Turing Machines
Turing Machines
• The tape is divided into cells, and each cell holds one symbol
from the tape alphabet.
• Tape head sees only one cell at any instant. The contents of
this cell and the current state determine the next move of the
TM.
The tape extends
to infinity on the
right with all
Blanks (B)
1 1 0 2 B B B B B B B …
state
0 1 2
1 L,2,3
2
3 State = 1
4
Moves
• M=({p,q,r,s,t,d},{0,1,},{0,1,B},p,s,d)
• Pictures of TM can be
drawn like those for
PDA's. Here's the TM
of the example
below.
• Starting Configuration
Both of these
• Accepting Configuration are halting
configurations
• Rejecting Configuration
Relating configurations
• If δ(q,Xi)=(p,Y,R) then
ω |- ω ' holds for ω ' = X1. . . Xi-1 Y p Xi+1. . . Xk
• Similarly, if δ(q,X_i)=(p,Y,L)
then ω |- ω’ holds for ω’ =X1. . . pXi-1YXi+1 . . . Xk
• When ω |- ω’ Sipser says: “ ω yields ω’ ”
Note
• ω = X1 . . . Xk-1 q Xk B
• If the machine recognizes some language, and also halts for all
inputs. We say the language is Turing-decidable.
Acceptance by Halting
• Some text books define an alternative way of defining a
language associated with a TM M. (But not Sipser, though
the idea is still interesting).
• We denote it H(M), and it consists of strings that cause
the TM to halt. Precisely, a string w ∈ Σ* belongs to H(M)
• iff q0 w |-* α p X β
• where δ(p,X) is undefined.