The Timpson Lyceum seal

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 M=(Q,Σ,Γ,δ,q0,qaccept,qreject)M = (Q, \Sigma, \Gamma, \delta, q_0, q_{\text{accept}}, q_{\text{reject}}), where:

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 qrejectq_{\text{reject}}.

Recognizable vs. decidable.

The hierarchy nests: regular languages (finite automata) ⊂\subset context-free languages (pushdown automata) ⊂\subset decidable ⊂\subset recognizable. Outside the recognizable class, computation no longer applies — every physical computer is at best a Turing machine.

Variant 1 — the stay option. Allow δ\delta to output {L,R,S}\{L, R, S\}, where SS leaves the head in place. No extra power: simulate each SS 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{\}atthefar−leftendofaone−waytape,then∗∗interleave∗∗thetwohalvesintoasingleone−waytape.Readingat the far-left end of a one-way tape, then **interleave** the two halves into a single one-way tape. Reading\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 kk-tape machine has δ:Q×Γk→Q×Γk×{L,R,S}k\delta : Q \times \Gamma^k \to Q \times \Gamma^k \times \{L,R,S\}^k: it reads all kk heads, writes all kk cells, and moves all kk 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 kk tapes separated by a delimiter #\#, marking each tape's head position with a dotted version of the symbol (extend Γ\Gamma with a˙\dot{a} for each aa). To simulate one step, scan once to read every dotted symbol, apply δ\delta, 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. (⇒\Rightarrow) every single-tape machine is a 1-tape multi-tape machine; (⇐\Leftarrow) the simulation above.

Variant 4 — nondeterministic machine. Here δ:Q×Γ→P(Q×Γ×{L,R})\delta : Q \times \Gamma \to \mathcal{P}(Q \times \Gamma \times \{L,R\}) 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. xx q1 0011x x\, q_1\, 0011. 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 EE 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 w1,w2,…w_1, w_2, \dots. 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 ⇔\Leftrightarrow enumerable theorem in both directions.

(⇐\Leftarrow) Enumerator →\to recognizer. Let AA be the language enumerated by EE. Build a Turing machine MM that recognizes AA:

M on input w:run E; compare each printed string to w; if some output equals w, ACCEPT.\begin{aligned} &M \text{ on input } w:\\ &\quad \text{run } E;\ \text{compare each printed string to } w;\ \text{if some output equals } w,\ \text{ACCEPT.} \end{aligned}

If w∈Aw \in A, then EE eventually prints it and MM accepts; if w∉Aw \notin A, MM may run forever — exactly recognizability (not decidability).

(⇒\Rightarrow) Recognizer →\to enumerator. Let AA be recognized by Turing machine MM over alphabet Σ\Sigma, and let s1,s2,s3,…s_1, s_2, s_3, \dots be all strings of Σ∗\Sigma^* in lexicographic order (by length, then alphabetically — e.g. for Σ={0,1}\Sigma=\{0,1\}: ε,0,1,00,01,10,11,000,…\varepsilon, 0, 1, 00, 01, 10, 11, 000, \dots). The trick is dovetailing: never run MM on one string until it halts, since it might loop. Instead:

E (ignore input):for i=1,2,3,⋯: run M for i steps on each of s1,…,si; print every sj that accepts.\begin{aligned} &E \text{ (ignore input):}\\ &\quad \text{for } i = 1, 2, 3, \dots:\ \text{run } M \text{ for } i \text{ steps on each of } s_1, \dots, s_i;\ \text{print every } s_j \text{ that accepts.} \end{aligned}

Every string MM accepts is accepted within some finite number of steps, so it is eventually printed (and may be reprinted on later rounds — harmless). Thus EE enumerates exactly AA. ■\blacksquare

Summary