MIT 18.404 — Lecture 6
TM Variants, Church-Turing Thesis
Grades for PSET 1 have been released on Gradescope. We have a quiz next Tuesday (October 6th) from 7:30 PM to 9:00 PM in Walker; sample questions will be posted on the course website.
§ Turing Machines (Recap) & The Church-Turing Thesis
Recall the definition of a Turing machine from Lecture 5. Importantly, for any word , a Turing machine can either:
ACCEPT (enter ) REJECT BY HALTING (enter ) REJECT BY LOOPING (never halt)
The Turing machine will be our model for a general-purpose computer.
Question. Why is a one-tape TM our choice of model? Why not anything else?
(Recall that a PDA with two stacks is strictly more powerful than a PDA with just one stack.)
Answer: As we'll eventually show in this course, it turns out that a one-tape TM is equally as powerful as, say, Python or Java, because one can compile code in any one of these “languages” into any other. In fact…
Theorem. (The Church-Turing Thesis) Any function computable by an “algorithm” is computable by a Turing machine.
(The Church-Turing thesis is more of a heuristic than a theorem.)
Definition. Also recall from Lecture 5 the following properties of languages and TMs.
A Turing machine is a decider if it halts on every input.
A language is Turing-recognizable if for some Turing machine .
A language is decidable if for some decider .
§ Multi-Tape Turing Machines
Definition. We say that a multitape Turing machine is a TM with multiple tapes, naturally.

In particular, the transition function of a multitape Turing machine with tapes has type .
Theorem. (Multitape = Single Tape) A language is Turing-recognizable if and only if for some multitape TM .
Proof: The direction is obvious. For the direction, a one-tape TM can simulate a multitape TM like so.

The idea is to simply store the concatenation of all tapes in a single tape.
Separate each of the tapes with a symbol.
If one of the tapes writes in a blank space—thereby “extending its length”—then we simply shift everything to the right.
Keep track of the head position on each of the tapes by writing if the head is pointing to .
Details omitted, but they're not hard to implement.
Remark. It follows that “a PDA with 100 stacks plus a tape” is equally as powerful as “an FA plus a tape”.
§ Nondeterministic Turing Machines
Definition. We say that a nondeterministic Turing machine (NTM) is a TM that's nondeterministic, naturally. The transition function has type .
Theorem. (NTM = TM) A language is Turing-recognizable if and only if for some NTM .
Proof: The direction is obvious.
For the direction, the idea is for a one-tape TM to BFS through the tree of computation paths of .

In the single tape of , we simply store the state of all threads of , moving down one layer at a time.

As before, threads are separated with , and tape heads are indicated by the in . Furthermore, each block begins with a cell that stores the FA state that the thread lands at (e.g., , , or , as shown above).
So the TM should BFS through all threads layer-by-layer and return if any thread returns . (Details omitted.)
§ Enumerators (Turing Machines with Printers)
Definition. We say that an enumerator is a Turing machine that takes no inputs and prints outputs. Specifically,
Its workspace tape is initially completely empty.
At any point, can move to a state and print the contents of the workspace.
We let denote the set of strings that eventually prints.
Theorem. (Enumerator = TM) A language is Turing-recognizable if and only if for some enumerator .
Proof: We first consider the direction: given any for which , we construct a TM for which .
Solution: On input , simply simulate on a blank tape. During the simulation, check everything it prints for whether it matches . If there's ever a match, return .
Now for the direction: given any for which , we construct an enumerator that prints out .
Solution: The rough idea is brute force: for each , simulate on , and print if accepts. There are two issues:
If we try to simulate one at a time, then we might fail if a simulation of on loops.
If we try to simulate one layer at a time, then we'll never get past the first layer because is infinite.
(In a rough sense, the former is DFS, and the latter is BFS—but this time, they both fail.)
The fix is similar to how we prove ; do a “zig-zag” across both and layers, like so.
More formally, in the step, run up to the layer, and do this for all .
This completes the proof of both directions. (Again, many details omitted.)
