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

Finite Automata
Finite AutomataFinite Automata
Finite Automata
Mukesh Tekwani
 
Moore and mealy machine
Moore and mealy machineMoore and mealy machine
Moore and mealy machine
Mian Munib
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
AYESHA JAVED
 
Finite automata
Finite automataFinite automata
Finite automata
Bipul Roy Bpl
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
Sampath Kumar S
 
Automata theory
Automata theoryAutomata theory
Automata theory
Pardeep Vats
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
Rajendran
 
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
 
Two-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataTwo-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataHafsa.Naseem
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
Rishabh Soni
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
Ruchika Sinha
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite Automata
Mohammad Imam Hossain
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
 
Undecidability.pptx
Undecidability.pptxUndecidability.pptx
Undecidability.pptx
PEzhumalai
 
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
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
Srimatre K
 
Parsing
ParsingParsing
Parsing
khush_boo31
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
Ratnakar Mikkili
 

What's hot (20)

Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Moore and mealy machine
Moore and mealy machineMoore and mealy machine
Moore and mealy machine
 
Finite automata
Finite automataFinite automata
Finite automata
 
Moore and mealy machines
Moore and mealy machinesMoore and mealy machines
Moore and mealy machines
 
Finite automata
Finite automataFinite automata
Finite automata
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
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
 
Two-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataTwo-way Deterministic Finite Automata
Two-way Deterministic Finite Automata
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite Automata
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
Undecidability.pptx
Undecidability.pptxUndecidability.pptx
Undecidability.pptx
 
Pushdown Automata Theory
Pushdown Automata TheoryPushdown Automata Theory
Pushdown Automata Theory
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite Automata
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
 
Parsing
ParsingParsing
Parsing
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 

Similar to NFA Converted to DFA , Minimization of DFA , Transition Diagram

Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
parmeet834
 
Automata
AutomataAutomata
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Mohammad Ilyas Malik
 
CS 5th.pptx
CS 5th.pptxCS 5th.pptx
CS 5th.pptx
MadniFareed1
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdf
AmayJaiswal4
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
deepinderbedi
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
A. S. M. Shafi
 
Finite Automata fgyft rtrt rr uuy y.pptx
Finite Automata fgyft rtrt  rr uuy y.pptxFinite Automata fgyft rtrt  rr uuy y.pptx
Finite Automata fgyft rtrt rr uuy y.pptx
AsadBaig49
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
Thapar Institute
 
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
 
5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
TANZINTANZINA
 
1. finite_automata_new.ppt
1. finite_automata_new.ppt1. finite_automata_new.ppt
1. finite_automata_new.ppt
SanthoshS508159
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite AutomatAdel Al-Ofairi
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
ranjan317165
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
amara jyothi
 
finiteautomata-160104102657.pptx
finiteautomata-160104102657.pptxfiniteautomata-160104102657.pptx
finiteautomata-160104102657.pptx
StudyvAbhi
 
Finite automata
Finite automataFinite automata
Finite automata
ManishTadhiyal
 
minimization the number of states of DFA
minimization the number of states of DFAminimization the number of states of DFA
minimization the number of states of DFA
Archana Gopinath
 
flat unit1
flat unit1flat unit1
flat unit1
Janhavi Vishwanath
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyser
Archana Gopinath
 

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

Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
 
Automata
AutomataAutomata
Automata
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
 
CS 5th.pptx
CS 5th.pptxCS 5th.pptx
CS 5th.pptx
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdf
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Finite Automata fgyft rtrt rr uuy y.pptx
Finite Automata fgyft rtrt  rr uuy y.pptxFinite Automata fgyft rtrt  rr uuy y.pptx
Finite Automata fgyft rtrt rr uuy y.pptx
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
 
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
 
5. NFA & DFA.pdf
5. NFA & DFA.pdf5. NFA & DFA.pdf
5. NFA & DFA.pdf
 
1. finite_automata_new.ppt
1. finite_automata_new.ppt1. finite_automata_new.ppt
1. finite_automata_new.ppt
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
finiteautomata-160104102657.pptx
finiteautomata-160104102657.pptxfiniteautomata-160104102657.pptx
finiteautomata-160104102657.pptx
 
Finite automata
Finite automataFinite automata
Finite automata
 
minimization the number of states of DFA
minimization the number of states of DFAminimization the number of states of DFA
minimization the number of states of DFA
 
flat unit1
flat unit1flat unit1
flat unit1
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyser
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
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
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
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
 
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
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
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
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
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
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
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
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
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
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
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
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 

Recently uploaded (20)

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
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
 
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.
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
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...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
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
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
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
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
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
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
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
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 

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