home *** CD-ROM | disk | FTP | other *** search
- Turing Machine Simulator 1.0
-
- This program simulates a single-tape turing machine. It is
- based on the discussions in the book "The Emperor's New Mind."
-
- Programs for this machine consist of an ASCII text file in
- the following format:
-
- <state#>,<symbol to read>-><next state>,<symbol to write>,<COMMAND>
-
- where symbol is one of '0' or '1', and command is:
-
- 'R' : move one step right
- 'L' : move one step left
- 'S' : stop
-
- Lines that begin with '#' are ignored.
-
- For example:
-
- 2,0->3,1,R
-
- -means that if the machine is in state #2, then if the symbol under the
- read/write head is a '0', write a '1', move the read/write head one space
- to the right, and goto state number 3.
-
- Conventions:
- 1) The machine starts execution in state 0.
- 2) The 'answer' lies to the left of the read/write head once execution
- stops.
-
- The program will prompt you for the initial position to place data on
- the tape (the rest of the tape will be all '0'. Since the tape is 1000
- spaces long, 500 is a good choice. It will then prompt for a string of
- '0's and '1's to enter at that position. The final prompt is for the
- initial location of the read/write head on the tape.
-
- Kevin Dahlhausen
- ap096@po.cwru.edu