parikh image of pushdown automata
play

Parikh Image of Pushdown Automata Elena Guti errez and Pierre Ganty - PowerPoint PPT Presentation

Parikh Image of Pushdown Automata Elena Guti errez and Pierre Ganty Introduction Context-free Languages (CFLs) G P L ( P ) = L ( G ) Pushdown Automata Context-free Grammars (PDAs) (CFGs) 1 Introduction Context-free Languages (CFLs)


  1. Parikh Image of Pushdown Automata Elena Guti´ errez and Pierre Ganty

  2. Introduction Context-free Languages (CFLs) G P L ( P ) = L ( G ) Pushdown Automata Context-free Grammars (PDAs) (CFGs) 1

  3. Introduction Context-free Languages (CFLs) G P Pushdown Automata Context-free Grammars (PDAs) (CFGs) 2

  4. Introduction Context-free Languages (CFLs) PDA2CFG G P Pushdown Automata Context-free Grammars (PDAs) (CFGs) 2

  5. PDAs and CFGs Pushdown Automata Context-free Grammar X S ⇒ aSa ⇒ abSba ⇒ . . . ⇒ abaaba q Z a b 3

  6. PDAs and CFGs Pushdown Automata Context-free Grammar X S ⇒ aSa ⇒ abSba ⇒ . . . ⇒ abaaba q Z a b PDA2CFG PDA2CFG n states p s.s. CFG PDA 3

  7. PDAs and CFGs Pushdown Automata Context-free Grammar X S ⇒ aSa ⇒ abSba ⇒ . . . ⇒ abaaba q Z a b PDA2CFG PDA2CFG n states V = { [ q X q ′ ] | q , q ′ ∈ Q , X ∈ Γ } p s.s. CFG PDA 3

  8. PDAs and CFGs Pushdown Automata Context-free Grammar X S ⇒ aSa ⇒ abSba ⇒ . . . ⇒ abaaba q Z a b PDA2CFG | V | = n 2 p + 1 PDA2CFG n states V = { [ q X q ′ ] | q , q ′ ∈ Q , X ∈ Γ } p s.s. CFG PDA 3

  9. Introduction CFLs PDA2CFG G P CFGs PDAs 4

  10. Introduction CFLs PDA2CFG G P CFGs PDAs Goldstine et. al.(1982): PDA2CFG is optimal 4

  11. Introduction 5

  12. Introduction 5

  13. Introduction 6

  14. PDA2CFG is also optimal ∗ in the unary case Lower bound Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent CFG has Ω( n 2 ( p − 2 n − 4)) variables. Family P(n,k) n states p = 2 n + k + 4 stack symbols Σ = { a } 7

  15. PDA2CFG is also optimal ∗ in the unary case Set of actions of P(n,k): ( q 0 , a , S ) ֒ → ( q 0 , X k r 0 ) ( q i , a , X j ) ֒ → ( q i , X j − 1 r m s i X j − 1 r m ) ∀ i , m ∈ { 0 , . . . , n − 1 } , ∀ j ∈ { 1 , . . . , k } , ( q j , a , s i ) ֒ → ( q i , ε ) ∀ i , j ∈ { 0 , . . . , n − 1 } , ( q i , a , r i ) ֒ → ( q i , ε ) ∀ i ∈ { 0 , . . . , n − 1 } , ( q i , a , X 0 ) ֒ → ( q i , X k ⋆ ) ∀ i ∈ { 0 , . . . , n − 1 } , ( q i , a , X 0 ) ֒ → ( q i +1 , X k $) ∀ i ∈ { 0 , . . . , n − 2 } , ( q i , a , ⋆ ) ֒ → ( q i − 1 , ε ) ∀ i ∈ { 1 , . . . , n − 1 } , ( q 0 , a , $) ֒ → ( q n − 1 , ε ) ( q n − 1 , a , X 0 ) ֒ → ( q n − 1 , ε ) 8

  16. PDA2CFG is also optimal ∗ in the unary case Properties of P(n,k): P has only one accepting run L ( P ) = { a ℓ } with ℓ ≥ 2 n 2 k 9

  17. PDA2CFG is also optimal ∗ in the unary case Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent CFG has Ω( n 2 ( p − 2 n − 4)) variables. 10

  18. PDA2CFG is also optimal ∗ in the unary case Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent CFG has Ω( n 2 ( p − 2 n − 4)) variables. Proof: Find G s.t.: L ( G ) = L ( P ) = { a ℓ } with ℓ ≥ 2 n 2 k . 10

  19. PDA2CFG is also optimal ∗ in the unary case Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent CFG has Ω( n 2 ( p − 2 n − 4)) variables. Proof: Find G s.t.: L ( G ) = L ( P ) = { a ℓ } with ℓ ≥ 2 n 2 k . [Charikar et. al., 2005] : The smallest CFG that generates exactly one word of length ℓ has Ω( log ( ℓ )) variables. 10

  20. PDA2CFG is also optimal ∗ in the unary case Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent CFG has Ω( n 2 ( p − 2 n − 4)) variables. Proof: Find G s.t.: L ( G ) = L ( P ) = { a ℓ } with ℓ ≥ 2 n 2 k . [Charikar et. al., 2005] : The smallest CFG that generates exactly one word of length ℓ has Ω( log ( ℓ )) variables. Then G has Ω( log (2 n 2 k )) = Ω( n 2 k ) variables. 10

  21. PDA2CFG is also optimal ∗ in the unary case Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent CFG has Ω( n 2 ( p − 2 n − 4)) variables. Proof: Find G s.t.: L ( G ) = L ( P ) = { a ℓ } with ℓ ≥ 2 n 2 k . [Charikar et. al., 2005] : The smallest CFG that generates exactly one word of length ℓ has Ω( log ( ℓ )) variables. Then G has Ω( log (2 n 2 k )) = Ω( n 2 k ) variables. As k = p − 2 n − 4, G has Ω( n 2 ( p − 2 n − 4)) variables. 10

  22. PDA2CFG is also optimal ∗ in the unary case Equivalent CFG Upper bound Lower bound P ( n , k ) O ( n 2 ( k + n )) Ω( n 2 k ) 11

  23. PDA2CFG is also optimal ∗ in the unary case Equivalent CFG Upper bound Lower bound P ( n , k ) O ( n 2 ( k + n )) Ω( n 2 k ) Asymptotically tight if n ≤ Ck with C > 0 11

  24. PDA2CFG is also optimal ∗ in the unary case PDA2CFG is optimal | Σ | > 1 | Σ | = 1 12

  25. PDA2CFG is also optimal ∗ in the unary case PDA2CFG is optimal | Σ | > 1 | Σ | = 1 12

  26. CFLs PDA2CFG G P CFGs PDAs 13

  27. CFLs PDA2CFG G P CFGs PDAs 14

  28. CFLs G P { abb , ab } { bab , ba } CFGs PDAs 15

  29. Parikh equivalence Parikh-equivalent words abb bab Parikh-equivalent languages { abb , ab } { bab , ba } 16

  30. Parikh equivalence Parikh-equivalent words abb bab Parikh-equivalent languages { abb , ab } { bab , ba } 16

  31. Parikh equivalence Parikh-equivalent words abb ≈ bab Parikh-equivalent languages { abb , ab } { bab , ba } 16

  32. Parikh equivalence Parikh-equivalent words abb ≈ bab Parikh-equivalent languages { abb , ab } { bab , ba } 16

  33. PDA2CFG for Parikh equivalence CFLs PDA2CFG P G PDAs CFGs Idea: Find F such that: For all L ∈ F : every CFG G with L ( G ) ≈ L needs Ω( n 2 p ) variables 17

  34. PDA2CFG for Parikh equivalence CFLs PDA2CFG P G PDAs CFGs Idea: Find F such that: For all L ∈ F : every CFG G with L ( G ) ≈ L needs Ω( n 2 p ) variables 17

  35. { abb , ab } { abb , ab } 18

  36. { abb , ab } { abb , ab } L = L ′ ⇒ L ≈ L ′ 18

  37. { abb , ab } { abb , ab } L = L ′ ⇒ L ≈ L ′ 18

  38. { abb , ab } { abb , ab } L = L ′ ⇒ L ≈ L ′ �⇐ 18

  39. If | Σ | = 1 : aaa 19

  40. If | Σ | = 1 : aaa aaa 19

  41. { aaa , aa } If | Σ | = 1 : aaa aaa { aaa , aa } 19

  42. { aaa , aa } If | Σ | = 1 : aaa aaa { aaa , aa } If | Σ | = 1 : L = L ′ ⇐ ⇒ L ≈ L ′ 19

  43. | Σ | = 1 CFLs PDA2CFG P G PDAs CFGs Idea: with | Σ | = 1 Find F such that: For all L ∈ F : every CFG G with L ( G ) ≈ L needs Ω( n 2 p ) variables 20

  44. | Σ | = 1 CFLs PDA2CFG P G PDAs CFGs P ( n , k ) is unary Idea: with | Σ | = 1 Find F such that: For all L ∈ F : every CFG G with L ( G ) ≈ L needs Ω( n 2 p ) variables 20

  45. PDA2CFG is optimal ∗ for Parikh equivalence PDA2CFG is optimal | Σ | > 1 | Σ | = 1 Parikh equivalence 21

  46. 2-step procedure for Parikh-equivalent FSA Thm: Every CFL is Parikh-equivalent to some regular language CFLs F P PDAs Finite State Automata (FSAs) 22

  47. 2-step procedure for Parikh-equivalent FSA Thm: Every CFL is Parikh-equivalent to some regular language Regular Languages F P FSAs PDAs 23

  48. 2-step procedure for Parikh-equivalent FSA Upper bound 2-step procedure Parikh-equivalent PDA FSA 24

  49. 2-step procedure for Parikh-equivalent FSA 2-step procedure for Parikh-equivalent FSA 2-step procedure for Parikh-equivalent FSA Upper bound 2-step procedure Equivalent Parikh-equivalent Procedure PDA2CFG PDA procedure FSA [Esparza et. al., 2011] CFG O ( n 2 p ) n states variables p s.s. 24

  50. 2-step procedure for Parikh-equivalent FSA Upper bound 2-step procedure Equivalent Parikh-equivalent Procedure PDA2CFG PDA procedure FSA [Esparza et. al., 2011] CFG n O (4 n ) variables states 24

  51. 2-step procedure for Parikh-equivalent FSA 2-step procedure for Parikh-equivalent FSA Upper bound 2-step procedure Equivalent Parikh-equivalent Procedure PDA2CFG PDA procedure FSA [Esparza et. al., 2011] CFG O (4 n 2 p ) n states p s.s. states Thm: Given a PDA with n states and p s.s., there is a Parikh-equivalent FSA with O (4 n 2 p ) states . 24

  52. 2-step procedure for Parikh-equivalent FSA Lower bound Using the family P ( n , k ) L ( P ) = { a ℓ } with ℓ ≥ 2 n 2 k a a a q 0 q 1 q ℓ Thm: There is a family of unary PDAs with n states and p stack symbols for which every equivalent FSA needs at least 2 n 2 ( p − 2 n − 4) + 1 states . 25

  53. 2-step procedure for Parikh-equivalent FSA Parikh-equivalent FSA Upper bound Lower bound P ( n , k ) O (4 n 2 ( k +2 n +4) ) Ω(2 n 2 k ) Asymptotically tight if n ≤ Ck with C > 0 26

  54. Conclusions PDA2CFG is also optimal in the unary case PDA2CFG is optimal for Parikh-equivalence PDA2CFG-based procedure for Parikh-equivalent FSA is close to optimal 27

  55. Conclusions PDA2CFG is also optimal in the unary case PDA2CFG is optimal for Parikh-equivalence PDA2CFG-based procedure for Parikh-equivalent FSA is close to optimal Thank you! 27

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend