Turing's first two machines

Before Turing used his machines to prove anything, he showed two of them working. Section 3 of the 1936 paper, "Examples of computing machines", gives their tables in full.1 They are small, but they are written differently from Turing Daily tables, and the second one already uses the tricks that the rest of the paper depends on. The paper itself is the subject of What Turing wrote in 1936.

Reading Turing's tables

Each line of a Turing table has four columns. The first is the m-configuration, his word for a state. The second is the scanned symbol, where "None" means a blank square. The third lists the operations, carried out in order: P0 prints 0, R and L move the head one square right or left, and E erases the scanned square. The last column is the m-configuration the machine goes to next.

One line is one cell of a Turing Daily table, with a difference in the third column. A Turing Daily cell always writes one symbol and moves once. A line of Turing's can print, move several times or do nothing at all, and a line with an empty symbol column applies to whatever is on the square.

Turing named his m-configurations with German Gothic letters. Below they are written as plain letters. The machine starts in b, on a blank tape.

Machine I: 0 1 0 1

The first machine computes the sequence 010101 and so on, with four m-configurations:

m-config.SymbolOperationsFinal m-config.
bNoneP0, Rc
cNoneRe
eNoneP1, Rf
fNoneRb

In b it prints 0 and moves right. In c it moves right again without printing, which leaves a blank square. In e it prints 1 and moves right, and in f it skips another square and goes back to b. The tape fills up as 0, blank, 1, blank, 0, blank, without end. Every line reads a blank, because the machine never comes back to a square it has already used.

The same machine can be drawn as a Turing Daily table. Turing's b, c, e and f become states 1 to 4, and his 0 and 1 become A and B. Only the blank row is filled in, and no cell leads to ✓.

This is machine I as a Turing Daily table, with Turing's 0 and 1 written as A and B. It has no ✓ and never stops.

Turing then pointed out that if a line may move more than once, one m-configuration is enough:

m-config.SymbolOperationsFinal m-config.
bNoneP0b
0R, R, P1b
1R, R, P0b

This version reads the figure it printed last and prints the other one two squares further on. Four m-configurations became one, and the work moved into the operations column. The first version remembers what to print next by being in the right m-configuration. This one reads it back off the tape. That is the same trade described in A state is the only memory.

Machine II: 001011011101111

The second machine is, in Turing's words, "a slightly more difficult example". Its sequence is 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0 and so on: between one 0 and the next, the block of 1s grows by one each time. A machine with a fixed number of m-configurations cannot remember how long the last block was once the blocks get long enough, so this machine has to look back at the tape to find out.

It uses four symbols: the figures 0 and 1, the letter x, and ə, an upside-down e. The figures go on every other square, which Turing called F-squares. On the squares between them, the E-squares, the machine only ever prints x, as a marker that it erases once it is done with it. These letters, he wrote, "serve to 'keep the place' for us". The tape begins with ə ə so that the machine can find its left end.

m-config.SymbolOperationsFinal m-config.
bPə, R, Pə, R, P0, R, R, P0, L, Lo
o1R, Px, L, L, Lo
0q
qAny (0 or 1)R, Rq
NoneP1, Lp
pxE, Rq
əRf
NoneL, Lp
fAnyR, Rf
NoneP0, L, Lo

Each m-configuration has one job:

  • b runs once. It prints ə ə 0, skips a square, prints a second 0 and steps back onto the first 0.
  • o walks left over the newest block of 1s and prints an x to the right of each one. When it reaches the 0 in front of the block, it changes to q.
  • q walks right along the F-squares to the first empty one, prints 1 there and changes to p.
  • p walks left along the E-squares looking for an x. If it finds one, it erases it and sends q off to print another 1. If it reaches ə instead, every x has been used up, and it changes to f.
  • f walks right to the end, prints 0, steps back onto the last 1 and changes to o, which starts the next round.

So q prints one 1 for each x, plus one more on its first trip, before p has erased anything. That is why each block has one more 1 than the block before it.

Here are the first twelve moves, which print 0 0 1 0. A move is one line of the table, however many operations the line has. A dot is a blank square, and the bold symbol is the one under the head after the move.

Movem-config.SymbolOperationsFinal m-config.Tape
1bNonePə, R, Pə, R, P0, R, R, P0, L, Loəə0·0
2o0qəə0·0
3q0R, Rqəə0·0
4q0R, Rqəə0·0··
5qNoneP1, Lpəə0·0·1
6pNoneL, Lpəə0·0·1
7pNoneL, Lpəə0·0·1
8pəRfəə0·0·1
9f0R, Rfəə0·0·1
10f0R, Rfəə0·0·1
11f1R, Rfəə0·0·1··
12fNoneP0, L, Loəə0·0·1·0

Move 2 uses the line with an empty operations column: o reading 0 does nothing except change to q. The first round has no 1s to copy, so no x appears. The second round starts at move 13, when o marks the only 1 on the tape:

Movem-config.SymbolOperationsFinal m-config.Tape
13o1R, Px, L, L, Loəə0·0·1x0
14o0qəə0·0·1x0
15q0R, Rqəə0·0·1x0
16q1R, Rqəə0·0·1x0
17q0R, Rqəə0·0·1x0··
18qNoneP1, Lpəə0·0·1x0·1
19pNoneL, Lpəə0·0·1x0·1
20pxE, Rqəə0·0·1·0·1
21q0R, Rqəə0·0·1·0·1
22q1R, Rqəə0·0·1·0·1··
23qNoneP1, Lpəə0·0·1·0·1·1

After move 23, p walks left all the way to ə without finding another x, and f prints the next 0 at move 36. Each round takes longer than the last, because the machine crosses the tape twice for every 1 it prints. This table shows the tape at the end of each round, just after f prints a 0:

RoundMoveTape
112əə0·0·1·0
236əə0·0·1·0·1·1·0
379əə0·0·1·0·1·1·0·1·1·1·0
4147əə0·0·1·0·1·1·0·1·1·1·0·1·1·1·1·0
5246əə0·0·1·0·1·1·0·1·1·1·0·1·1·1·1·0·1·1·1·1·1·0

What the examples show

Machine II already works the way the rest of the paper does. Figures go on F-squares and are never erased. Rough working goes on E-squares as letters that mark a place and are rubbed out later, and a symbol at the left end lets the head find its way back. The universal machine in section 6 is built from the same pieces, at much greater length, as it marks, copies and compares descriptions of other machines.

Neither machine ever stops, and Turing meant it that way: a machine that computes a sequence should go on printing it forever. A Turing Daily puzzle asks for the opposite, a machine that stops on ✓.

Sources

  1. A. M. Turing, On Computable Numbers, with an Application to the Entscheidungsproblem, Proceedings of the London Mathematical Society s2-42 (1936), 230–265.