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.

darosa
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 Costas Busch - LSU

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

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

  4. First Choice Costas Busch - LSU

  5. First Choice Costas Busch - LSU

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

  7. Second Choice Costas Busch - LSU

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

  9. A NFA accepts a string: if there is a computation path of the NFA that accepts the string all the symbols of input string are processed and the last is an accepting state Costas Busch - LSU

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

  11. Rejection example Costas Busch - LSU

  12. First Choice “reject” Costas Busch - LSU

  13. Second Choice Costas Busch - LSU

  14. Second Choice “reject” Costas Busch - LSU

  15. Another Rejection example Costas Busch - LSU

  16. First Choice Costas Busch - LSU

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

  18. Second Choice Costas Busch - LSU

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

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

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

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

  23. Language accepted: Costas Busch - LSU

  24. Epsilon Transitions Costas Busch - LSU

  25. Costas Busch - LSU

  26. Costas Busch - LSU

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

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

  29. Rejection Example Costas Busch - LSU

  30. Costas Busch - LSU

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

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

  33. Language accepted: Costas Busch - LSU

  34. Another NFA Example Costas Busch - LSU

  35. Costas Busch - LSU

  36. Costas Busch - LSU

  37. “accept” Costas Busch - LSU

  38. Another String Costas Busch - LSU

  39. Costas Busch - LSU

  40. Costas Busch - LSU

  41. Costas Busch - LSU

  42. Costas Busch - LSU

  43. Costas Busch - LSU

  44. “accept” Costas Busch - LSU

  45. Language accepted Costas Busch - LSU

  46. Another NFA Example Costas Busch - LSU

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

  48. Simple Automata Costas Busch - LSU

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

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

More Related