The Timpson Lyceum · Computation Theory
Lecture 13 (Computation Theory) Turing Machine Variants
Overview
This lecture explores whether a standard Turing machine can be made fundamentally more powerful by extending its definition, and concludes that it cannot. After recapping the seven-tuple definition of a Turing machine and the difference between recognizable and decidable languages, we examine four "variants" — the stay option, the two-way-infinite tape, the multi-tape machine, and the nondeterministic machine — and show each can be simulated by an ordinary single-tape Turing machine, so none recognizes any new language. We also meet the enumerator, a Turing machine that generates strings rather than recognizing them, and prove it characterizes exactly the recognizable languages. The recurring theme is robustness: the class of Turing-recognizable languages is stable under all of these natural modifications.
Key Concepts
Turing machine (the seven-tuple). A Turing machine is , where:
- — finite set of states.
- — input alphabet; the blank symbol is not allowed in .
- — tape alphabet; must contain , and .
- — transition function: given a state and the scanned symbol, it gives the next state, the symbol to write, and a move left or right.
- — start state; , — the single accept and reject states. Entering either halts the machine immediately.
The tape begins populated with the input string followed by infinitely many blanks. Unlike a finite automaton or PDA — whose head only moves right — the Turing head moves either direction. By convention the reject state and its many transitions are left undrawn: any transition not shown is understood to go to .
Recognizable vs. decidable.
- A language is Turing-recognizable if some Turing machine accepts every string in the language. On a string not in the language it may reject or loop forever — there is no guarantee it halts.
- A language is Turing-decidable if some Turing machine accepts every string in the language and rejects every string not in the language — it always halts.
- The gap is the halting problem in miniature: when a machine runs a long time you cannot tell whether it is in an infinite loop or merely slow. (Intuition: a machine listing recognizes the integers — it accepts any integer eventually — but never rejects a non-integer like , so it recognizes without deciding.)
The hierarchy nests: regular languages (finite automata) context-free languages (pushdown automata) decidable recognizable. Outside the recognizable class, computation no longer applies — every physical computer is at best a Turing machine.
Variant 1 — the stay option. Allow to output , where leaves the head in place. No extra power: simulate each by a right move immediately followed by a left move.
Variant 2 — two-way-infinite tape. A tape infinite in both directions adds no power. Mark the original center with a special symbol \text{\}\text{$}$ toggles which half you are on; on one half each logical move is two physical cells in one direction, and on the other half it is two physical cells in the opposite direction.
Variant 3 — multi-tape machine. A -tape machine has : it reads all heads, writes all cells, and moves all heads at once. The input starts on tape 1; the other tapes start blank (an arbitrary convention — a machine can copy the input onto the others if desired). No extra power: simulate on one tape by storing the contents of all tapes separated by a delimiter , marking each tape's head position with a dotted version of the symbol (extend with for each ). To simulate one step, scan once to read every dotted symbol, apply , then scan again to rewrite. When a tape needs more room, shift everything from that point one cell right and insert a dotted blank.
Corollary. A language is Turing-recognizable iff some multi-tape Turing machine recognizes it. () every single-tape machine is a 1-tape multi-tape machine; () the simulation above.
Variant 4 — nondeterministic machine. Here offers a set of choices per step, branching the computation into a tree of configurations. A configuration writes the current state just before the scanned symbol, e.g. . The machine accepts if any branch reaches an accepting configuration. No extra power: simulate with a 3-tape machine — tape 1 holds the untouched input, tape 2 is the simulation tape, tape 3 is an address tape encoding which choice to take at each step. Iterating addresses in increasing length performs a breadth-first search of the tree; a depth-first search would risk diving down one infinite branch and missing an accepting node elsewhere. (Contrast with PDAs, where nondeterminism is strictly more powerful — not so for Turing machines.)
Enumerator. An enumerator is a deterministic Turing machine with a printer. It takes no input (starts on a blank tape); whenever it enters a special print state it outputs whatever is currently left of the head. Turned on, it simply runs and prints a (possibly infinite) list of strings . It is a generator, not a recognizer — analogous to a regular expression or grammar producing strings rather than a finite automaton answering yes/no. Determinism vs. nondeterminism does not matter here.
Theorem. A language is Turing-recognizable iff some enumerator enumerates it.
Worked Example
We prove the recognizable enumerable theorem in both directions.
() Enumerator recognizer. Let be the language enumerated by . Build a Turing machine that recognizes :
If , then eventually prints it and accepts; if , may run forever — exactly recognizability (not decidability).
() Recognizer enumerator. Let be recognized by Turing machine over alphabet , and let be all strings of in lexicographic order (by length, then alphabetically — e.g. for : ). The trick is dovetailing: never run on one string until it halts, since it might loop. Instead:
Every string accepts is accepted within some finite number of steps, so it is eventually printed (and may be reprinted on later rounds — harmless). Thus enumerates exactly .
Summary
- A Turing machine is the seven-tuple ; the tape starts with the input then infinite blanks, the head moves both ways, and the reject state is left implicit.
- Recognizable = accepts all strings in the language (may loop on others); decidable = additionally rejects all strings not in it (always halts).
- The stay option, two-way-infinite tape, tapes, and nondeterminism are all simulable by an ordinary single-tape Turing machine — they add convenience, never new recognizing power. This robustness is evidence for the Church–Turing thesis.
- Key simulation tricks: = right-then-left; interleave a two-way tape; store multiple tapes with delimiters and dotted heads; breadth-first search the nondeterministic configuration tree via an address tape.
- An enumerator is a printer-equipped deterministic machine that generates strings instead of recognizing them.
- A language is recognizable iff some enumerator enumerates it; the reverse direction relies on dovetailing ( steps on the first strings) to avoid getting stuck in a single nonhalting computation.