Combining and Changing
The reader, if he or she hasn't already, should read the tutorial about creating a finite automaton. It covers the basics of constructing an automaton and describes how one is implemented in JFLAP. This section specifically describes how one may combine two separate automata into one automaton using the “Convert → Combine Automata” menu option. Note that although the examples shown here are finite automata, this menu tool is also available for other types of automata, such as Mealy machines, Moore machines, pushdown automata, and Turing machines, both single-tape and multi-tape. Also note that one can only combine alike automaton types. One cannot, for example, combine a finite automaton and a Turing machine.
To get started, open JFLAP. Then, either load the files combine1.jff and combine2.jff, which represent the languages a*b and a(ba)* respectively, or construct them in two separate JFLAP windows. Do not run JFLAP twice to do this, as you will not be able to combine the automata if you generate the screens through separate instances of the JFLAP program. Instead, once one automaton is up, either load the file of the other automaton or generate a new window using the “File → New” option. When finished, you should have two screens which resemble the screens below:
Now, in one of the windows, click on the “Convert → Combine Automata” menu option. You will be asked to which other open automaton you wish to combine with. Select the opposite automaton from the menu bar, if the opposite is not the default (if only those two automata are open, it should be both the default and the only option in the menu. Click OK, and the two automata should be on the same screen together in a new window, resembling the screen shown below. Note that while the final states are still valid for both, the only start state is from the automaton from whose screen you selected the menu option.
One can now combine and manipulate the two automata as you see fit. For example, in order to demonstrate the language (a*b)+(a(ba)*), one can add another state, set it to be the start state, and create transitions from it to “q0” and “q2'. This example is shown below, and can be loaded combine3.jff.
This concludes our brief tutorial on combining automata. Thanks for reading!