Turing Machines


This activity is based on a lab found in Chapter 8 in The Analytical Engine written by Decker and Hirschfield. It has been adapted and written by us to help you explore the ideas of Turing Machines.

The first thing to notice about our Turing Machine Simulator is that it represents all of the components of a Turing Machine (TM). The "Tape" is displayed horizontally near the top of the program window, with an arrow beneath it indicating the current position of the scanning head. The large table contains rules, one per row, of the TM being simulated. There are also display fields for the "Current State" of the machine and the "Rule Used" to make the previous move. The panel at the right of the display fields provides a set of buttons for the basic control of the machine: you can Step through a TM or Run it through to completion, as well as Reset it.

Gaining Familiarity with Turing Machines

Run through each of the first two Turing Machines given by clicking on the Run button. Compare the "Original Tape" to the "Ending Tape". Do you see a pattern here? Click the "Restart" button to reset the simulator, and run the Turing Machine to completion again, this time using the Step button to step through the rules one at a time. You do not need to turn anything in for Machines #1 and #2.

Understanding Turing Machines

Run through the two Turing Machines given below by clicking on the Run button. Compare the "Original Tape" to the "Ending Tape". Do you see a pattern here? Once you've formed a hypothesis about what the Turing Machine is doing (or if you can't decide what the TM is doing), restart the TM and change the tape input. Test the TM on your new input. Keep experimenting with different valid input strings until you see a pattern. (A useful shortcut: You can use the tab key to move from one tape cell to the next.)

For each of the Turing Machines below, write down on a piece of paper a short description of the overall behavior of the machine. For example, the behavior for Turing Machine #2 above might be "Adds 1 to a unary number." Some of the machines below also use unary numbers.


Copyright 1997, 2003, 2023 Alyce Brady and Kelly Schultz, Kalamazoo College