The Turing Machine Simulator IDE (Integrated Development Environment) displays four windows:
The Turing Machine Simulator was written in Borland's Turbo Pascal for DOS (v6.0) to run under MS-DOS. I've also run it under Windows 3.1, Windows 95 and WindowsNT. The Turing Machine Simulator is provides "as is".
To down load a WinZip file containing the Emulator program plus some documentation (txt & pdf), Click Here.
Alternately you can find a short cut to the Turing Machine Emulator program at
Q:\Computer Science\Icons\Turing
current state current tape symbol next symbol (written to tape) next state head movement (Left, Right, or Stay)A quintuple causes a transition if the Turing Machine's current state and current tape symbol under the R/W head match the first two components of a quintuple. When a match occurs, the next symbol is written to the tape overwriting the current tape symbol, the next state becomes the new current state, and the R/W head moves left, right or stays in place depending on the value of the fifth component of the quintuple.
Example: The quintuple (A,1,x,B,R) will cause a transition if the current state is A and the current tape symbol under the R/W head is 1. It will overwrite the 1 with an "x", go to state B, and move the R/W head one position to the Right.
States are restricted to letters and digits and may be one or two characters long. States are case-sensitive.
A tape symbols can be any single character EXCEPT a comma and are case-sensitive. However, since the Turing Machine window displays a blank as a dot (making the tape easier to view) avoid using periods as tape symbols since you cannot distinguish periods from blanks. Blanks and periods are different tape symbols but are displayed the same.
Head movement symbols are R (or r) for Right, L (or l) for Left) and S (or s) for Stay. For clarity you should avoid using them as State or Tape symbols.
Avoid using the "?" as a tape or state symbol since it's used to indicate a quintuple whose current state/tape symbol was not found and the initial undefined machine state.
Quintuples must have the correct format (five fields separated by commas and enclosed in parentheses). If the syntax of a quintuple is incorrect, it will be ignored. This Turing Machine Simulator is deterministic so no two quintuples should have the same values for current state/current tape symbol. (The second will overwrite the first.)
Characters to the right of the closing parenthesis of a quintuple are ignored so comments may be "attached" to quintuples. See example.
Turing Machine configurations (current state/current tape symbol) which do not match the first two components of any quintuple will halt the machine. I use the convention that any state which does NOT appear as the first component of a quintuple (therefore halting the machine) is an Accept State.
The range of tape positions runs from -1000 to +1000. If the Turing Machine attempts to go beyond this range, a "tape error" will occur.
Hitting [F1] will display a Help Screen. Hitting (Esc) will interrupt a running Turing Machine program and generally exit any selected option thereby returning you to the Main Menu
- Palindrome Detector for strings of 0's and 1's - A is Start State; Z is Accept State (A,1, ,B,R) - detect 1 - store as state B (A,0, ,C,R) - detect 0 - store as state C (A, , ,Z,R) - empty string - done! (even number) (B,0,0,B,R) - go right (B,1,1,B,R) (B, , ,D,L) - end of string detected - go back (C,0,0,C,R) - go right (C,1,1,C,R) (C, , ,E,L) - end of string detected - go back (D,1, ,F,L) - found 1, cancel it, & go back (D, , ,Z,L) - or found blank - done! (odd number) (E,0, ,F,L) - found 0, cancel it & go back (E, , ,Z,L) - or found blank - done! (odd number) (F,0,0,F,L) - go back (F,1,1,F,L) (F, , ,A,R) - beginning of string detectedState Z is the Accept State since no quintuple begins with Z.