1 / 102

Non-Deterministic Finite Automata

Non-Deterministic Finite Automata. Nondeterministic Finite Automaton (NFA). Alphabet =. Alphabet =. Two choices. No transition. No transition. First Choice. First Choice. First Choice. All input is consumed. “accept”. Second Choice. Second Choice. Input cannot be consumed.

guy
Download Presentation

Non-Deterministic Finite Automata

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. Non-Deterministic Finite Automata Prof. Busch - LSU

  2. Nondeterministic Finite Automaton (NFA) Alphabet = Prof. Busch - LSU

  3. Alphabet = Two choices No transition No transition Prof. Busch - LSU

  4. First Choice Prof. Busch - LSU

  5. First Choice Prof. Busch - LSU

  6. First Choice All input is consumed “accept” Prof. Busch - LSU

  7. Second Choice Prof. Busch - LSU

  8. Second Choice Input cannot be consumed Automaton Halts “reject” Prof. Busch - LSU

  9. An NFA accepts a string: if there is a computation of the NFA that accepts the string i.e., all the input string is processed and the automaton is in an accepting state Prof. Busch - LSU

  10. is accepted by the NFA: “accept” “reject” because this computation accepts this computation is ignored Prof. Busch - LSU

  11. Rejection example Prof. Busch - LSU

  12. First Choice “reject” Prof. Busch - LSU

  13. Second Choice Prof. Busch - LSU

  14. Second Choice “reject” Prof. Busch - LSU

  15. Another Rejection example Prof. Busch - LSU

  16. First Choice Prof. Busch - LSU

  17. First Choice Input cannot be consumed “reject” Automaton halts Prof. Busch - LSU

  18. Second Choice Prof. Busch - LSU

  19. Second Choice Input cannot be consumed Automaton halts “reject” Prof. Busch - LSU

  20. An NFA rejects a string: if there is no computation of the NFA that accepts the string. For each computation: • All the input is consumed and the • automaton is in a non accepting state OR • The input cannot be consumed Prof. Busch - LSU

  21. is rejected by the NFA: “reject” “reject” All possible computations lead to rejection Prof. Busch - LSU

  22. is rejected by the NFA: “reject” “reject” All possible computations lead to rejection Prof. Busch - LSU

  23. Language accepted: Prof. Busch - LSU

  24. Lambda Transitions Prof. Busch - LSU

  25. Prof. Busch - LSU

  26. Prof. Busch - LSU

  27. input tape head does not move Automaton changes state Prof. Busch - LSU

  28. all input is consumed “accept” String is accepted Prof. Busch - LSU

  29. Rejection Example Prof. Busch - LSU

  30. Prof. Busch - LSU

  31. (read head doesn’t move) Prof. Busch - LSU

  32. Input cannot be consumed Automaton halts “reject” String is rejected Prof. Busch - LSU

  33. Language accepted: Prof. Busch - LSU

  34. Another NFA Example Prof. Busch - LSU

  35. Prof. Busch - LSU

  36. Prof. Busch - LSU

  37. “accept” Prof. Busch - LSU

  38. Another String Prof. Busch - LSU

  39. Prof. Busch - LSU

  40. Prof. Busch - LSU

  41. Prof. Busch - LSU

  42. Prof. Busch - LSU

  43. Prof. Busch - LSU

  44. “accept” Prof. Busch - LSU

  45. Language accepted Prof. Busch - LSU

  46. Another NFA Example Prof. Busch - LSU

  47. Language accepted (redundant state) Prof. Busch - LSU

  48. Remarks: • The symbol never appears on the • input tape • Simple automata: Prof. Busch - LSU

  49. NFAs are interesting because we can • express languages easier than DFAs NFA DFA Prof. Busch - LSU

  50. Formal Definition of NFAs Set of states, i.e. Input aplhabet, i.e. Transition function Initial state Accepting states Prof. Busch - LSU

More Related