- 2072 Kartik
What is a Turing machine; its operation
Short answer
A Turing machine is a mathematical model of computation with an infinite tape, a read/write head, and a finite control. It reads a symbol, writes a new symbol, moves the head, and changes state per a transition function. It accepts if it halts in a final state.
What is a Turing machine? Describe its operation.
Definition
A Turing machine (TM) is a mathematical model of a general-purpose computer, proposed by Alan Turing (1936). It consists of a finite control, an infinite tape divided into cells, and a read/write head.
Formally, M = (Q, Σ, Γ, δ, q0, ⊔, F), where
- Q is a finite set of states, q0 ∈ Q the start state, F ⊆ Q the final (accepting) states,
- Σ is the input alphabet (not containing the blank), Γ ⊇ Σ ∪ {⊔} the tape alphabet, ⊔ the blank,
- δ : Q × Γ → Q × Γ × {L, R, S} is the transition function (partial).
┌───────────────┐
│ finite control│ state q
└───────┬───────┘
│ head
... ⊔ │ a │ b │ a │ ⊔ │ ⊔ ... infinite tape
Operation
- The input string w is written on the tape, the rest of the tape is blank, the head is on the leftmost symbol, and the state is q0.
- In each step, the machine reads the symbol under the head. If δ(q, a) = (p, b, D), it writes b over a, moves the head one cell in direction D (L, R or stay), and changes state to p.
- This repeats. If no move is defined, the machine halts.
- w is accepted if M halts in a state of F. It is rejected if M halts in a non-final state; on some inputs M may also run forever (loop).
The language accepted is L(M) = { w : q0 w ⊢* u p v with p ∈ F }.
Example
For δ(q0, 1) = (q0, 1, R) and δ(q0, ⊔) = (qa, ⊔, S): the machine scans a string of 1's from left to right and accepts at the first blank, so it accepts 1*.
Turing machines accept exactly the recursively enumerable languages and compute the partial recursive functions. By the Church–Turing thesis, they capture everything an algorithm can compute.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Define multitape Turing machine · Theory of Computation, chapter 4
- How a universal Turing machine works · Theory of Computation, chapter 5
- Multitape TM as copying machine · Theory of Computation, chapter 4
- AI, Turing test, CSP examples · Artificial Intelligence, chapter 1
- Replace existing machine now; AEC and ESL · Engineering Economics, chapter 5
- Transformer operation; flux constant at any load · Electrical Machine, chapter 2 · asked 3×