SlideShare a Scribd company logo
NFA CONVERSION TO DFA
Author : Abdullah Jan
Non-deterministic Automaton.
• In NDFA, for a particular input symbol, the machine can move to any
combination of the states in the machine. Hence, it is called Non-
deterministic Automaton.
• Formal Definition of an NDFA
• An NDFA 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)
Deterministic Finite Automaton (DFA)
• Deterministic Finite Automaton (DFA)
• In DFA, for each input symbol, one can determine the state to which the machine will
move.
• Hence, it is called Deterministic Automaton.
• As it has a finite number of states, the machine is called Deterministic Finite Machine
or Deterministic Finite Automaton
•Q is a finite set of states.
•∑ is a finite set of symbols called the alphabet.
•δ is the transition function where δ: Q × ∑ → Q
Properties
NFA
• “NFA” stands for “Nondeterministic
Finite Automata.”
• In NFA each pair of state and input
symbol can have many possible next
states.
• NFA can use empty string transition
• NFA is easier to construct
• NFA requires less space
DFA
• DFA” stands for “Deterministic Finite
Automata”
• In DFA the next possible state is
distinctly set
• DFA cannot use empty string
transition.
• It is more difficult to construct DFA.
• DFA requires more space
Conversion of NFA TO DFA
• Every DFA is an NFA But not vice versa
DFA δ = Q x ∑ -> Q NFA δ = Q x ∑ -> 2Q
• But there is an equivalent DFA For every NFA
NFA ˜ DFA=
Important point
• In DFA we combine two state into single state.
• In DFA there is only one transition to only one state
EXAMPLE NO1 ON CONVERSION
• L = {set of all strings over (0,1) that start with ‘0’}
∑ = {0,1)
NFA:
A B
O,1
State 0 1
->A B ɸ
B B B
NFA converter into DFA
• DFA
A B
O,1
State 0 1
->A B C
B B B
C C C
O
C
1
EXAMPLE 2
• L = {set of all string over(0,1) that end with ‘1’}
• ∑ = {0,1)1
A B
State 0 1
->A B {A,B}
ɸ ɸ
O,1
1
B
NFA converted into DFA
A AB
State 0 1
->A B {AB}
A {AB}
1
O 1
O AB
Example 3
• L = {Set of all string over(0,1) that end with ‘01’}
• NFA
A C
O,1
State 0 1
->A {A,B} A
B ɸ C
ɸ ɸ
B
O 1
C
NFA converted into DFA
A
AB
State 0 1
->A AB A
AB AB AC
AB A
0
1 0
1
AB
0 1
AC
Example 4 NFA
• M= [ {A,B,C},(a,b), δ,A,{C}]
• NFA AND DFA is represented by 5 tuple
State a b
->A {A,B} C
B A B
ɸ {A,B}
AB
AB
a
A
b
a
a
b
bb
C
NFA converted into DFA
A
BC
State 0 1
->A AB C
AB AB BC
A AB
D AB
D D D
a
b a
a
AB
b b
C
D
a
a,b
b
BC
C
Assignment for home
• Assignment : try to find out what type of string this NFA and
Equivalent DFA accepted
Transition Graph
• Properties:
• Can have more than one initial state
• Empty transaction is allowed
• We allow the machine to real move than one character at a time
• If ∑ = {a,b} Draw TG for all string containing bbb or aaa
• (a+b)* (aaa+bbb) (a+b)*
• TG reduced the complexity of NFA and DFA
Transition Graph
A
A
B
a,b
a,b
a,b
MINIMIZATION OF DFA
• Minimization of DFA is required to obtain the minimal version of any
DFA which consists of the minimum number of states possible
• DFA 5 state 4 state
00000 0000
These two are equivalent Two state ‘A’ and ‘B’ are said to be equivalent
δ(A,X) -> F δ(A,X) -> F
and and
δ (B,X) ->F δ (B,X) -> F
MINIMIZATION OF DFA
• If |X| = 0, then A and B are said to be 0 equivalent
• If |X| = 1, then A and B are said to be 1 equivalent
• If |X| = 2, then A and B are said to be 2 equivalent
.
.
.
if|X| = n then A and B are said to be n equivalent
We need these properties to combined two state and make one state
to get minimal version DFA
Example Part1
A
C
DB
E
0
1
0
1
1
1
1
State 0 1
->A B C
B B D
C B C
D B E
B CE
Example Part1
• 0 equivalence {A,B,C,D} {E}
• 1 equivalence {A,B,C) {D} {E}
• 2 equivalence {A,C} {B} {D} {E}
• 3 equivalence {A,C} {B} {D} {E}
When you find two row gives consecutive result than it time to stop the
process
Result both are
same
Example Part1
AC
E
DB
Particle work to create NFA AND DFA IN JFLAP
Particle work to create NFA AND DFA IN JFLAP
Assignment
• Thompson subset construction
Work Smart Not hard

More Related Content

What's hot (20)

PPTX
Automata theory - NFA ε to DFA Conversion
Akila Krishnamoorthy
 
PPT
NFA or Non deterministic finite automata
deepinderbedi
 
PPTX
Simplification of cfg ppt
Shiela Rani
 
PPT
Mealy moore machine model
deepinderbedi
 
PPTX
NFA & DFA
Akhil Kaushik
 
PPT
Regular expressions-Theory of computation
Bipul Roy Bpl
 
PPTX
Deterministic Finite Automata
Shiraz316
 
PPTX
1.9. minimization of dfa
Sampath Kumar S
 
PPTX
language , grammar and automata
ElakkiyaS11
 
PPT
Lecture 7
shah zeb
 
PDF
Formal Languages and Automata Theory unit 2
Srimatre K
 
PPT
Lecture 6
shah zeb
 
PPTX
push down automata
nadiatariq6
 
PDF
NFA to DFA
Animesh Chaturvedi
 
PPTX
Automata theory - NFA to DFA Conversion
Akila Krishnamoorthy
 
PPTX
closure properties of regular language.pptx
Thirumoorthy64
 
PPTX
Minimization of DFA.pptx
SadagopanS
 
PPTX
Automaton
SudipKambli
 
PPTX
Equivalence of DFAs and NFAs.pptx
SamyakJain710491
 
Automata theory - NFA ε to DFA Conversion
Akila Krishnamoorthy
 
NFA or Non deterministic finite automata
deepinderbedi
 
Simplification of cfg ppt
Shiela Rani
 
Mealy moore machine model
deepinderbedi
 
NFA & DFA
Akhil Kaushik
 
Regular expressions-Theory of computation
Bipul Roy Bpl
 
Deterministic Finite Automata
Shiraz316
 
1.9. minimization of dfa
Sampath Kumar S
 
language , grammar and automata
ElakkiyaS11
 
Lecture 7
shah zeb
 
Formal Languages and Automata Theory unit 2
Srimatre K
 
Lecture 6
shah zeb
 
push down automata
nadiatariq6
 
NFA to DFA
Animesh Chaturvedi
 
Automata theory - NFA to DFA Conversion
Akila Krishnamoorthy
 
closure properties of regular language.pptx
Thirumoorthy64
 
Minimization of DFA.pptx
SadagopanS
 
Automaton
SudipKambli
 
Equivalence of DFAs and NFAs.pptx
SamyakJain710491
 

Similar to NFA Converted to DFA , Minimization of DFA , Transition Diagram (20)

PDF
Automata theory
Pardeep Vats
 
PPTX
FiniteAutomata_anim.pptx
amara jyothi
 
PPTX
FiniteAutomata_anim.pptx
ranjan317165
 
PPTX
AUTOMATA THEORY AUTOMATA THEORYAutomata3Chapter2.pptx
ArjayBalberan1
 
PPTX
1.3.2 non deterministic finite automaton
Sampath Kumar S
 
PPTX
Theory of computation Unit 1 Lecute 2.pptx
RishabhGupta238479
 
PPTX
TCS MUBAI UNIVERSITY ATHARVA COLLEGE OF ENGINEERING.pptx
userqwerty2612
 
PPTX
INTRODUTION Formal Language and Automatic Theory.pptx
SUNEEL37
 
PDF
Theory of Computation FSM Conversions and Problems
Rushabh2428
 
PPTX
4-Regular expression to Deterministic Finite Automata (Direct method)-05-05-2...
venkatapranaykumarGa
 
PDF
TCS GOLDEN NOTES THEORY OF COMPUTATION .pdf
userqwerty2612
 
PDF
Nondeterministic Finite Automata
parmeet834
 
PDF
NFA DFA Equivalence theorem
niveditJain
 
PPTX
NFA to DFA Conversion Using Subset Construction Method
Zihan Islam
 
PPT
Lecture 1 CSE 322 LPU By 5th SEM .ppt Good
abcxyz19691969
 
PPT
CSE-322 lecture1 notes
databydevang
 
PPTX
Week 3 - to FiniteAutomata DrJunaid.pptx
MFaizan35
 
PDF
deterministicfiniteautomatondfa-181008145215 (1).pdf
AmayJaiswal4
 
PPTX
03-FiniteAutomata.pptx
ssuser47f7f2
 
Automata theory
Pardeep Vats
 
FiniteAutomata_anim.pptx
amara jyothi
 
FiniteAutomata_anim.pptx
ranjan317165
 
AUTOMATA THEORY AUTOMATA THEORYAutomata3Chapter2.pptx
ArjayBalberan1
 
1.3.2 non deterministic finite automaton
Sampath Kumar S
 
Theory of computation Unit 1 Lecute 2.pptx
RishabhGupta238479
 
TCS MUBAI UNIVERSITY ATHARVA COLLEGE OF ENGINEERING.pptx
userqwerty2612
 
INTRODUTION Formal Language and Automatic Theory.pptx
SUNEEL37
 
Theory of Computation FSM Conversions and Problems
Rushabh2428
 
4-Regular expression to Deterministic Finite Automata (Direct method)-05-05-2...
venkatapranaykumarGa
 
TCS GOLDEN NOTES THEORY OF COMPUTATION .pdf
userqwerty2612
 
Nondeterministic Finite Automata
parmeet834
 
NFA DFA Equivalence theorem
niveditJain
 
NFA to DFA Conversion Using Subset Construction Method
Zihan Islam
 
Lecture 1 CSE 322 LPU By 5th SEM .ppt Good
abcxyz19691969
 
CSE-322 lecture1 notes
databydevang
 
Week 3 - to FiniteAutomata DrJunaid.pptx
MFaizan35
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
AmayJaiswal4
 
03-FiniteAutomata.pptx
ssuser47f7f2
 
Ad

Recently uploaded (20)

PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Ad

NFA Converted to DFA , Minimization of DFA , Transition Diagram

  • 1. NFA CONVERSION TO DFA Author : Abdullah Jan
  • 2. Non-deterministic Automaton. • In NDFA, for a particular input symbol, the machine can move to any combination of the states in the machine. Hence, it is called Non- deterministic Automaton. • Formal Definition of an NDFA • An NDFA 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)
  • 3. Deterministic Finite Automaton (DFA) • Deterministic Finite Automaton (DFA) • In DFA, for each input symbol, one can determine the state to which the machine will move. • Hence, it is called Deterministic Automaton. • As it has a finite number of states, the machine is called Deterministic Finite Machine or Deterministic Finite Automaton •Q is a finite set of states. •∑ is a finite set of symbols called the alphabet. •δ is the transition function where δ: Q × ∑ → Q
  • 4. Properties NFA • “NFA” stands for “Nondeterministic Finite Automata.” • In NFA each pair of state and input symbol can have many possible next states. • NFA can use empty string transition • NFA is easier to construct • NFA requires less space DFA • DFA” stands for “Deterministic Finite Automata” • In DFA the next possible state is distinctly set • DFA cannot use empty string transition. • It is more difficult to construct DFA. • DFA requires more space
  • 5. Conversion of NFA TO DFA • Every DFA is an NFA But not vice versa DFA δ = Q x ∑ -> Q NFA δ = Q x ∑ -> 2Q • But there is an equivalent DFA For every NFA NFA ˜ DFA=
  • 6. Important point • In DFA we combine two state into single state. • In DFA there is only one transition to only one state
  • 7. EXAMPLE NO1 ON CONVERSION • L = {set of all strings over (0,1) that start with ‘0’} ∑ = {0,1) NFA: A B O,1 State 0 1 ->A B ɸ B B B
  • 8. NFA converter into DFA • DFA A B O,1 State 0 1 ->A B C B B B C C C O C 1
  • 9. EXAMPLE 2 • L = {set of all string over(0,1) that end with ‘1’} • ∑ = {0,1)1 A B State 0 1 ->A B {A,B} ɸ ɸ O,1 1 B
  • 10. NFA converted into DFA A AB State 0 1 ->A B {AB} A {AB} 1 O 1 O AB
  • 11. Example 3 • L = {Set of all string over(0,1) that end with ‘01’} • NFA A C O,1 State 0 1 ->A {A,B} A B ɸ C ɸ ɸ B O 1 C
  • 12. NFA converted into DFA A AB State 0 1 ->A AB A AB AB AC AB A 0 1 0 1 AB 0 1 AC
  • 13. Example 4 NFA • M= [ {A,B,C},(a,b), δ,A,{C}] • NFA AND DFA is represented by 5 tuple State a b ->A {A,B} C B A B ɸ {A,B} AB AB a A b a a b bb C
  • 14. NFA converted into DFA A BC State 0 1 ->A AB C AB AB BC A AB D AB D D D a b a a AB b b C D a a,b b BC C
  • 15. Assignment for home • Assignment : try to find out what type of string this NFA and Equivalent DFA accepted
  • 16. Transition Graph • Properties: • Can have more than one initial state • Empty transaction is allowed • We allow the machine to real move than one character at a time • If ∑ = {a,b} Draw TG for all string containing bbb or aaa • (a+b)* (aaa+bbb) (a+b)* • TG reduced the complexity of NFA and DFA
  • 18. MINIMIZATION OF DFA • Minimization of DFA is required to obtain the minimal version of any DFA which consists of the minimum number of states possible • DFA 5 state 4 state 00000 0000 These two are equivalent Two state ‘A’ and ‘B’ are said to be equivalent δ(A,X) -> F δ(A,X) -> F and and δ (B,X) ->F δ (B,X) -> F
  • 19. MINIMIZATION OF DFA • If |X| = 0, then A and B are said to be 0 equivalent • If |X| = 1, then A and B are said to be 1 equivalent • If |X| = 2, then A and B are said to be 2 equivalent . . . if|X| = n then A and B are said to be n equivalent We need these properties to combined two state and make one state to get minimal version DFA
  • 20. Example Part1 A C DB E 0 1 0 1 1 1 1 State 0 1 ->A B C B B D C B C D B E B CE
  • 21. Example Part1 • 0 equivalence {A,B,C,D} {E} • 1 equivalence {A,B,C) {D} {E} • 2 equivalence {A,C} {B} {D} {E} • 3 equivalence {A,C} {B} {D} {E} When you find two row gives consecutive result than it time to stop the process Result both are same
  • 23. Particle work to create NFA AND DFA IN JFLAP
  • 24. Particle work to create NFA AND DFA IN JFLAP