Download presentation
Presentation is loading. Please wait.
Published byAda Perry Modified over 6 years ago
1
By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
Theory of Computation Turing Machine Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman Prof. Muhammad Saeed
2
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Church-Turing’s Thesis Any mathematical problem solving that can be described by an algorithm can be modeled by a Turing Machine. Dept. of Computer Science & IT, FUUAST Theory of Computation
3
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Types of Turing Machine 1) Multiple track 2) Shift over Turing Machine 3) Nondeterministic 4) Two way Turing Machine 5) Multitape Turing Machine 6) Multidimensional Turing Machine 7) Composite Turing Machine 8) Universal Turing Machine Dept. of Computer Science & IT, FUUAST Theory of Computation
4
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Formal Definition Dept. of Computer Science & IT, FUUAST Theory of Computation
5
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Dept. of Computer Science & IT, FUUAST Theory of Computation
6
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Steps Start in state q0 Read symbol under head Write new symbol Shift left/right Enter new state qj Dept. of Computer Science & IT, FUUAST Theory of Computation
7
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Notational Conventions For Turing Machines Dept. of Computer Science & IT, FUUAST Theory of Computation
8
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } Dept. of Computer Science & IT, FUUAST Theory of Computation
9
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Moves for input 0011: Moves for input 0010: Dept. of Computer Science & IT, FUUAST Theory of Computation
10
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Transition Diagram for 0011 input Dept. of Computer Science & IT, FUUAST Theory of Computation
11
Dept. of Computer Science & IT, FUUAST Theory of Computation
Pushdown Automata A Turing Machine M computes a function ( proper subtraction) for 0m10n on the tape. means if m ≥ n then m - n else if m < n then 0 Dept. of Computer Science & IT, FUUAST Theory of Computation
12
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function Dept. of Computer Science & IT, FUUAST Theory of Computation
13
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function Dept. of Computer Science & IT, FUUAST Theory of Computation
14
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Transition Table for the function Dept. of Computer Science & IT, FUUAST Theory of Computation
15
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Transition Diagram for Dept. of Computer Science & IT, FUUAST Theory of Computation
16
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Transition Table for the function Transition Diagram for Dept. of Computer Science & IT, FUUAST Theory of Computation
17
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
18
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
19
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
20
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X 0 Y 1 B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
21
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X 0 Y 1 B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
22
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X 0 Y 1 B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
23
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X 0 Y 1 B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
24
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y 1 B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
25
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y 1 B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
26
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
27
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
28
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
29
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
30
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
31
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
32
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine A Turing Machine M that accepts the language { 0n1n | n ≥0 } X X Y Y B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
33
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine End of Simulation Dept. of Computer Science & IT, FUUAST Theory of Computation
34
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
35
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
36
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
37
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
38
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
39
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
40
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
41
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
42
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
43
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
44
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
45
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
46
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
47
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
48
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
49
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
50
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
51
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
52
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
53
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
54
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
55
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
56
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
57
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
58
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
59
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
60
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
61
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
62
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
63
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
64
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
65
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
66
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
67
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
68
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
69
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
70
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
71
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
72
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q3 Dept. of Computer Science & IT, FUUAST Theory of Computation
73
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B q0 Dept. of Computer Science & IT, FUUAST Theory of Computation
74
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
75
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q1 Dept. of Computer Science & IT, FUUAST Theory of Computation
76
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
77
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
78
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
79
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q2 Dept. of Computer Science & IT, FUUAST Theory of Computation
80
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
81
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
82
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B B B B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
83
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B 0 1 B B B B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
84
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B 0 B B B B B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
85
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B B 0 B B B B B B q4 Dept. of Computer Science & IT, FUUAST Theory of Computation
86
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Evaluating function B B B 0 0 B B B B B B q6 Final State Dept. of Computer Science & IT, FUUAST Theory of Computation
87
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine End of Simulation Dept. of Computer Science & IT, FUUAST Theory of Computation
88
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Multiplication 0m10n1 Dept. of Computer Science & IT, FUUAST Theory of Computation
89
Dept. of Computer Science & IT, FUUAST Theory of Computation
Turing Machine Multiplication 0m10n1 Dept. of Computer Science & IT, FUUAST Theory of Computation
90
Dept. of Computer Science & IT, FUUAST Theory of Computation
END Dept. of Computer Science & IT, FUUAST Theory of Computation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.