Download presentation
Presentation is loading. Please wait.
Published byHadi Kartawijaya Modified over 6 years ago
1
NFA->DFA Module 05.3 COP4020 – Programming Language Concepts Dr. Manuel E. Bermudez
2
NFA->DFA RGR RGL Minimum DFA RE NFA DFA Done Soon Now
3
NFA->DFA Deterministic Finite-State Automata (DFA’s)
Definition: A deterministic FSA is defined just like an NFA, except that δ: Q x Σ → Q, rather than δ: Q x Σ U {ε}→ 2Q Thus, both and are impossible. For every NFA there exists an equivalent DFA (accepting the same language). ε a
4
NFA->DFA Conversion from NFA’s to DFA’s:
Simulate NFA moves with the DFA. DFA start state: NFA start state S, and all ε-reachable states from S. Each DFA state: a subset of the set of NFA states. New DFA states: Calculate the states reachable through each t Σ. Final DFA states: contain any NFA final state.
5
NFA->DFA In general, if NFA has N states,
ε b 1 3 4 2 5 6 a NFA: Input State a b In general, if NFA has N states, The DFA can have as many as 2N states. a DFA: b 6 23 a 123 b a a 456 56
6
NFA->DFA ε a 3 5 6 4 7 8 b 1 2 10 9 11 NFA: from ba(a+b)*ab DFA: a
1 2 10 9 11 NFA: from ba(a+b)*ab NFA->DFA State a b DFA: a b a b a a 1 234689 a b 346789 b b
7
NFA->DFA RGR RGL Minimum DFA RE NFA DFA Done Soon Done
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.