Turing Machine
Turing Machine
MODULE 5
TURING MACHINE
Turing Machine
Operation Rule – 1
At each step of computation
Read the current symbol
Write (update) the same cell
Move exactly one cell either LEFT or RIGHT
Symbol to Direction to
read move
Symbol to
write
Operation Rule – 2
Turing Machine has a control portion , which controls the Turing
Machine and is similar to FSM or PDA. It is deterministic also
TM has an initial state
TM has two final states
Accept state
Reject state
When the computation Halt (stop) ?
HALT & Accept
HALT & Reject
Loop (Keep on computation and fail to stop)
Prepared By Prof. EBIN PM 7
Transition Function (δ )
Q × Σ → T × (R/L) × Q
Production rule of TM
δ (q₀, a) → (q₁ , y, R)
Turing Thesis
It states that, any computation that can be carried out by mechanical
means can be performed by some Turing Machine.
10
Consider 0110
Tape x y y x ˽
11
0 0 1 1 1 1 ˽ ˽
Tape 0 0
x x x x y y y y
Prepared By Prof. EBIN PM 12
12
Transition Diagram
Tape
˽ ˽
0 0 0 0 1 1 1 1
13
˽ ˽ ˽ ˽ ˽ ˽
14
Transition Diagram
a b a a b a ˽ ˽ ˽ ˽
15
16
17
18
19
we can observe that FA is less powerful than any other machine.
It is important to note that DFA and NFA are of same power
because every NFA can be converted into DFA and every DFA can
be converted into NFA .
The Turing Machine (TM) is more powerful than any other
machine.
Linear Bounded Automata is accepted Context Sensitive Language
(Type 1).
20
21
22
Example
n=2
δ (q₀ , a , e) = (q₁ , x , y , L , R)
q₀ q₁
abc de f xbc dy f
Tape 1 Tape 2 Tape 1 Tape 2
23
24
25
a b a b b a a ˽ ˽ ˽ abaQbbaa
Prepared By Mr.EBIN PM, AP, IESCE 26
26
ccQabbc
ccxSbbc
ccxyPbc
Prepared By Mr.EBIN PM, AP, IESCE 27
27
cScybbc ccxPbbc
Tczybbc ccxyRbc
cwUybbc
28
29
30
31
32
33
34
Undecidable Language
• A language is undecidable if it is not decidable
• An undecidable language may sometimes be partially decidable
but not decidable.
• If a language is not even partially decidable, then there exists no
Turing Machine for that language
35
Recursively Enumerable Turing Machine will halt some times & may
Language not halt some times
Decidable Language Recursive Language
36