Ackermann-Hardness for Lossy Counter Machines (and Reset Petri Nets)
Philippe Schnoebelen LSV, CNRS & ENS Cachan + Oxford 1-year visitor QM EECS–TCS Seminar, London, June 20th 2012
Ackermann-Hardness for Lossy Counter Machines (and Reset Petri Nets) - - PowerPoint PPT Presentation
Ackermann-Hardness for Lossy Counter Machines (and Reset Petri Nets) Philippe Schnoebelen LSV, CNRS & ENS Cachan + Oxford 1-year visitor QM EECSTCS Seminar, London, June 20th 2012 Part I: Lossy counter machines 2/20 C OUNTER M ACHINES
Philippe Schnoebelen LSV, CNRS & ENS Cachan + Oxford 1-year visitor QM EECS–TCS Seminar, London, June 20th 2012
2/20
Finite state control + finite number of “counters” (say m) + simple instructions and tests
ℓ0 ℓ1 ℓ2 ℓ3 c1++ c2>0? c2-- c3=0? 4 c2 1 c1 c3
Operational semantics: – Configurations: Conf
def
= Loc × NC = {s,t,...}, e.g., s0 = (ℓ0,1,4,0) – Steps: (ℓ0,1,4,0) − → (ℓ1,2,4,0) − → (ℓ2,2,3,0) − → (ℓ3,2,3,0) − → ··· A well-known model, Turing-powerful as soon as there are 2 counters
3/20
LCM = Counter machines with unreliability: “counters decrease nondeterministically” [R. Mayr, TCS 2003] (Weaker) computational model useful, e.g., for logics like XPath or LTL+data. See decidability survey in [S., RP 2010].
→rel t as above Lossy steps: s − → t
def
⇔ s s′ − →rel t′ t for some s′ and t′ where s = (ℓ,a1,...,am) (ℓ′,b1,...,bm) = s′ def ⇔ ℓ = ℓ′ ∧ a1 b1 ∧ ... ∧ am bm
− → t implies s′ + − → t′ for all s′ s and t′ t
well-structured
4/20
5/20
(X,) is a well-quasi-ordering (a WQO) if any infinite sequence x0,x1,x2 ... over X contains an increasing pair xi xj (for some i < j) Examples.
where, e.g., 3,2,1 5,2,2 but 1,2,3 5,2,2
where, e.g., abc ⊑ bacbc but cba bacbc Many other examples: (Conf,) for LCM’s, finite trees with tree embedding (Kruskal’s Theorem), graphs ordered as minors (Robertson-Seymour Theorem), .. Systems where steps are monotonic wrt a WQO on configurations, called “well-structured systems” , enjoy generic decidability results [Finkel & S., TCS 2001] My current research program: Algorithmic aspects of WQO-theory & Complexity of WQO-based algorithms
6/20
def
⇔ there is no increasing pair xi xj with i < j Now: Over a WQO, a bad sequence is necessarily finite. Complexity upper bounds ≃ “how long can a bad sequence be?” In general, bad sequences over a given WQO can be arbitrarily long. However, controlled bad sequences cannot:
def
⇔ |xi| gi(n) Length Function Theorems are results of the form “Any (g,n)-controlled bad sequence x0,x1,...,xl over X has length l LX,g(n)” for some bounding functions LX,g.
7/20
A.k.a. The (Extended) Grzegorczyk Hierarchy For α = 0,1,2,... define Fα : N → N with: F0(n)
def
= n + 1 (D1) Fα+1(n)
def
= Fn+1
α
(n) =
n+1 times
(D2) Fω(n)
def
= Fn(n) ≃ Ackermann(n) (D3) This yields: F1(n) = 2n + 1 F2(n) = (n + 1)2n+1 − 1 and F3(n) > 22 . . .
2
n times F4 is . . . impossible to grasp intuitively (at least for me) Length Function Theorem for Nk. [LICS 2011, ICALP 2011] For primitive-recursive g, the length of (g,n)-controlled bad sequences
8/20
9/20
(Non-)Termination. There is an infinite run sinit = s0 − → s1 − → s2 ··· iff there is a loop sinit = s0 − → ··· − → sk − → ··· − → sn = sk Hence termination is co-r.e. for LCM’s
sequence (until sn−1)
i < j < n. Then we obtain a shorter loop by replacing sj−1 − → sj by sj−1 − → s′
j = si. Thus the shortest loop has no increasing pair
→ t implies |t| |s| + 1, any run is Succ-controlled Hence n LA,Succ(|sinit|) for A ≡ Loc × N|C| ≡ Nm × |Loc|.
in Fm when we fix |C| = m
10/20
Same ideas work for reachability: “is there a run from sinit to sgoal?”
→ s1 − → ··· − → sn = sgoal has a decreasing pair si sj for 0 < i < j it can be shortened as s0 − → ··· − → si−1 − → sj − → ··· − → sn
that is a (reversed) bad sequence
Fm (same as Termination)
11/20
12/20
We have (rather disgusting) upper bounds on the complexity of verification for lossy counter machines. Do we have matching lower bounds?
simple algorithms we just saw Reduction stategy for proving lower bounds in lossy systems:
13/20
F0(n)
def
= n + 1 H0(n)
def
= n Fα+1(n)
def
= Fn+1
α
(n) =
n+1 times
Hα+1(n)
def
= Hα(n + 1) Fλ(n)
def
= Fλn(n) Hλ(n)
def
= Hλn(n)
α,n = α0,n0
H
− → α1,n1
H
− → α2,n2
H
− → ··· H − → αk,nk with α0 > α1 > α2 > ··· until eventually αk = 0 and nk = Hα(n) % tail-recursion!! Below we compute fast-growing functions and their inverses by encoding α,n H − → α′,n′ and α′,n′ H − →−1 α,n
14/20
H
Write α in CNF with coefficients α = ωm.am + ωm−1.am−1 + ··· + ω0a0. Encoding of α is [am,...,a0] ∈ Nm+1. [am,...,a0 + 1],n H − → [am,...,a0],n + 1 %Hα+1(n) = Hα(n + 1) [am,...,ak + 1,0,0,...,0],n H − → [am,...,ak,n + 1,0,...,0],n %Hλ(n) = Hλn(n) Recall (γ + ωk+1)n = γ + ωk · (n + 1)
15/20
H
[am,...,a0],n + 1 H − →−1 [am,...,a0 + 1],n %Hα+1(n) = Hα(n + 1) [am,...,ak,n + 1,...,0],n H − →−1 [am,...,ak + 1,0,...,0],n %Hλ(n) = Hλn(n)
16/20
Ensures:
− →rel (ℓ,B′,a′) implies B + |a| = B′ + |a′|
− →rel (ℓ,B′,a′) implies M ⊢ (ℓ,a) ∗ − →rel (ℓ′,a′)
− →rel (ℓ,a′) then ∃B,B′: Mb ⊢ (ℓ,B,a) ∗ − →rel (ℓ′,B′,a′)
− → (ℓ,B′,a′) then Mb ⊢ (ℓ,B,a) ∗ − →rel (ℓ,B′,a′) iff B + |a| = B′ + |a′|
17/20
(ℓH,am :1,0,...,n :m,0,...) ∗ − → (ℓH−1,1,0,...,m,0,...) iff M(m) has a reliable run (ℓH,am : 1,0,...,n : m,0,...) ∗ − →rel (ℓH−1,am : 1,0,...,n : m,0,...) iff M has a reliable run from ℓini to ℓfin that is bounded by Hωm(m), i.e., by Ackermann(m)
18/20
Length of bad sequences is key to bounding the complexity of WQO-based algorithms Here verification people have a lot to learn from proof-theory and combinatorics Proving matching lower bounds is not necessarily tricky (and is easy for LCM’s or Reset Petri nets) but we still lack: — a collection of hard problems: Post Embedding Problem, . . . — a tutorial/textbook on subrecursive hierarchies (like fast-growing and Hardy hierarchies) — a toolkit of coding tricks and lemmas for ordinals The approach seems workable: recently we could characterize the complexity of Timed-Arc Petri nets and Data Petri Nets at Fωωω
19/20
Finkel & S., Theor.Comp.Sci. 2001: well-structured transition systems Baier, Bertrand & S., LPAR 2006: more on well-structured transition systems (games, probabilities, ..) Figueira, Figueira, Schmitz & S., LICS 2011: length of bad sequences
Schmitz & S., ICALP 2011: compositional length of bad sequences S., MFCS 2010: hardness for LCM’s and related models S., RP 2010: decidability for LCM’s Chambart & S., LICS 2008: hardness for LCS’s (lossy fifo channels) Haddad, Schmitz & S., LICS 2012: hardness for Data nets and Timed-arc Petri nets Chambart & S., ICALP 2010: Post Embedding Problem
20/20