Download
pushdown automata pdas n.
Skip this Video
Loading SlideShow in 5 Seconds..
Pushdown Automata PDAs PowerPoint Presentation
Download Presentation
Pushdown Automata PDAs

Pushdown Automata PDAs

61 Views Download Presentation
Download Presentation

Pushdown Automata PDAs

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Pushdown AutomataPDAs COMP 335

  2. Pushdown Automaton -- PDA Input String Stack States COMP 335

  3. Initial Stack Symbol Stack Stack stack head top bottom special symbol COMP 335

  4. The States Pop symbol Input symbol Push symbol COMP 335

  5. input stack top Replace COMP 335

  6. input stack top Push COMP 335

  7. input stack top Pop COMP 335

  8. input stack top No Change COMP 335

  9. A Possible Transition input stack empty Pop top COMP 335

  10. A Bad Transition input Empty stack HALT The automaton Halts in state and Rejects the input string COMP 335

  11. A Bad Transition input Empty stack HALT The automaton Halts in state and Rejects the input string COMP 335

  12. No transition is allowed to be followed when the stack is empty Empty stack COMP 335

  13. A Good Transition input stack Pop top COMP 335

  14. Non-Determinism These are allowed transitions in a Non-deterministic PDA (NPDA) COMP 335

  15. NPDA: Non-Deterministic PDA Example: COMP 335

  16. Execution Example: Time 0 Input Stack current state COMP 335

  17. Time 1 Input Stack COMP 335

  18. Time 2 Input Stack COMP 335

  19. Time 3 Input Stack COMP 335

  20. Time 4 Input Stack COMP 335

  21. Time 5 Input Stack COMP 335

  22. Time 6 Input Stack COMP 335

  23. Time 7 Input Stack COMP 335

  24. Time 8 Input Stack accept COMP 335

  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 COMP 335

  26. The input string is accepted by the NPDA: COMP 335

  27. In general, is the language accepted by the NPDA: COMP 335

  28. NPDA -- Another example NPDA COMP 335

  29. Execution Example: Time 0 Input Stack COMP 335

  30. Time 1 Input Stack COMP 335

  31. Time 2 Input Stack COMP 335

  32. Time 3 Input Guess the middle of string Stack COMP 335

  33. Time 4 Input Stack COMP 335

  34. Time 5 Input Stack COMP 335

  35. Time 6 Input Stack accept COMP 335

  36. Rejection Example: Time 0 Input Stack COMP 335

  37. Time 1 Input Stack COMP 335

  38. Time 2 Input Stack COMP 335

  39. Time 3 Input Guess the middle of string Stack COMP 335

  40. Time 4 Input Stack COMP 335

  41. Time 5 There is no possible transition. Input Input is not consumed Stack COMP 335

  42. Another computation on the same string: Input Time 0 Stack COMP 335

  43. Time 1 Input Stack COMP 335

  44. Time 2 Input Stack COMP 335

  45. Time 3 Input Stack COMP 335

  46. Time 4 Input Stack COMP 335

  47. Time 5 Input No final state is reached Stack COMP 335

  48. There is no computation that accepts string COMP 335

  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 COMP 335

  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 COMP 335