Turing Machine Variations
Turing Machine Variations
Turing’s Thesis
Control Unit
Deterministic
We will prove:
each new class has the same power
with Standard Turing Machine
such that: L ( M1 ) = L ( M 2 )
and vice-versa
Second Class
First Class Simulation Machine
Original Machine M2
M1 M1
simulates M1
Costas Busch - LSU 10
Configurations in the Original Machine M1
have corresponding configurations
in the Simulation Machine M 2
M1
Original Machine: d 0 ≻ d1 ≻ " ≻ d n
∗ ∗ ∗
Simulation Machine: d 0ʹ ≻ d1ʹ ≻ " ≻ d nʹ
M2
Costas Busch - LSU 11
Accepting Configuration
Original Machine: df
Simulation Machine: d ʹf
q1 a → b, S q2
Costas Busch - LSU 14
Theorem: Stay-Option machines
have the same power with
Standard Turing machines
a → b, S
q1 q2
a → b, L x → x, R
q1 q2
Stay-Option Machine
a → b, L
q1 q2
a → b, L
q1 q2
Stay-Option Machine:
q1 a → b, S q2 ◊aab a ◊ ◊b ab a ◊
1 2
q1 q2
END OF PROOF
Costas Busch - LSU 20
A useful trick: Multiple Track Tape
helps for more complicated simulations
One Tape
◊ ◊ a b a b ◊ track 1
◊ ◊ b a c d ◊ track 2
One head
One symbol ( a, b)
It is a standard Turing machine, but each tape alphabet symbol
describes a pair of actual useful symbols
Costas Busch - LSU 21
◊ ◊ a b a b ◊ track 1
◊ ◊ b a c d ◊ track 2
q1
◊ ◊ a c a b ◊ track 1
◊ ◊ b d c d ◊ track 2
q2
(b, a) → (c, d ), L
q1 q2
Costas Busch - LSU 22
Semi-Infinite Tape
The head extends infinitely only to the right
a b a c ◊ ◊ .........
2. Semi-Infinite Machines
simulate Standard Turing machines
Costas Busch - LSU 24
1. Standard Turing machines simulate
Semi-Infinite machines:
......... ◊ ◊ # a b a c ◊ ◊ .........
Standard machine
......... .........
reference point
q2
q1
R (a, x) → ( g , x), R R
Right part q1 q2
Left part L ( x, a) → ( x, g ), L L
q1 q2
For all tape symbols x
Costas Busch - LSU 29
Time 1
Standard machine
......... ◊ a b c d e ◊ ◊ .........
q1
q2
R (# , # ) → (# , # ), R L
Right part q1 q1
L (# , # ) → (# , # ), R R
Left part q1 q1
Control unit
(state machine)
Tape 1 Tape 2
◊ a b c ◊ ◊ e f g ◊
Input string
(b, f ) → ( g , d ), L, R
q1 q2
Costas Busch - LSU 35
Theorem: Multi-tape machines
have the same power with
Standard Turing machines
Standard machine:
• Uses a multi-track tape to simulate
the multiple tapes
2-dimensional tape y
◊
◊ c a x
◊ b
◊
Standard machine:
• Use a two track tape
• Store symbols in track 1
• Store coordinates in track 2
◊
◊ c a x
◊ b
◊
Standard Machine q1
a b c symbol
1 # 1 # 2 # − 1 # − 1 coordinates
q1 Costas Busch - LSU 46
Standard machine:
END OF PROOF
Costas Busch - LSU 47
Nondeterministic Turing Machines
q2 Choice 1
a → b, L
q1
a → c, R q3 Choice 2
◊ a b c ◊
Time 1
q1
Choice 1
q2 ◊ b b c ◊
a → b, L
q2
q1
Choice 2
a → c, R q3 ◊ c b c ◊
There is a computation:
Deterministic machine:
• Uses a 2-dimensional tape
(equivalent to standard Turing machine with one tape)
Step 1
Step 2
Step i
reject accept infinite
Step i+1
path
Costas Busch - LSU 54
The Deterministic Turing machine
simulates all possible computation paths:
•simultaneously
•step-by-step
q2 Time 0
a → b, L
◊ a b c ◊
q1
q1
a → c, R q3
Deterministic machine
# # # # # #
# a b c # current
# q1 # configuration
# # # # #
Costas Busch - LSU 56
NonDeterministic machine
Time 1
q2 ◊ b b c ◊ Choice 1
a → b, L
q2
q1
◊ c b c ◊ Choice 2
a → c, R q3 q3
Deterministic machine
# # # # # #
# b b c # Computation 1
# q2 #
# c b c #
q3 Computation 2
# #
Costas Busch - LSU 57
Deterministic Turing machine
Repeat
For each configuration in current step
of non-deterministic machine,
if there are two or more choices:
1. Replicate configuration
2. Change the state in the replicas
Until either the input string is accepted
or rejected in all configurations