JasTeX → Turing Machine → Simulation

Under my guidance, B.J. Dweck created a nifty little program that lets you do all the following in a unified Java application:

  1. Draw a TM state diagram using JasTeX: a Java based graph/automata drawing and GasTeX LaTeX source code generator.
  2. Generate GasTeX LaTeX source code so you can print out your Turing Machine inside a LaTeX document.
  3. Get the 7-tuple description for the Turing Machine (except for some ambiguity involving the input versus tape alphabet)
  4. Automatically translate the TM into usable instructions for a Suzanne Skinner Turing Machine applet, and have the applet simulate the Turing Machine inside the program.
Here are some screenshots of the four functionalities for a Turing Machine Simulator for the language { anbncn | n > 0 }:
  1. Draw the Turing Machine (press the "Drawing" tab):
  2. Generate GasTeX source for use with LaTeX documents (press the "Latex Code" tab):
  3. Get the 7-tuple (press the "Turing Machine Description" tab):
  4. Translate into a Suzanne Skinner Turing Machine (press the "Turing Machine Applet" tab).
    1. Now you should slide the "initial tape" slider all the way to the left so input is read at the beginning, press "Install Program" to have the generated instructions registered, and enter a test string into the "Initial characters on" text-field (in our example I used the string aaaaabbbbbcccccc = a5b5c6 ).
    2. Choose your simulation speed (I recommend "Fast"), press "Start" and see how the computation proceeds on the tape. In our case, the computation "REJECTED" as the message "No applicable transition found" indicates that the TM either crashed or halted in a non-accept state.
    3. Repeating instead with the string a5b5c5 we "ACCEPT" as indicated by the message "Machine halted: Halt state reached".

I use the program in my Computer Science Theory course to help illustrate Turing Machines, and also to help me draw Turing Machines and other automata for printing up in LaTeX documents such as handouts and exams.

If you would like to try out the program you will need to have Java on your system. Then:

  1. download the Turing Machine Application jar file into the directory that you'll want to run it from (right click and save directly to your hard drive)
  2. follow the usage instructions
  3. try out the following example Turing Machine instances. You load them into the application by downloading and then chooosing File→Open→filename from the application.
    1. { anbncn | n > 0 }. This is the example pictured above.
    2. { 0n1m | m is a positive multiple of n }
    3. { bitstrings x with n0(x) = 5n1(x) } (i.e. five times as many 0's as 1's) - by Zeyar Htet
    4. converts binary numbers to unary

Last modified: Sun Nov 14 16:43:14 2004