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

complexity of parikh s theorem
SMART_READER_LITE
LIVE PREVIEW

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 =


slide-1
SLIDE 1

ACTS 2015 – 1 / 43

Complexity of Parikh’s Theorem

Anthony Widjaja Lin Yale-NUS College, Singapore

slide-2
SLIDE 2

Introduction

ACTS 2015 – 2 / 43

Classical automata theory

w = abaabba T = a b a a b

slide-3
SLIDE 3

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)

slide-4
SLIDE 4

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)?

slide-5
SLIDE 5

Parikh’s Theorem

ACTS 2015 – 3 / 43

Parikh’s Theorem: Parikh images of regular and context-free languages are effectively semilinear.

slide-6
SLIDE 6

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.

slide-7
SLIDE 7

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]
slide-8
SLIDE 8

Complexity of Parikh’s Theorem

ACTS 2015 – 5 / 43

Descriptional Complexity: How succinct are the different automata models for representing semilinear sets?

slide-9
SLIDE 9

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, ...?

slide-10
SLIDE 10

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?
slide-11
SLIDE 11

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

slide-12
SLIDE 12

Parikh Images

ACTS 2015 – 7 / 43

  • Parikh Image P(L) of a language L over Σ = {a1, . . . , ak} is a subset of Nk
slide-13
SLIDE 13

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}
slide-14
SLIDE 14

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), . . .}
slide-15
SLIDE 15

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′).
slide-16
SLIDE 16

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.
slide-17
SLIDE 17

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)})
slide-18
SLIDE 18

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.
slide-19
SLIDE 19

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
slide-20
SLIDE 20

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!

slide-21
SLIDE 21

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

slide-22
SLIDE 22

Esparza’s Theorem

ACTS 2015 – 11 / 43

S → A

(1)

A → aBb

(2)

B → aAb

(3)

B → ε

(4)

slide-23
SLIDE 23

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.

slide-24
SLIDE 24

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)

slide-25
SLIDE 25

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)

slide-26
SLIDE 26

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)

slide-27
SLIDE 27

Esparza’s Theorem

ACTS 2015 – 12 / 43

  • Flow and connectivity conditions are expressible as an exponential sized

semilinear set (Esparza’97)

slide-28
SLIDE 28

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)

slide-29
SLIDE 29

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.

slide-30
SLIDE 30

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.

slide-31
SLIDE 31

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.

slide-32
SLIDE 32

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]}:

slide-33
SLIDE 33

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!!)

slide-34
SLIDE 34

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

slide-35
SLIDE 35

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)

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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.

slide-38
SLIDE 38

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
slide-39
SLIDE 39

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.

slide-40
SLIDE 40

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.
slide-41
SLIDE 41

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

slide-42
SLIDE 42

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

slide-43
SLIDE 43

Unary alphabet case: Chrobak-Martinez Theorem

ACTS 2015 – 17 / 43

Let us assume that the alphabet is unary, i.e., Σ = {a}.

slide-44
SLIDE 44

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.

slide-45
SLIDE 45

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.

slide-46
SLIDE 46

Chrobak-Martinez Theorem in Action

ACTS 2015 – 18 / 43

slide-47
SLIDE 47

Chrobak-Martinez Theorem in Action

ACTS 2015 – 18 / 43

Parikh image of L(A) is 8 + 4N + 3N

slide-48
SLIDE 48

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)

slide-49
SLIDE 49

Generalised Chrobak-Martinez Theorem

ACTS 2015 – 19 / 43

Let Σ := {a1, . . . , ak} for fixed k ∈ Z>0.

slide-50
SLIDE 50

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).
slide-51
SLIDE 51

Outline of proof

ACTS 2015 – 20 / 43

  • Normal-Form Theorem for Semilinear sets.
  • Normal-Form Theorem for Parikh images of NFA
slide-52
SLIDE 52

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

slide-53
SLIDE 53

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 ...)

slide-54
SLIDE 54

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)

slide-55
SLIDE 55

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}

slide-56
SLIDE 56

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
slide-57
SLIDE 57

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.
slide-58
SLIDE 58

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}

slide-59
SLIDE 59

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)

slide-60
SLIDE 60

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)

slide-61
SLIDE 61

Caratheodory-like theorem for linear sets

ACTS 2015 – 26 / 43

  • Question: Does the integer version of Caratheodory’s theorem hold?
slide-62
SLIDE 62

Caratheodory-like theorem for linear sets

ACTS 2015 – 26 / 43

  • Question: Does the integer version of Caratheodory’s theorem hold?
  • Unfortunately, no!
slide-63
SLIDE 63

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 :)
slide-64
SLIDE 64

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)

slide-65
SLIDE 65

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

slide-66
SLIDE 66

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

slide-67
SLIDE 67

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

slide-68
SLIDE 68

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

slide-69
SLIDE 69

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

slide-70
SLIDE 70

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

slide-71
SLIDE 71

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

slide-72
SLIDE 72

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

slide-73
SLIDE 73

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

slide-74
SLIDE 74

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

slide-75
SLIDE 75

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

slide-76
SLIDE 76

Intuition for dimension 2

ACTS 2015 – 28 / 43

Key observations:

  • Each parallelogram has a quadratically many integer points
slide-77
SLIDE 77

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.
slide-78
SLIDE 78

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.
slide-79
SLIDE 79

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)}

slide-80
SLIDE 80

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”.
slide-81
SLIDE 81

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
slide-82
SLIDE 82

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

slide-83
SLIDE 83

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).
slide-84
SLIDE 84

Proof idea: Path types

ACTS 2015 – 32 / 43

Notation: Q = {q0, . . . , qn−1} with initial state q0 and final state qn−1.

slide-85
SLIDE 85

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

slide-86
SLIDE 86

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).

slide-87
SLIDE 87

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.

slide-88
SLIDE 88

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).

slide-89
SLIDE 89

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 π.

slide-90
SLIDE 90

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π:

slide-91
SLIDE 91

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.

slide-92
SLIDE 92

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!

slide-93
SLIDE 93

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

slide-94
SLIDE 94

Linear grammars

ACTS 2015 – 36 / 43

S → A

(5)

A → aBb

(6)

B → aAb

(7)

B → ε

(8)

slide-95
SLIDE 95

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.

slide-96
SLIDE 96

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.

slide-97
SLIDE 97

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 ...

slide-98
SLIDE 98

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.

slide-99
SLIDE 99

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.

slide-100
SLIDE 100

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.

slide-101
SLIDE 101

Reversal-bounded counter automata

ACTS 2015 – 38 / 43

Minsky’s counter automata

Control X3 X2 X1 Counters

slide-102
SLIDE 102

Reversal-bounded counter automata

ACTS 2015 – 39 / 43

Time R R R This variable has 3 reversals

slide-103
SLIDE 103

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

slide-104
SLIDE 104

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!

slide-105
SLIDE 105

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.

slide-106
SLIDE 106

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.

slide-107
SLIDE 107

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.

slide-108
SLIDE 108

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).

slide-109
SLIDE 109

Alternative notion of Complexity

ACTS 2015 – 41 / 43

Study the complexity of decision problems (e.g. membership, universality, ...)

  • ver different models.
slide-110
SLIDE 110

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]
slide-111
SLIDE 111

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).

slide-112
SLIDE 112

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

slide-113
SLIDE 113

Challenges

ACTS 2015 – 43 / 43

  • Does generalised Chrobak-Martinez Theorem extend to one-counter

automata?

slide-114
SLIDE 114

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?

slide-115
SLIDE 115

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.
slide-116
SLIDE 116

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.

THANKS!!