The tm program simulates deterministic Turing machines. It performs absolutely no error checking and provides absolutely no help whatsoever. You might need to change the line at the top of the tm program from #!/usr/local/bin/perl to #!/usr/bin/perl. The tm program can be invoked by: ./tm tmfile input where tmfile is a file that specifies the Turing machine and input is the input to the Turing machine. For example, here is the file mab: q0 c q0 c R q0 a q1 c R q0 b q2 c R q0 _ accept _ L q1 a q1 a R q1 b q3 c L q1 c q1 c R q2 a q3 c L q2 b q2 b R q2 c q2 c R q3 a q3 a L q3 b q3 b L q3 c q3 c L q3 _ q0 _ R Each line specifies a transition of the Turing machine, e.g., the first line "q0 c q0 c R" specifies that if the Turing machine is in state q0 and is currently reading a c, then it stays in state q0, writes a c, and moves one square to the right. The second line "q0 a q1 c R" specifies that if the Turing machine is in state q0 and is currently reading an a, then it goes to state q1, writes a c, and moves one square to the right. The initial state is assumed to be q0. The _ character is used to denote a blank. Here is what should happen when you invoke "./tm mab ba": q0 | __ba__ q2 | __ca__ q3 | __cc__ q3 | __cc__ q0 | __cc__ q0 | __cc__ q0 | __cc__ accept | __cc__ Each group of 3 lines displays a configuration of the Turing machine, with the state on the first line. The second line indicates the current position of the read-write head. The third line displays the current string on the tape. Blanks are displayed as underscores. You need to enter a return for each configuration. There are three example Turing machines in the tarfile. mab: Input alphabet is {a,b}. This Turing machine will end up in state accept if the number of a's equals the number of b's. m2x: Input alphabet is {1}. This Turing machine will double the number of 1's in the input, ending up in state qf. mincr: Input alphabet is {0,1}. This Turing machine will increment the binary number, ending up in state qf. Tom Bylander bylander@cs.utsa.edu