0% found this document useful (0 votes)
32 views23 pages

Lecture-1 Introduction To Turing Machine

Uploaded by

Sumit Shrivastav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views23 pages

Lecture-1 Introduction To Turing Machine

Uploaded by

Sumit Shrivastav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

B.

Tech, CSE, V Semester, III Year

CS-501: Theory of Computation


UNIT: 5
Introduction to Turing Machine
July-December 2023, Lecture-1

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→QxxD, 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

<SELO: 6, 8, 9, 12> <Reference: R2>


CS-501 6
Turing Machine: Representation
•Transition Function
•Transition Table
•Transition Diagram

<SELO: 6, 8, 9, 12> <Reference: R2>


CS-501 7
Transition Function
•δ(qi, a) = (qj, 0, R)

•δ(qi, ε) = (qj, 1, R)

•δ(qi, ) = (qj, 0, L)

<SELO: 6, 8, 9, 12> <Reference: R2>


CS-501 8
Interaction-1

CS-501 9
Transition Table

State/Input a b 

q0 0Rq1 1Rq2 0Lq3

q1

q2

q3

<SELO: 6, 8, 9, 12> <Reference: R2>


CS-501 10
Transition Diagram

qi a/0, R qj

b/1, R /, L

qk
qm

<SELO: 6, 8, 9, 12> <Reference: R2>


CS-501 11
Moves by Instantaneous Description
•An instantaneous description of a Turing machine M is a
string , where  is the present state of M, the entire
input string is split into , the first symbol of  is the
current symbol a under the read/write head and the  has
all the subsequent symbols of the input string, and the
string  is the substring of the input string formed by all
the symbols to the left of a.
<SELO: 6, 8, 9, 12> <Reference: R2>
CS-501 12
Interaction-2

CS-501 13
Instantaneous Description: Example

…  a a b a b a  …

Read/Write Head

State q1

•then instantaneous description =


aq1ababa
• = a,  = q1 and  = ababa
<SELO: 6, 8, 9, 12> <Reference: R2>
CS-501 14
Processing through Transition Table
State/Input a b 
q0 0Rq1 1Rq2
q1 0Rq2
q2 1Rq3 0Lq3
q3
• Let w = aa
• then instantaneous
description:
• q0aa├ 0q1a├ 00q2├ 0q300
CS-501
• <SELO:
String w12>= aa is accepted
6, 8, 9, <Reference: R2>
15
Processing in Transition Diagram

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.

•The set of all strings accepted by a Turing machine M =


(Q, Σ, , δ, q0, , F) is called the language of the Turing
machine M and is represented by L(M).

<SELO: 6, 8, 9, 12> <Reference: R2>


CS-501 17
Interaction-3

CS-501 18
Assignment
1. Construct PDA for the given CFG.
S → aAA
S → aS | bS | a

2. Construct PDA for the given CFG.


S → aA | ε
A → aAb | ab

CS-501 19
Learning Outcomes

•Turing machine definition and basic model, representation,

moves, processing, instantaneous description, acceptability and

language of Turing machine

CS-501 20
SELO
 6. Ability to observe and developing sense making, logical skills for abstract
concepts.

 8. Ability to understand subject related concepts clearly along with


contemporary issues.

 9. Application of concepts of topic & it’s technological application.

 12. Computational thinking ability.

CS-501 21
References
 1. Hopcroft, Ullman, “Introduction to Automata Theory, Languages and
Computation”, 2nd Edition, Pearson Education.

 2. K. L. P. Mishra and N.Chandrasekaran, “Theory of Computer Science:


Automata, Languages and Computation”, 3rd Edition PHI.

 3. J. C. Martin, “Introduction to Languages and Theory of Computation”, 2 nd


Edition, TMH.

 4. C. Papadimitrou and C. L. Lewis, “Elements of the Theory of Computation”,


PHI.

 5. Cohen,“Introduction to Computer Theory”, Wiley India.

 6. Michael Sipser, “Theory of Computation”, 2nd Edition, Cengage Learning.


CS-501 22
23

You might also like