sridhav / dfsm Goto Github PK
View Code? Open in Web Editor NEWDeterministic Finite State Machine - Checking for a valid Sequence and Pattern
Deterministic Finite State Machine - Checking for a valid Sequence and Pattern
//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)] */
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.