Counting Problems for Parikh Images Christoph Haase Stefan Kiefer - - PowerPoint PPT Presentation

counting problems for parikh images
SMART_READER_LITE
LIVE PREVIEW

Counting Problems for Parikh Images Christoph Haase Stefan Kiefer - - PowerPoint PPT Presentation

Counting Problems for Parikh Images Christoph Haase Stefan Kiefer Markus Lohrey MFCS 2017, Aalborg 25 August 2017 Christoph Haase, Stefan Kiefer , Markus Lohrey Counting Problems for Parikh Images 1 The Cost Problem 2 10 : 5 3 8 10 : 15


slide-1
SLIDE 1

Counting Problems for Parikh Images

Christoph Haase Stefan Kiefer Markus Lohrey MFCS 2017, Aalborg 25 August 2017

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 1

slide-2
SLIDE 2

The Cost Problem

3 10 : 15 7 10 : 20 2 10 : 5 8 10 : 10

What is the probability to reach the gate in 25–45min? Quantiles? Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ) 25 ≤ cost ≤ 45

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 2

slide-3
SLIDE 3

The Cost Problem

3 10 : 15 7 10 : 20 2 10 : 5 8 10 : 10

What is the probability to reach the gate in 25–45min? Quantiles? Cost Problem := Input: Cost Markov chain cost formula ϕ threshold τ ∈ [0, 1] Output: Is Pr(ϕ) ≥ τ ? 25 ≤ cost ≤ 45

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 2

slide-4
SLIDE 4

Complexity of the Cost Problem

Theorem (Laroussinie, Sproston, FoSSaCS’05) The cost problem is in EXPTIME. The cost problem is NP-hard.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 3

slide-5
SLIDE 5

Complexity of the Cost Problem

Theorem (Laroussinie, Sproston, FoSSaCS’05) The cost problem is in EXPTIME. The cost problem is NP-hard NP-hard.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 3

by reduction from the Kth largest subset problem

slide-6
SLIDE 6

Complexity of the Cost Problem

Theorem (Laroussinie, Sproston, FoSSaCS’05) The cost problem is in EXPTIME. The cost problem is NP-hard NP-hard.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 3

by reduction from the Kth largest subset problem

slide-7
SLIDE 7

Complexity of the Cost Problem

Theorem (Laroussinie, Sproston, FoSSaCS’05) The cost problem is in EXPTIME. The cost problem is NP-hard NP-hard.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 3

by reduction from the Kth largest subset problem Theorem (HK, IPL ’16) The Kth largest subset problem is PP-complete. Corollary The cost problem is PP-hard. a superset of NP

slide-8
SLIDE 8

Complexity of the Cost Problem

EXPTIME PSPACE Cost PP NP

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 4

slide-9
SLIDE 9

Complexity of the Cost Problem

EXPTIME PSPACE Cost PP PosSLP NP 1 + + ∗ − ∗ circuit value := Input: arithmetic circuit Output: Is the value > 0 ?

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 4

slide-10
SLIDE 10

Complexity of the Cost Problem

EXPTIME PSPACE Cost PP PosSLP NP := Input: arithmetic circuit Output: Is the value > 0 ?

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 4

Theorem (HK, ICALP’15) The cost problem is PosSLP-hard.

slide-11
SLIDE 11

Complexity of the Cost Problem

EXPTIME PSPACE Cost PP PosSLP NP := Input: arithmetic circuit Output: Is the value > 0 ?

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 4

Theorem (HK, ICALP’15) The cost problem is PosSLP-hard. The cost problem is in PSPACE.

slide-12
SLIDE 12

Complexity of the Cost Problem

EXPTIME PSPACE CH Cost PP PosSLP NP

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 4

Theorem (HK, ICALP’15) The cost problem is PosSLP-hard. The cost problem is in PSPACE. Theorem (HKL, LICS’17) The cost problem is in CH.

slide-13
SLIDE 13

Solving the Cost Problem

Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ)

3 10 : 20 1 2 : 15 1 2 : 25

1 : 10 1 : 10

7 10 : 5

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 5

slide-14
SLIDE 14

Solving the Cost Problem

Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ)

3 10 : 20 1 2 : 15 1 2 : 25

1 : 10 1 : 10

7 10 : 5

2 1 2 1 2 1

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 5

slide-15
SLIDE 15

Solving the Cost Problem

Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ)

3 10 : 20 1 2 : 15 1 2 : 25

1 : 10 1 : 10

7 10 : 5

2 1 2 1 2 1 Enumerate the Parikh images.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 5

slide-16
SLIDE 16

Solving the Cost Problem

Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ)

3 10 : 20 1 2 : 15 1 2 : 25

1 : 10 1 : 10

7 10 : 5

2 1 2 1 2 1 Enumerate the Parikh images. Problem: there might be multiple paths per Parikh image.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 5

slide-17
SLIDE 17

Solving the Cost Problem

Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ) Enumerate the Parikh images. Problem: there might be multiple paths per Parikh image.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 5

slide-18
SLIDE 18

Solving the Cost Problem

Cost Problem := Input: Cost Markov chain cost formula ϕ Output: Pr(ϕ) Enumerate the Parikh images. Problem: there might be multiple paths per Parikh image.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 5

slide-19
SLIDE 19

The BEST Theorem

Theorem (de Bruijn, van Aardenne-Ehrenfest, Smith, Tutte) The number of Eulerian cycles in an Eulerian graph G equals t(G) ·

  • v∈V
  • d(v) − 1
  • !

Theorem (Tutte’s matrix-tree theorem) t(G) = det(L(G)11)

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 6

number of directed spanning trees in G Laplacian of G

slide-20
SLIDE 20

QUANT: A Tool for the Cost Problem

Theorem ([HK, ICALP’15], [HK, IPL ’16], [HKL, LICS’17]) The cost problem is hard for PP and PosSLP . The cost problem is in CH.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 7

slide-21
SLIDE 21

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-22
SLIDE 22

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-23
SLIDE 23

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-24
SLIDE 24

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-25
SLIDE 25

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-26
SLIDE 26

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-27
SLIDE 27

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-28
SLIDE 28

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 8

0.45 : (1, 0) 0.45 : (0, 1) 0.1 : (0, 0) What is Pr(cost ∈ [4, 6]2)?

slide-29
SLIDE 29

QUANT: A Tool for the Cost Problem

dimension d time in sec 3 4 5 6 7 8 50 100 150 200 QUANT [8, 10]d QUANT [13, 15]d QUANT [18, 20]d

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 9

slide-30
SLIDE 30

QUANT: A Tool for the Cost Problem

dimension d time in sec 3 4 5 6 7 8 50 100 150 200 QUANT [8, 10]d QUANT [13, 15]d QUANT [18, 20]d PRISM [8, 10]d PRISM [13, 15]d PRISM [18, 20]d

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 9

slide-31
SLIDE 31

QUANT: A Tool for the Cost Problem

dimension d time in sec 3 4 5 6 7 8 50 100 150 200 QUANT [8, 10]d QUANT [13, 15]d QUANT [18, 20]d PRISM [8, 10]d PRISM [13, 15]d PRISM [18, 20]d

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 9

slide-32
SLIDE 32

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 10

slide-33
SLIDE 33

QUANT: A Tool for the Cost Problem

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 10

slide-34
SLIDE 34

Counting Parikh Images

Σ: finite alphabet p ∈ NΣ: vector A: language generator (DFA, NFA, CFG) N(A, p): number of words accepted by A with Parikh image p Example: for A = a∗ba∗ and p = (2, 1): N(A, p) = 3 PosParikh := Input: Language generators A, B vector p ∈ NΣ Output: Is N(A, p) > N(B, p) ? Different variants: language generator: DFA, NFA, CFG unary or binary encoding of p fixed or variable alphabet Σ

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 11

slide-35
SLIDE 35

Results of This Paper: Complexity of PosParikh

vector p size of Σ DFA NFA CFG unary encoding unary in L NL-c. P-c. fixed PL-c. variable PP-c. binary encoding unary in L NL-c. DP-c. fixed PosMatPow-hard, in CH PSPACE-c. PEXP-c. variable PosSLP-hard, in CH

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 12

slide-36
SLIDE 36

Results of This Paper: Complexity of PosParikh

vector p size of Σ DFA NFA CFG unary encoding unary in L NL-c. P-c. fixed PL-c. variable PP-c. binary encoding unary in L NL-c. DP-c. fixed PosMatPow-hard, in CH PSPACE-c. PEXP-c. variable PosSLP-hard, in CH BitParikh := Input: Language generator A vector p ∈ NΣ number i ∈ N in binary Output: Is the i-th bit of N(A, p) equal to 1 ?

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 12

slide-37
SLIDE 37

PosMatPow

PosMatPow := Input: m×m integer matrix M (in binary) number n ∈ N (in binary) Output: Is (Mn)1,m ≥ 0 ? The entries of Mn are of exponential size. Theorem (Galby, Ouaknine, Worrell, 2015) PosMatPow is in P for m = 2. PosMatPow is in P for m = 3 and M given in unary. PosMatPow reduces to PosSLP . Theorem (HKL, 2017) PosMatPow reduces to PosParikh with DFAs, binary encoding of p, even for |Σ| = 2.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 13

slide-38
SLIDE 38

From Matrix Powers to Graphs

G: multi-graph with edges labelled by multiplicities N(G, u, v, n) : number of paths from u to v of length n Lemma Given an integer matrix M and indices i, j, one can compute in logspace a multi-graph G with vertices u, v+, v− such that (Mn)i,j = N(G, u, v+, n) − N(G, u, v−, n) for all n ∈ N.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 14

slide-39
SLIDE 39

Getting Rid of Edge Weights

Replace u v 21 by 10101 1010 101 10 1 u v The edge weights are removed at the expense of longer paths.

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 15

slide-40
SLIDE 40

From Graphs to DFAs

Replace v v1 v2 v3 v4 by v v1 v2 v3 v4 a b b b b a b b b a b b a

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 16

slide-41
SLIDE 41

Summary

Counting Parikh images is closely related to performance analysis of probabilistic systems. The complexity depends strongly on various parameters: language generator: DFA, NFA, CFG unary or binary encoding of p fixed or variable alphabet Σ

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 17

slide-42
SLIDE 42

Results of This Paper: Complexity of PosParikh

vector p size of Σ DFA NFA CFG unary encoding unary in L NL-c. P-c. fixed PL-c. variable PP-c. binary encoding unary in L NL-c. DP-c. fixed PosMatPow-hard, in CH PSPACE-c. PEXP-c. variable PosSLP-hard, in CH

Christoph Haase, Stefan Kiefer, Markus Lohrey Counting Problems for Parikh Images 18