Professional Documents
Culture Documents
Algorithm: An algorithm for a problem is a Turing Machine which solves the problem
The algorithm describes the steps of the mechanical means This is easily translated to computation steps of a Turing machine
aababbcac a
Read Write !ead "ontrol #nit $eterministic '(eft or Right)
%ame -ower of two machine classes: both classes accept the same set of languages We will prove: each new class has the same power with %tandard Turing Machine 'accept Turing Recogni.able (anguages)
M1
M2
L( M1 ) = L( M 2 )
and vice versa
Simulation: A techni/ue to prove same power0 %imulate the machine of one class with a machine of the other class %econd "lass %imulation Machine
M2 M1
simulates
M1
M1
"onfigurations in the +riginal Machine have corresponding configurations in the %imulation Machine M 2
M1
+riginal Machine:
d0
M1 d1 d n
%imulation Machine:
d1 dn d0 M2
df
%imulation Machine:
d f
the %imulation Machine and the +riginal Machine accept the same strings
L( M1 ) = L( M 2 )
aababbcac a
(eft2 Right2 %tay (2R2%: possible head moves
3xample:
Time 4
aababbcac a q1
Time 5
b ab abb c ac a q2 q1 a b, S q2
Theorem: %tay +ption machines have the same power with %tandard Turing machines Proof: 40 %tay +ption Machines simulate %tandard Turing machines 50 %tandard Turing machines simulate %tay +ption machines
We need to simulate the stay head option with two head moves2 one left and one right
q1
a b, S
q2
q1
a b, L
x x, R
q2
q1
a b, L
q2
q1
a b, L
q2
example of simulation
q1 a b, S q2
aaba q1 baba q2
baba q2 baba
q3
aaba q1
3,$ +1 -R++1
a b a b b a c d
+ne head +ne symbol ( a, b)
trac7 4 trac7 5
a b a b b a c d q1 a c a b b d c d q2 q1
(b, a ) (c, d ), L
trac7 4 trac7 5
trac7 4 trac7 5
q2
a b a c
000000000
* &nitial position is the leftmost cell * When the head moves left from the border2 it returns to the same position
Theorem:
%emi &nfinite machines have the same power with %tandard Turing machines
Proof: 40 %tandard Turing machines simulate %emi &nfinite machines 50 %emi &nfinite Machines simulate %tandard Turing machines
#
# # , R
50 %emi &nfinite tape machines simulate %tandard Turing machines: 000000000 %tandard machine 000000000
%emi &nfinite tape machine 000000000 %/uee.e infinity of both directions in one direction
000000000
%tandard machine
a b c d e
reference point
000000000
%emi &nfinite tape machine with two trac7s Right part # d e (eft part
# c b a
000000000
%tandard machine
q1
q2
Right part
R q1 R q2
%tandard machine
q1
a g, R
q2
(a, x) ( g , x), R ( x, a ) ( x, g ), L
R q2 L q2
Time 4 000000000
%tandard machine
a b c d e q1
%emi &nfinite tape machine
000000000
# c b a
L q1
000000000
Time 5 000000000
%tandard machine
g b c d e q2
%emi &nfinite tape machine
000000000
g c b #
L q2
000000000
At the border:
(# , # ) (# , # ), R
L q1
(eft part
L q1
(# , # ) (# , # ), R
R q1
# c b g
Time 5
Time 4
000000000
# c b g
000000000
3,$ +1 -R++1
a b c
&nput string "ontrol #nit
'state machine)
g d e
Tape
read write
Theorem: +ff (ine machines have the same power with %tandard Turing machines Proof: 40 +ff (ine machines simulate %tandard Turing machines 50 %tandard Turing machines simulate +ff (ine machines
40 +ff line machines simulate %tandard Turing Machines +ff line machine: 40 "opy input file to tape 50 "ontinue computation as in %tandard Turing machine
%tandard machine
a b c
a b c
&nput 1ile
a b c
Tape
a b c q1
%tandard machine
a b c
&nput 1ile
a b c
q1
Tape
#se a %tandard machine with a four trac7 tape to 7eep trac7 of the +ff line input file and tape contents
a b c d
&nput 1ile
e f g
1our trac7 tape &nput 1ile head position Tape head position
Tape
%tandard Machine
# a b # 0 0 e f 0 1
c d 1 0 g 0
Reference point
# # # #
a 0 e 0
b 0 f 1
c d 1 0 g 0
Repeat for each state transition: 40 Return to reference point 50 1ind current input file symbol 60 1ind current tape symbol 80 Ma7e transition
3,$ +1 -R++1
Tape 4
a b c
&nput string
g f e
Tape 5
Tape 4
Time 4
a b c q1
Tape 4
g f e q1
Tape 5
a g c q2 q1
Time 5
g e d q2
Tape 5
(b, f ) ( g , d ), L, R
q2
Theorem: Multi tape machines have the same power with %tandard Turing machines Proof: 40 Multi tape machines simulate %tandard Turing machines 50 %tandard Turing machines simulate Multi tape machines
50 %tandard Turing machines simulate Multi tape machines: %tandard machine: * #ses a multi trac7 tape to simulate the multiple tapes * A tape of the Multi tape machine corresponds to a pair of trac7s
a b c
g f e h
a 0 e 0
b 1 f 0
c 0 g h 1 0
Reference point
# # # #
a 0 e 0
b 1 f 0
c 0 g h 1 0
Repeat for each state transition: 40 Return to reference point 50 1ind current symbol in Tape 4 60 1ind current symbol in Tape 5 80 Ma7e transition
3,$ +1 -R++1
L= a b }
5 tape machine: O ( n) time n 40 "opy b to tape 5 'O(n) steps) 50 "ompare a on tape 4 n and b tape 5 'O(n) steps)
y c a b
Theorem: Multidimensional machines have the same power with %tandard Turing machines Proof: 40 Multidimensional machines simulate %tandard Turing machines 50 %tandard Turing machines simulate Multi $imensional machines
%tandard machine: * #se a two trac7 tape * %tore symbols in trac7 4 * %tore coordinates in trac7 5
5 dimensional machine
c a b
%tandard Machine
q1
symbols coordinates
c a b 1 # 1 # 2 # 1 # 1 q1
%tandard machine: Repeat for each transition followed in the 5 dimensional machine: 40 #pdate current symbol 50 "ompute coordinates of next position 60 ;o to new position
3,$ +1 -R++1
q2
"hoice 4
Time =
a b c q1 a b, L q1 a c, R
q3
Time 4
q2
b b c q2 c b c
q3
"hoice 5
"hoice 4
q0 w x q f y
&nitial configuration
1inal "onfiguration
Theorem: ,ondeterministic machines have the same power with %tandard Turing machines Proof: 40 ,ondeterministic machines simulate %tandard Turing machines 50 %tandard Turing machines simulate ,ondeterministic machines
* %tores all possible computations of the non deterministic machine on the 5 dimensional tape
%tep i<4
The $eterministic Turing machine simulates all possible computation paths: *simultaneously *step by step *in a breadth first search fashion
,on$eterministic machine
a b, L q1 a c, R # # # #
q2
Time =
a b c q1
q3
$eterministic machine
# # # a b c q1 # # #
# # # # #
current configuration
a b, L q1 a c, R
q2
b b c
"hoice 4 "hoice 5
q2 c b c
q3
q3
$eterministic machine
# # # # # # # b b c # # q2 # # c b c # q3 # #
"omputation 4 "omputation 5
$eterministic Turing machine Repeat 1or each configuration in current step of non deterministic machine2 if there are two or more choices: 40 Replicate configuration 50 "hange the state in the replicas #ntil either the input string is accepted or re:ected in all configurations
3,$ +1 -R++1
Remar7: The simulation ta7es in the worst case exponential time compared to the shortest accepting path length of the nondeterministic machine