Classwork 11 (10 pts)
April 16, 2007
For group work, please turn in one sheet of paper with all the names of those who participated in your group.
We will use JFLAP to solve these problems. See below for info on JFLAP and how to get a zip file of these problems.
Turing machines are the heart of computer science. Alan Turing invented the Turing machine in 1936 (24 years old). He defined it in on paper and showed how to use it to solve problems. There were no computers for years still. Turing machines are similar to finite automaton in that there is an initial (or start) state (an arrow into it), and one or more states can be final states (indicated by two circles). With finite automata, the input is scanned just once and a decision is made whether or not to accept. However, Turing machines can write to the tape and also move over the input many times, using directions ((L)eft, (R)ight or (S)tay put). Thus, transitions are different to represent this additional information. A transition is labeled with three items. The first item is the character in the input processed (this is the same as for the finite automata). The second item is the character to write to the tape (to replace the first item). The third item is the direction to move (L, R or S). If the first or second item is left blank, that is the same as reading or writing a blank symbol. Turing machines are also different in that they can compute values, have an input and a corresponding output. For example, consider the Turing machine shown below that takes as input a string of a's and b's and outputs the same string with each "aa" replaced by "ab". Note that "aaa" would be replaced by "aba", "aaaa" would be replaced with "abab". |
|
Draw a picture of it to turn in.
Here is a picture of this Turing machine.
Determine why this Turing machine does not work and fix it so it works correctly.
What is the output of this Turing machine for the strings: 1, 11, 111, 1111, 11111 (put the input string on tape 1 to start, leave tape 2 blank, the output will be on tape 2.). Give a description of what it computes.
Here is a picture of this Turing machine.
The Turing machines above are all here in a zip file called jflapturingmachines.zip
To test it on input strings. First select "Input", then "Step" to trace through one string. To see the output for several inputs, select "Multiple Run (Transducer)."