1 / 35

NFAs accept the Regular Languages

NFAs accept the Regular Languages. Equivalence of Machines. Definition: Machine is equivalent to machine if. Example of equivalent machines. NFA. DFA. Theorem:. Languages accepted by NFAs. Regular Languages. Languages accepted by DFAs.

mabli
Download Presentation

NFAs accept the Regular Languages

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. NFAs accept the Regular Languages Prof. Busch - LSU

  2. Equivalence of Machines Definition: Machine is equivalent to machine if Prof. Busch - LSU

  3. Example of equivalent machines NFA DFA Prof. Busch - LSU

  4. Theorem: Languages accepted by NFAs Regular Languages Languages accepted by DFAs NFAs and DFAs have the same computation power, accept the same set of languages Prof. Busch - LSU

  5. Proof: we only need to show Languages accepted by NFAs Regular Languages AND Languages accepted by NFAs Regular Languages Prof. Busch - LSU

  6. Proof-Step 1 Languages accepted by NFAs Regular Languages Every DFA is trivially an NFA Any language accepted by a DFA is also accepted by an NFA Prof. Busch - LSU

  7. Proof-Step 2 Languages accepted by NFAs Regular Languages Any NFA can be converted to an equivalent DFA Any language accepted by an NFA is also accepted by a DFA Prof. Busch - LSU

  8. Conversion NFA to DFA NFA DFA Prof. Busch - LSU

  9. NFA DFA Prof. Busch - LSU

  10. empty set NFA DFA trap state Prof. Busch - LSU

  11. NFA union DFA Prof. Busch - LSU

  12. NFA union DFA Prof. Busch - LSU

  13. NFA DFA trap state Prof. Busch - LSU

  14. END OF CONSTRUCTION NFA DFA Prof. Busch - LSU

  15. General Conversion Procedure Input: an NFA Output: an equivalent DFA with Prof. Busch - LSU

  16. The NFA has states The DFA has states from the power set Prof. Busch - LSU

  17. Conversion Procedure Steps 1. Initial state of NFA: Initial state of DFA: step Prof. Busch - LSU

  18. Example NFA DFA Prof. Busch - LSU

  19. step 2. For every DFA’s state compute in the NFA add transition to DFA Union Prof. Busch - LSU

  20. Example NFA DFA Prof. Busch - LSU

  21. 3. Repeat Step 2 for every state in DFA and symbols in alphabet until no more states can be added in the DFA step Prof. Busch - LSU

  22. Example NFA DFA Prof. Busch - LSU

  23. step 4. For any DFA state if some is accepting state in NFA Then, is accepting state in DFA Prof. Busch - LSU

  24. Example NFA DFA Prof. Busch - LSU

  25. Lemma: If we convert NFA to DFA then the two automata are equivalent: Proof: We only need to show: AND Prof. Busch - LSU

  26. First we show: We only need to prove: Prof. Busch - LSU

  27. NFA Consider symbols Prof. Busch - LSU

  28. symbol denotes a possible sub-path like symbol Prof. Busch - LSU

  29. We will show that if NFA then DFA state label state label Prof. Busch - LSU

  30. More generally, we will show that if in : (arbitrary string) NFA then DFA Prof. Busch - LSU

  31. Proof by induction on Induction Basis: NFA DFA is true by construction of Prof. Busch - LSU

  32. Induction hypothesis: Suppose that the following hold NFA DFA Prof. Busch - LSU

  33. Induction Step: Then this is true by construction of NFA DFA Prof. Busch - LSU

  34. Therefore if NFA then DFA Prof. Busch - LSU

  35. We have shown: With a similar proof we can show: Therefore: END OF LEMMA PROOF Prof. Busch - LSU

More Related