ACTS 2015 – 1 / 43
Complexity of Parikhs Theorem Anthony Widjaja Lin Yale-NUS College, - - PowerPoint PPT Presentation
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 =
Introduction
ACTS 2015 – 2 / 43
Classical automata theory
w = abaabba T = a b a a b
Introduction
ACTS 2015 – 2 / 43
Classical automata theory
w = abaabba T = a b a a b
Parikh (1961) suggested to remove ordering
P(w) = (4, 3) P(T) = (3, 2)
Introduction
ACTS 2015 – 2 / 43
Classical automata theory
w = abaabba T = a b a a b
Parikh (1961) suggested to remove ordering
P(w) = (4, 3) P(T) = (3, 2)
Q: What’s the expressive power of standard automata models “modulo Parikh mapping P” (i.e. treated as sets of vectors)?
Parikh’s Theorem
ACTS 2015 – 3 / 43
Parikh’s Theorem: Parikh images of regular and context-free languages are effectively semilinear.
Parikh’s Theorem
ACTS 2015 – 3 / 43
Parikh’s Theorem: Parikh images of regular and context-free languages are effectively semilinear. Semilinear sets = Presburger-definable subsets of Nk.
Parikh’s Theorem Almost Everywhere
ACTS 2015 – 4 / 43
- Verification of concurrent systems
- Bounded context-switch analysis [Esparza-Ganty’11, Hague-Lin’12]
- Asynchronous programs [Ganty-Majumdar’10]
- Message-passing programs [Abdulla-Atig-Cederberg’13]
- Verification of (restrictions of) counter machines:
- Reversal-bounded verification [Ibarra’79]
- Flat counter machines [Fribourg-Olsen’97, Comon-Jurski’98]
- Flattable counter machines [Bardin-Finkel-Leroux-Schnoebelen’05,
Leroux-Sutre’05]
- Path logics over graph databases [Barcelo-Libkin-Lin-Woods’12]
- Cryptographic Analysis of C programs [Verma et al.’06]
Complexity of Parikh’s Theorem
ACTS 2015 – 5 / 43
Descriptional Complexity: How succinct are the different automata models for representing semilinear sets?
Complexity of Parikh’s Theorem
ACTS 2015 – 5 / 43
Descriptional Complexity: How succinct are the different automata models for representing semilinear sets? i.e. the size of the smallest semilinear sets for NFA, CFG, ...?
Complexity of Parikh’s Theorem
ACTS 2015 – 5 / 43
Descriptional Complexity: How succinct are the different automata models for representing semilinear sets? i.e. the size of the smallest semilinear sets for NFA, CFG, ...? Computational complexity: Can we compute semilinear sets for Parikh images
- f these models efficiently?
Parikh’s Theorem (more precisely)
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) Parikh’s Theorem Semilinearity Parikh’s Theorem CFG 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 – 6 / 43
Parikh Images
ACTS 2015 – 7 / 43
- Parikh Image P(L) of a language L over Σ = {a1, . . . , ak} is a subset of Nk
Parikh Images
ACTS 2015 – 7 / 43
- Parikh Image P(L) of a language L over Σ = {a1, . . . , ak} is a subset of Nk
- L = {anbn : n ∈ N}
Parikh Images
ACTS 2015 – 7 / 43
- Parikh Image P(L) of a language L over Σ = {a1, . . . , ak} is a subset of Nk
- L = {anbn : n ∈ N}
- P(L) = {(0, 0), (1, 1), (2, 2), (3, 3), . . .}
Parikh Images
ACTS 2015 – 7 / 43
- Parikh Image P(L) of a language L over Σ = {a1, . . . , ak} is a subset of Nk
- L = {anbn : n ∈ N}
- P(L) = {(0, 0), (1, 1), (2, 2), (3, 3), . . .}
- Note: L′ = (ab)∗ and P(L) = P(L′).
Semilinear Sets
ACTS 2015 – 8 / 43
- A linear set (over Nk) is a set of the form
L(v0; {v1, . . . , vm}) :=
- v0 +
m
- i=1
aivi : a1, . . . , am ∈ N
- for some offset v0 ∈ Nk and periods v1, . . . , vm ∈ Nk and m ∈ N.
Semilinear Sets
ACTS 2015 – 8 / 43
- A linear set (over Nk) is a set of the form
L(v0; {v1, . . . , vm}) :=
- v0 +
m
- i=1
aivi : a1, . . . , am ∈ N
- for some offset v0 ∈ Nk and periods v1, . . . , vm ∈ Nk and m ∈ N.
- Example: {(i, i) : i ∈ N} = L((0, 0); {(1, 1)})
Semilinear Sets
ACTS 2015 – 8 / 43
- A linear set (over Nk) is a set of the form
L(v0; {v1, . . . , vm}) :=
- v0 +
m
- i=1
aivi : a1, . . . , am ∈ N
- for some offset v0 ∈ Nk and periods v1, . . . , vm ∈ Nk and m ∈ N.
- Example: {(i, i) : i ∈ N} = L((0, 0); {(1, 1)})
- A semilinear set over Nk is a finite union of linear sets.
Complexity of Parikh’s Theorem
ACTS 2015 – 9 / 43
Theorem (Parikh): Parikh images of context-free and regular languages are effectively semilinear.
- Descriptional complexity: size of smallest description
- Computational complexity: how efficient to compute
Complexity of Parikh’s Theorem
ACTS 2015 – 9 / 43
Theorem (Parikh): Parikh images of context-free and regular languages are effectively semilinear.
- Descriptional complexity: size of smallest description
- Computational complexity: how efficient to compute
Parikh’s original proof gives exponential complexity bound with linearly many periods for each linear set!
CFG Case
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG Case CFG upper CFG upper CFG lower 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 – 10 / 43
Esparza’s Theorem
ACTS 2015 – 11 / 43
S → A
(1)
A → aBb
(2)
B → aAb
(3)
B → ε
(4)
Esparza’s Theorem
ACTS 2015 – 11 / 43
S → A
(1)
A → aBb
(2)
B → aAb
(3)
B → ε
(4) (Esparza’97): a sufficient and necessary condition for a multiset X ⊆ {1, . . . , 4} to be realisable based on (C1) flow condition, and (C2) connectivity condition.
Esparza’s Theorem
ACTS 2015 – 11 / 43
S → A
(1)
A → aBb
(2)
B → aAb
(3)
B → ε
(4) (Esparza’97): a sufficient and necessary condition for a multiset X ⊆ {1, . . . , 4} to be realisable based on (C1) flow condition, and (C2) connectivity condition. The following are not realisable:
- {12, 2, 4} — need at least two S
(C1)
Esparza’s Theorem
ACTS 2015 – 11 / 43
S → A
(1)
A → aBb
(2)
B → aAb
(3)
B → ε
(4) (Esparza’97): a sufficient and necessary condition for a multiset X ⊆ {1, . . . , 4} to be realisable based on (C1) flow condition, and (C2) connectivity condition. The following are not realisable:
- {12, 2, 4} — need at least two S
(C1)
- {1, 2, 37, 4} — need at least seven B
(C1)
Esparza’s Theorem
ACTS 2015 – 11 / 43
S → A
(1)
A → aBb
(2)
B → aAb
(3)
B → ε
(4) (Esparza’97): a sufficient and necessary condition for a multiset X ⊆ {1, . . . , 4} to be realisable based on (C1) flow condition, and (C2) connectivity condition. The following are not realisable:
- {12, 2, 4} — need at least two S
(C1)
- {1, 2, 37, 4} — need at least seven B
(C1)
- {1, 3, 4} — 3 cannot be fired without 2
(C2)
Esparza’s Theorem
ACTS 2015 – 12 / 43
- Flow and connectivity conditions are expressible as an exponential sized
semilinear set (Esparza’97)
Esparza’s Theorem
ACTS 2015 – 12 / 43
- Flow and connectivity conditions are expressible as an exponential sized
semilinear set (Esparza’97)
- Flow and connectivity conditions are expressible as a linear sized existential
Presburger formula (Verma et al.’05)
Esparza’s Theorem
ACTS 2015 – 12 / 43
- Flow and connectivity conditions are expressible as an exponential sized
semilinear set (Esparza’97)
- Flow and connectivity conditions are expressible as a linear sized existential
Presburger formula (Verma et al.’05) n.b. checking existential Presburger formulas are NP-complete: can use fast SMT solvers.
Esparza’s Theorem
ACTS 2015 – 12 / 43
- Flow and connectivity conditions are expressible as an exponential sized
semilinear set (Esparza’97)
- Flow and connectivity conditions are expressible as a linear sized existential
Presburger formula (Verma et al.’05) n.b. checking existential Presburger formulas are NP-complete: can use fast SMT solvers. Note: This has been successfully used in many applications in infinite-state verification.
Lower bound for semilinear sets for CFGs
ACTS 2015 – 13 / 43
Proposition: There is an infinite sequence {Gn}n∈N of CFGs over Σ = {a} s.t. P(L(Gn)) must have at least 2Ω(|Gn|) linear sets.
Lower bound for semilinear sets for CFGs
ACTS 2015 – 13 / 43
Proposition: There is an infinite sequence {Gn}n∈N of CFGs over Σ = {a} s.t. P(L(Gn)) must have at least 2Ω(|Gn|) linear sets. The CFG Gn generates {aj : j ∈ [0, 2n − 1]}:
Lower bound for semilinear sets for CFGs
ACTS 2015 – 13 / 43
Proposition: There is an infinite sequence {Gn}n∈N of CFGs over Σ = {a} s.t. P(L(Gn)) must have at least 2Ω(|Gn|) linear sets. The CFG Gn generates {aj : j ∈ [0, 2n − 1]}: (2n linear sets!!)
Lower bound for semilinear sets for CFGs
ACTS 2015 – 13 / 43
Proposition: There is an infinite sequence {Gn}n∈N of CFGs over Σ = {a} s.t. P(L(Gn)) must have at least 2Ω(|Gn|) linear sets. The CFG Gn generates {aj : j ∈ [0, 2n − 1]}: (2n linear sets!!)
S → A0 . . . An−1 Ai → ε
for each 0 ≤ i < n
Ai → Bi
for each 0 ≤ i < n
Bi → Bi−1Bi−1
for each 0 < i < n
B0 → a
Lower bound for semilinear sets for CFGs
ACTS 2015 – 13 / 43
Proposition: There is an infinite sequence {Gn}n∈N of CFGs over Σ = {a} s.t. P(L(Gn)) must have at least 2Ω(|Gn|) linear sets. The CFG Gn generates {aj : j ∈ [0, 2n − 1]}: (2n linear sets!!)
S → A0 . . . An−1 Ai → ε
for each 0 ≤ i < n
Ai → Bi
for each 0 ≤ i < n
Bi → Bi−1Bi−1
for each 0 < i < n
B0 → a
n.b. this kind of encoding for CFG is from (Stockmeyer-Meyer’73)
NFA Case
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG 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
Exponential lower bound for DFAs
ACTS 2015 – 15 / 43
Proposition: There is an infinite sequence {An}n∈N of DFAs s.t. P(L(An)) must have at least 2Ω(|An|) linear sets.
Exponential lower bound for DFAs
ACTS 2015 – 15 / 43
Proposition: There is an infinite sequence {An}n∈N of DFAs s.t. P(L(An)) must have at least 2Ω(|An|) linear sets.
An is over Σn := {a1, . . . , an+1}: Σn · Σn · · · · · Σn
- n copies
Exponential lower bound for DFAs
ACTS 2015 – 15 / 43
Proposition: There is an infinite sequence {An}n∈N of DFAs s.t. P(L(An)) must have at least 2Ω(|An|) linear sets.
An is over Σn := {a1, . . . , an+1}: Σn · Σn · · · · · Σn
- n copies
P(L(An)) contains each (r1, . . . , rn+1) s.t. n+1
i=1 ri = n.
Exponential lower bound for DFAs
ACTS 2015 – 15 / 43
Proposition: There is an infinite sequence {An}n∈N of DFAs s.t. P(L(An)) must have at least 2Ω(|An|) linear sets.
An is over Σn := {a1, . . . , an+1}: Σn · Σn · · · · · Σn
- n copies
P(L(An)) contains each (r1, . . . , rn+1) s.t. n+1
i=1 ri = n. There are
2n
n
- ≥ 22n−1
√n
- f these.
Exponential lower bound for DFAs
ACTS 2015 – 15 / 43
Proposition: There is an infinite sequence {An}n∈N of DFAs s.t. P(L(An)) must have at least 2Ω(|An|) linear sets.
An is over Σn := {a1, . . . , an+1}: Σn · Σn · · · · · Σn
- n copies
P(L(An)) contains each (r1, . . . , rn+1) s.t. n+1
i=1 ri = n. There are
2n
n
- ≥ 22n−1
√n
- f these.
Note: Σn grows with n
What about a fixed alphabet size?
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG Case NFA Case 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
Unary alphabet case: Chrobak-Martinez Theorem
ACTS 2015 – 17 / 43
Let us assume that the alphabet is unary, i.e., Σ = {a}.
Unary alphabet case: Chrobak-Martinez Theorem
ACTS 2015 – 17 / 43
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.
Unary alphabet case: Chrobak-Martinez Theorem
ACTS 2015 – 17 / 43
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.
Chrobak-Martinez Theorem in Action
ACTS 2015 – 18 / 43
Chrobak-Martinez Theorem in Action
ACTS 2015 – 18 / 43
Parikh image of L(A) is 8 + 4N + 3N
Chrobak-Martinez Theorem in Action
ACTS 2015 – 18 / 43
Parikh image of L(A) is 8 + 4N + 3N which is equal to
(8 + 4N) ∪ (11 + 4N) ∪ (14 + 4N) ∪ (17 + 4N)
Generalised Chrobak-Martinez Theorem
ACTS 2015 – 19 / 43
Let Σ := {a1, . . . , ak} for fixed k ∈ Z>0.
Generalised Chrobak-Martinez Theorem
ACTS 2015 – 19 / 43
Let Σ := {a1, . . . , ak} 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).
Outline of proof
ACTS 2015 – 20 / 43
- Normal-Form Theorem for Semilinear sets.
- Normal-Form Theorem for Parikh images of NFA
Normal Form Theorem for Semilinear Sets
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG Case NFA Case 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 extensions of NFA
ACTS 2015 – 21 / 43
Digression to Convex Geometry: Real Cones
ACTS 2015 – 22 / 43
Given V = {v1, . . . , vn} ⊆ Rk, define the real cone over V : cone(V ) := {Σn
i=1aivi : ai ∈ R≥0}.
Note: akin to definition of vector subspace of Rk “spanned” by some set V (but ...)
Examples
ACTS 2015 – 23 / 43
0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1
Real cone of (1, 1, 0.5), (1, 0.5, 1), (0.5, 1, 1)
Examples
ACTS 2015 – 23 / 43
- 1
1
- 1
- 0.5
0.5 1 0.2 0.4 0.6 0.8 1
Real cone over {1, −1} × {1, −1} × {1}
Caratheodory’s theorem
ACTS 2015 – 24 / 43
Theorem: Given a finite V ⊆ Rk of rank d ≤ k, we have cone(V ) =
- V ′⊆V,|V ′|=V ′=d
cone(V ′).
- Cones over Rk can be decomposed into smaller subcones with ≤ k vertices
Caratheodory’s theorem
ACTS 2015 – 24 / 43
Theorem: Given a finite V ⊆ Rk of rank d ≤ k, we have cone(V ) =
- V ′⊆V,|V ′|=V ′=d
cone(V ′).
- Cones over Rk can be decomposed into smaller subcones with ≤ k vertices
- Note: if k is fixed, there are only polynomially many such subcones.
Caratheodory’s theorem (example)
ACTS 2015 – 25 / 43
- 1
1
- 1
- 0.5
0.5 1 0.2 0.4 0.6 0.8 1
Real cone over {1, −1} × {1, −1} × {1}
Caratheodory’s theorem (example)
ACTS 2015 – 25 / 43
- 1
- 0.5
0.5 1
- 1
1 0.2 0.4 0.6 0.8 1
Real cone over (1, 1, 1), (1, −1, 1), (−1, 1, 1)
Caratheodory’s theorem (example)
ACTS 2015 – 25 / 43
- 1
- 0.5
0.5 1
- 1
1 0.2 0.4 0.6 0.8 1
Real cone over (−1, −1, 1), (1, −1, 1), (−1, 1, 1)
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
- Question: Does the integer version of Caratheodory’s theorem hold?
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
- Question: Does the integer version of Caratheodory’s theorem hold?
- Unfortunately, no!
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
- Question: Does the integer version of Caratheodory’s theorem hold?
- Unfortunately, no!
- Fortunately, it does if you allow nonzero offsets :)
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Each number in wi is polynomially large (in unary)
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Each number in wi is polynomially large (in unary) When V ⊆ Nk, each wi ∈ Nk
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Each number in wi is polynomially large (in unary) When V ⊆ Nk, each wi ∈ Nk The same holds when the initial offset is v = 0
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Each number in wi is polynomially large (in unary) When V ⊆ Nk, each wi ∈ Nk The same holds when the initial offset is v = 0
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Use Caratheodory’s theorem
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Use Caratheodory’s theorem Use bounds from integer programming (Papadimitriou’83) for estimating the biggest entries in wi’s
Caratheodory-like theorem for linear sets
ACTS 2015 – 26 / 43
Theorem: Fix k ∈ N. Given a finite V ⊆ Zk of rank d ≤ k, we can compute in pseudopolynomial time linear sets L(w1; S1), . . . , L(ws; Ss) s.t. each Si ⊆ V and |Si| = d
L(0; V ) =
s
- i=1
L(wi; Si).
Use Caratheodory’s theorem Use bounds from integer programming (Papadimitriou’83) for estimating the biggest entries in wi’s Use dynamic programming to compute all wi’s
Intuition for dimension 2
ACTS 2015 – 27 / 43 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Intuition for dimension 2
ACTS 2015 – 27 / 43 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Intuition for dimension 2
ACTS 2015 – 27 / 43 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
b b b b b b b b b b b b b b b b b b
Intuition for dimension 2
ACTS 2015 – 27 / 43 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
b b b b b b b b b b b b b b b b b b
Intuition for dimension 2
ACTS 2015 – 27 / 43 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
ACTS 2015 – 28 / 43
Key observations:
- Each parallelogram has a quadratically many integer points
Intuition for dimension 2
ACTS 2015 – 28 / 43
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.
Intuition for dimension 2
ACTS 2015 – 28 / 43
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.
Intuition for dimension 2
ACTS 2015 – 28 / 43
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)}
Intuition for dimension 2
ACTS 2015 – 28 / 43
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”.
Case of dimension > 2
ACTS 2015 – 29 / 43
- 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
Normal Form Theorem for Parikh Images of NFA
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG Case NFA Case 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
Statement of the Theorem
ACTS 2015 – 31 / 43
Let Σ := {a1, . . . , ak} 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).
Proof idea: Path types
ACTS 2015 – 32 / 43
Notation: Q = {q0, . . . , qn−1} with initial state q0 and final state qn−1.
Proof idea: Path types
ACTS 2015 – 32 / 43
Notation: Q = {q0, . . . , qn−1} with initial state q0 and final state qn−1. Given a path π and simple cycles C1, . . . , Cm meeting with π:
Cm π p q C1 C2
Proof idea: Path types
ACTS 2015 – 32 / 43
Notation: Q = {q0, . . . , qn−1} with initial state q0 and final state qn−1. Given a path π and simple cycles C1, . . . , Cm meeting with π:
Cm π p q C1 C2
The path type Tπ of π is the linear set L(P(π); {P(Ci)}m
i=1).
Proof idea: Path types
ACTS 2015 – 32 / 43
Notation: Q = {q0, . . . , qn−1} with initial state q0 and final state qn−1. Given a path π and simple cycles C1, . . . , Cm meeting with π:
Cm π p q C1 C2
The path type Tπ of π is the linear set L(P(π); {P(Ci)}m
i=1).
There are at most nkO(1) many periods.
Proof idea
ACTS 2015 – 33 / 43
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(n2).
Proof idea
ACTS 2015 – 33 / 43
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(n2). Problem: There are 2(n+k)O(1) such π.
Proof idea
ACTS 2015 – 33 / 43
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(n2). Problem: There are 2(n+k)O(1) such π. BUT: can apply Caratheodory-like theorem on each Tπ:
Proof idea
ACTS 2015 – 33 / 43
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(n2). 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.
Computational complexity
ACTS 2015 – 34 / 43
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!
Parikh images of extensions of NFA
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG 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 LG LG RBCA Conclusion
ACTS 2015 – 35 / 43
Linear grammars
ACTS 2015 – 36 / 43
S → A
(5)
A → aBb
(6)
B → aAb
(7)
B → ε
(8)
Linear grammars
ACTS 2015 – 36 / 43
S → A
(5)
A → aBb
(6)
B → aAb
(7)
B → ε
(8) The r.h.s. of a rule has at most 1 variable.
Linear grammars
ACTS 2015 – 36 / 43
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.
Linear grammars
ACTS 2015 – 36 / 43
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 ...
CFG of fixed “dimensions”
ACTS 2015 – 37 / 43
A1 A1 a A2 c A1 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.
CFG of fixed “dimensions”
ACTS 2015 – 37 / 43
A1 A1 a A2 c A1 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.
CFG of fixed “dimensions”
ACTS 2015 – 37 / 43
A1 A1 a A2 c A1 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.
Reversal-bounded counter automata
ACTS 2015 – 38 / 43
Minsky’s counter automata
Control X3 X2 X1 Counters
Reversal-bounded counter automata
ACTS 2015 – 39 / 43
Time R R R This variable has 3 reversals
Reversal-bounded counter automata
ACTS 2015 – 39 / 43
Time R R R This variable has 3 reversals Restricted problem: examine paths with r ∈ N reversals for all variables
Reversal-bounded counter automata
ACTS 2015 – 39 / 43
Time R R R This variable has 3 reversals Restricted problem: examine paths with r ∈ N reversals for all variables No finite bounds on length of 0-reversal-bounded paths!
Reversal-bounded counter automata
ACTS 2015 – 40 / 43
Theorem: Generalised Chrobak-Martinez Theorem extends to reversal-bounded counter automata with a fixed number of reversals and a fixed number of counters.
Reversal-bounded counter automata
ACTS 2015 – 40 / 43
Theorem: Generalised Chrobak-Martinez Theorem extends to reversal-bounded counter automata with a fixed number of reversals and a fixed number of counters. Proof idea: follow Ibarra’s proof, but use Generalised Chrobak-Martinez for Parikh images of NFA.
Reversal-bounded counter automata
ACTS 2015 – 40 / 43
Theorem: Generalised Chrobak-Martinez Theorem extends to reversal-bounded counter automata with a fixed number of reversals and a fixed number of counters. Proof idea: follow Ibarra’s proof, but use Generalised Chrobak-Martinez for Parikh images of NFA. Note: This result can be used to derive optimal complexity for reversal-bounded verification counter automata.
Reversal-bounded counter automata
ACTS 2015 – 40 / 43
Theorem: Generalised Chrobak-Martinez Theorem extends to reversal-bounded counter automata with a fixed number of reversals and a fixed number of counters. Proof idea: follow Ibarra’s proof, but use Generalised Chrobak-Martinez for Parikh images of NFA. Note: This result can be used to derive optimal complexity for reversal-bounded verification counter automata. Theorem (Hague-Lin’11): This does not work if # reversals/# counters are non-fixed, but you can compute an existential Presburger formula in polynomial time (even if a pushdown stack is added).
Alternative notion of Complexity
ACTS 2015 – 41 / 43
Study the complexity of decision problems (e.g. membership, universality, ...)
- ver different models.
Alternative notion of Complexity
ACTS 2015 – 41 / 43
Study the complexity of decision problems (e.g. membership, universality, ...)
- ver different models.
There is also a stark difference, e.g., for emptiness:
- NFA: P (f.a.), NP (u.a.) [Kopczynski-Lin’10]
- CFG: NP (f.a.), NP (u.a.) [Hyunh’83]
Alternative notion of Complexity
ACTS 2015 – 41 / 43
Study the complexity of decision problems (e.g. membership, universality, ...)
- ver different models.
There is also a stark difference, e.g., for emptiness:
- NFA: P (f.a.), NP (u.a.) [Kopczynski-Lin’10]
- CFG: NP (f.a.), NP (u.a.) [Hyunh’83]
Can be proven by first constructing Parikh images (as semilinear set representation or existential Presburger formulas).
Conclusion
Intro. Intro. Intro. Complexity Parikh’s Theorem (more precisely) CFG 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 – 42 / 43
Challenges
ACTS 2015 – 43 / 43
- Does generalised Chrobak-Martinez Theorem extend to one-counter
automata?
Challenges
ACTS 2015 – 43 / 43
- Does generalised Chrobak-Martinez Theorem extend to one-counter
automata?
- How do we compare the descriptional complexity of alternating finite-state
automata vs. CFG?
Challenges
ACTS 2015 – 43 / 43
- Does generalised Chrobak-Martinez Theorem extend to one-counter
automata?
- How do we compare the descriptional complexity of alternating finite-state
automata vs. CFG?
- Study succinctness hierarchy in Parikh’s Theorem.
Challenges
ACTS 2015 – 43 / 43
- Does generalised Chrobak-Martinez Theorem extend to one-counter
automata?
- How do we compare the descriptional complexity of alternating finite-state
automata vs. CFG?
- Study succinctness hierarchy in Parikh’s Theorem.