A Multi-Head Turing Machine (MHTM) is a variant of the standard Turing Machine that uses a single tape with multiple read/write heads, instead of multiple tapes.
Each head can independently read, write, and move on the same tape.
A Multi-Head Turing Machine is defined as:
M = (Q, Σ, δ, Γ, q0, B, F, k)
Where:
Q → finite set of statesΣ → input alphabetδ → transition functionΓ → tape alphabet (Σ ⊆ Γ)q0 → start stateB → blank symbolF → set of final (accepting) statesk → Number of heads on the tapeSingle head:
Multi-head:
Result:
L = { ww | w ∈ {a,b}* }
Strings like:
aaababbbbbSteps:
Compact format (recommended):
q0,aa → q0,aa,RR
Verbose format (also supported):
q0,a,a → q0,a,a,R,R
q0aa or a,aaa or a,aRR (both right) or R,Rq0Where moves are:
R = move rightL = move leftS = stay (no move)String: a b c b a
^ ^
H1 H2
Position: 0 1 2 3 4
Head 1 starts at position 0 (left end) Head 2 starts at position 4 (right end)
q_start,a,a -> q_start,a,a,R,L
q_start,b,b -> q_start,b,b,R,L
q_start,c,c -> q_start,c,c,R,L
q_start,__ → q_accept,__,SS
| State | Read (H1, H2) | Write (H1, H2) | Move (H1, H2) | Next |
|---|---|---|---|---|
| q_start | (a, a) | (a, a) | (R, L) | q_start |
| q_start | (b, b) | (b, b) | (R, L) | q_start |
| q_start | (c, c) | (c, c) | (R, L) | q_start |
| q_start | (_, _) | (_, _) | (S, S) | q_accept |
| Feature | Multi-Tape TM | Multi-Head TM |
|---|---|---|
| Tapes | Multiple | One |
| Heads | One per tape | k on same tape |
| Memory | Separate tapes | Shared tape |
| Access | Independent | Shared positions |
| Use case | Storage separation | Parallel scanning |
Multi-head TM ≡ Single-tape TM (same power)
Equivalent to multi-tape TM in computational power
Used for:
Write rules like:
qi,(x1, x2, ..., xk) → (qj,(y1, y2, ..., yk),(m1, m2, ..., mk))
Where:
xi : symbols read under each headyi : symbols writtenmi in L, R, S