Giter VIP home page Giter VIP logo

dfsm's Introduction

//README
/**
	Sridhar Vemula
	Formal Language Theory
*/

/**
	NOTE: Most of the description is given inside the program 
	      under comments for a better understanding. 
		  The brief gist for the program is provided below
    COMPILE : 1. javac DFSM.java
			  2. javac pattern.java
    USAGE : 1. java DFSM <input-file> <string to be accepted>
		    2. java pattern <output-file> <pattern>
	ERROR HANDLING : Appropriate Error Handling is done.
*/

/**
Problem 1 :
1. Values are taken from the File and loaded to the specific arrays 
   
2.  Each Character in the input string is checked for the transition from the 
	current state. If there is a transition for the current input character  
	the current state is changed to corresponding transition state .

3.  If the current state is in the final state then it returns true
	else it returns false  
*/


/**
Problem 2:
1. Takes 256 characters for every row(state) but most of them are wasted only the valid 
   input variables are considered i.e., the unique variables 
   obtained from the the above getUnique function
2. First fill the first row values all the values are zero except the first character in pattern
   it changes to the next state
3. For every other rows from index j= 1 to j<=pattern.length().
		1. Copy the entries from row at index equal to lastposition.
		2. Update the entry for transitions[j][pattern.charAt(j)] character to j+1.
		3. Update lastPosition = transitions[lastPosition][pattern.charAt(j)]
*/

dfsm's People

Contributors

sridhav avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.