dept computer science p j af rik univerzity ko ice
play

Dept. Computer Science, P.J. af rik Univerzity Ko ice, Slovakia - PowerPoint PPT Presentation

Viliam Geffert Zuzana Bednrov Dept. Computer Science, P.J. af rik Univerzity Ko ice, Slovakia Nondeterministic pushdown automata input tape A = ( Q, ,,H,q I ,F ) . . . x 1 x 2 x 3 x n Q -- finite set of states, -- input


  1. Witness language – lower bound CASE 1 CR ∉ L C h CR w 1 u 1 w 1 $ u 2 q l q k  u’ y l x l x k $ CR u 1 w 1 w 1 CR u 2

  2. Witness language – lower bound CASE 1 CR ∉ L C h CR w 1 u 1 w 1 $ u 2 q l q k  u’ y l x l x k $ CR u 1 w 1 w 1 CR u 2

  3. Summing up: For L , we have NPDA with n + O(| Σ |) states n pushdown height | Σ | pushdown symbols On the other hand, each NPDA for L C requires at least states 2 | Σ | n-O(1) or pushdown height

  4. Witness language by two-way machine Lem.: For each Σ and n ≥ 1, language L C can be accepted by constant height 2 DPDA using n + 6| Σ |+21 states n + 1 pushdown height | Σ |+1 pushdown symbols

  5. Witness language by two-way machine Well formed input? ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP q . . . state X I pushdown

  6. Witness language by two-way machine Well formed input? (Exactly one “$” ?) ├ $ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP q . . . state X I pushdown

  7. Witness language by two-way machine Well formed input? ├ $ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP q state X I pushdown

  8. Witness language by two-way machine Well formed input? (All blocks of equal length?) ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP q 0 state X I pushdown

  9. Witness language by two-way machine Well formed input? ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 TOP q 1 state X I pushdown

  10. Witness language by two-way machine Well formed input? ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 TOP q 2 state X I pushdown

  11. Witness language by two-way machine Well formed input? ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 TOP q 3 state X I pushdown

  12. Witness language by two-way machine Well formed input? ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 TOP q 4 state X I pushdown

  13. Witness language by two-way machine Well formed input? ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 . . . 4 TOP q 0 state X I pushdown

  14. Witness language by two-way machine Well formed input? ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP q 0 state X I pushdown

  15. Witness language by two-way machine Well formed input? ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 . . . 4 TOP q state X I pushdown

  16. Witness language by two-way machine Well formed input? ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 . . . 4 TOP YES n + O(1) states X I pushdown

  17. Witness language by two-way machine Idea ? ∃ Z : R x i = Z = y j ├ ┤ 1 0 1 1 ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 1 q 0 state Z 1 1 X I pushdown

  18. Witness language by two-way machine Idea ? ∃ Z : R x i = Z = y j ├ ┤ 1 0 1 1 1 1 0 1 ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 $ 0 0 0 1 1 0 1 0 0 1 0 0 TOP 1 q 0 state Z 1 1 X I pushdown

  19. Witness language by two-way machine Initialize PD memory 4 ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 q state TOP X I pushdown

  20. Witness language by two-way machine Initialize PD memory 4 ├ 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 q state TOP 0 X I pushdown

  21. Witness language by two-way machine Initialize PD memory 4 ├ 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 q state TOP 0 0 X I pushdown

  22. Witness language by two-way machine Initialize PD memory 4 ├ 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 q TOP 0 state 0 0 X I pushdown

  23. Witness language by two-way machine Initialize PD memory 4 ├ 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  24. Witness language by two-way machine Initialize PD memory 4 ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 O(1) states 0 X I pushdown

  25. Witness language by two-way machine Left Part ? = Z ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  26. Witness language by two-way machine Left Part ? = Z ├ 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  27. Witness language by two-way machine Left Part ? = Z ├ 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Difference q TOP 0 0 Z 0 0 X I pushdown

  28. Witness language by two-way machine Left Part ├ 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 q TOP 0 state Z 0 0 X I pushdown

  29. Witness language by two-way machine Left Part ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  30. Witness language by two-way machine Left Part ? = Z ├ 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  31. Witness language by two-way machine Left Part ? = Z ├ 0 1 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Difference q TOP 0 0 Z 0 0 X I pushdown

  32. Witness language by two-way machine Left Part ├ 0 1 1 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 q TOP 0 state Z 0 0 X I pushdown

  33. Witness language by two-way machine Left Part ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  34. Witness language by two-way machine Left Part ? = Z ├ 1 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Difference TOP 0 q 0 0 Z 0 0 X I pushdown

  35. Witness language by two-way machine Left Part ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  36. Witness language by two-way machine Left Part ├ $ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  37. Witness language by two-way machine Left Part . . . ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 0 state Z 0 0 X I pushdown

  38. Witness language by two-way machine Left Part ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z := Z + 1 0 0 X I pushdown

  39. Witness language by two-way machine Left Part ? = Z ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

  40. Witness language by two-way machine Left Part ? = Z ├ ┤ 0 1 0 0 ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 YES q 1 Z 0 0 X I pushdown

  41. Witness language by two-way machine Right Part ? Z= ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

  42. Witness language by two-way machine Right Part ? Z= ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 TOP 0 q 1 state Z 0 0 X I pushdown

  43. Witness language by two-way machine Right Part ? Z= ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 Difference q 1 TOP 1 Z 0 0 X I pushdown

  44. Witness language by two-way machine Right Part ├ 0 1 0 0 ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 q TOP 1 state Z 0 0 X I pushdown

  45. Witness language by two-way machine Right Part ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

  46. Witness language by two-way machine Right Part ? Z= ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

  47. Witness language by two-way machine Right Part ? Z= ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

  48. Witness language by two-way machine Right Part ? Z= ├ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 $ 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

  49. Witness language by two-way machine Right Part No match ├ $ ┤ ₵ ₵ ₵ ₵ ₵ ₵ ₵ 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 TOP 0 q 1 state Z 0 0 X I pushdown

Recommend


More recommend