complexity of parikh s theorem
play

Complexity of Parikhs Theorem Anthony Widjaja Lin Yale-NUS College, - PowerPoint PPT Presentation

Complexity of Parikhs Theorem Anthony Widjaja Lin Yale-NUS College, Singapore ACTS 2015 1 / 43 Introduction Classical automata theory a w = abaabba T = b b a a ACTS 2015 2 / 43 Introduction Classical automata theory a w =


  1. Lower bound for semilinear sets for CFGs Proposition : There is an infinite sequence { G n } n ∈ N of CFGs over Σ = { a } s.t. P ( L ( G n )) must have at least 2 Ω( | G n | ) linear sets. The CFG G n generates { a j : j ∈ [0 , 2 n − 1] } : ( 2 n linear sets!!) → S A 0 . . . A n − 1 → for each 0 ≤ i < n A i ε → for each 0 ≤ i < n A i B i → for each 0 < i < n B i B i − 1 B i − 1 → B 0 a ACTS 2015 – 13 / 43

  2. Lower bound for semilinear sets for CFGs Proposition : There is an infinite sequence { G n } n ∈ N of CFGs over Σ = { a } s.t. P ( L ( G n )) must have at least 2 Ω( | G n | ) linear sets. The CFG G n generates { a j : j ∈ [0 , 2 n − 1] } : ( 2 n linear sets!!) → S A 0 . . . A n − 1 → for each 0 ≤ i < n A i ε → for each 0 ≤ i < n A i B i → for each 0 < i < n B i B i − 1 B i − 1 → B 0 a n.b. this kind of encoding for CFG is from (Stockmeyer-Meyer’73) ACTS 2015 – 13 / 43

  3. Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG Case NFA Case NFA Case NFA case What about a fixed alphabet size? Normal Form Theorem for Semilinear Sets Normal Form Theorem for Parikh Images of NFA Parikh images of extensions of NFA Conclusion ACTS 2015 – 14 / 43

  4. Exponential lower bound for DFAs Proposition : There is an infinite sequence {A n } n ∈ N of DFAs s.t. P ( L ( A n )) must have at least 2 Ω( |A n | ) linear sets. ACTS 2015 – 15 / 43

  5. Exponential lower bound for DFAs Proposition : There is an infinite sequence {A n } n ∈ N of DFAs s.t. P ( L ( A n )) must have at least 2 Ω( |A n | ) linear sets. A n is over Σ n := { a 1 , . . . , a n +1 } : Σ n · Σ n · · · · · Σ n � �� � n copies ACTS 2015 – 15 / 43

  6. Exponential lower bound for DFAs Proposition : There is an infinite sequence {A n } n ∈ N of DFAs s.t. P ( L ( A n )) must have at least 2 Ω( |A n | ) linear sets. A n is over Σ n := { a 1 , . . . , a n +1 } : Σ n · Σ n · · · · · Σ n � �� � n copies P ( L ( A n )) contains each ( r 1 , . . . , r n +1 ) s.t. � n +1 i =1 r i = n . ACTS 2015 – 15 / 43

  7. Exponential lower bound for DFAs Proposition : There is an infinite sequence {A n } n ∈ N of DFAs s.t. P ( L ( A n )) must have at least 2 Ω( |A n | ) linear sets. A n is over Σ n := { a 1 , . . . , a n +1 } : Σ n · Σ n · · · · · Σ n � �� � n copies P ( L ( A n )) contains each ( r 1 , . . . , r n +1 ) s.t. � n +1 i =1 r i = n . There are � 2 n � ≥ 2 2 n − 1 √ n of these. n ACTS 2015 – 15 / 43

  8. Exponential lower bound for DFAs Proposition : There is an infinite sequence {A n } n ∈ N of DFAs s.t. P ( L ( A n )) must have at least 2 Ω( |A n | ) linear sets. A n is over Σ n := { a 1 , . . . , a n +1 } : Σ n · Σ n · · · · · Σ n � �� � n copies P ( L ( A n )) contains each ( r 1 , . . . , r n +1 ) s.t. � n +1 i =1 r i = n . There are � 2 n � ≥ 2 2 n − 1 √ n of these. n Note: Σ n grows with n ACTS 2015 – 15 / 43

  9. Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) What about a fixed alphabet CFG Case NFA Case size? What about a fixed alphabet size? Chrobak-Martinez Kopczynski-Lin Proof outline Normal Form Theorem for Semilinear Sets Normal Form Theorem for Parikh Images of NFA Parikh images of extensions of NFA Conclusion ACTS 2015 – 16 / 43

  10. Unary alphabet case: Chrobak-Martinez Theorem Let us assume that the alphabet is unary, i.e., Σ = { a } . ACTS 2015 – 17 / 43

  11. Unary alphabet case: Chrobak-Martinez Theorem Let us assume that the alphabet is unary, i.e., Σ = { a } . Theorem (Chrobak-Martinez): Descriptional and computational complexity of Parikh Images of unary regular languages are polynomial. ACTS 2015 – 17 / 43

  12. Unary alphabet case: Chrobak-Martinez Theorem Let us assume that the alphabet is unary, i.e., Σ = { a } . Theorem (Chrobak-Martinez): Descriptional and computational complexity of Parikh Images of unary regular languages are polynomial. Note : quadratically many union of arithmetic progressions with periods of linear size � suffice. ACTS 2015 – 17 / 43

  13. Chrobak-Martinez Theorem in Action ACTS 2015 – 18 / 43

  14. Chrobak-Martinez Theorem in Action Parikh image of L ( A ) is 8 + 4 N + 3 N ACTS 2015 – 18 / 43

  15. Chrobak-Martinez Theorem in Action Parikh image of L ( A ) is 8 + 4 N + 3 N which is equal to (8 + 4 N ) ∪ (11 + 4 N ) ∪ (14 + 4 N ) ∪ (17 + 4 N ) ACTS 2015 – 18 / 43

  16. Generalised Chrobak-Martinez Theorem Let Σ := { a 1 , . . . , a k } for fixed k ∈ Z > 0 . ACTS 2015 – 19 / 43

  17. Generalised Chrobak-Martinez Theorem Let Σ := { a 1 , . . . , a k } for fixed k ∈ Z > 0 . Theorem (Kopczynski & Lin’10): Descriptional and computational complexity of Parikh Images of NFAs are polynomial. union of polynomially many linear sets with at most k polynomially-bounded � periods Complexities are exponential in k � Generalizes Chrobak-Martinez Theorem (case k = 1 ). � ACTS 2015 – 19 / 43

  18. Outline of proof Normal-Form Theorem for Semilinear sets. � Normal-Form Theorem for Parikh images of NFA � ACTS 2015 – 20 / 43

  19. Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) Normal Form Theorem for CFG Case NFA Case Semilinear Sets What about a fixed alphabet size? Normal Form Theorem for Semilinear Sets Real cones Real cone example Caratheodory’s thm Our theorem Intuition Intuition Higher dim. Normal Form Theorem for Parikh Images of NFA Parikh images of ACTS 2015 – 21 / 43 extensions of NFA

  20. Digression to Convex Geometry: Real Cones Given V = { v 1 , . . . , v n } ⊆ R k , define the real cone over V : cone ( V ) := { Σ n i =1 a i v i : a i ∈ R ≥ 0 } . Note : akin to definition of vector subspace of R k “spanned” by some set V (but ...) ACTS 2015 – 22 / 43

  21. Examples 1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 1 0.6 0.8 0.6 0.8 0.4 0.2 1 0 Real cone of (1 , 1 , 0 . 5) , (1 , 0 . 5 , 1) , (0 . 5 , 1 , 1) ACTS 2015 – 23 / 43

  22. Examples 1 0.8 0.6 0.4 0.2 1 0 0 1 0.5 0 -0.5 -1 -1 Real cone over { 1 , − 1 } × { 1 , − 1 } × { 1 } ACTS 2015 – 23 / 43

  23. Caratheodory’s theorem Theorem : Given a finite V ⊆ R k of rank d ≤ k , we have � cone ( V ′ ) . cone ( V ) = V ′ ⊆ V, | V ′ | = � V ′ � = d Cones over R k can be decomposed into smaller subcones with ≤ k vertices � ACTS 2015 – 24 / 43

  24. Caratheodory’s theorem Theorem : Given a finite V ⊆ R k of rank d ≤ k , we have � cone ( V ′ ) . cone ( V ) = V ′ ⊆ V, | V ′ | = � V ′ � = d Cones over R k can be decomposed into smaller subcones with ≤ k vertices � Note : if k is fixed, there are only polynomially many such subcones. � ACTS 2015 – 24 / 43

  25. Caratheodory’s theorem (example) 1 0.8 0.6 0.4 0.2 1 0 0 1 0.5 0 -0.5 -1 -1 Real cone over { 1 , − 1 } × { 1 , − 1 } × { 1 } ACTS 2015 – 25 / 43

  26. Caratheodory’s theorem (example) 1 0.8 0.6 0.4 0.2 -1 0 0 1 0.5 0 -0.5 1 -1 Real cone over (1 , 1 , 1) , (1 , − 1 , 1) , ( − 1 , 1 , 1) ACTS 2015 – 25 / 43

  27. Caratheodory’s theorem (example) 1 0.8 0.6 0.4 0.2 -1 0 0 1 0.5 0 -0.5 1 -1 Real cone over ( − 1 , − 1 , 1) , (1 , − 1 , 1) , ( − 1 , 1 , 1) ACTS 2015 – 25 / 43

  28. Caratheodory-like theorem for linear sets Question : Does the integer version of Caratheodory’s theorem hold? � ACTS 2015 – 26 / 43

  29. Caratheodory-like theorem for linear sets Question : Does the integer version of Caratheodory’s theorem hold? � Unfortunately, no! � ACTS 2015 – 26 / 43

  30. Caratheodory-like theorem for linear sets Question : Does the integer version of Caratheodory’s theorem hold? � Unfortunately, no! � Fortunately, it does if you allow nonzero offsets :) � ACTS 2015 – 26 / 43

  31. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Each number in w i is polynomially large (in unary) ACTS 2015 – 26 / 43

  32. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Each number in w i is polynomially large (in unary) When V ⊆ N k , each w i ∈ N k ACTS 2015 – 26 / 43

  33. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Each number in w i is polynomially large (in unary) When V ⊆ N k , each w i ∈ N k The same holds when the initial offset is v � = 0 ACTS 2015 – 26 / 43

  34. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Each number in w i is polynomially large (in unary) When V ⊆ N k , each w i ∈ N k The same holds when the initial offset is v � = 0 ACTS 2015 – 26 / 43

  35. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Use Caratheodory’s theorem ACTS 2015 – 26 / 43

  36. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Use Caratheodory’s theorem Use bounds from integer programming (Papadimitriou’83) for estimating the biggest entries in w i ’s ACTS 2015 – 26 / 43

  37. Caratheodory-like theorem for linear sets Theorem : Fix k ∈ N . Given a finite V ⊆ Z k of rank d ≤ k , we can compute in pseudopolynomial time linear sets L ( w 1 ; S 1 ) , . . . , L ( w s ; S s ) s.t. each S i ⊆ V and | S i | = d s � L ( 0 ; V ) = L ( w i ; S i ) . i =1 Use Caratheodory’s theorem Use bounds from integer programming (Papadimitriou’83) for estimating the biggest entries in w i ’s Use dynamic programming to compute all w i ’s ACTS 2015 – 26 / 43

  38. Intuition for dimension 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ACTS 2015 – 27 / 43

  39. Intuition for dimension 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ACTS 2015 – 27 / 43

  40. b b b b b b b b b b b b b b b b b b Intuition for dimension 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ACTS 2015 – 27 / 43

  41. b b b b b b b b b b b b b b b b b b Intuition for dimension 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ACTS 2015 – 27 / 43

  42. b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b Intuition for dimension 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ACTS 2015 – 27 / 43

  43. Intuition for dimension 2 Key observations : Each parallelogram has a quadratically many integer points � ACTS 2015 – 28 / 43

  44. Intuition for dimension 2 Key observations : Each parallelogram has a quadratically many integer points � There is a natural ordering on these parallelograms: � The parallelogram above or to the right of a parallelogram is larger. � ACTS 2015 – 28 / 43

  45. Intuition for dimension 2 Key observations : Each parallelogram has a quadratically many integer points � There is a natural ordering on these parallelograms: � The parallelogram above or to the right of a parallelogram is larger. � Once a point “appears”, it stays in the larger parallelograms. � ACTS 2015 – 28 / 43

  46. Intuition for dimension 2 Key observations : Each parallelogram has a quadratically many integer points � There is a natural ordering on these parallelograms: � The parallelogram above or to the right of a parallelogram is larger. � Once a point “appears”, it stays in the larger parallelograms. � So, only need to keep track of minimal representatives M , i.e., � L ( 0 ; { (3 , 1) , (2 , 3) , (2 , 2) } ) = M + (3 , 1) N + (2 , 3) N where: M = { (2 , 2) , (4 , 4) , (6 , 6) , (8 , 8) , (10 , 10) , (12 , 12) } ACTS 2015 – 28 / 43

  47. Intuition for dimension 2 Key observations : Each parallelogram has a quadratically many integer points � There is a natural ordering on these parallelograms: � The parallelogram above or to the right of a parallelogram is larger. � Once a point “appears”, it stays in the larger parallelograms. � So, only need to keep track of minimal representatives M , i.e., � L ( 0 ; { (3 , 1) , (2 , 3) , (2 , 2) } ) = M + (3 , 1) N + (2 , 3) N where: M = { (2 , 2) , (4 , 4) , (6 , 6) , (8 , 8) , (10 , 10) , (12 , 12) } |M| and all numbers in M are “not big”. � ACTS 2015 – 28 / 43

  48. Case of dimension > 2 Need to use linear sets with different periods (unlike d = 2 ) � Replace finding two outermost vectors with Caratheodory’s � The rest are similar: � Dynamic programming, � Bounds from integer programming � ACTS 2015 – 29 / 43

  49. Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) Normal Form Theorem for CFG Case NFA Case Parikh Images of NFA What about a fixed alphabet size? Normal Form Theorem for Semilinear Sets Normal Form Theorem for Parikh Images of NFA Proof idea Comp. complex. Parikh images of extensions of NFA Conclusion ACTS 2015 – 30 / 43

  50. Statement of the Theorem Let Σ := { a 1 , . . . , a k } for fixed k ∈ Z > 0 . Theorem (Kopczynski & Lin, LICS 2010): Descriptional and computational complexity of Parikh Images of NFAs are polynomial. poly many union of linear sets with at most k periods with poly-bounded � numbers Complexities are exponential in k . � Generalizes Chrobak-Martinez Theorem (case k = 1 ). � ACTS 2015 – 31 / 43

  51. Proof idea: Path types Notation : Q = { q 0 , . . . , q n − 1 } with initial state q 0 and final state q n − 1 . ACTS 2015 – 32 / 43

  52. Proof idea: Path types Notation : Q = { q 0 , . . . , q n − 1 } with initial state q 0 and final state q n − 1 . Given a path π and simple cycles C 1 , . . . , C m meeting with π : C 1 C 2 C m p π q ACTS 2015 – 32 / 43

  53. Proof idea: Path types Notation : Q = { q 0 , . . . , q n − 1 } with initial state q 0 and final state q n − 1 . Given a path π and simple cycles C 1 , . . . , C m meeting with π : C 1 C 2 C m p π q The path type T π of π is the linear set L ( P ( π ); {P ( C i ) } m i =1 ) . ACTS 2015 – 32 / 43

  54. Proof idea: Path types Notation : Q = { q 0 , . . . , q n − 1 } with initial state q 0 and final state q n − 1 . Given a path π and simple cycles C 1 , . . . , C m meeting with π : C 1 C 2 C m p π q The path type T π of π is the linear set L ( P ( π ); {P ( C i ) } m i =1 ) . There are at most n k O (1) many periods. ACTS 2015 – 32 / 43

  55. Proof idea Characterization of Parikh images of L ( A ) Lemma: P ( L ( A )) = � π T π , where π ranges over paths from initial to final state of length at most O ( n 2 ) . ACTS 2015 – 33 / 43

  56. Proof idea Characterization of Parikh images of L ( A ) Lemma: P ( L ( A )) = � π T π , where π ranges over paths from initial to final state of length at most O ( n 2 ) . Problem: There are 2 ( n + k ) O (1) such π . ACTS 2015 – 33 / 43

  57. Proof idea Characterization of Parikh images of L ( A ) Lemma: P ( L ( A )) = � π T π , where π ranges over paths from initial to final state of length at most O ( n 2 ) . Problem: There are 2 ( n + k ) O (1) such π . BUT: can apply Caratheodory-like theorem on each T π : ACTS 2015 – 33 / 43

  58. Proof idea Characterization of Parikh images of L ( A ) Lemma: P ( L ( A )) = � π T π , where π ranges over paths from initial to final state of length at most O ( n 2 ) . Problem: There are 2 ( n + k ) O (1) such π . BUT: can apply Caratheodory-like theorem on each T π : Corollary: P ( L ( A )) coincides with a union of polynomially many linear sets with polynomially large offsets and at most k polynomially large periods. ACTS 2015 – 33 / 43

  59. Computational complexity Theorem: P ( L ( A )) coincides with a union of polynomially many linear sets with polynomially large offsets and at most k polynomially large periods. A naive implementation takes exponential time. Can improve to PTIME using dynamic programming! ACTS 2015 – 34 / 43

  60. Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) Parikh images of extensions of CFG Case NFA Case NFA What about a fixed alphabet size? Normal Form Theorem for Semilinear Sets Normal Form Theorem for Parikh Images of NFA Parikh images of extensions of NFA LG LG RBCA Conclusion ACTS 2015 – 35 / 43

  61. Linear grammars → S A (5) → A aBb (6) → B aAb (7) → B ε (8) ACTS 2015 – 36 / 43

  62. Linear grammars → S A (5) → A aBb (6) → B aAb (7) → B ε (8) The r.h.s. of a rule has at most 1 variable. ACTS 2015 – 36 / 43

  63. Linear grammars → S A (5) → A aBb (6) → B aAb (7) → B ε (8) The r.h.s. of a rule has at most 1 variable. Proposition: Generalised Chrobak-Martinez Theorem extends to Linear Grammars. ACTS 2015 – 36 / 43

  64. Linear grammars → S A (5) → A aBb (6) → B aAb (7) → B ε (8) The r.h.s. of a rule has at most 1 variable. Proposition: Generalised Chrobak-Martinez Theorem extends to Linear Grammars. Proof : Linear grammars are essentially NFA ... ACTS 2015 – 36 / 43

  65. CFG of fixed “dimensions” A 1 A 1 A 2 a c A 1 a Theorem (Esparza-Ganty-Kiefer-Luttenberger’11): Generalised Chrobak-Martinez Theorem extends to CFG of fixed dimensions. Dimensions measure how many times “doubling tricks” possibly get used in a CFG. ACTS 2015 – 37 / 43

  66. CFG of fixed “dimensions” A 1 A 1 A 2 a c A 1 a Theorem (Esparza-Ganty-Kiefer-Luttenberger’11): Generalised Chrobak-Martinez Theorem extends to CFG of fixed dimensions. Dimensions measure how many times “doubling tricks” possibly get used in a CFG. Linear grammars have dimension 0. ACTS 2015 – 37 / 43

  67. CFG of fixed “dimensions” A 1 A 1 A 2 a c A 1 a Theorem (Esparza-Ganty-Kiefer-Luttenberger’11): Generalised Chrobak-Martinez Theorem extends to CFG of fixed dimensions. Dimensions measure how many times “doubling tricks” possibly get used in a CFG. Linear grammars have dimension 0. Proof : Compute an equivalent NFA of polynomial size and use Generalised Chrobak-Martinez Theorem. ACTS 2015 – 37 / 43

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