Professional Documents
Culture Documents
Class 13
Class 13
Turing Machines
ng
Lem umpi
For ma
s
P
CFL
ma rs
te s
d G r am
Indexe
la
Vio
0 n1 n
01
n n 2n
g
m pin
0n t es Pu r RLs
la o
Vio ma F
Lem
Described by DFA, NFA, RegExp, w De
scr
ib
RegGram Gr ed b
am y
ma LL(k
r )
De
scri
be PDA
Regular Languages
ND
db
C FLs
yC
c
inisti
FG
rm
Dete
,
g u a ges
LL(k)
Lan ng u ages
-F re e La
ex t
Cont
For ma
s
P
CFL
la te s
Vio
0n1n
g
m pin
0n t es Pu r RLs
la o
Vio ma F
Lem
Described by DFA, NFA, RegExp, w
RegGram
De
sc ND
rib PD
Regular Languages
ed A
by
CF
,G
es
La nguag
x t-F ree
e
Cont
Languages recognizable by
any mechanical computing
machine
Decidable Problems
Recognizable Languages
Decidable Problems
Decidable Problems
NP
...
?
A B
Lecture 13: Turing Machines 12
Simulating 3-DPDA with 2-DPDA +
pushB($)
pushB(popA())
...
pushB(popA(#))
# pushB(popA())
...
pushB(popA(#))
res = popA()
pushA(popB(#))
# pushA(popB())
pop green ...
$
3-DPDA popB($)
A B
Lecture 13: Turing Machines 13
2-DPDA + Forced ε-Transitions
A B
Lecture 13: Turing Machines 17
Turing Machine?
Tape Head
A B
Lecture 13: Turing Machines 18
Turing Machine
...
FSM
Infinite tape: Γ*
Tape head: read current square on tape,
write into current square,
move one square left or right
FSM: like PDA, except:
transitions also include direction (left/right)
final accepting and rejecting states
Lecture 13: Turing Machines 19
Turing Machine Formal Description
...
FSM
7-tuple: (Q, , Γ, δ, q0, qaccept, qreject)
Q: finite set of states
: input alphabet (cannot include blank symbol, _)
Γ: tape alphabet, includes and _
δ: transition function: Q Γ Q Γ {L, R}
q0: start state, q0 Q
qaccept: accepting state, qaccept Q
qreject: rejecting state, qreject Q (Sipser’s notation)
Lecture 13: Turing Machines 20
Turing Machine Computing Model
x Initial configuration:
x x x x x x x _ _ _ _ ...
blanks
input
FSM
q0 TM Configuration: Γ* Q Γ*
u v
FSM
q
δ*(ua, q, bv) = (uac, qr, v) if δ(q, b) = (qr, c, R)
δ*(ua, q, bv) = (u, qr, acv) if δ(q, b) = (qr, c, L)
Also: need a rule to cover what happens at left edge of tape