1 / 14

NFA to DFA Conversion

NFA to DFA Conversion. Rabin and Scott (1959). Removing Nondeterminism. By simulating all moves of an NFA- λ in parallel using a DFA. λ -closure of a state is the set of states reachable using only the λ -transitions. . NFA- λ. p2. λ. p1. a. p3. q1. λ. λ. p5. λ. q2. a. p4.

onaona
Download Presentation

NFA to DFA Conversion

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 to DFA Conversion Rabin and Scott (1959) L12NFA2DFA

  2. Removing Nondeterminism • By simulating all moves of an NFA-λin parallel using a DFA. • λ-closure of a state is the set of states reachable using only the λ-transitions. L12NFA2DFA

  3. NFA-λ p2 λ p1 a p3 q1 λ λ p5 λ q2 a p4 L12NFA2DFA

  4. L12NFA2DFA

  5. Transition Function L12NFA2DFA

  6. L12NFA2DFA

  7. Equivalence Construction • Given NFA-λ M, construct a DFA DM such that L(M) = L(DM). • Observe that • A node of the DFA = Set of nodes of NFA-λ • Transition of the DFA = Transition among set of nodes of NFA- λ L12NFA2DFA

  8. {q1,…,qn} {p1,…,pm} a For every pi, there exists qj such that L12NFA2DFA

  9. Start state of DFA = Final/Accepting state of DFA = All subsets of states of NFA-λ that contain an accepting state of the NFA-λ Dead state of DFA = L12NFA2DFA

  10. Example a b q1 a q0 a+c*b* λ a q2 c L12NFA2DFA

  11. {q0} {q0} {q0,q1,q2} a b c f L12NFA2DFA

  12. {q0} {q0,q1,q2} a b c f a b {q1} c {q1,q2} a,b,c L12NFA2DFA

  13. b {q1} a,c f c {q1} b {q1,q2} a f L12NFA2DFA

  14. Equivalent DFA a a {q0} {q0,q1,q2} c c {q1,q2} b b,c b b a,c {q1} f a a,b,c L12NFA2DFA

More Related