An automata can be implemented in 2 ways.
1. Linked List representation
2. Matrix representation
I implemented a program in JAVA to model an automata(deterministic) in a Matrix structure and represent it graphically as shown to the left. The graphical representation was done by using the Graphviz JAVA api.
Eg. The Automata shown can be represented in matrix form as
I have uploaded the code at github, you can download it here
STEPS TO RUN
1. First compile the source files
$ javac FiniteStateMachine.java
$ javac GraphViz.java
2. If both compile successfully, run
$ java FiniteStateMachine –filename <input_file>
3. By default, if you have evince reader, the gif file should pop up instantly, else edit the code and remove the System command being executed.
4. For more help run
$ java FiniteStateMachine –help