Lecture-1 Introduction To Turing Machine
Lecture-1 Introduction To Turing Machine
GAURAV DUBEY
Assistant Professor
Department of Computer Science and Engineering
1
Outlines
• Prerequisite
• Definition
• Turing Machine Model
• Representation of Turing
Machines
• Transition Function
• Transition Table
• Transition Diagram
• Moves
• Processing
• Acceptability & Language
• Interaction
• Learning Outcomes
• References
• SELO
CS-501 2
Prerequisite of topic
Students should have knowledge about the basics of modeling concept and
various finite state machine models.
CS-501 3
Problem Objective
The objective of this lecture is to give the knowledge about the conversion of
context free grammar to push down automata for checking the acceptability of
strings using PDA.
CS-501 4
Turing Machine: Definition
• A Turing machine M is a 7-tuple, namely (Q, Σ, , δ, q0,, F),
where
• Q is the finite, non-empty set of states
• Σ is the finite, non-empty set of inputs/input alphabet
• is the finite non-empty set of tape symbols
• δ is the transition function, δ: Qx→QxxD, where D = {L, R}
denotes the direction of movement of read/write head.
• q0 is the unique initial state, q0 Q
• is the blank symbol, ϵ ,
• F is the set of final state(s), F Q
<SELO: 6, 8, 9, 12> <Reference: R2>
CS-501 5
Turing Machine: Basic Model
Infinite Tape
… a b a … …
Read/Write Head
Finite
Control
•δ(qi, ε) = (qj, 1, R)
•δ(qi, ) = (qj, 0, L)
CS-501 9
Transition Table
State/Input a b
q1
q2
q3
qi a/0, R qj
b/1, R /, L
qk
qm
CS-501 13
Instantaneous Description: Example
… a a b a b a …
Read/Write Head
State q1
b/1, R q2
q0 a/0, R q1 a/0, R
/, L b/1, R
b/1, R
/, L q4
q5
q3 b/1, R
•Let w = abaab
• then instantaneous description:
• q0abaab├ 0q1baab├ 01q2aab├ 010q2ab├ 0100q2b├
CS-501 01001q4├ 0100q51 String w = abaab is accepted
16
<SELO: 6, 8, 9, 12> <Reference: R2>
Acceptability & Language
•A string x is accepted by a Turing machine M = (Q, Σ,
, δ, q0, , F) if δ(q0, x) = q for some q ϵ F.
CS-501 18
Assignment
1. Construct PDA for the given CFG.
S → aAA
S → aS | bS | a
CS-501 19
Learning Outcomes
CS-501 20
SELO
6. Ability to observe and developing sense making, logical skills for abstract
concepts.
CS-501 21
References
1. Hopcroft, Ullman, “Introduction to Automata Theory, Languages and
Computation”, 2nd Edition, Pearson Education.