27.04.2015 Views

Computability and Logic

Computability and Logic

Computability and Logic

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.2. SIMULATING ABACUS MACHINES BY TURING MACHINES 53<br />

Figure 5-8. Correspondence between boxes <strong>and</strong> tape.<br />

R 4 in the figure). The 1 is m<strong>and</strong>atory if there are any strokes further to the right on the<br />

tape, <strong>and</strong> is m<strong>and</strong>atory initially for empty argument boxes. The blank is m<strong>and</strong>atory<br />

initially for R r+1 , R r+2 , .... Then at any stage of the computation we can be sure<br />

that when in moving to the right or left we encounter two successive blanks, there<br />

are no further strokes to be found anywhere to the right or left (as the case may be)<br />

on the tape. The exact portion of the tape that represents a box will wax <strong>and</strong> wane with<br />

the contents of that box as the execution of the program progresses, <strong>and</strong> will shift to<br />

the right or left on the tape as stones are added to or removed from lower-numbered<br />

boxes.<br />

The first step in our method for converting abacus flow charts into equivalent<br />

Turing-machine flow charts can now be specified: replace each s+ node (consisting<br />

of a node marked s+ <strong>and</strong> the arrow leading from it) by a copy of the s+ flow chart<br />

shown in Figure 5-9.<br />

Figure 5-9. The s+ flow chart.<br />

The first 2(s − 1) nodes of the s+ chart simply take the Turing machine across the<br />

first s − 1 blocks of strokes. In the course of seeking the sth block, the machine substitutes<br />

the 1-representation for the B-representation of any empty boxes encountered<br />

along the way.<br />

When it enters the node sa, the Turing machine has arrived at the sth block. Then<br />

again substitutes the 1-representation for the B-representation of that box, if that box<br />

is empty. On leaving node sb, the machine writes a stroke, moves 1 square right, <strong>and</strong><br />

does one thing or another (node x) depending on whether it is then scanning a blank<br />

or a stroke.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!