The Complexity of Counting Models of Linear-time Temporal Logic - - PowerPoint PPT Presentation

the complexity of counting models of linear time temporal
SMART_READER_LITE
LIVE PREVIEW

The Complexity of Counting Models of Linear-time Temporal Logic - - PowerPoint PPT Presentation

The Complexity of Counting Models of Linear-time Temporal Logic Joint work with Hazem Torfah (Saarland University) Martin Zimmermann Saarland University January 22nd, 2015 Research Training Group AlgoSyn RWTH Aachen University Martin


slide-1
SLIDE 1

The Complexity of Counting Models of Linear-time Temporal Logic

Joint work with Hazem Torfah (Saarland University)

Martin Zimmermann

Saarland University

January 22nd, 2015

Research Training Group AlgoSyn RWTH Aachen University

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 1/15

slide-2
SLIDE 2

Why Model Counting

How many models does a boolean formula ϕ have?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 2/15

slide-3
SLIDE 3

Why Model Counting

How many models does a boolean formula ϕ have? Generalization of satisfiability: does ϕ have a model? Applications: probabilistic inference problems planning problems combinatorial designs etc.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 2/15

slide-4
SLIDE 4

Why LTL Model Counting

LTL model counting comes in two flavors:

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 3/15

slide-5
SLIDE 5

Why LTL Model Counting

LTL model counting comes in two flavors: for fixed ϕ and k ∈ N..

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 3/15

slide-6
SLIDE 6

Why LTL Model Counting

LTL model counting comes in two flavors: for fixed ϕ and k ∈ N.. .. count (ultimately periodic) word models u · vω with |u| + |v| = k: Analogue to model checking: count the number of error traces of a given system.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 3/15

slide-7
SLIDE 7

Why LTL Model Counting

LTL model counting comes in two flavors: for fixed ϕ and k ∈ N.. .. count (ultimately periodic) word models u · vω with |u| + |v| = k: Analogue to model checking: count the number of error traces of a given system. .. count tree models of depth k with back-edges at leaves: Analogue to synthesis: count the number of implementations (implementation freedom). a b c e1 e2 e1 e2 e2 e1

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 3/15

slide-8
SLIDE 8

Why LTL Model Counting

LTL model counting comes in two flavors: for fixed ϕ and k ∈ N.. .. count (ultimately periodic) word models u · vω with |u| + |v| = k: Analogue to model checking: count the number of error traces of a given system. .. count tree models of depth k with back-edges at leaves: Analogue to synthesis: count the number of implementations (implementation freedom). a b c e1 e2 e1 e2 e2 e1

Theorem (Finkbeiner and Torfah ’14)

  • 1. Word models can be counted in time O(k · 22|ϕ|).
  • 2. Tree models can be counted in time O(k · 222|ϕ|

).

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 3/15

slide-9
SLIDE 9

Outline

  • 1. Counting Complexity
  • 2. Counting Word Models
  • 3. Counting Tree Models
  • 4. Conclusion

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 4/15

slide-10
SLIDE 10

Counting Complexity

f : Σ∗ → N

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 5/15

slide-11
SLIDE 11

Counting Complexity

f : Σ∗ → N is in #P if there is an NP machine M such that f (w) is equal to the number of accepting runs of M on w.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 5/15

slide-12
SLIDE 12

Counting Complexity

f : Σ∗ → N is in #P if there is an NP machine M such that f (w) is equal to the number of accepting runs of M on w. Examples: #SAT is in #P. #CLIQUE is in #P.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 5/15

slide-13
SLIDE 13

Counting Complexity

f : Σ∗ → N is in #P if there is an NP machine M such that f (w) is equal to the number of accepting runs of M on w. Examples: #SAT is in #P. #CLIQUE is in #P. (Parsimonious) Reductions: f #P-hard: for all f ′ ∈ #P there is a polynomial time computable function r such that f ′(x) = f (r(x)) for all inputs x.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 5/15

slide-14
SLIDE 14

Counting Complexity

f : Σ∗ → N is in #P if there is an NP machine M such that f (w) is equal to the number of accepting runs of M on w. Examples: #SAT is in #P. #CLIQUE is in #P. (Parsimonious) Reductions: f #P-hard: for all f ′ ∈ #P there is a polynomial time computable function r such that f ′(x) = f (r(x)) for all inputs x. If f ′ is computed by M, then r may depend on M and its time-bound p(n).

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 5/15

slide-15
SLIDE 15

Counting Complexity

f : Σ∗ → N is in #P if there is an NP machine M such that f (w) is equal to the number of accepting runs of M on w. Examples: #SAT is in #P. #CLIQUE is in #P. (Parsimonious) Reductions: f #P-hard: for all f ′ ∈ #P there is a polynomial time computable function r such that f ′(x) = f (r(x)) for all inputs x. If f ′ is computed by M, then r may depend on M and its time-bound p(n). Completeness: hardness and membership.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 5/15

slide-16
SLIDE 16

Counting Complexity

#SAT is #P-complete. #CLIQUE is #P-complete.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 6/15

slide-17
SLIDE 17

Counting Complexity

#SAT is #P-complete. #CLIQUE is #P-complete. #2SAT is #P-complete. #DNF-SAT is #P-complete. #PERFECT-MATCHING is #P-complete. Note: Decision problems 2SAT, DNF-SAT, and PERFECT-MATCHING are in P:

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 6/15

slide-18
SLIDE 18

Counting Complexity

#SAT is #P-complete. #CLIQUE is #P-complete. #2SAT is #P-complete. #DNF-SAT is #P-complete. #PERFECT-MATCHING is #P-complete. Note: Decision problems 2SAT, DNF-SAT, and PERFECT-MATCHING are in P: Counting versions of easy problems can be hard!

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 6/15

slide-19
SLIDE 19

Beyond #P

Remark: f ∈ #P implies f (w) ∈ O(2p(|w|)) for some polynomial p.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 7/15

slide-20
SLIDE 20

Beyond #P

Remark: f ∈ #P implies f (w) ∈ O(2p(|w|)) for some polynomial p. We need larger counting classes. f : Σ∗ → N is in #Pspace, if there is a nondeterministic polynomial-space Turing machine M such that f (w) is equal to the number of accepting runs of M on w.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 7/15

slide-21
SLIDE 21

Beyond #P

Remark: f ∈ #P implies f (w) ∈ O(2p(|w|)) for some polynomial p. We need larger counting classes. f : Σ∗ → N is in #Pspace, if there is a nondeterministic polynomial-space Turing machine M such that f (w) is equal to the number of accepting runs of M on w. Analogously: #Exptime, #Expspace, and #2Exptime.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 7/15

slide-22
SLIDE 22

Beyond #P

Remark: f ∈ #P implies f (w) ∈ O(2p(|w|)) for some polynomial p. We need larger counting classes. f : Σ∗ → N is in #Pspace, if there is a nondeterministic polynomial-space Turing machine M such that f (w) is equal to the number of accepting runs of M on w. Analogously: #Exptime, #Expspace, and #2Exptime. Remark: f ∈ #Exptime implies f (w) ∈ O(22p(|w|)) for a polynomial p. f ∈ #2Exptime implies f (w) ∈ O(222p(|w|) ) for a polynomial p. w → 22|w| is in #Pspace. w → 222|w| is in #Expspace.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 7/15

slide-23
SLIDE 23

Outline

  • 1. Counting Complexity
  • 2. Counting Word Models
  • 3. Counting Tree Models
  • 4. Conclusion

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 8/15

slide-24
SLIDE 24

Counting Word-Models for Binary Bounds

Theorem

The following problem is #Pspace-complete: Given an LTL formula ϕ and a bound k (in binary), how many k-word-models does ϕ have?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 9/15

slide-25
SLIDE 25

Counting Word-Models for Binary Bounds

Theorem

The following problem is #Pspace-complete: Given an LTL formula ϕ and a bound k (in binary), how many k-word-models does ϕ have? Lower bound: Pspace-hardness of LTL satisfiability [Sistla & Clarke ’85] made parsimonious. · · ·

p(n)

c1 c2 c3 ct

$ $ $ $

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 9/15

slide-26
SLIDE 26

Counting Word-Models for Binary Bounds

Theorem

The following problem is #Pspace-complete: Given an LTL formula ϕ and a bound k (in binary), how many k-word-models does ϕ have? Lower bound: Pspace-hardness of LTL satisfiability [Sistla & Clarke ’85] made parsimonious. · · ·

p(n)

c1 c2 c3 ct

$ 1 $ 2 $ 3 $ t

· · · ct

$ 2p′(n)

⊥ω

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 9/15

slide-27
SLIDE 27

Counting Word-Models for Binary Bounds

Theorem

The following problem is #Pspace-complete: Given an LTL formula ϕ and a bound k (in binary), how many k-word-models does ϕ have? Lower bound: Pspace-hardness of LTL satisfiability [Sistla & Clarke ’85] made parsimonious. · · ·

p(n)

c1 c2 c3 ct

$ 1 $ 2 $ 3 $ t

· · · ct

$ 2p′(n)

⊥ω Length of prefix is exponential, but k can be encoded in binary.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 9/15

slide-28
SLIDE 28

Counting Word-Models for Binary Bounds

Theorem

The following problem is #Pspace-complete: Given an LTL formula ϕ and a bound k (in binary), how many k-word-models does ϕ have? Lower bound: Pspace-hardness of LTL satisfiability [Sistla & Clarke ’85] made parsimonious. · · ·

p(n)

c1 c2 c3 ct

$ 1 $ 2 $ 3 $ t

· · · ct

$ 2p′(n)

⊥ω Length of prefix is exponential, but k can be encoded in binary. Upper bound: guess word of length k letter-by-letter (starting at the end) and model-check it on the fly (using unambiguous non-determinism). Then: one accepting run per model.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 9/15

slide-29
SLIDE 29

Counting Word-Models

Theorem

The following problem is #P-complete: Given an LTL formula ϕ and a bound k (in unary), how many k-word-models does ϕ have?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 10/15

slide-30
SLIDE 30

Counting Word-Models

Theorem

The following problem is #P-complete: Given an LTL formula ϕ and a bound k (in unary), how many k-word-models does ϕ have? Lower bound: Same as before, but we have to encode k in

  • unary. Thus, k has to be polynomial.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 10/15

slide-31
SLIDE 31

Counting Word-Models

Theorem

The following problem is #P-complete: Given an LTL formula ϕ and a bound k (in unary), how many k-word-models does ϕ have? Lower bound: Same as before, but we have to encode k in

  • unary. Thus, k has to be polynomial.

Upper bound: Guess word of length k and model-check it.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 10/15

slide-32
SLIDE 32

Outline

  • 1. Counting Complexity
  • 2. Counting Word Models
  • 3. Counting Tree Models
  • 4. Conclusion

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 11/15

slide-33
SLIDE 33

Counting Tree-Models with Unary Bounds

Theorem

The following problem is #Exptime-complete: Given an LTL formula ϕ and a bound k (in unary), how many k-tree-models does ϕ have?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 12/15

slide-34
SLIDE 34

Counting Tree-Models with Unary Bounds

Theorem

The following problem is #Exptime-complete: Given an LTL formula ϕ and a bound k (in unary), how many k-tree-models does ϕ have? Lower bound:

2p(n) 2p(n) c1 c2 c2p(n)−1 c2p(n) p(n) p(n) left right

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 12/15

slide-35
SLIDE 35

Counting Tree-Models with Unary Bounds

Theorem

The following problem is #Exptime-complete: Given an LTL formula ϕ and a bound k (in unary), how many k-tree-models does ϕ have? Lower bound:

2p(n) 2p(n) c1 c2 c2p(n)−1 c2p(n) p(n) p(n) left right

Upper bound: Guess tree of height k and model-check it.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 12/15

slide-36
SLIDE 36

Counting Tree-Models with Binary Bounds

Theorem

The following problem is #Expspace-hard and in #2Exptime: Given an LTL formula ϕ and a bound k (in binary), how many k-tree-models does ϕ have?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 13/15

slide-37
SLIDE 37

Counting Tree-Models with Binary Bounds

Theorem

The following problem is #Expspace-hard and in #2Exptime: Given an LTL formula ϕ and a bound k (in binary), how many k-tree-models does ϕ have? Lower bound:

C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15

left right each inner tree has exponentially many leaves. tree has exponential height (thus, doubly-exponentially many inner trees).

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 13/15

slide-38
SLIDE 38

Counting Tree-Models with Binary Bounds

Theorem

The following problem is #Expspace-hard and in #2Exptime: Given an LTL formula ϕ and a bound k (in binary), how many k-tree-models does ϕ have? Lower bound:

C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15

left right each inner tree has exponentially many leaves. tree has exponential height (thus, doubly-exponentially many inner trees). Upper bound: Guess tree of height k and model-check it.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 13/15

slide-39
SLIDE 39

Outline

  • 1. Counting Complexity
  • 2. Counting Word Models
  • 3. Counting Tree Models
  • 4. Conclusion

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 14/15

slide-40
SLIDE 40

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15

slide-41
SLIDE 41

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime

Lower bounds: safety LTL, upper bounds: full LTL

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15

slide-42
SLIDE 42

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime

Lower bounds: safety LTL, upper bounds: full LTL Open problems: Close the gap!

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15

slide-43
SLIDE 43

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime

Lower bounds: safety LTL, upper bounds: full LTL Open problems: Close the gap! Lowering the upper bound: how to guess and model-check doubly-exponentially sized trees in exponential space?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15

slide-44
SLIDE 44

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime

Lower bounds: safety LTL, upper bounds: full LTL Open problems: Close the gap! Lowering the upper bound: how to guess and model-check doubly-exponentially sized trees in exponential space? Raising the lower bound: how to encode doubly-exponentially sized configurations using polynomially sized formulas? Do games help?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15

slide-45
SLIDE 45

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime graphs #P-hard/#

  • Pspace.

#Exptime-compl.

Lower bounds: safety LTL, upper bounds: full LTL Open problems: Close the gap! Lowering the upper bound: how to guess and model-check doubly-exponentially sized trees in exponential space? Raising the lower bound: how to encode doubly-exponentially sized configurations using polynomially sized formulas? Do games help?

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15

slide-46
SLIDE 46

Conclusion

Overview of results:

unary binary words #P-compl. #Pspace-compl. trees #Exptime-compl. #Expspace-hard/#2Exptime graphs #P-hard/#

  • Pspace.

#Exptime-compl.

Lower bounds: safety LTL, upper bounds: full LTL Open problems: Close the gap! Lowering the upper bound: how to guess and model-check doubly-exponentially sized trees in exponential space? Raising the lower bound: how to encode doubly-exponentially sized configurations using polynomially sized formulas? Do games help? Close the gap for graph models, too.

Martin Zimmermann Saarland University The Complexity of Counting LTL Models 15/15