Labs

Lab 8.1: Welcome to ITM

ITM Help

The first thing to notice about ITM is that it represents all of the components of a Turing Machine (TM). The "Current 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 scrollable field contains rules, one per line, of the TM being simulated. There are also display fields for the "Start State" of the current machine, the "Current State" of the machine, and the "Rule Used" to make the previous move. The panel at the bottom of the program window provides one set of buttons for the basic control of the machine, (you can step through a TM or play it through to completion, as well as stop it and reset it), and another to allow you to clear, import (read in) and export (write out) the descriptions.

We have provided you with a data file that contains descriptions of six Turing machines, named "TM1", "TM2", ..."TM6". Click on this link to open the data file. As you can see, each TM is described in two parts. First, we provide a string to be used as the initial value of the machine tape. To set the tape "copy" the value following the line that says "//USE THE LINE BELOW TO SET THE TAPE" and "paste" it in into the "Input Tape" field on the simulator. Then, click the "Set Tape" button, and you will see the "Start Tape" field has been loaded with this tape data.

To load a set of rules into the simulator first click the "Import" button on the simulator. A text area will appear into which you can "paste" the rules from our data file. Copy the lines following: ("//USE THE LINES BELOW TO IMPRT RULES" until you see a blank line). After pasting the rules for a TM into the import box, click "OK" and the rules will appear in the simulator's rule area.

  1. Load the simulator now with the data for "TM1".

  2. Run TM1 to completion by clicking on the "PLAY" button. Compare the "Original Tape" to the "Current Tape." Do you see a pattern?

  3. Click the "RESET" button to reset the simulator, and run TM1 to completion again, this time by stepping through the rules one at a time.
You may have enjoyed watching TM1 do its thing, but unless you know something about how TM1 was defined, the relation between the original and final tapes may be a mystery. For the first few TMs that you'll deal with, we'll provide you with this information.

The start state of TM1 as you saw, was 1. Its alphabet is the set of symbols 0, 1, q, and b (which we use to stand for blank). The required format for the input tape is any combination of zeros and one, followed by a single q, followed by a series of b's of equal (or greater) length to the leading 0's and 1's. The result? TM1 makes a copy of the zero-and-one portion of its tape at another location on the tape. While this may seem a trivial use of a TM, think of the utility of this operation to modern computers!

  1. Now load the data for "TM2" into the simulator.

  2. Run TM2 to completion using the "PLAY" button.

    Compare the final version of the tape with the original tape. Do you see a pattern here?

If you do, you're pretty good! In order to understand the processing accomplished by TM2 you need to know more than its alphabet, start state, and tape format. You need to know that the original tape is intended (by it authors) to represent the integer 3. That is, TM2 uses strings of ones to represent positive integers. On input 111b it produces tape 1111; on input 1111b it produces 11111; ... now do you see the pattern? TM2 adds one to a positive integer.

Labs

MODULES:


Home Resources Objectives Feedback Order Form Credits

Copyright Notice
© 2003 PWS Publishing Company, All Rights Reserved.