
Originally Posted by
mrproper
You just move one of the tapes to the start symbol and try one more left (backward) movement after that. The difference between the positions of the two heads will be now odd number.
This is one possible way.
More generally, the machine may have to remember (in its state) character(s) it read during previous step(s). I.e., there have to be several copies of one state, one per character read during one of the previous steps.
Here is a possible execution trace. There is a loop during which the machine reads two characters and writes four characters; then it starts the next iteration of the loop.
Code:
(1) |ABC (2) A|BC (3) |ABC (4) A|BC (5) AB|C
| A| AA| A AB| AA BB| I write step numbers in parentheses. What follows is the description of the machine before the corresponding step. The top line shows the input tape and the bottom line shows the work tape. I write "|" before the character that is observed by the head. Since "|" is not an actual character on the tape, ignore the spaces between characters; they are for alignment only.
During step 1 the machine reads A and writes A on the work tape. It also remembers A in a state. Both heads move right. During step 2 the machine writes the character it remembered ("A") and not the one observed on the input tape. It also remembers the character it observes ("B"). The input head moves left and the work head moves right. During steps (3) and (4) the machine writes the latest remembered character ("B"); both heads move right.