SlideShare a Scribd company logo
Formal Languages and
Automata Theory
Presented By:
K Lakshmi Sravani(Asst Professor)
Course Outcomes
1. Able to understand the concept of abstract machines and their power to recognize
the languages. 

2. Able to employ finite state machines for modeling and solving computing
problems. 

3. Able to design context free grammars for formal languages. 

4. Able to distinguish between decidability and undecidability. 

5. Able to gain proficiency with mathematical tools and formal methods.
UNIT - I

PART-1
Introduction to Finite Automata: Structural Representations, Automata and Complexity, the Central
Concepts of Automata Theory – Alphabets, Strings, Languages, Problems.

PART-2
Nondeterministic Finite Automata: Formal Definition, an application, Text Search, Finite Automata
with Epsilon-Transitions.

PART-3
Deterministic Finite Automata: Definition of DFA, How A DFA Process Strings, The language of
DFA, Conversion of NFA with €-transitions to NFA without €-transitions. Conversion of NFA to
DFA, Moore and Melay machines
What is automata
● The term "Automata" is derived from the Greek word
"αὐτό%ατα" which means “self-acting”.
● Automatons are abstract models of machines that
performs computations of an input by moving
through a series of states.
Finite Automata(FA)
● An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State Machine (FSM).
● Formal definition of a Finite Automaton
An automaton can be represented by a
5-tuple (Q, ∑, δ, q0, F), where −
• Q is a finite set of states.

• ∑ is a finite set of symbols, called
the alphabet of the automaton.

• δ is the transition function.

• q0 is the initial state from where
any input is processed (q0 ∈ Q).

• F is a set of final state/states of Q
(F ⊆ Q).

● Example:
• The Circle represent the states.
• The arcs labeled with an input alphabet show the transitions.
• The initial state is denoted by an empty single incoming arc.
• The final state is indicated by double circles.
Q = {a, b, c},
∑ = {0, 1},
q0 = {a},
F = {c}
Structural Representation
● FA is represented in 2 ways
A. Transition Diagram
B. Transition Table States/
Input
0 1
—>A A B
B C A
*C B C
Transition Diagram
● A transition diagram or state transition diagram is a directed
graph which can be constructed as follows:
◦ There is a node for each state in Q, which is represented by the
circle.
◦ There is a directed edge from node q to node p labeled a if
δ(q, a) = p.
◦ In the start state, there is an arrow with no source.
◦ Accepting states or final states are indicating by a double
circle.
Transition Table
● The transition table is basically a tabular representation of the
transition function. It takes two arguments (a state and a
symbol) and returns a state (the "next state").
A transition table is represented by the following things:
◦ Columns correspond to input symbols.
◦ Rows correspond to states.
◦ Entries correspond to the next state.
◦ The start state is denoted by an arrow with no source.
◦ The accept state is denoted by a star.
Input/states 0 1
—>Q0 Q1 Q2
Q1 Q0 Q2
*Q2 Q2 Q2
●Chomsky Normal Form
Grammar Languages Automaton
Type-0 Recursively
enumerable
Turing machine
Type-1
Context-
sensitive
Linear-
bounded non-
deterministic
Turing
machine
Type-2 Context-free
 pushdown
automaton
Type-3 Regular
Finite state
automaton
Alphabets, Strings, Languages, Problems
● Alphabet: An   alphabet   is   a finite collection of
symbols.
● Example:
● Σ = {a, b} be an alphabet
● Σ = {0,1} be an alphabet
● Σ = {a, b…..z} be an alphabets (set of lower case
letters)
● String: A string over an alphabet Σ is a finite
sequence of symbols of Σ.
● Example:
● Let Σ = {a, b} be an alphabet; then {a, b, aa, ab, bba,
baaba, . . . } are some examples of strings over Σ.
A infinite number of strings can be generated.
● Let Σ = {0,1} be an alphabet; then
{0,1,01,0011,0101,100000…..}
● Language: It is collection of appropriate strings.
● Examples:
● L= The set of all strings over {0, 1} that start with 0
Σ={0,00,010,011,0111,0101…..}
• The set of all strings over {a, b, c} having ac as a substring
Σ={ac, abaca, acba, bcac, abac……..}
Since languages are sets, we can apply various well known set operations
such as union, concatenation ,Kleene star or Kleene closure, complement,
difference, intersection on languages
Kleene Star/Kleene Closure
● The Kleene star, ∑*, is a unary operator on a set of symbols
or strings ∑.
● For example, if Σ = {0, 1}, then ∑*= {ε, 0, 1, 00, 01, 10, 11,
000, 001, . . .}
● ∑0=ε. The length of string
● ∑1={0,1}
● ∑2={00,11,10,01}
● ∑3={000,001,011,010,111,110,101,100}
● The Kleene closure of a language L is denoted by L* is
defined as
● The Kleene star of the language L = {0, 1} over the
alphabet Σ = {0, 1} is
● L* = L 0 ∪ L1 ∪ L 2 ∪ · · ·
● = {ε} ∪ {0, 1} ∪ {00, 01, 10, 11} ∪ · · ·
● = {ε, 0, 1, 00, 01, 10, 11, · · · }
● = the set of all strings over Σ.
Kleene Plus
● The positive closure of a language L is denoted by
L+ is defined as over the alphabet Σ = {0, 1} is
● L+ = L1 ∪ L 2 ∪ · · ·
● = {0, 1} ∪ {00, 01, 10, 11} ∪ · · ·
● = {0, 1, 00, 01, 10, 11, · · · }
● = the set of all strings over Σ.
Types of FA
● 2 types of FA. They are
● Deterministic Finite Automaton(DFA) or
Deterministic Finite Machine
● Non-Deterministic Finite Automaton(NFA) or Non-
Deterministic Finite Machine
DFA
Formal Definition of a DFA
A DFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where −
• Q is a finite set of states.

• ∑ is a finite set of symbols called the alphabet.

• δ is the transition function where δ: Q × ∑ → Q

• q0 is the initial state from where any input is processed (q0 ∈ Q).

• F is a set of final state/states of Q (F ⊆ Q).

Graphical Representation of a DFA
A DFA is represented by state diagram.
• The vertices represent the states.
• The arcs labeled with an input alphabet show the transitions.
• The initial state is denoted by an empty single incoming arc.
• The final state is indicated by double circles.
NFA
An NFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where −
• Q is a finite set of states.

• ∑ is a finite set of symbols called the alphabets.

• δ is the transition function where δ: Q × ∑ → 2Q

(Here the power set of Q (2Q) has been taken because in case of NDFA, from a state,
transition can occur to any combination of Q states)

• q0 is the initial state from where any input is processed (q0 ∈ Q).

• F is a set of final state/states of Q (F ⊆ Q).

Graphical Representation of a NFA
• The vertices represent the states.
• The arcs labeled with an input alphabet show the
transitions.
• The initial state is denoted by an empty single incoming
arc.
• The final state is indicated by double circles.
NFA VS DFA
Examples of FA Refer Document
FA-1
FA -2
FA-3
● Conversion from NFA to DFA
● Suppose there is an NFA N < Q, ∑, q0, δ, F > which recognizes
a language L. Then the DFA D < Q’, ∑, q0, δ’, F’ > can be
constructed for language L as:
Step 1: Initially Q’ = ɸ.
Step 2: Add q0 to Q’.
Step 3: For each state in Q’, find the possible set of states for each
input symbol using transition function of NFA. If this set of states
is not in Q’, add it to Q’.
Step 4: Final state of DFA will be all states with contain F (final
states of NFA)
Examples: refer document
●∈-NFA
● NFA with (null) or ∈ move : If any finite automata
contains ε (null) move or transaction, then that finite
automata is called NFA with ∈ moves
Epsilon (∈) – closure :
Epsilon closure for a given state X is a set of states which can be
reached from the states X with only (null) or ε moves including
the state X itself. In other words, ε-closure for a state can be
obtained by union operation of the ε-closure of the states which
can be reached from X with a single ε move in recursive manner.
For the above example ∈ closure are as follows :
∈ closure(A) : {A, B, C}
∈ closure(B) : {B, C}
∈ closure(C) : {C}
∈-NFA TO NFA CONVERSION
● Step1: Find e-closure for each state in
machine(default e-closure applicable to every state)
● Step 2: output of step 1 apply input alphabets we will
get a result.
● Step 3: On result of step 2 again apply closure.
● Formula: e-closure(δ(e-closure(q),∑))
Example
Example:Any no of 0's followed by any 1’s followed by 2’s
Minimisation of DFA -Equivalence Theorem
Step 1: We will divide Q (set of states) into two sets. One set will
contain all final states and other set will contain non-final states.
This partition is called P0.
Step 2: Initialize k = 1
Step 3: Find Pk by partitioning the different sets of Pk-1. In each set
of Pk-1, we will take all possible pair of states. If two states of a set
are distinguishable, we will split the sets into different sets in Pk.
Step 4: Stop when Pk = Pk-1 (No change in partition)
Step 5: All states of one set are merged into one. No. of states in
minimized DFA will be equal to no. of sets in Pk.
● Question 1
Step 1. P0 will have two sets of states. One set will contain q1, q2, q4 which are final
states of DFA and another set will contain remaining states. So P0 = { { q1, q2, q4 }, { q0,
q3, q5 } }. 
Step 2. To calculate P1, we will check whether sets of partition P0 can be partitioned or
not: 
i) For set { q1, q2, q4 } 
δ ( q1, 0 ) = q2 ( q2, 0 ) = q2 and δ ( q1, 1 ) = q5 ( q2, 1 ) = q5, So q1 and q2 are not
distinguishable. 
Similarly, δ ( q1, 0 ) = δ ( q4, 0 ) = q2 and δ ( q1, 1 ) = δ ( q4, 1 ) = q5, So q1 and q4 are
not distinguishable. 
Since, q1 and q2 are not distinguishable and q1 and q4 are also not distinguishable, So q2
and q4 are not distinguishable. So, { q1, q2, q4 } set will not be partitioned in P1. 
ii) For set { q0, q3, q5 } : 
δ ( q0, 0 ) = q3 and δ ( q3, 0 ) = q0 
δ ( q0, 1) = q1 and δ( q3, 1 ) = q4 
Moves of q0 and q3 on input symbol 0 are q3 and q0 respectively which are in same set in
partition P0
Moves of q0 and q3 on input symbol 1 are q3 and q0 which are in same set in partition P0.
So, q0 and q3 are not distinguishable
δ( q0, 0 ) = q3 and δ ( q5, 0 ) = q5
δ ( q0, 1 ) = q1 and δ ( q5, 1 ) = q5 
Moves of q0 and q5 on input symbol 1 are q1 and q5 respectively which are in different set
in partition P0. 
So, q0 and q5 are distinguishable. So, set { q0, q3, q5 } will be partitioned into { q0, q3 }
and { q5 }.
P1 = { { q1, q2, q4 }, { q0, q3}, { q5 } } 
To calculate P2:
ii)For set { q1, q2, q4 } : 

δ ( q1, 0 ) = δ ( q2, 0 ) = q2 and δ ( q1, 1 ) = δ ( q2, 1 ) = q5, So q1 and q2 are not distinguishable. 

Similarly, δ ( q1, 0 ) = δ ( q4, 0 ) = q2 and δ ( q1, 1 ) = δ ( q4, 1 ) = q5, So q1 and q4 are not
distinguishable. 

Since, q1 and q2 are not distinguishable and q1 and q4 are also not distinguishable, So q2 and q4 are
not distinguishable. So, { q1, q2, q4 } set will not be partitioned in P2. 
iv)For set { q0, q3 } : 

δ ( q0, 0 ) = q3 and δ ( q3, 0 ) = q0 

δ ( q0, 1 ) = q1 and δ ( q3, 1 ) = q4 

Moves of q0 and q3 on input symbol 0 are q3 and q0 respectively which are in same set in partition P1.
Similarly, Moves of q0 and q3 on input symbol 1 are q3 and q0 which are in same set in partition P1. So,
q0 and q3 are not distinguishable. 
v) For set { q5 }: 

Since we have only one state in this set, it can’t be further partitioned. So, 

P2 = { { q1, q2, q4 }, { q0, q3 }, { q5 } } 
● Solution 1
Minimisation of DFA- Myphill-Nerode Theorem
Step 1 − Draw a table for all pairs of states (Qi, Qj) not
necessarily connected directly [All are unmarked
initially]
Step 2 − Consider every state pair (Qi, Qj) in the DFA
where Qi ∈ F and Qj ∉ F or vice versa and mark them.
[Here F is the set of final states]
Step 3 − Repeat this step until we cannot mark
anymore states −
If there is an unmarked pair (Qi, Qj), mark it if the pair
{δ (Qi, A), δ (Qi, A)} is marked for some input alphabet.
Step 4 − Combine all the unmarked pair (Qi, Qj) and
make them a single state in the reduced DFA.
● Solution
● Question 2
Thank You

More Related Content

What's hot

Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
Tsegazeab Asgedom
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Ashish Duggal
 
Automata theory
Automata theoryAutomata theory
Automata theory
Pardeep Vats
 
push down automata
push down automatapush down automata
push down automata
Christopher Chizoba
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
Mukesh Tekwani
 
Pushdown Automata Theory
Pushdown Automata TheoryPushdown Automata Theory
Pushdown Automata Theory
Saifur Rahman
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite AutomataAdel Al-Ofairi
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
deepinderbedi
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphsArham Khan G
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
Akhil Kaushik
 
Finite automata(For college Seminars)
Finite automata(For college Seminars)Finite automata(For college Seminars)
Finite automata(For college Seminars)
Naman Joshi
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
Farooq Mian
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rahul Narang
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
Animesh Chaturvedi
 
Chomsky Hierarchy.ppt
Chomsky Hierarchy.pptChomsky Hierarchy.ppt
Chomsky Hierarchy.ppt
AayushSingh233965
 
Finite automata
Finite automataFinite automata
Finite automata
Bipul Roy Bpl
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
Dipankar Boruah
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computation
Sampath Kumar S
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
Mohammad Ilyas Malik
 
Types of grammer - TOC
Types of grammer - TOCTypes of grammer - TOC
Types of grammer - TOC
AbhayDhupar
 

What's hot (20)

Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
push down automata
push down automatapush down automata
push down automata
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Pushdown Automata Theory
Pushdown Automata TheoryPushdown Automata Theory
Pushdown Automata Theory
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite Automata
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Generalized transition graphs
Generalized transition graphsGeneralized transition graphs
Generalized transition graphs
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 
Finite automata(For college Seminars)
Finite automata(For college Seminars)Finite automata(For college Seminars)
Finite automata(For college Seminars)
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
Chomsky Hierarchy.ppt
Chomsky Hierarchy.pptChomsky Hierarchy.ppt
Chomsky Hierarchy.ppt
 
Finite automata
Finite automataFinite automata
Finite automata
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computation
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Types of grammer - TOC
Types of grammer - TOCTypes of grammer - TOC
Types of grammer - TOC
 

Similar to Formal Languages and Automata Theory Unit 1

5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
TANZINTANZINA
 
Automata
AutomataAutomata
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
FariyaTasneem1
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
NAMRATA BORKAR
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
Prof. Dr. K. Adisesha
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
Prof. Dr. K. Adisesha
 
Theory of Computation Basics of Finite Acceptors
Theory of Computation Basics of Finite AcceptorsTheory of Computation Basics of Finite Acceptors
Theory of Computation Basics of Finite Acceptors
Rushabh2428
 
Theory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and ProblemsTheory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and Problems
Rushabh2428
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 
Automata
AutomataAutomata
Automata
Gaditek
 
Automata
AutomataAutomata
Automata
Gaditek
 
Thoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's ClassificationThoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's Classification
PrafullMisra
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
RohitPaul71
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
ssuser47f7f2
 
Nondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfNondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdf
SergioUlisesRojasAla
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
Muhammad Love Kian
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
A. S. M. Shafi
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
Arslan905905
 

Similar to Formal Languages and Automata Theory Unit 1 (20)

5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
 
Automata
AutomataAutomata
Automata
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of Computation Basics of Finite Acceptors
Theory of Computation Basics of Finite AcceptorsTheory of Computation Basics of Finite Acceptors
Theory of Computation Basics of Finite Acceptors
 
Theory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and ProblemsTheory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and Problems
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
Finite automata
Finite automataFinite automata
Finite automata
 
Thoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's ClassificationThoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's Classification
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
 
Nondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfNondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdf
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 

More from Srimatre K

ML_ Unit 2_Part_B
ML_ Unit 2_Part_BML_ Unit 2_Part_B
ML_ Unit 2_Part_B
Srimatre K
 
ML_Unit_2_Part_A
ML_Unit_2_Part_AML_Unit_2_Part_A
ML_Unit_2_Part_A
Srimatre K
 
ML_Unit_1_Part_C
ML_Unit_1_Part_CML_Unit_1_Part_C
ML_Unit_1_Part_C
Srimatre K
 
ML_Unit_1_Part_B
ML_Unit_1_Part_BML_Unit_1_Part_B
ML_Unit_1_Part_B
Srimatre K
 
Internet of things unit-1
Internet of things unit-1Internet of things unit-1
Internet of things unit-1
Srimatre K
 
ML_ Unit_1_PART_A
ML_ Unit_1_PART_AML_ Unit_1_PART_A
ML_ Unit_1_PART_A
Srimatre K
 
Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5
Srimatre K
 
Formal Languages and Automata Theory unit 4
Formal Languages and Automata Theory unit 4Formal Languages and Automata Theory unit 4
Formal Languages and Automata Theory unit 4
Srimatre K
 
Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3
Srimatre K
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
Srimatre K
 

More from Srimatre K (10)

ML_ Unit 2_Part_B
ML_ Unit 2_Part_BML_ Unit 2_Part_B
ML_ Unit 2_Part_B
 
ML_Unit_2_Part_A
ML_Unit_2_Part_AML_Unit_2_Part_A
ML_Unit_2_Part_A
 
ML_Unit_1_Part_C
ML_Unit_1_Part_CML_Unit_1_Part_C
ML_Unit_1_Part_C
 
ML_Unit_1_Part_B
ML_Unit_1_Part_BML_Unit_1_Part_B
ML_Unit_1_Part_B
 
Internet of things unit-1
Internet of things unit-1Internet of things unit-1
Internet of things unit-1
 
ML_ Unit_1_PART_A
ML_ Unit_1_PART_AML_ Unit_1_PART_A
ML_ Unit_1_PART_A
 
Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5
 
Formal Languages and Automata Theory unit 4
Formal Languages and Automata Theory unit 4Formal Languages and Automata Theory unit 4
Formal Languages and Automata Theory unit 4
 
Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
 

Recently uploaded

Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 

Recently uploaded (20)

Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Formal Languages and Automata Theory Unit 1

  • 1. Formal Languages and Automata Theory Presented By: K Lakshmi Sravani(Asst Professor)
  • 2. Course Outcomes 1. Able to understand the concept of abstract machines and their power to recognize the languages. 
 2. Able to employ finite state machines for modeling and solving computing problems. 
 3. Able to design context free grammars for formal languages. 
 4. Able to distinguish between decidability and undecidability. 
 5. Able to gain proficiency with mathematical tools and formal methods.
  • 3. UNIT - I
 PART-1 Introduction to Finite Automata: Structural Representations, Automata and Complexity, the Central Concepts of Automata Theory – Alphabets, Strings, Languages, Problems.
 PART-2 Nondeterministic Finite Automata: Formal Definition, an application, Text Search, Finite Automata with Epsilon-Transitions.
 PART-3 Deterministic Finite Automata: Definition of DFA, How A DFA Process Strings, The language of DFA, Conversion of NFA with €-transitions to NFA without €-transitions. Conversion of NFA to DFA, Moore and Melay machines
  • 4. What is automata ● The term "Automata" is derived from the Greek word "αὐτό%ατα" which means “self-acting”. ● Automatons are abstract models of machines that performs computations of an input by moving through a series of states.
  • 5. Finite Automata(FA) ● An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State Machine (FSM). ● Formal definition of a Finite Automaton An automaton can be represented by a 5-tuple (Q, ∑, δ, q0, F), where − • Q is a finite set of states.
 • ∑ is a finite set of symbols, called the alphabet of the automaton.
 • δ is the transition function.
 • q0 is the initial state from where any input is processed (q0 ∈ Q).
 • F is a set of final state/states of Q (F ⊆ Q).

  • 7. • The Circle represent the states. • The arcs labeled with an input alphabet show the transitions. • The initial state is denoted by an empty single incoming arc. • The final state is indicated by double circles. Q = {a, b, c}, ∑ = {0, 1}, q0 = {a}, F = {c}
  • 8.
  • 9. Structural Representation ● FA is represented in 2 ways A. Transition Diagram B. Transition Table States/ Input 0 1 —>A A B B C A *C B C
  • 10. Transition Diagram ● A transition diagram or state transition diagram is a directed graph which can be constructed as follows: ◦ There is a node for each state in Q, which is represented by the circle. ◦ There is a directed edge from node q to node p labeled a if δ(q, a) = p. ◦ In the start state, there is an arrow with no source. ◦ Accepting states or final states are indicating by a double circle.
  • 11.
  • 12. Transition Table ● The transition table is basically a tabular representation of the transition function. It takes two arguments (a state and a symbol) and returns a state (the "next state"). A transition table is represented by the following things: ◦ Columns correspond to input symbols. ◦ Rows correspond to states. ◦ Entries correspond to the next state. ◦ The start state is denoted by an arrow with no source. ◦ The accept state is denoted by a star.
  • 13. Input/states 0 1 —>Q0 Q1 Q2 Q1 Q0 Q2 *Q2 Q2 Q2
  • 14. ●Chomsky Normal Form Grammar Languages Automaton Type-0 Recursively enumerable Turing machine Type-1 Context- sensitive Linear- bounded non- deterministic Turing machine Type-2 Context-free  pushdown automaton Type-3 Regular Finite state automaton
  • 15. Alphabets, Strings, Languages, Problems ● Alphabet: An   alphabet   is   a finite collection of symbols. ● Example: ● Σ = {a, b} be an alphabet ● Σ = {0,1} be an alphabet ● Σ = {a, b…..z} be an alphabets (set of lower case letters)
  • 16. ● String: A string over an alphabet Σ is a finite sequence of symbols of Σ. ● Example: ● Let Σ = {a, b} be an alphabet; then {a, b, aa, ab, bba, baaba, . . . } are some examples of strings over Σ. A infinite number of strings can be generated. ● Let Σ = {0,1} be an alphabet; then {0,1,01,0011,0101,100000…..}
  • 17. ● Language: It is collection of appropriate strings. ● Examples: ● L= The set of all strings over {0, 1} that start with 0 Σ={0,00,010,011,0111,0101…..} • The set of all strings over {a, b, c} having ac as a substring Σ={ac, abaca, acba, bcac, abac……..} Since languages are sets, we can apply various well known set operations such as union, concatenation ,Kleene star or Kleene closure, complement, difference, intersection on languages
  • 18. Kleene Star/Kleene Closure ● The Kleene star, ∑*, is a unary operator on a set of symbols or strings ∑. ● For example, if Σ = {0, 1}, then ∑*= {ε, 0, 1, 00, 01, 10, 11, 000, 001, . . .} ● ∑0=ε. The length of string ● ∑1={0,1} ● ∑2={00,11,10,01} ● ∑3={000,001,011,010,111,110,101,100} ● The Kleene closure of a language L is denoted by L* is defined as
  • 19. ● The Kleene star of the language L = {0, 1} over the alphabet Σ = {0, 1} is ● L* = L 0 ∪ L1 ∪ L 2 ∪ · · · ● = {ε} ∪ {0, 1} ∪ {00, 01, 10, 11} ∪ · · · ● = {ε, 0, 1, 00, 01, 10, 11, · · · } ● = the set of all strings over Σ.
  • 20. Kleene Plus ● The positive closure of a language L is denoted by L+ is defined as over the alphabet Σ = {0, 1} is ● L+ = L1 ∪ L 2 ∪ · · · ● = {0, 1} ∪ {00, 01, 10, 11} ∪ · · · ● = {0, 1, 00, 01, 10, 11, · · · } ● = the set of all strings over Σ.
  • 21. Types of FA ● 2 types of FA. They are ● Deterministic Finite Automaton(DFA) or Deterministic Finite Machine ● Non-Deterministic Finite Automaton(NFA) or Non- Deterministic Finite Machine
  • 22.
  • 23. DFA Formal Definition of a DFA A DFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where − • Q is a finite set of states.
 • ∑ is a finite set of symbols called the alphabet.
 • δ is the transition function where δ: Q × ∑ → Q
 • q0 is the initial state from where any input is processed (q0 ∈ Q).
 • F is a set of final state/states of Q (F ⊆ Q).

  • 24. Graphical Representation of a DFA A DFA is represented by state diagram. • The vertices represent the states. • The arcs labeled with an input alphabet show the transitions. • The initial state is denoted by an empty single incoming arc. • The final state is indicated by double circles.
  • 25. NFA An NFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where − • Q is a finite set of states.
 • ∑ is a finite set of symbols called the alphabets.
 • δ is the transition function where δ: Q × ∑ → 2Q
 (Here the power set of Q (2Q) has been taken because in case of NDFA, from a state, transition can occur to any combination of Q states)
 • q0 is the initial state from where any input is processed (q0 ∈ Q).
 • F is a set of final state/states of Q (F ⊆ Q).

  • 26. Graphical Representation of a NFA • The vertices represent the states. • The arcs labeled with an input alphabet show the transitions. • The initial state is denoted by an empty single incoming arc. • The final state is indicated by double circles.
  • 27.
  • 28.
  • 30. Examples of FA Refer Document
  • 31. FA-1
  • 32. FA -2
  • 33. FA-3
  • 34. ● Conversion from NFA to DFA ● Suppose there is an NFA N < Q, ∑, q0, δ, F > which recognizes a language L. Then the DFA D < Q’, ∑, q0, δ’, F’ > can be constructed for language L as: Step 1: Initially Q’ = ɸ. Step 2: Add q0 to Q’. Step 3: For each state in Q’, find the possible set of states for each input symbol using transition function of NFA. If this set of states is not in Q’, add it to Q’. Step 4: Final state of DFA will be all states with contain F (final states of NFA) Examples: refer document
  • 35. ●∈-NFA ● NFA with (null) or ∈ move : If any finite automata contains ε (null) move or transaction, then that finite automata is called NFA with ∈ moves
  • 36.
  • 37. Epsilon (∈) – closure : Epsilon closure for a given state X is a set of states which can be reached from the states X with only (null) or ε moves including the state X itself. In other words, ε-closure for a state can be obtained by union operation of the ε-closure of the states which can be reached from X with a single ε move in recursive manner. For the above example ∈ closure are as follows : ∈ closure(A) : {A, B, C} ∈ closure(B) : {B, C} ∈ closure(C) : {C}
  • 38. ∈-NFA TO NFA CONVERSION ● Step1: Find e-closure for each state in machine(default e-closure applicable to every state) ● Step 2: output of step 1 apply input alphabets we will get a result. ● Step 3: On result of step 2 again apply closure. ● Formula: e-closure(δ(e-closure(q),∑))
  • 40. Example:Any no of 0's followed by any 1’s followed by 2’s
  • 41.
  • 42. Minimisation of DFA -Equivalence Theorem Step 1: We will divide Q (set of states) into two sets. One set will contain all final states and other set will contain non-final states. This partition is called P0. Step 2: Initialize k = 1 Step 3: Find Pk by partitioning the different sets of Pk-1. In each set of Pk-1, we will take all possible pair of states. If two states of a set are distinguishable, we will split the sets into different sets in Pk. Step 4: Stop when Pk = Pk-1 (No change in partition) Step 5: All states of one set are merged into one. No. of states in minimized DFA will be equal to no. of sets in Pk.
  • 44. Step 1. P0 will have two sets of states. One set will contain q1, q2, q4 which are final states of DFA and another set will contain remaining states. So P0 = { { q1, q2, q4 }, { q0, q3, q5 } }.  Step 2. To calculate P1, we will check whether sets of partition P0 can be partitioned or not:  i) For set { q1, q2, q4 }  δ ( q1, 0 ) = q2 ( q2, 0 ) = q2 and δ ( q1, 1 ) = q5 ( q2, 1 ) = q5, So q1 and q2 are not distinguishable.  Similarly, δ ( q1, 0 ) = δ ( q4, 0 ) = q2 and δ ( q1, 1 ) = δ ( q4, 1 ) = q5, So q1 and q4 are not distinguishable.  Since, q1 and q2 are not distinguishable and q1 and q4 are also not distinguishable, So q2 and q4 are not distinguishable. So, { q1, q2, q4 } set will not be partitioned in P1. 
  • 45. ii) For set { q0, q3, q5 } :  δ ( q0, 0 ) = q3 and δ ( q3, 0 ) = q0  δ ( q0, 1) = q1 and δ( q3, 1 ) = q4  Moves of q0 and q3 on input symbol 0 are q3 and q0 respectively which are in same set in partition P0 Moves of q0 and q3 on input symbol 1 are q3 and q0 which are in same set in partition P0. So, q0 and q3 are not distinguishable δ( q0, 0 ) = q3 and δ ( q5, 0 ) = q5 δ ( q0, 1 ) = q1 and δ ( q5, 1 ) = q5  Moves of q0 and q5 on input symbol 1 are q1 and q5 respectively which are in different set in partition P0.  So, q0 and q5 are distinguishable. So, set { q0, q3, q5 } will be partitioned into { q0, q3 } and { q5 }. P1 = { { q1, q2, q4 }, { q0, q3}, { q5 } } 
  • 46. To calculate P2: ii)For set { q1, q2, q4 } : 
 δ ( q1, 0 ) = δ ( q2, 0 ) = q2 and δ ( q1, 1 ) = δ ( q2, 1 ) = q5, So q1 and q2 are not distinguishable. 
 Similarly, δ ( q1, 0 ) = δ ( q4, 0 ) = q2 and δ ( q1, 1 ) = δ ( q4, 1 ) = q5, So q1 and q4 are not distinguishable. 
 Since, q1 and q2 are not distinguishable and q1 and q4 are also not distinguishable, So q2 and q4 are not distinguishable. So, { q1, q2, q4 } set will not be partitioned in P2.  iv)For set { q0, q3 } : 
 δ ( q0, 0 ) = q3 and δ ( q3, 0 ) = q0 
 δ ( q0, 1 ) = q1 and δ ( q3, 1 ) = q4 
 Moves of q0 and q3 on input symbol 0 are q3 and q0 respectively which are in same set in partition P1. Similarly, Moves of q0 and q3 on input symbol 1 are q3 and q0 which are in same set in partition P1. So, q0 and q3 are not distinguishable.  v) For set { q5 }: 
 Since we have only one state in this set, it can’t be further partitioned. So, 
 P2 = { { q1, q2, q4 }, { q0, q3 }, { q5 } } 
  • 48. Minimisation of DFA- Myphill-Nerode Theorem Step 1 − Draw a table for all pairs of states (Qi, Qj) not necessarily connected directly [All are unmarked initially] Step 2 − Consider every state pair (Qi, Qj) in the DFA where Qi ∈ F and Qj ∉ F or vice versa and mark them. [Here F is the set of final states] Step 3 − Repeat this step until we cannot mark anymore states − If there is an unmarked pair (Qi, Qj), mark it if the pair {δ (Qi, A), δ (Qi, A)} is marked for some input alphabet. Step 4 − Combine all the unmarked pair (Qi, Qj) and make them a single state in the reduced DFA.