2
Most read
13
Most read
21
Most read
Minimization of DFA
• Name: Kunj Desai
• Enrollment No.:140950107022
• Branch: CSE-A
• Year : 2017
DFA
• Deterministic Finite Automata (DFSA)
• (Q, Σ, δ, q0, F)
• Q – (finite) set of states
• Σ – alphabet – (finite) set of input symbols
• δ – transition function
• q0 – start state
• F – set of final / accepting states
DFA
• Often representing as a diagram:
DFA Minimization
• Some states can be redundant:
• The following DFA accepts (a|b)+
• State s1 is not necessary
DFA Minimization
• So these two DFAs are equivalent:
DFA Minimization
• This is a state-minimized (or just minimized) DFA
• Every remaining state is necessary
DFA Minimization
• The task of DFA minimization, then, is to automatically transform a
given DFA into a state-minimized DFA
• Several algorithms and variants are known
• Note that this also in effect can minimize an NFA (since we know algorithm
to convert NFA to DFA)
DFA Minimization Algorithm
• Recall that a DFA M=(Q, Σ, δ, q0, F)
• Two states p and q are distinct if
• p in F and q not in F or vice versa, or
• for some α in Σ, δ(p, α) and δ(q, α) are distinct
• Using this inductive definition, we can calculate which states are
distinct
DFA Minimization Algorithm
• Create lower-triangular table DISTINCT, initially blank
• For every pair of states (p,q):
• If p is final and q is not, or vice versa
• DISTINCT(p,q) = ε
• Loop until no change for an iteration:
• For every pair of states (p,q) and each symbol α
• If DISTINCT(p,q) is blank and
DISTINCT( δ(p,α), δ(q,α) ) is not blank
• DISTINCT(p,q) = α
• Combine all states that are not distinct
Very Simple Example
s0
s1
s2
s0 s1 s2
Very Simple Example
s0
s1 ε
s2 ε
s0 s1 s2
Label pairs with ε where one is a final state and the other is not
Very Simple Example
s0
s1 ε
s2 ε
s0 s1 s2
Main loop (no changes occur)
Very Simple Example
s0
s1 ε
s2 ε
s0 s1 s2
DISTINCT(s1, s2) is empty, so s1 and s2 are equivalent states
Very Simple Example
Merge s1 and s2
More Complex Example
More Complex Example
•Check for pairs with one state final and one not:
More Complex Example
• First iteration of main loop:
More Complex Example
• Second iteration of main loop:
More Complex Example
• Third iteration makes no changes
• Blank cells are equivalent pairs of states
More Complex Example
•Combine equivalent states for minimized DFA:
Conclusion
• DFA Minimization is a fairly understandable process, and is useful in
several areas
• Regular expression matching implementation
• Very similar algorithm is used for compiler optimization to eliminate
duplicate computations
• The algorithm described is O(kn2
)
• John Hopcraft describes another more complex algorithm that is O(k (n log n)
)

More Related Content

PPTX
MULTIPLEXER
DOC
Naming in Distributed System
PPTX
Differential equations
PDF
English conversation-5 CLASS - FIVE
PPTX
Design Concept software engineering
PPTX
Linear differential equation of second order
PPTX
Knowledge discovery process
PDF
Formal Languages and Automata Theory Unit 1
MULTIPLEXER
Naming in Distributed System
Differential equations
English conversation-5 CLASS - FIVE
Design Concept software engineering
Linear differential equation of second order
Knowledge discovery process
Formal Languages and Automata Theory Unit 1

What's hot (20)

PDF
NFA to DFA
PPTX
Minimization of DFA.pptx
PPTX
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
PPTX
Introduction TO Finite Automata
PPTX
NFA & DFA
PPTX
1.7. eqivalence of nfa and dfa
PPT
Kleene's theorem
PPTX
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
PPTX
Regular expressions
PPTX
Breadth First Search & Depth First Search
PPTX
Equivalence of DFAs and NFAs.pptx
PDF
Automata theory
PPTX
Pushdown Automata Theory
PDF
A* Search Algorithm
PPT
Regular expressions-Theory of computation
PDF
Deterministic Finite Automata (DFA)
PPT
Finite automata(For college Seminars)
PPT
Backtracking
PPT
Regular Languages
PPTX
Moore Mealy Machine Conversion
NFA to DFA
Minimization of DFA.pptx
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Introduction TO Finite Automata
NFA & DFA
1.7. eqivalence of nfa and dfa
Kleene's theorem
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Regular expressions
Breadth First Search & Depth First Search
Equivalence of DFAs and NFAs.pptx
Automata theory
Pushdown Automata Theory
A* Search Algorithm
Regular expressions-Theory of computation
Deterministic Finite Automata (DFA)
Finite automata(For college Seminars)
Backtracking
Regular Languages
Moore Mealy Machine Conversion
Ad

Viewers also liked (20)

PPT
Bottom - Up Parsing
PPT
Lexical Analysis
PPT
Dfa vs nfa
PPTX
Optimization of dfa
PPT
DFA Minimization
PPTX
Programming Languages / Translators
PPTX
Programming languages,compiler,interpreter,softwares
PPTX
optimization of DFA
PPT
Nfa vs dfa
PPTX
Lexical analysis - Compiler Design
PPTX
Compiler Chapter 1
PPT
NFA or Non deterministic finite automata
PPTX
Phases of Compiler
PPTX
Intermediate code- generation
PPTX
Translators(Compiler, Assembler) and interpreter
PPT
Language translator
PPT
Lexical analyzer
PPT
Intermediate code generation
PPTX
Lexical analyzer
PPTX
Code generation
Bottom - Up Parsing
Lexical Analysis
Dfa vs nfa
Optimization of dfa
DFA Minimization
Programming Languages / Translators
Programming languages,compiler,interpreter,softwares
optimization of DFA
Nfa vs dfa
Lexical analysis - Compiler Design
Compiler Chapter 1
NFA or Non deterministic finite automata
Phases of Compiler
Intermediate code- generation
Translators(Compiler, Assembler) and interpreter
Language translator
Lexical analyzer
Intermediate code generation
Lexical analyzer
Code generation
Ad

Similar to Minimization of DFA (20)

PDF
DFA_Minimization_Presentation_uploaded.pdf
PPT
DFA_Minimization for engineering students.ppt
PPTX
minimization the number of states of DFA
PPTX
INTRODUTION Formal Language and Automatic Theory.pptx
PPT
Finite automata examples
PPT
Finite automata examples
PPT
FiniteAutomata.ppt
PPT
FiniteAutomata (1).ppt
PPT
FiniteAutomata-DFA and NFA from Theory of Computation.ppt
PDF
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
PPTX
NFA Converted to DFA , Minimization of DFA , Transition Diagram
PPTX
CS911-Lecture-13_34826.pptx
PPTX
Automata theory - Push Down Automata (PDA)
PDF
Theory of Computation Basics of Finite Acceptors
PPTX
Pushdown Automata toc presentation 2025.pptx
PPTX
DIU_BD_AvaGandu_SE-234-Lecture-02-DFA.pptx
PPTX
symbolic_automata or Advanced Programming Practice.pptx
PDF
PDF
5. NFA & DFA.pdf
DFA_Minimization_Presentation_uploaded.pdf
DFA_Minimization for engineering students.ppt
minimization the number of states of DFA
INTRODUTION Formal Language and Automatic Theory.pptx
Finite automata examples
Finite automata examples
FiniteAutomata.ppt
FiniteAutomata (1).ppt
FiniteAutomata-DFA and NFA from Theory of Computation.ppt
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
NFA Converted to DFA , Minimization of DFA , Transition Diagram
CS911-Lecture-13_34826.pptx
Automata theory - Push Down Automata (PDA)
Theory of Computation Basics of Finite Acceptors
Pushdown Automata toc presentation 2025.pptx
DIU_BD_AvaGandu_SE-234-Lecture-02-DFA.pptx
symbolic_automata or Advanced Programming Practice.pptx
5. NFA & DFA.pdf

More from kunj desai (9)

PPTX
OLAP operations
PPT
Loaders and Linkers
PPT
Binary Search
PPTX
Introduction to 8085 microprocessor
PPT
Custom Controls in ASP.net
PPT
JDBC Connectivity Model
PPT
Requirement specification (SRS)
PPT
php databse handling
PPTX
Concept of constructors
OLAP operations
Loaders and Linkers
Binary Search
Introduction to 8085 microprocessor
Custom Controls in ASP.net
JDBC Connectivity Model
Requirement specification (SRS)
php databse handling
Concept of constructors

Recently uploaded (20)

PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PPTX
introduction to high performance computing
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PPTX
Current and future trends in Computer Vision.pptx
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Soil Improvement Techniques Note - Rabbi
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PPT
Total quality management ppt for engineering students
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
III.4.1.2_The_Space_Environment.p pdffdf
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
introduction to high performance computing
"Array and Linked List in Data Structures with Types, Operations, Implementat...
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
Current and future trends in Computer Vision.pptx
Information Storage and Retrieval Techniques Unit III
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Soil Improvement Techniques Note - Rabbi
distributed database system" (DDBS) is often used to refer to both the distri...
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
Fundamentals of safety and accident prevention -final (1).pptx
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
Total quality management ppt for engineering students
Amdahl’s law is explained in the above power point presentations
Abrasive, erosive and cavitation wear.pdf
Fundamentals of Mechanical Engineering.pptx
III.4.1.2_The_Space_Environment.p pdffdf

Minimization of DFA

  • 1. Minimization of DFA • Name: Kunj Desai • Enrollment No.:140950107022 • Branch: CSE-A • Year : 2017
  • 2. DFA • Deterministic Finite Automata (DFSA) • (Q, Σ, δ, q0, F) • Q – (finite) set of states • Σ – alphabet – (finite) set of input symbols • δ – transition function • q0 – start state • F – set of final / accepting states
  • 4. DFA Minimization • Some states can be redundant: • The following DFA accepts (a|b)+ • State s1 is not necessary
  • 5. DFA Minimization • So these two DFAs are equivalent:
  • 6. DFA Minimization • This is a state-minimized (or just minimized) DFA • Every remaining state is necessary
  • 7. DFA Minimization • The task of DFA minimization, then, is to automatically transform a given DFA into a state-minimized DFA • Several algorithms and variants are known • Note that this also in effect can minimize an NFA (since we know algorithm to convert NFA to DFA)
  • 8. DFA Minimization Algorithm • Recall that a DFA M=(Q, Σ, δ, q0, F) • Two states p and q are distinct if • p in F and q not in F or vice versa, or • for some α in Σ, δ(p, α) and δ(q, α) are distinct • Using this inductive definition, we can calculate which states are distinct
  • 9. DFA Minimization Algorithm • Create lower-triangular table DISTINCT, initially blank • For every pair of states (p,q): • If p is final and q is not, or vice versa • DISTINCT(p,q) = ε • Loop until no change for an iteration: • For every pair of states (p,q) and each symbol α • If DISTINCT(p,q) is blank and DISTINCT( δ(p,α), δ(q,α) ) is not blank • DISTINCT(p,q) = α • Combine all states that are not distinct
  • 11. Very Simple Example s0 s1 ε s2 ε s0 s1 s2 Label pairs with ε where one is a final state and the other is not
  • 12. Very Simple Example s0 s1 ε s2 ε s0 s1 s2 Main loop (no changes occur)
  • 13. Very Simple Example s0 s1 ε s2 ε s0 s1 s2 DISTINCT(s1, s2) is empty, so s1 and s2 are equivalent states
  • 16. More Complex Example •Check for pairs with one state final and one not:
  • 17. More Complex Example • First iteration of main loop:
  • 18. More Complex Example • Second iteration of main loop:
  • 19. More Complex Example • Third iteration makes no changes • Blank cells are equivalent pairs of states
  • 20. More Complex Example •Combine equivalent states for minimized DFA:
  • 21. Conclusion • DFA Minimization is a fairly understandable process, and is useful in several areas • Regular expression matching implementation • Very similar algorithm is used for compiler optimization to eliminate duplicate computations • The algorithm described is O(kn2 ) • John Hopcraft describes another more complex algorithm that is O(k (n log n) )