Universal Turing Machines, Part 8: Lost in Transition

First: Last weekend I met with a friend and we reviewed this UTM subroutine by subroutine, finding a few errata, which have been fixed.

Finally, we’ve reached the end. The last step of simulation is to find and mark the state with has been copied into the register.
This procedure resembles the find symbol subroutine.

  1. Move Right until we find an unmarked Q and mark it with a Q.
  2. Move Left and step over the B symbol.
  3. Keep moving Left and mark all the 0‘s and 1‘s.
  4. If we hit the B that means all bits have been verified and we can exit the loop; Else, we pick up and unmark the least significant 0 or 1.
  5. Move Right until we hit the state we are trying to verify. (it’ll be designated by a Q)
    • If the least significant unmarked bit corresponds to the bit we just picked up, then mark it off and return to pick up the next bit.
    • If it doesn’t match, then move back erasing marked bits, until we hit the state marker, Q, and unmark it, stepping to the Right so that we’ll pick up the next state in the next iteration of the loop.


\xymatrix @!=3pc {
&&*++[][]{} \ar[d]
\\
&&*++[o][F-]{Q_0} \ar@(ur,dr)^{R}
            \ar[d]^{Q \rightarrow \overline{Q},L}
\\
&&*++[o][F-]{Q_1} \ar@(ur,dr)^{L}
            \ar[d]^{B \rightarrow B,L}
\\
&&*++[o][F-]{Q_2} \ar@(ur,dr)^{ {\scriptstyle 0 \rightarrow \overline{0},L}
                                \atop
                               {\scriptstyle 1 \rightarrow \overline{1},L}}
                \ar@(ul,dl)_{L}
                \ar[d]^{q \rightarrow q,R}
\\
&&*++[o][F-]{Q_3} \ar@(ul,dl)_{R}
                \ar[rr]^{B \rightarrow B,R}
                \ar[dr]^{\overline{1} \rightarrow 1,R}
                \ar[dl]_{\overline{0} \rightarrow 0,R}
& &\\
&*++[o][F-]{Q_4} \ar@(ul,dl)_{R}
                \ar[d]_{\overline{Q} \rightarrow \overline{Q},R}
&*++[o][F-]{Q_9} \ar@(dr,ur)_{L}
                 \ar[u]^(.3){q \rightarrow q,R}
&*++[o][F]{Q_5} \ar@(ur,dr)^{R}
                \ar[d]^{\overline{Q} \rightarrow \overline{Q},R}
\\
&*++[o][F-]{Q_6} \ar@(ul,dl)_{R}
                 \ar[r]^{0 \rightarrow \overline{0},R}
                 \ar[dr]_{1 \rightarrow 1,L}
&*++[o][F-]{Q_8} \ar[u]_{ B \rightarrow B,L}
                 \ar@(dl,dr)_{L}
&*++[o][F-]{Q_7} \ar@(ur,dr)^{R}
                 \ar[l]_{ 1 \rightarrow \overline{1},R}
                 \ar[dl]^{0 \rightarrow 0,L}
\\
&&*++[o][F-]{Q_{10}} \ar@(ur,dr)^{ {\scriptstyle \overline{0} \rightarrow 0,L}
                                \atop
                               {\scriptstyle \overline{1} \rightarrow 1,L}}
                  \ar `l[ll]^{\overline{Q} \rightarrow Q,R} `u[uuuuuu] [uuuuuu]
\\
}