Model Institute of Engineering & Technology
Department of Computer Science and
Engineering
Course Name:- Theory of Automation
Course Code:- COM-604
Lecture No:-
Date-
Dr. Rajneet Kaur Bijral
Course Outcomes
By the end of the course, students shall be able to:
CO1 Apply DFA and NFA concepts to design and analyze finite automata.
CO2 Analyze context-free grammars and the Pumping Lemma for language properties.
CO3 Design computational models using various Turing machine models.
CO4 Evaluate Push Down Automata models for their acceptance criteria of context-free
languages.
CO5 Assess properties of recursive and recursively enumerable languages for decidability
issues.
Detailed Syllabus
Section-A
Unit 1: Finite Automata: Deterministic Finite Automata (DFA), Designing, Non- deterministic
finite Automata (NFA) without E-moves, Conversions, Equivalence, NFA with E-moves, Regular
expression designing, Finite machine with output assigned, Moore and mealy machines, Conversion
and Equivalence, Myhill-Nerode Theorem.
Unit 2: Regular Grammar & Context free Languages: Context free Grammar, Context free Languages,
reduced form of Grammar, Ambiguous and Non- Ambiguous grammar, acceptors and generators,
Relations between Classes of Languages, Pumping lemma of regular sets, Chomsky’s hierarchy of
languages, derivation Trees, CYK Algorithm for CFL Membership, Testing emptiness of CFLs.
Section-B
Unit 3: Turing Machines: Church Testing Hypothesis, Turing Computability, Non- deterministic,
Multitape and other versions of Turing machines, Churches Hypothesis, Primitive Recursive
functions, Universal Turing machines, decidability, Halting problem, Stack Automata.
Unit 4: Push Down Automata: Definition, Model, Acceptance of CFL, Acceptance by Final State and
Acceptance by Empty stack and its Equivalence, Equivalence of CFG and PDA.
Unit 5: Recursive and Recursively Enumerable Languages (rel): Properties of recursive and
recursively enumerable languages, Context sensitive language and linear bounded automata (LBA),
Chomsky hierarchy, Decidability, Post's correspondence problem (PCKP), undecidability of PCP.
Assessment and Evaluation Plan
4
Assessment Tools
 Assignment
 Sessional
 Attendance
 External Exam
Evaluation
 20 marks
 20 marks
 10 marks
 100 marks
The Turing Machine
Turing’s machine — is the simple mathematical model of a modern digital computer:
1. A tape of infinite length.
2. Finitely many squares of
the tape have a single
symbol from a finite
language.
3. We can read the squares and write in
them.
4. At any time, the machine is in one of
a finite number of internal states.
5. The machine has instructions that
determine what it does given its
internal state and the symbol it
encounters on the tape. It can
  change its internal state;
  change the symbol on the
square;
  move forward;
  move backward;
  halt (i.e. stop).
Control unit
Read-write head
Tape
Processing unit with a
finite memory.
A secondary storage of unlimited capacity.
The Tape
6
Read-Write head
No boundaries -- infinite length
The head at each time step:
1. Reads a symbol
2. Writes a symbol
3. Moves Left or
Right
Example 1: Time 0
Time 1
1. Reads a
2. Write k
3. Move Left
Input string 1
q 2
q
Read
Write Move Left
a k, L
States & Transitions
7
......
......
   

a b c
a
Time 1
1
q 2
q
R
b
a ,

......
......
   

a b c
b
Time 2
1
q
2
q
9
......
......
   

a b c
a
Time 1
1
q 2
q
R
b
a ,

......
......
   

a b c
b
Time 2
1
q
2
q
Final States
12
1
q 2
q Allowed
1
q 2
q NotAllowed
• Final states have no outgoing transitions
• In a final state the machine halts
Acceptance
13
Accept Input If machine halts
in a final state
Reject Input
If machine halts
in a non-final state
or
If machine enters
an infinite loop
9.1 The standard Turing Machine
states.
final
of
set
the
is
state,
initial
the
is
blank,
the
called
symbol
special
a
is
function,
n
transitio
the
is
alphabet,
tape
the
called
symbols
of
set
finite
a
is
alphabet,
input
the
is
Σ
states,
internal
of
set
the
is
where
),
(
by
defined
is
machine
A turing
9.1
Definition
0
0
Q
F
Q
q
T
δ
Γ
Q
, ,F
,q
Q,Σ,
M
M





Control unit
Read-write head
Tape
{L,R}
Γ
Q
Γ
δ:Q 



a b c
State p
d b c
State q
(q,d,R)
δ(p,a) 
Example 9.1 The following figure shows the
situation before and after the move caused by
the transition .
(q,d,R)
δ(p,a) 
Halt state: A Turing machine will halt
whenever it enters a final state or reaches a
configuration for which is not defined.
δ
15
......
......
1
q
Example:
a a a b b b
B
B B
q
0
q
1
a,X,R
a,a,R
q
2
b,Y, L
a,a, L
q
3
X,X, R
Y
,
Y
,
R
B,B,R
q
4
16
 Example #1: {w | w is in {0,1}* and w ends with a 0}
0
00
10
10110
Not ε
Q = {q0, q1, q2}
= {0, 1, B}
Γ
= {0, 1}
Σ
F = {q2}
:
δ
0 1 B
->q0 (q0, 0, R) (q0, 1, R) (q1, B, L)
q1 (q2, 0, R) - -
q2
*
- - -
 q0 is the start state and the “scan right” state, until hits B
 q1 is the verify 0 state

Turing machine for even palindrom
Turing machine for transducer
Turing machine as an adder
TM for multiplication
Church-Turing Thesis
Implications of the Church-Turing Thesis
1. Universality of Turing Machines: Any computation that can be done
by any machine can be done by a Turing machine.
2. Limits of Computability: If a problem cannot be solved by a Turing
machine, it is undecidable.
3. Basis for Modern Computers: Real-world computers (ignoring
memory limits) are equivalent in power to Turing machines.
4. Decidability: Helps define which problems are decidable vs.
undecidable (e.g., Halting Problem is undecidable).
Turing Computability
Definition: A function is said to be Turing computable if there exists a
Turing machine that, for every valid input, halts and gives the correct
output.
Key Points:
• It's the formal definition of what it means for a function to be
"algorithmically solvable".
• If no Turing machine exists to compute a function, it is uncomputable
(e.g., Halting Problem).
Non-Deterministic Turing Machine (NTM)
Definition: A Turing machine where, for some configurations, the
machine may have multiple possible transitions.
Features:
• Like a DFA vs. NFA, but for Turing machines.
• Accepts an input if any of the computation paths lead to an accepting
state.
• Theoretical result: NTMs and deterministic TMs are equivalent in
power (i.e., same languages recognized), but NTMs may be
exponentially faster.
Multitape Turing Machine
Definition: A Turing machine with multiple tapes (and heads) for
input/output and working memory.
Characteristics:
• Each tape operates independently.
• Allows for more efficient algorithms (e.g., copying a string in linear
time).
• Equivalence: Multitape TMs are equivalent in computational power
to single-tape TMs — any multitape TM can be simulated by a single-
tape TM with polynomial slowdown.
Primitive Recursive Functions
Definition: A class of functions built using:
• Basic initial functions: zero function, successor function, projection
functions.
• Operations: composition and primitive recursion.
Characteristics:
• All primitive recursive functions are total (they always terminate).
• Examples: Addition, multiplication, factorial.
• Limitation: Cannot express all computable functions (e.g., Ackermann’s
function is computable but not primitive recursive).
Universal Turing Machine (UTM)
Definition: A Turing machine that can simulate any other Turing
machine.
Key Concepts:
• Input is a pair: the description of another Turing machine and its
input.
• The UTM reads the encoded description and simulates the machine
step-by-step.
• Foundation of the idea of stored-program computers.
• It proves that Turing machines are programmable.
Decidability
Definition: A problem is decidable if there exists a Turing machine that
halts on every input and correctly answers YES or NO.
Categories:
• Decidable languages: Turing machines that always halt (a.k.a.
recursive languages).
• Undecidable languages: No such machine exists.
• Examples of decidable problems:
• Membership in regular or context-free languages.
• Undecidable problems include:
• Halting problem.
• Post Correspondence Problem.
• Validity of first-order logic formulas.
Halting Problem
 Definition: The problem of determining, for any arbitrary Turing machine M
and input w, whether M halts on w.
Formal Statement:
Given M,w , does M halt on w?
⟨ ⟩
Result:
• Undecidable: Proven by Alan Turing using diagonalization and self-
reference.
• Central result in computability theory.
• Implies many practical limits: no program can determine for all others
whether they terminate.
Stack Automata
Definition: A computational model like a pushdown automaton (PDA),
but with more direct access to the stack.
Types:
• 1-way stack automata: Read-only input tape, one stack with limited
access (can read more than just the top).
• 2-way stack automata: Input head can move in both directions.
Power:
• More powerful than PDAs.
• Can accept some languages not context-free.
• Still less powerful than Turing machines.
What is turing machine full described PPT for all learners

What is turing machine full described PPT for all learners

  • 1.
    Model Institute ofEngineering & Technology Department of Computer Science and Engineering Course Name:- Theory of Automation Course Code:- COM-604 Lecture No:- Date- Dr. Rajneet Kaur Bijral
  • 2.
    Course Outcomes By theend of the course, students shall be able to: CO1 Apply DFA and NFA concepts to design and analyze finite automata. CO2 Analyze context-free grammars and the Pumping Lemma for language properties. CO3 Design computational models using various Turing machine models. CO4 Evaluate Push Down Automata models for their acceptance criteria of context-free languages. CO5 Assess properties of recursive and recursively enumerable languages for decidability issues.
  • 3.
    Detailed Syllabus Section-A Unit 1:Finite Automata: Deterministic Finite Automata (DFA), Designing, Non- deterministic finite Automata (NFA) without E-moves, Conversions, Equivalence, NFA with E-moves, Regular expression designing, Finite machine with output assigned, Moore and mealy machines, Conversion and Equivalence, Myhill-Nerode Theorem. Unit 2: Regular Grammar & Context free Languages: Context free Grammar, Context free Languages, reduced form of Grammar, Ambiguous and Non- Ambiguous grammar, acceptors and generators, Relations between Classes of Languages, Pumping lemma of regular sets, Chomsky’s hierarchy of languages, derivation Trees, CYK Algorithm for CFL Membership, Testing emptiness of CFLs. Section-B Unit 3: Turing Machines: Church Testing Hypothesis, Turing Computability, Non- deterministic, Multitape and other versions of Turing machines, Churches Hypothesis, Primitive Recursive functions, Universal Turing machines, decidability, Halting problem, Stack Automata. Unit 4: Push Down Automata: Definition, Model, Acceptance of CFL, Acceptance by Final State and Acceptance by Empty stack and its Equivalence, Equivalence of CFG and PDA. Unit 5: Recursive and Recursively Enumerable Languages (rel): Properties of recursive and recursively enumerable languages, Context sensitive language and linear bounded automata (LBA), Chomsky hierarchy, Decidability, Post's correspondence problem (PCKP), undecidability of PCP.
  • 4.
    Assessment and EvaluationPlan 4 Assessment Tools  Assignment  Sessional  Attendance  External Exam Evaluation  20 marks  20 marks  10 marks  100 marks
  • 5.
    The Turing Machine Turing’smachine — is the simple mathematical model of a modern digital computer: 1. A tape of infinite length. 2. Finitely many squares of the tape have a single symbol from a finite language. 3. We can read the squares and write in them. 4. At any time, the machine is in one of a finite number of internal states. 5. The machine has instructions that determine what it does given its internal state and the symbol it encounters on the tape. It can   change its internal state;   change the symbol on the square;   move forward;   move backward;   halt (i.e. stop). Control unit Read-write head Tape Processing unit with a finite memory. A secondary storage of unlimited capacity.
  • 6.
    The Tape 6 Read-Write head Noboundaries -- infinite length The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right Example 1: Time 0 Time 1 1. Reads a 2. Write k 3. Move Left Input string 1 q 2 q Read Write Move Left a k, L States & Transitions
  • 7.
    7 ...... ......     a b c a Time 1 1 q 2 q R b a ,  ...... ......      a b c b Time 2 1 q 2 q
  • 8.
    9 ...... ......     a b c a Time 1 1 q 2 q R b a ,  ...... ......      a b c b Time 2 1 q 2 q
  • 9.
    Final States 12 1 q 2 qAllowed 1 q 2 q NotAllowed • Final states have no outgoing transitions • In a final state the machine halts
  • 10.
    Acceptance 13 Accept Input Ifmachine halts in a final state Reject Input If machine halts in a non-final state or If machine enters an infinite loop
  • 11.
    9.1 The standardTuring Machine states. final of set the is state, initial the is blank, the called symbol special a is function, n transitio the is alphabet, tape the called symbols of set finite a is alphabet, input the is Σ states, internal of set the is where ), ( by defined is machine A turing 9.1 Definition 0 0 Q F Q q T δ Γ Q , ,F ,q Q,Σ, M M      Control unit Read-write head Tape {L,R} Γ Q Γ δ:Q     a b c State p d b c State q (q,d,R) δ(p,a)  Example 9.1 The following figure shows the situation before and after the move caused by the transition . (q,d,R) δ(p,a)  Halt state: A Turing machine will halt whenever it enters a final state or reaches a configuration for which is not defined. δ
  • 12.
    15 ...... ...... 1 q Example: a a ab b b B B B q 0 q 1 a,X,R a,a,R q 2 b,Y, L a,a, L q 3 X,X, R Y , Y , R B,B,R q 4
  • 13.
    16  Example #1:{w | w is in {0,1}* and w ends with a 0} 0 00 10 10110 Not ε Q = {q0, q1, q2} = {0, 1, B} Γ = {0, 1} Σ F = {q2} : δ 0 1 B ->q0 (q0, 0, R) (q0, 1, R) (q1, B, L) q1 (q2, 0, R) - - q2 * - - -  q0 is the start state and the “scan right” state, until hits B  q1 is the verify 0 state 
  • 15.
    Turing machine foreven palindrom
  • 16.
  • 17.
  • 18.
  • 19.
    Church-Turing Thesis Implications ofthe Church-Turing Thesis 1. Universality of Turing Machines: Any computation that can be done by any machine can be done by a Turing machine. 2. Limits of Computability: If a problem cannot be solved by a Turing machine, it is undecidable. 3. Basis for Modern Computers: Real-world computers (ignoring memory limits) are equivalent in power to Turing machines. 4. Decidability: Helps define which problems are decidable vs. undecidable (e.g., Halting Problem is undecidable).
  • 20.
    Turing Computability Definition: Afunction is said to be Turing computable if there exists a Turing machine that, for every valid input, halts and gives the correct output. Key Points: • It's the formal definition of what it means for a function to be "algorithmically solvable". • If no Turing machine exists to compute a function, it is uncomputable (e.g., Halting Problem).
  • 21.
    Non-Deterministic Turing Machine(NTM) Definition: A Turing machine where, for some configurations, the machine may have multiple possible transitions. Features: • Like a DFA vs. NFA, but for Turing machines. • Accepts an input if any of the computation paths lead to an accepting state. • Theoretical result: NTMs and deterministic TMs are equivalent in power (i.e., same languages recognized), but NTMs may be exponentially faster.
  • 22.
    Multitape Turing Machine Definition:A Turing machine with multiple tapes (and heads) for input/output and working memory. Characteristics: • Each tape operates independently. • Allows for more efficient algorithms (e.g., copying a string in linear time). • Equivalence: Multitape TMs are equivalent in computational power to single-tape TMs — any multitape TM can be simulated by a single- tape TM with polynomial slowdown.
  • 23.
    Primitive Recursive Functions Definition:A class of functions built using: • Basic initial functions: zero function, successor function, projection functions. • Operations: composition and primitive recursion. Characteristics: • All primitive recursive functions are total (they always terminate). • Examples: Addition, multiplication, factorial. • Limitation: Cannot express all computable functions (e.g., Ackermann’s function is computable but not primitive recursive).
  • 24.
    Universal Turing Machine(UTM) Definition: A Turing machine that can simulate any other Turing machine. Key Concepts: • Input is a pair: the description of another Turing machine and its input. • The UTM reads the encoded description and simulates the machine step-by-step. • Foundation of the idea of stored-program computers. • It proves that Turing machines are programmable.
  • 25.
    Decidability Definition: A problemis decidable if there exists a Turing machine that halts on every input and correctly answers YES or NO. Categories: • Decidable languages: Turing machines that always halt (a.k.a. recursive languages). • Undecidable languages: No such machine exists. • Examples of decidable problems: • Membership in regular or context-free languages. • Undecidable problems include: • Halting problem. • Post Correspondence Problem. • Validity of first-order logic formulas.
  • 26.
    Halting Problem  Definition:The problem of determining, for any arbitrary Turing machine M and input w, whether M halts on w. Formal Statement: Given M,w , does M halt on w? ⟨ ⟩ Result: • Undecidable: Proven by Alan Turing using diagonalization and self- reference. • Central result in computability theory. • Implies many practical limits: no program can determine for all others whether they terminate.
  • 27.
    Stack Automata Definition: Acomputational model like a pushdown automaton (PDA), but with more direct access to the stack. Types: • 1-way stack automata: Read-only input tape, one stack with limited access (can read more than just the top). • 2-way stack automata: Input head can move in both directions. Power: • More powerful than PDAs. • Can accept some languages not context-free. • Still less powerful than Turing machines.

Editor's Notes

  • #1 Presentation slide for courses, classes, lectures et al.