2020 January 31,
Carleton College, Joshua R. Davis
A. Problem 2.26.
The remaining problems require you to describe Turing machines. Sometimes students are confused about how much detail to show. So let's be explicit about three possible levels of detail:
Here's an example at detail level 2. To understand it, I recommend that you execute it by hand on an example input such as 001001.
Let A = {w w : w is a string in {0, 1}*}. Our decider for A will use an enlarged tape alphabet: In addition to the usual 0, 1, blank, and turnstiles, we will have four symbols 0L, 1L, 0R, 1R. In this way, we can "mark" a 0 or 1 on the tape with an L or R. Now here's the decider.
- Wrap the input in turnstiles.
- Scan the entire tape left-to-right, marking the first unmarked 0 or 1 with an L.
- Scan the entire tape right-to-left, marking the first unmarked 0 or 1 with an R.
- Repeat steps 2 and 3 until the left half of the input is marked L and the right half of the input is marked R. During this time, you can also reject if the length of the input is odd.
- Scan the entire tape left-to-right, blanking the first L-symbol and the first R-symbol if they agree (0L and 0R or 1L and 1R), or rejecting if they disagree.
- Repeat step 5 until all input symbols are blanked. If all goes well, then accept. If any error happens, reject.
B. Draw the {w w : w is a string in {0, 1}*} algorithm just described at detail level 1.
C. Do Exercise 3.8b at detail level 2.