1 / 7

NFA->DFA

NFA->DFA. COP4620 – Programming Language Translators Dr. Manuel E. Bermudez. NFA->DFA. Done. Soon. RG R RG L Minimum DFA RE NFA DFA. Now. Deterministic Finite-State Automata (DFA’s)

bbirmingham
Download Presentation

NFA->DFA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NFA->DFA COP4620 – Programming Language Translators Dr. Manuel E. Bermudez

  2. NFA->DFA Done Soon RGR RGL Minimum DFA RE NFA DFA Now

  3. 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). NFA->DFA ε a a

  4. 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. NFA->DFA

  5. Input State a b 123 23 456 23 23 6 456 56 --- 6 --- --- 56 56 --- In general, if NFA has N states, The DFA can have as many as 2N states. a ε 2 3 b ε a 6 1 b ε ε 4 5 NFA->DFA NFA: DFA: a b 6 23 a 123 b a a 456 56

  6. State a b 0 --- 1 1 234689 --- 234689 34568910 346789 34568910 34568910 34678911 346789 34568910 346789 34678911 34568910 346789 ε NFA->DFA NFA: from ba(a+b)*ab a 4 5 ε ε ε a b b a ε 10 9 11 8 2 0 1 3 a ε 6 7 ε b 34568910 b a ε b a a 0 1 234689 a 34678911 b 346789 b DFA: b

  7. NFA->DFA Done Soon RGR RGL Minimum DFA RE NFA DFA Done

More Related