Turing Machines
Turing-Machine Theory
- The purpose of the theory of Turing machines is to prove that certain specific languages have no algorithm.
- Start with a language about Turing machines themselves.
- Reductions are used to prove more common questions undecidable.
Picture of a Turing Machine
Turing-Machine Formalism
A TM is described by:
- A finite set of states (Q, typically).
- An input alphabet (Σ, typically).
- A transition function (δ, typically).
- Takes two arguments:
- A state, in Q.
- A tape symbol in Γ.
- δ(q, Z) is either undefined or a triple of the form (p, Y, D).
- p is a state.
- Y is the new tape symbol.
- D is a direction, L or R.
- Takes two arguments:
- A start state ( q0 , in Q, typically).
- All tape except for the input is blank initially.
- A set of final states (F ⊆ Q, typically).
Instantaneous Descriptions of a Turing Machine
- Initially, a TM has a tape consisting of a string of input symbols surrounded by an infinity of blanks in both directions.
- The TM is in the start state, and the head is at the leftmost input symbol.
- An ID is a string αqβ , where αβ includes the tape between the leftmost and rightmost nonblanks.
- The state q is immediately to the left of the tape symbol scanned.
- If
q is at the right end, it is scanning B .
- If
q is scanning a B at the left end, then consecutive B 's at and to the right ofq are part of α .
- As for PDA's we may use symbols ⊦ and ⊦* to represent "becomes in one move" and "becomes in zero or more moves" respectively, on ID'*s.
Formal Definition of Moves
- If δ(q, Z) = (p, Y, R), then
- αqZβ⊦αYpβ
- If Z is the blank B, then also αq⊦αYp
- If δ(q, Z) = (p, Y, L), then
- For any X, αXqZβ⊦αpXYβ
- In addition, qZβ⊦pBYβ
Languages of a TM
A TM defines a language by final state, as usual.
L(M) = {w | q0w⊦∗I , where I is an ID with a final state}.Or, a TM can accept a language by halting.
H(M) = {w | q0w⊦∗I , and there is no move possible from ID I}.
Equivalence of Accepting and Halting
- If L = L(M), then there is a TM M'such that L = H(M').
- If L = H(M), then there is a TM M" such that L = L(M").
Proof of 1:
Final State -> Halting
- Modify M to become
M′ as follows:
- For each final state of M , remove any moves, so
M′<
- For each final state of M , remove any moves, so
- If δ(q, Z) = (p, Y, R), then
- If