1 / 77

Pushdown Automata PDAs

Pushdown Automata PDAs. Pushdown Automaton -- PDA. Input String. Stack. States. Initial Stack Symbol. Stack. Stack. stack head. top. bottom. special symbol. Appears at time 0. The States. Pop symbol. Input symbol. Push symbol. input. stack. top. Replace. input. stack.

deron
Download Presentation

Pushdown Automata PDAs

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. Pushdown AutomataPDAs Costas Busch - RPI

  2. Pushdown Automaton -- PDA Input String Stack States Costas Busch - RPI

  3. Initial Stack Symbol Stack Stack stack head top bottom special symbol Appears at time 0 Costas Busch - RPI

  4. The States Pop symbol Input symbol Push symbol Costas Busch - RPI

  5. input stack top Replace Costas Busch - RPI

  6. input stack top Push Costas Busch - RPI

  7. input stack top Pop Costas Busch - RPI

  8. input stack top No Change Costas Busch - RPI

  9. Pop from Empty Stack input Pop Automaton halts! stack top If the automaton attempts to pop from empty stack then it halts and rejects input Costas Busch - RPI

  10. Non-Determinism PDAs are non-deterministic Allowed non-deterministic transitions Costas Busch - RPI

  11. Example PDA PDA : Costas Busch - RPI

  12. Basic Idea: • Push the a’s • on the stack 2. Match the b’s on input with a’s on stack 3. Match found Costas Busch - RPI

  13. Execution Example: Time 0 Input Stack current state Costas Busch - RPI

  14. Time 1 Input Stack Costas Busch - RPI

  15. Time 2 Input Stack Costas Busch - RPI

  16. Time 3 Input Stack Costas Busch - RPI

  17. Time 4 Input Stack Costas Busch - RPI

  18. Time 5 Input Stack Costas Busch - RPI

  19. Time 6 Input Stack Costas Busch - RPI

  20. Time 7 Input Stack Costas Busch - RPI

  21. Time 8 Input Stack accept Costas Busch - RPI

  22. A string is accepted if there is a computation such that: All the input is consumed AND The last state is an accepting state we do not care about the stack contents at the end of the accepting computation Costas Busch - RPI

  23. Rejection Example: Time 0 Input Stack current state Costas Busch - RPI

  24. Rejection Example: Time 1 Input Stack current state Costas Busch - RPI

  25. Rejection Example: Time 2 Input Stack current state Costas Busch - RPI

  26. Rejection Example: Time 3 Input Stack current state Costas Busch - RPI

  27. Rejection Example: Time 4 Input Stack current state Costas Busch - RPI

  28. Rejection Example: Time 4 Input Stack reject current state Costas Busch - RPI

  29. There is no accepting computation for The string is rejected by the PDA Costas Busch - RPI

  30. Another PDA example PDA : Costas Busch - RPI

  31. Basic Idea: • Push v • on stack 3. Match on input with v on stack 2. Guess middle of input 4. Match found Costas Busch - RPI

  32. Execution Example: Time 0 Input Stack Costas Busch - RPI

  33. Time 1 Input Stack Costas Busch - RPI

  34. Time 2 Input Stack Costas Busch - RPI

  35. Time 3 Input Guess the middle of string Stack Costas Busch - RPI

  36. Time 4 Input Stack Costas Busch - RPI

  37. Time 5 Input Stack Costas Busch - RPI

  38. Time 6 Input Stack accept Costas Busch - RPI

  39. Rejection Example: Time 0 Input Stack Costas Busch - RPI

  40. Time 1 Input Stack Costas Busch - RPI

  41. Time 2 Input Stack Costas Busch - RPI

  42. Time 3 Input Guess the middle of string Stack Costas Busch - RPI

  43. Time 4 Input Stack Costas Busch - RPI

  44. Time 5 There is no possible transition. Input Input is not consumed Stack Costas Busch - RPI

  45. Another computation on same string: Input Time 0 Stack Costas Busch - RPI

  46. Time 1 Input Stack Costas Busch - RPI

  47. Time 2 Input Stack Costas Busch - RPI

  48. Time 3 Input Stack Costas Busch - RPI

  49. Time 4 Input Stack Costas Busch - RPI

  50. Time 5 Input No accept state is reached Stack Costas Busch - RPI

More Related