1 / 85

Pushdown Automata PDAs

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

varian
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 Courtesy Costas Busch - RPI

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

  3. Initial Stack Symbol Stack Stack stack head top bottom special symbol Courtesy Costas Busch - RPI

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

  5. input stack top Replace Courtesy Costas Busch - RPI

  6. input stack top Push Courtesy Costas Busch - RPI

  7. input stack top Pop Courtesy Costas Busch - RPI

  8. input stack top No Change Courtesy Costas Busch - RPI

  9. A Possible Transition input stack empty Pop top Courtesy Costas Busch - RPI

  10. A Bad Transition input Empty stack HALT The automaton Halts in state and Rejects the input string Courtesy Costas Busch - RPI

  11. A Bad Transition input Empty stack HALT The automaton Halts in state and Rejects the input string Courtesy Costas Busch - RPI

  12. No transition is allowed to be followed When the stack is empty Empty stack Courtesy Costas Busch - RPI

  13. A Good Transition input stack Pop top Courtesy Costas Busch - RPI

  14. Non-Determinism These are allowed transitions in a Non-deterministic PDA (NPDA) Courtesy Costas Busch - RPI

  15. NPDA: Non-Deterministic PDA Example: Courtesy Costas Busch - RPI

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

  17. Time 1 Input Stack Courtesy Costas Busch - RPI

  18. Time 2 Input Stack Courtesy Costas Busch - RPI

  19. Time 3 Input Stack Courtesy Costas Busch - RPI

  20. Time 4 Input Stack Courtesy Costas Busch - RPI

  21. Time 5 Input Stack Courtesy Costas Busch - RPI

  22. Time 6 Input Stack Courtesy Costas Busch - RPI

  23. Time 7 Input Stack Courtesy Costas Busch - RPI

  24. Time 8 Input Stack accept Courtesy Costas Busch - RPI

  25. A string is accepted if there is a computation such that: All the input is consumed AND The last state is a final state At the end of the computation, we do not care about the stack contents Courtesy Costas Busch - RPI

  26. The input string is accepted by the NPDA: Courtesy Costas Busch - RPI

  27. In general, is the language accepted by the NPDA: Courtesy Costas Busch - RPI

  28. Another NPDA example NPDA Courtesy Costas Busch - RPI

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

  30. Time 1 Input Stack Courtesy Costas Busch - RPI

  31. Time 2 Input Stack Courtesy Costas Busch - RPI

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

  33. Time 4 Input Stack Courtesy Costas Busch - RPI

  34. Time 5 Input Stack Courtesy Costas Busch - RPI

  35. Time 6 Input Stack accept Courtesy Costas Busch - RPI

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

  37. Time 1 Input Stack Courtesy Costas Busch - RPI

  38. Time 2 Input Stack Courtesy Costas Busch - RPI

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

  40. Time 4 Input Stack Courtesy Costas Busch - RPI

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

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

  43. Time 1 Input Stack Courtesy Costas Busch - RPI

  44. Time 2 Input Stack Courtesy Costas Busch - RPI

  45. Time 3 Input Stack Courtesy Costas Busch - RPI

  46. Time 4 Input Stack Courtesy Costas Busch - RPI

  47. Time 5 Input No final state is reached Stack Courtesy Costas Busch - RPI

  48. There is no computation that accepts string Courtesy Costas Busch - RPI

  49. A string is rejected if there is no computation such that: All the input is consumed AND The last state is a final state At the end of the computation, we do not care about the stack contents Courtesy Costas Busch - RPI

  50. In other words, a string is rejected if in every computation with this string: The input cannot be consumed OR The input is consumed and the last state is not a final state OR The stack head moves below the bottom of the stack Courtesy Costas Busch - RPI

More Related