This paper characterizes the asymptotic computational complexity of vector addition systems with states, showing it is either polynomial with a computable degree or exponential, and provides methods to determine this degree efficiently.
Contribution
It establishes a precise complexity classification for vector addition systems with states, including a polynomial-time method to compute the degree of polynomial complexity.
Findings
01
Complexity is either polynomial with a computable degree or exponential.
02
The degree of polynomial complexity can be computed in polynomial time.
03
The degree k satisfies 1 ≤ k ≤ 2^n, where n is the system's dimension.
Abstract
Vector addition systems are an important model in theoretical computer science and have been used in a variety of areas. In this paper, we consider vector addition systems with states over a parameterized initial configuration. For these systems, we are interested in the standard notion of computational complexity, i.e., we want to understand the length of the longest trace for a fixed vector addition system with states depending on the size of the initial configuration. We show that the asymptotic complexity of a given vector addition system with states is either Θ(Nk) for some computable integer k, where N is the size of the initial configuration, or at least exponential. We further show that k can be computed in polynomial time in the size of the considered vector addition system. Finally, we show that 1≤k≤2n, where n is the dimension of the considered…
w(s,ν)=rank(r,z)(s,exts(ν)) for all (s,ν)∈Cfg(V).
w(s,ν)=rank(r,z)(s,exts(ν)) for all (s,ν)∈Cfg(V).
Dμ
Dμ
μ
Fμ
μ(t)
r
r
z
DTr+FTz
(DId)μ
(DId)μ
Fμ
(ry)
(ry)
(DId)T(ry)+FTz
(0chart)T(ry)+0Tz
r
r
y
DTr+y+FTz
y(t)
Dμ
Dμ
μ
Fμ
r
r
z
DTr+FTz
r(x)
(DId)μ
(DId)μ
Fμ
(ry)
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Full text
11institutetext: TU Wien
The Polynomial Complexity of Vector Addition Systems with States
Vector addition systems are an important model in theoretical computer science and have been used in a variety of areas.
In this paper, we consider vector addition systems with states over a parameterized initial configuration.
For these systems, we are interested in the standard notion of computational time complexity, i.e., we want to understand the length of the longest trace for a fixed vector addition system with states depending on the size of the initial configuration.
We show that the asymptotic complexity of a given vector addition system with states is either Θ(Nk) for some computable integer k, where N is the size of the initial configuration, or at least exponential.
We further show that k can be computed in polynomial time in the size of the considered vector addition system.
Finally, we show that 1≤k≤2n, where n is the dimension of the considered vector addition system.
1 Introduction
Vector addition systems (VASs) [13], which are equivalent to Petri nets, are a popular model for the analysis of parallel processes [7].
Vector addition systems with states (VASSs) [10] are an extension of VASs with a finite control and are a popular model for the analysis of concurrent systems, because the finite control can for example be used to model shared global memory [12].
In this paper, we consider VASSs over a parameterized initial configuration.
For these systems, we are interested in the standard notion of computational time complexity, i.e., we want to understand the length of the longest execution for a fixed VASS depending on the size of the initial configuration.
VASSs over a parameterized initial configuration naturally arise in two areas:
The parameterized verification problem.
For concurrent systems the number of system processes is often not known in advance, and thus the system is designed such that a template process can be instantiated an arbitrary number of times.
The problem of analyzing the concurrent system for all possible system sizes is a common theme in the literature [9, 8, 1, 11, 4, 2, 3].
Automated complexity analysis of programs.
VASSs (and generalizations) have been used as backend in program analysis tools for automated complexity analysis [18, 19, 20].
The VASS considered by these tools are naturally parameterized over the initial configuration,
modelling the dependency of the program complexity on the program input.
The cited papers have proposed practical techniques but did not give complete algorithms.
Two recent papers have considered the computational time complexity of VASSs over a parameterized initial configuration.
[15] presents a PTIME procedure for deciding whether a VASS is polynomial or at least exponential, but does not give a precise analysis in case of polynomial complexity.
[5] establishes the precise asymptotic complexity for the special case of VASSs whose configurations are linearly bounded in the size of the initial configuration.
In this paper, we generalize both results and fully characterize the asymptotic behaviour of VASSs with polynomial complexity:
We show that the asymptotic complexity of a given VASS is either Θ(Nk) for some computable integer k, where N is the size of the initial configuration, or at least exponential.
We further show that k can be computed in PTIME in the size of the considered VASS.
Finally, we show that 1≤k≤2n, where n is the dimension of the considered VASS.
1.1 Overview and Illustration of Results
We discuss our approach on the VASS Vrun, stated in Figure 1, which will serve as running example.
The VASS has dimension 3 (i.e., the vectors annotating the transitions have dimension 3) and four states s1,s2,s3,s4.
In this paper we will always represent vectors using a set of variables Var, whose cardinality equals the dimension of the VASS.
For Vrun we choose Var={x,y,z} and use x,y,z as indices for the first, second and third component of 3-dimensional vectors.
The configurations of a VASS are pairs of states and valuations of the variables to non-negative integers.
A step of a VASS moves along a transition from the current state to a successor state, and adds the vector labelling the transition to the current valuation;
a step can only be taken if the resulting valuation is non-negative.
For the computational time complexity analysis of VASSs, we consider traces (sequences of steps) whose initial configurations consist of a valuation whose maximal value is bounded by N (the parameter used for bounding the size of the initial configuration).
The computational time complexity is then the length of the longest trace whose initial configuration is bounded by N.
For ease of exposition, we will in this paper only consider VASSs whose control-flow graph is connected. (For the general case, we remark that one needs to decompose a VASS into its strongly-connected components (SCCs), which can then be analyzed in isolation, following the DAG-order of the SCC decomposition; for this, one slightly needs to generalize the analysis in this paper to initial configurations with values Θ(Nkx) for every variable x∈Var, where kx∈Z.)
For ease of exposition, we further consider traces over arbitrary initial states (instead of some fixed initial state); this is justified because for a fixed initial state one can always restrict the control-flow graph
to the reachable states, and then the two options result in the same notion of computational complexity (up to a constant offset, which is not relevant for our asymptotic analysis).
In order to analyze the computational time complexity of a considered VASS,
our approach computes variable bounds and transition bounds.
A variable bound is the maximal value of a variable reachable by any trace whose initial configuration is bounded by N.
A transition bound is the maximal number of times a transition appears in any trace whose initial configuration is bounded by N.
For Vrun, our approach establishes the linear variable bound Θ(N) for x and y, and the quadratic bound Θ(N2) for z.
We note that because the variable bound of z is quadratic and not linear, Vrun cannot be analyzed by the procedure of [5].
Our approach establishes the bound Θ(N) for the transitions s1→s3 and s4→s2, the bound Θ(N2) for transitions s1→s2, s2→s1, s3→s4, s4→s3, and the bound Θ(N3) for all self-loops.
The computational complexity of Vrun is then the maximum of all transition bounds, i.e., Θ(N3).
In general, our main algorithm (Algorithm 1 presented in Section 4) either establishes that the VASS under analysis has at least exponential complexity or computes asymptotically precise variable and transition bounds Θ(Nk), with k computable in PTIME and 1≤k≤2n, where n is the dimension of the considered VASS.
We note that our upper bound 2n also improves the analysis of [15], which reports an exponential dependence on the number of transitions (and not only on the dimension).
We further state a family Vn of VASSs, which illustrate that k can indeed be exponential in the dimension (the example can be skipped on first reading).
Vn uses variables xi,j and consists of states si,j, for 1≤i≤n and j=1,2.
We note that Vn has dimension 2n.
Vn consists of the transitions
•
si,1dsi,2, for 1≤i≤n, with d(xi,1)=−1 and d(x)=0 for all x=xi,1,
•
si,2dsi,1, for 1≤i≤n, with d(x)=0 for all x,
•
si,1dsi,1, for 1≤i≤n, with d(xi,1)=−1, d(xi,2)=1,
d(xi+1,1)=d(xi+1,2)=1 in case i<n, and d(x)=0 for all other x,
•
si,2dsi,2, for 1≤i≤n, with d(xi,1)=1, d(xi,2)=−1, and d(x)=0 for all other x,
•
si,1dsi+1,1, for 1≤i<n, with d(xi,1)=−1 and d(x)=0 for all x=xi,1,
•
si+1,2dsi,2, for 1≤i<n, with d(x)=0 for all x.
Vexp in Figure 1 depicts Vn for n=3, where the vector components are stated in the order x1,1,x1,2,x2,1,x2,2,x3,1,x3,2.
It is not hard to verify for all 1≤i≤n that Θ(N2i−1) is the precise asymptotic variable bound for xi,1 and xi,2, that
si,1→si,2, si,2→si,1 and si,1→si+1,1, si+1,2→si,2 in case i<n, and that Θ(N2i) is the precise asymptotic transition bound for si,1→si,1, si,2→si,2 (Algorithm 1 can be used to find these bounds).
1.2 Related Work
A celebrated result on VASs is the EXPSPACE-completeness [16, 17] of the boundedness problem.
Deciding termination for a VAS with a fixed initial configuration can be reduced to the boundedness problem, and is therefore also EXPSPACE-complete;
this also applies to VASSs, whose termination problem can be reduced to the VAS termination problem.
In contrast, deciding the termination of VASSs for all initial configurations is in PTIME.
It is not hard to see that non-termination over all initial configurations is equivalent to the existence of non-negative cycles (e.g., using
Dickson’s Lemma [6]).
Kosaraju and Sullivan have given a PTIME procedure for the detection of zero-cycles [14], which can be easily be adapted to non-negative cycles.
The existence of zero-cycles is decided by the repeated use of a constraint system in order to remove transitions that can definitely not be part of a zero-cycle.
The algorithm of Kosaraju and Sullivan forms the basis for both cited papers [15, 5], as well as the present paper.
A line of work [18, 19, 20]
has used VASSs (and their generalizations) as backends for the automated complexity analysis of C programs.
These algorithms have been designed for practical applicability, but are not complete and no theoretical analysis of their precision has been given.
We point out, however, that these papers have inspired the Bound Proof Principle in Section 5.
2 Preliminaries
Basic Notation.
For a set X we denote by ∣X∣ the number of elements of X.
Let S be either N or Z.
We write SI for the set of vectors over S indexed by some set I.
We write SI×J for the set of matrices over S indexed by I and J.
We write 1 for the vector which has entry 1 in every component.
Given a∈SI, we write a(i)∈S for the entry at line i∈I of a, and ∥a∥=maxi∈I∣a(i)∣ for the maximum absolute value of a.
Given a∈SI and J⊆I, we denote by a∣J∈SJ the restriction of a to J, i.e., we set a∣J(i)=a(i) for all i∈J.
Given A∈SI×J, we write A(j) for the vector in column j∈J of A and A(i,j)∈S for the entry in column i∈I and row j∈J of A.
Given A∈SI×J and K⊆J, we denote by A∣K∈SI×K the restriction of A to K, i.e., we set A∣K(i,j)=A(i,j) for all (i,j)∈I×K.
We write Id for the square matrix which has entries 1 on the diagonal and [math] otherwise.
Given a,b∈SI we write a+b∈SI for component-wise addition, c⋅a∈SI for multiplying every component of a by some c∈S and a≥b for component-wise comparison.
Given A∈SI×J, B∈SJ×K and x∈SJ, we write AB∈SI×K for the standard matrix multiplication,
Ax∈SI for the standard matrix-vector multiplication, AT∈SJ×I for the transposed matrix of A and xT∈S1×J for the transposed vector of x.
Vector Addition System with States (VASS).
Let Var be a finite set of variables.
A vector addition system with states (VASS) V=(St(V),Trns(V)) consists of a finite set of statesSt(V) and a finite set of transitionsTrns(V), where Trns(V)⊆St(V)×ZVar×St(V);
we call n=∣Var∣ the dimension of V. We write s1ds2 to denote a transition (s1,d,s2)∈Trns(V);
we call the vector d the update of transition s1ds2.
A pathπ of V is a finite sequence s0d1s1d2⋯sk with sidi+1si+1∈Trns(V) for all 0≤i<k.
We define the length of π by length(π)=k and the value of π by val(π)=∑i∈[1,k]di.
Let instance(π,t) be the number of times π contains the transition t, i.e., the number of indices i such that t=sidisi+1.
We remark that length(π)=∑t∈Trns(V)instance(π,t) for every path π of V.
Given a finite path π1 and a path π2 such that the last state of π1 equals the first state of π2,
we write π=π1π2 for the path obtained by joining the last state of π1 with the first state of π2;
we call π the concatenation of π1 and π2, and π1π2 a decomposition of π.
We say π′ is a sub-path of π, if there is a decomposition π=π1π′π2 for some π1,π2.
A cycle is a path that has the same start- and end-state.
A multi-cycle is a finite set of cycles.
The value val(M) of a multi-cycle M is the sum of the values of its cycles.
V is connected, if for all s,s′∈St(V) there is a path from s to s′.
VASS V′ is a sub-VASS of V, if St(V′)⊆St(V) and Trns(V′)⊆Trns(V).
Sub-VASSs V1 and V2 are disjoint, if St(V1)∩St(V2)=∅.
A strongly-connected component (SCC) of a VASS V is a maximal sub-VASS S of V such that S is connected and Trns(S)=∅.
Let V be a VASS.
The set of valuationsVal(V)=NVar consists of Var-vectors over the natural numbers (we assume N includes [math]).
The set of configurationsCfg(V)=St(V)×Val(V) consists of pairs of states and valuations.
A step is a triple ((s1,ν1),d,(s2,ν2))∈Cfg(V)×Zdim(V)×Cfg(V) such that ν2=ν1+d and s1ds2∈Trns(V).
We write (s1,ν1)d(s2,ν2) to denote a step ((s1,ν1),d,(s2,ν2)) of V.
A trace of V is a finite sequence ζ=(s0,ν0)d1(s1,ν1)d2⋯(sk,νk) of steps.
We lift the notions of length and instances from paths to traces in the obvious way:
we consider the path π=s0d1s1d2⋯sk that consists of the transitions used by ζ, and set length(ζ):=length(π) and
instance(ζ,t)=instance(π,t), for all t∈Trns(V).
We denote by init(ζ)=∥ν0∥ the maximum absolute value of the starting valuation ν0 of ζ.
We say that ζreaches a valuation ν, if ν=νk.
The complexity of V is the function compV(N)=suptrace ζ of V,init(ζ)≤Nlength(ζ), which returns for every N≥0 the supremum over the lengths of the traces ζ with init(ζ)≤N.
The variable bound of a variable x∈Var is the function vboundx(N)=suptrace ζ of V,init(ζ)≤N,ζ reaches valuation νν(x), which returns for every N≥0 the supremum over the
the values of x reachable by traces ζ with init(ζ)≤N.
The transition bound of a transition t∈Trns(V) is the function tboundt(N)=suptrace ζ of V,init(ζ)≤Ninstance(ζ,t), which returns for every N≥0 the supremum over the number of instances of t in traces ζ with init(ζ)≤N.
Rooted Tree.
A rooted tree is a connected undirected acyclic graph in which one node has been designated as the root.
We will usually denote the root by ι.
We note that for every node η in a rooted tree there is a unique path of η to the root.
The parent of a node η=ι is the node connected to η on the path to the root.
Node η is a child of a node η′, if η′ is the parent of η.
η′ is a descendent of η, if η lies on the path from η′ to the root;
η′ is a strict descendent, if furthermore η=η′.
η is an ancestor of η′, if η′ a descendent of η; η is a strict ancestor, if furthermore η=η′.
The distance of a node η to the root, is the number of nodes =η on the path from η to the root.
We denote by layer(l) the set of all nodes with the same distance l to the root;
we remark that layer(0)={ι}.
All proofs are stated in the appendix.
3 A Dichotomy Result
We will make use of the following matrices associated to a VASS throughout the paper:
Let V be a VASS.
We define the update matrixD∈ZVar×Trns(V) by setting D(t)=d for all transitions t=(s,d,s′)∈Trns(V).
We define the flow matrixF∈ZSt(V)×Trns(V) by setting F(s,t)=−1, F(s′,t)=1 for transitions t=(s,d,s′) with s′=s, and F(s,t)=F(s′,t)=0 for transitions t=(s,d,s′) with s′=s;
in both cases we further set F(s′′,t)=0 for all states s′′ with s′′=s and s′′=s′.
We note that every column t of F either contains exactly one −1 and 1 entry (in case the source and target of transition t are different) or only [math] entries (in case the source and target of transition t are the same).
Example 1
We state the update and flow matrix for Vrun from Section 1:
D=−11−11−11−1111−1−100−100−100−100−1−100000,
F=00000000000000001−100−1100001−100−11−1010010−1,
with column order
s1→s1, s2→s2, s3→s3, s4→s4,
s2→s1, s1→s2, s4→s3, s3→s4, s1→s3, s4→s2
(from left to right) and row order x,y,z for D resp. s1,s2,s3,s4 for F (from top to bottom).
We now consider the constraint systems (P) and (Q), stated below, which have maximization objectives.
The constraint systems will be used by our main algorithm in Section 4.
We observe that both constraint systems are always satisfiable (set all coefficients to zero) and that the solutions of both constraint systems are closed under addition.
Hence, the number of inequalities for which the maximization objective is satisfied is unique for optimal solutions of both constraint systems.
The maximization objectives can be implemented by suitable linear objective functions.
Hence, both constraint systems can be solved
in PTIME over the integers, because we can use linear programming over the rationales and then scale rational solutions to the integers by multiplying with the least common multiple of the denominators.
[TABLE]
The solutions of (P) and (Q) are characterized by the following two lemmata:
μ∈ZTrns(V)* is a solution to constraint system (P) iff there exists a multi-cycle M with val(M)≥0 and μ(t) instances of transition t for every t∈Trns(V).*
Lemma 2 (Cited from [5]111There is no explicit lemma with this statement in [5], however the lemma is implicit in the exposition of Section 4 in [5].
We further note that [5] does not include the constraint z≥0.
However, this difference is minor and was added in order to ensure that ranking functions always return non-negative values, which is more standard than the choice of [5].
A proof of the lemma can be found in the appendix.)
Let r,z be a solution to constraint system (Q).
Let rank(r,z):Cfg(V)→N be the function defined by
rank(r,z)(s,ν)=rTν+z(s).
Then, rank(r,z) is a quasi-ranking function for V, i.e., we have
for all (s,ν)∈Cfg(V) that rank(r,z)(s,ν)≥0;
2. 2.
for all transitions t=s1ds2∈Trns(V) and valuations ν1,ν2∈Val(V) with ν2=ν1+d that
rank(r,z)(s1,ν1)≥rank(r,z)(s2,ν2);
moreover, the inequality is strict for every t with (DTr+FTz)(t)<0.
We now state a dichotomy between optimal solutions to constraint systems (P) and (Q),
which is obtained by an application of Farkas’ Lemma.
This dichotomy is the main reason why we are able to compute the precise asymptotic complexity of VASSs with polynomial bounds.
Lemma 3
Let r and z be an optimal solution to constraint system (Q) and let μ be an optimal solution to constraint system (P).
Then, for all variables x∈Var we either have r(x)>0 or (Dμ)(x)≥1, and for all transitions t∈Trns(V) we either have (DTr+FTz)(t)<0 or μ(t)≥1.
Example 2
Our main algorithm, Algorithm 1 presented in Section 4, will directly use constraint systems (P) and (Q) in its first loop iteration, and adjusted versions in later loop iterations.
Here, we illustrate the first loop iteration.
We consider the running example Vrun, whose update and flow matrices we have stated in Example 1.
An optimal solution to constraint systems (P) and (Q) is given by μ=(1441111100)T and r=(220)T, z=(0011)T.
The quasi-ranking function rank(r,z) immediately establishes that tboundt(N)∈O(N) for
t=s1→s3 and t=s4→s2, because
rank(r,z) decreases for these two transitions and does not increase for other transitions (by Lemma 2), and because
the initial value of rank(r,z) is bounded by O(N), i.e., we have rank(r,z)(s,ν)∈O(N) for every state s∈St(Vrun) and every valuation ν with ∥ν∥≤N.
By a similar argument we get vboundx(N)∈O(N) and vboundy(N)∈O(N).
The exact reasoning for deriving upper bounds is given in Section 5.
From μ we can, by Lemma 1, obtain the cycles C1=s1→s2→s2→s2→s2→s2→s1→s1 and C2=s3→s4→s4→s4→s4→s4→s4→s4 with ν(C1)+ν(C2)≥(001)T ().
We will later show that the cycles C1 and C2 give rise to a family of traces that establish tboundt(N)∈Ω(N2) for all transitions t∈Trns(Vrun) with t=s1→s3 and t=s4→s2.
Here we give an intuition on the construction:
We consider a cycle C of Vrun that visits all states at least once.
By (), the updates along the cycles C1 and C2 cancel each other out.
However, the two cycles are not connected.
Hence, we execute the cycle C1 some Ω(N) times, then (s part of) the cycle C, then execute C2 as often as C1, and finally the remaining part of C; this we repeat Ω(N) times.
This construction also establishes the bound vboundz(N)∈Ω(N2) because, by (*), we increase z with every joint execution of C1 and C2.
The precise lower bound construction is given in Section 6.
4 Main Algorithm
Our main algorithm – Algorithm 1 – computes the complexity as well as variable and transition bounds of an input VASS V, either detecting that V has at least exponential complexity or reporting precise asymptotic bounds for the transitions and variables of V (up to a constant factor):
Algorithm 1 will compute values vExp(x)∈N such that vboundN(x)∈Θ(NvExp(x)) for every x∈Var and values tExp(t)∈N such that tboundN(t)∈Θ(NtExp(t)) for every t∈Trns(V).
Data Structures.
The algorithm maintains a rooted tree T.
Every node η of T will always be labelled by a sub-VASSs VASS(η) of V.
The nodes in the same layer of T will always be labelled by disjoint sub-VASS of V.
The main loop of Algorithm 1 will extend
T by one layer per loop iteration.
The variable l always contains the next layer that is going to be added to T.
For computing variable and transition bounds, Algorithm 1 maintains the functions vExp:Var→N∪{∞} and tExp:Trns(V)→N∪{∞}.
Initialization.
We assume D to be the update matrix and F to be the flow matrix associated to V as discussed in Section 3.
At initialization, T consists of the root node ι and we set VASS(ι)=V, i.e., the root is labelled by the input V.
We initialize l=1 as Algorithm 1 is going to add layer 1 to T in the first loop iteration.
We initialize vExp(x)=∞ for all variables x∈Var and tExp(t)=∞ for all transitions t∈Trns(V).
The constraint systems solved during each loop iteration.
In loop iteration l, Algorithm 1 will set tExp(t):=l for some transitions t and vExp(x):=l for some variables x.
In order to determine those transitions and variables, Algorithm 1 instantiates constraint systems (P) and (Q) from Section 3 over the set of transitions U=⋃η∈layer(l−1)Trns(VASS(η)),
which contains all transitions associated to nodes in layer l−1 of T.
However, instead of a direct instantiation using D∣U and F∣U (i.e., the restriction of D and F to the transitions U), we need to work with an extended set of variables and an extended update matrix.
We set Varext:={(x,η)∣η∈layer(l−vExp(x))}, where we set n−∞=0 for all n∈N.
This means that we use a different copy of variable x for every node η in layer l−vExp(x).
We note that for a variable x with vExp(x)=∞ there is only a single copy of x in Varext because ι∈layer(0) is the only node in layer [math].
We define the extended update matrix Dext∈ZVarext×U by setting
[TABLE]
Constraint systems (I) and (II) stated in Figure 2 can be recognized as instantiation of constraint systems (P) and (Q) with matrices Dext and F∣U and variables Varext, and hence the dichotomy stated in Lemma 3 holds.
We comment on the choice of Varext:
Setting Varext={(x,η)∣η∈layer(i)} for any i≤l−vExp(x) would result in correct upper bounds (while i>l−vExp(x) would not).
However, choosing i<l−vExp(x) does in general result in sub-optimal bounds because fewer variables make constraint system (I) easier and constraint system (II) harder to satisfy (in terms of their maximization objectives).
In fact, i=l−vExp(x) is the optimal choice, because this choice allows us to prove corresponding lower bounds in Section 6.
We will further comment on key properties of constraint systems (I) and (II) in Sections 5 and 6, when we outline the proofs of the upper resp. lower bound.
We note that Algorithm 1 does not use the optimal solution μ to constraint system (I) for the computation of the vExp(x) and tExp(t), and hence the computation of the optimal solution μ could be removed from the algorithm.
The solution μ is however needed for the extraction of lower bounds in Sections 6 and 8, and this is the reason why it is stated here.
The extraction of lower bounds is not explicitly added to the algorithm in order to not clutter the presentation.
Discovering transition bounds.
After an optimal solution r, z to constraint system (II) has been found,
Algorithm 1 collects all transitions t with (DextTr+F∣UTz)(t)<0 in the set R (note that the optimization criterion in constraint system (II) tries to find as many such t as possible).
Algorithm 1 then sets tExp(t):=l for all t∈R.
The transitions in R will not be part of layer l of T.
Construction of the next layer in T.
For each node η in layer l−1, Algorithm 1 will create children by removing the transitions in R.
This is done as follows:
Given a node η in layer l−1, Algorithm 1 considers the VASS V′=VASS(η) associated to η.
Then, (St(V′),Trns(V′)∖R) is decomposed into its SCCs.
Finally, for each SCC S of (St(V′),Trns(V′)∖R) a child η′ of η is created with VASS(η′)=S.
Clearly, the new nodes in layer l are labelled by disjoint sub-VASS of V.
The transitions of the next layer.
The following lemma states that the new layer l of T contains all transitions of layer l−1 except for the transitions R;
the lemma is due to the fact that every transition in
U∖R belongs to a cycle and hence to some SCC that is part of the new layer l.
Lemma 4
We consider the new layer constructed during loop iteration l of Algorithm 1:
we have
U∖R=⋃η∈layer(l)Trns(VASS(η)).
Discovering variable bounds.
For each x∈Var with vExp(x)=∞, Algorithm 1 checks whether r(x,ι)>0 (we point out that the optimization criterion in constraint systems (II) tries to find as many such x with r(x,ι)>0 as possible).
Algorithm 1 then sets vExp(x):=l for all those variables.
The check for exponential complexity.
In each loop iteration, Algorithm 1 checks whether there are x∈Var, t∈Trns(V) with l<vExp(x)+tExp(t)<∞.
If this is not the case, then we can conclude that V is at least exponential
(see Theorem 4.1 below).
If the check fails, Algorithm 1 increments l and continues with the construction of the next layer in the next loop iteration.
Termination criterion.
The algorithm proceeds until either exponential complexity has been detected or until vExp(x)=∞ and tExp(t)=∞ for all x∈Var and t∈Trns(V) (i.e., bounds have been computed for all variables and transitions).
Invariants.
We now state some simple invariants maintained by
Algorithm 1, which are easy to verify:
•
For every node η that is a descendent of some node η′ we have that VASS(η) is a sub-VASS of VASS(η′).
•
The value of vExp and tExp is changed at most once for each input; when the value is changed, it is changed from ∞ to some value =∞.
•
For every transition t∈Trns(V) and layer l of T, we have that either tExp(t)≤l or there is a node η∈layer(l) such that t∈Trns(VASS(η)).
•
We have tExp(t)=l for t∈Trns(V) if and only if there is a η∈layer(l−1) with t∈Trns(VASS(η)) and there is no η∈layer(l) with t∈Trns(VASS(η)).
Example 3
We sketch the execution of Algorithm 1 on Vrun.
In iteration l=1, we have Varext={(x,ι),(y,ι),(z,ι)}, and thus matrix Dext is identical to the matrix D.
Hence, constraint systems (I) and (II) are identical to constraint systems (P) and (Q), whose optimal solutions μ=(1441111100)T and r=(220)T, z=(0011)T we have discussed in Example 2.
Algorithm 1 then sets tExp(s1→s3)=1 and tExp(s4→s2)=1,
creates two children ηA and ηB of ι labeled by VA=({s1,s2},{s1→s1,s1→s2,s2→s2,s2→s1}) and VB=({s3,s4},{s3→s3,s3→s4,s4→s4,s4→s3}), and sets vExp(x)=1 and vExp(y)=1.
In iteration l=2,
we have Varext={(x,ηA),(y,ηA),(x,ηB),(y,ηB),(z,ι)} and the matrix Dext stated in Figure 3.
Algorithm 1 obtains μ=(11110000)T and r=(12211)T, z=(0000)T as optimal solutions to (I) and (II).
Algorithm 1 then sets tExp(s1→s2)=tExp(s2→s1)=tExp(s3→s4)=tExp(s4→s3)=2, creates the children η1,η2 resp. η3,η4 of ηA resp. ηB with ηi labelled by Vi=({si},{si→si}), and sets vExp(z)=2.
In iteration l=3,
we have Varext={(x,η1),(y,η1),(x,η2),(y,η2),(x,η3),(y,η3),(x,η4),(y,η4),(z,ηA),(z,ηB)} and the matrix Dext stated in Figure 3.
Algorithm 1 obtains μ=(0000)T and r=(1113311111)T, z=(0000)T as optimal solutions to (I) and (II).
Algorithm 1 then sets tExp(si→si)=3, for all i, and terminates.
If Algorithm 1 returns “V has at least exponential complexity”, then compV(N)∈2Ω(N), and we have tboundt(N)∈2Ω(N) for all t∈Trns(V) with tExp(t)=∞ and vboundt(N)∈2Ω(N) for all x∈Var with vExp(x)=∞.
The proof of Theorem 4.1 is stated in Section 8.
We now assume that Algorithm 1 does not return “V has at least exponential complexity”.
Then, Algorithm 1 must terminate with tExp(t)=∞ and vExp(x)=∞ for all t∈Trns(V) and x∈Var.
The following result states that tExp and vExp contain the precise exponents of the asymptotic transition and variable bounds of V:
Theorem 4.2
vboundN(x)∈Θ(NvExp(x))* for all x∈Var and tboundN(t)∈Θ(NtExp(t)) for all t∈Trns(V).*
The upper bounds of Theorem 4.2 will be proved in Section 5 (Theorem 5.1) and the lower bounds in Section 6 (Corollary 2).
We will prove in Section 7 that the exponents of the variable and transition bounds are bounded exponentially in the dimension of V:
Theorem 4.3
We have vExp(x)≤2∣Var∣ for all x∈Var and tExp(t)≤2∣Var∣ for all t∈Trns(V).
Finally, we obtain the following corollary from Theorems 4.2 and 4.3:
Corollary 1
Let V be a connected VASS.
Then, either compV(N)∈2Ω(N) or compV(N)∈Θ(Ni) for some computable 1≤i≤2∣Var∣.
In the remainder of this section we will establish the following result:
Theorem 4.4
Algorithm 1 (with the below stated optimization) can be implemented in polynomial time with regard to the size of the input VASS V.
We will argue that A) every loop iteration of Algorithm 1 only takes polynomial time, and B) that polynomially many loop iterations are sufficient (this only holds for the optimization of the algorithm discussed below).
Let V be a VASS, let m=∣Trns(V)∣ be the number of transitions of V, and let n=∣Var∣ be the dimension of V.
We note that ∣layer(l)∣≤m for every layer l of T, because the VASSs of the nodes in the same layer are disjoint.
A) Clearly, removing the decreasing transitions and computing the strongly connected components can be done in polynomial time.
It remains to argue about constraint systems (I) and (II).
We observe that ∣Varext∣=∣{(x,η)∣η∈layer(l−vExp(x))}∣≤n⋅m and ∣U∣≤m.
Hence the size of constraint systems (I) and (II) is polynomial in the size of V.
Moreover, constraint systems (I) and (II) can be solved in PTIME as noted in Section 3.
B) We do not a-priori have a bound on the number of iterations of the main loop of Algorithm 1.
(Theorem 4.3 implies that the number of iterations is at most exponential; however, we do not use this result here).
We will shortly state an improvement of Algorithm 1 that ensures that polynomially many iterations are sufficient.
The underlying insight is that certain layers of the tree do not need to be constructed explicitly.
This insight is stated in the lemma below:
Lemma 6
We consider the point in time when the execution of Algorithm 1 reaches line l:=l+1 during some loop iteration l≥1.
Let RelevantLayers={tExp(t)+vExp(x)∣x∈Var,t∈Trns(V)} and let l′=min{l′∣l′>l,l′∈RelevantLayers}.
Then, vExp(x)=i and tExp(t)=i for all x∈Var, t∈Trns(V) and l<i<l′.
We now present the optimization that achieves polynomially many loop iterations.
We replace the line l:=l+1 by the two lines RelevantLayers:={tExp(t)+vExp(x)∣x∈Var,t∈Trns(V)} and
l:=min{l′∣l′>l,l′∈RelevantLayers}.
The effect of these two lines is that Algorithm 1 directly skips to the next relevant layer.
Lemma 6, stated above, justifies this optimization:
First, no new variable or transition bound is discovered in the intermediate layers l<i<l′.
Second, each intermediate layer l<i<l′ has the same number of nodes as layer l, which are labelled by the same sub-VASSs as the nodes in l (otherwise there would be a transition with transition bound l<i<l′);
hence, whenever needed, Algorithm 1 can construct a missing layer l<i<l′ on-the-fly from layer l.
We now analyze the number of loop iterations of the optimized algorithm.
We recall that the value of each vExp(x) and tExp(t) is changed at most once from ∞ to some value =∞.
Hence, Algorithm 1 encounters at most n⋅m different values in the set RelevantLayers={tExp(t)+vExp(x)∣x∈Var,t∈Trns(V)} during execution.
Thus, the number of loop iterations is bounded by n⋅m.
5 Proof of the Upper Bound Theorem
We begin by stating a proof principle for obtaining upper bounds.
Proposition 1 (Bound Proof Principle)
Let V be a VASS.
Let U⊆Trns(V) be a subset of the transitions of V.
Let w:Cfg(V)→N and inct:N→N, for every t∈Trns(V)∖U, be functions such that for every trace ζ=(s0,ν0)d1(s1,ν1)d2⋯ of V with init(ζ)≤N we have for every i≥0 that
We call such a function w a complexity witness and the associated inct functions the increase certificates.
Let t∈U be a transition on which wdecreases, i.e., we have w(s1,ν1)≥w(s2,ν2)−1 for every step (s1,ν1)d(s2,ν2) of V with t=s1ds2.
Then,
[TABLE]
Further, let x∈Var be a variable such that ν(x)≤w(s,ν) for all (s,ν)∈Cfg(V).
Then,
[TABLE]
Proof Outline of the Upper Bound Theorem.
Let V be a VASS for which Algorithm 1 does not report exponential complexity.
We will prove by induction on loop iteration l that vboundN(x)∈O(Nl) for every x∈Var with vExp(x)=l and that tboundN(t)∈O(Nl) for every t∈Trns(V) with tExp(t)=l.
We now consider some loop iteration l≥1.
Let U=⋃η∈layer(l−1)Trns(VASS(η)) be the transitions, Varext be the set of extended variables and Dext∈ZVarext×U be the update matrix considered by Algorithm 1 during loop iteration l.
Let r,z be some optimal solution to constraint system (II) computed by Algorithm 1 during loop iteration l.
The main idea for the upper bound proof is to use the quasi-ranking function from Lemma 2 as witness function for the Bound Proof Principle.
In order to apply Lemma 2 we need to consider the VASS associated to the matrices in constraint system (II):
Let Vext be the VASS over variables Varext associated to update matrix Dext and flow matrix F∣U.
From Lemma 2 we get that rank(r,z):Cfg(Vext)→N is a quasi-ranking function for Vext.
We now need to relate V to the extended VASS Vext in order to be able to use this quasi-ranking function.
We do so by extending valuations over Var to valuations over Varext.
For every state s∈St(V) and valuation ν:Var→N, we define the extended valuationexts(ν):Varext→N by setting
[TABLE]
As a direct consequence from the definition of extended valuations, we have that
(s,exts(ν))∈Cfg(Vext) for all (s,ν)∈Cfg(V), and that
(s1,exts1(ν1))Dext(t)(s2,exts2(ν2)) is a step of Vext for every step (s1,ν1)d(s2,ν2) of V with s1ds2∈U.
We now define the witness function w by setting
[TABLE]
We immediately get from Lemma 2 that w maps configurations to the non-negative integers and that condition 1) of the Bound Proof Principle is satisfied.
Indeed, we get from the first item of Lemma 2 that w(s,ν)≥0 for all (s,ν)∈Cfg(V), and from the second item that w(s1,ν1)≥w(s2,ν2) for every step (s1,ν1)d(s2,ν2) of V with t=s1ds2∈U;
moreover, the inequality is strict if (DextTr+F∣UTz)(t)<0, i.e., the witness function w decreases for transitions t with tExp(t)=l.
It remains to establish condition 2) of the Bound Proof Principle.
We will argue that we can find increase certificates inct(N)∈O(Nl−tExp(t)) for all t∈Trns(V)∖U.
We note that tExp(t)<l for all t∈Trns(V)∖U, and hence the induction assumption can be applied for such t.
We can then derive the desired bounds from the Bound Proof Principle because of ∑t∈Trns(V)∖Utboundt(N)⋅inct(N)=∑t∈Trns(V)∖UO(NtExp(t))⋅O(Nl−tExp(t))=O(Nl).
Theorem 5.1
vboundN(x)∈O(NvExp(x))* for all x∈Var and tboundN(t)∈O(NtExp(t)) for all t∈Trns(V).*
6 Proof of the Lower Bound Theorem
The following lemma will allow us to consider traces ζN with init(ζN)∈O(N) instead of init(ζN)≤N when proving asymptotic lower bounds.
Lemma 7
Let V be a VASS, let t∈Trns(V) be a transition and let x∈Var be a variable.
If there are traces ζN with init(ζN)∈O(N) and instance(ζN,t)≥Ni, then tboundN(t)∈Ω(Ni).
If there are traces ζN with init(ζN)∈O(N) that reach a final valuation ν with ν(x)≥Ni, then vboundN(x)∈Ω(Ni).
The lower bound proof uses the notion of a pre-path, which relaxes the notion of a path:
A pre-path σ=t1⋯tk is a finite sequence of transitions ti=sidisi′.
Note that we do not require for subsequent transitions that the end state of one transition is the start state of the next transition, i.e., we do not require si′=si+1.
We generalize notions from paths to pre-paths in the obvious way, e.g., we set val(σ)=∑i∈[1,k]di and denote by instance(σ,t), for t∈Trns(V), the number of times σ contains the transition t.
We say the pre-path σcan be executed from valuationν, if there are valuations νi≥0 with νi+1=νi+di+1 for all 0≤i<k and ν=ν0;
we further say that σreaches valuation ν′, if ν′=νk.
We will need the following relationship between execution and traces:
in case a pre-path σ is actually a path, σ can be executed from valuation ν, if and only if there is a trace with initial valuation ν that uses the same sequence of transitions as σ.
Two pre-paths σ=t1⋯tk and σ′=t1′⋯tl′ can be shuffled into a pre-path σ′′=t1′′⋯tk+l′′, if σ′′ is an order-preserving interleaving of σ and σ′;
formally, there are injective monotone functions f:[1,k]→[1,k+l] and g:[1,l]→[1,k+l] with f([1,k])∩g([1,l])=∅ such that tf(i)′′=ti for all i∈[1,k] and tg(i)′′=ti′ for all i∈[1,l].
Further, for d≥1 and pre-path σ, we denote by
σd=dσσ⋯σ the pre-path that consists of d subsequent copies of σ.
For the remainder of this section, we fix a VASS V for which Algorithm 1 does not report exponential complexity and we fix the computed tree T and bounds vExp, tExp.
We further need to use the solutions to constraint system (I) computed during the run of Algorithm 1:
For every layer l≥1 and node η∈layer(l),
we fix a cycle C(η) that contains μ(t) instances of every t∈Trns(VASS(η)),
where μ is an optimal solution to constraint system (I) during loop iteration l.
The existence of such cycles is stated in Lemma 8 below.
We note that this definition ensures val(C(η))=∑t∈Trns(VASS(η))D(t)⋅μ(t).
Further, for the root node ι, we fix an arbitrary cycle C(ι) that uses all transitions of V at least once.
Lemma 8
Let μ be an optimal solution to constraint system (I) during loop iteration l of Algorithm 1.
Then there is a cycle C(η) for every η∈layer(l) that contains exactly μ(t) instances of every transition t∈Trns(VASS(η)).
Proof Outline of the Lower Bound Theorem.
Step I) We define a pre-path τl, for every l≥1, with the following properties:
instance(τl,t)≥Nl+1 for all transitions t∈⋃η∈layer(l)Trns(VASS(η)).
2. 2)
val(τl)=Nl+1∑η∈layer(l)val(C(η)).
3. 3)
val(τl)(x)≥0 for every x∈Var with vExp(x)≤l.
4. 4)
val(τl)(x)≥Nl+1 for every x∈Var with vExp(x)≥l+1.
5. 5)
τl is executable from some valuation ν with
a)
ν(x)∈O(NvExp(x)) for x∈Var with vExp(x)≤l, and
2. b)
ν(x)∈O(Nl) for x∈Var with vExp(x)≥l+1.
The difficulty in the construction of the pre-paths τl lies in ensuring Property 5).
The construction of the τl proceeds along the tree T using that the cycles C(η) have been obtained according to solutions of constraint system (I).
Step II)
It is now a direct consequence of Properties 3)-5)
stated above that we can choose a sufficiently large k>0 such that for every l≥0 the pre-path ρl=τ0kτ1k⋯τlk (the concatenation of k copies of each τi, setting τ0=C(ι)N), can be executed from some valuation ν and reaches a valuation ν′ with
∥ν∥∈O(N),
2. 2)
ν′(x)≥kNvExp(x) for all x∈Var with vExp(x)≤l, and
3. 3)
ν′(x)≥kNl+1 for all x∈Var with vExp(x)≥l+1.
The above stated properties for the pre-path ρlmax, where lmax is the maximal layer of T, would be sufficient to conclude the lower bound proof except that we need to extend the proof from pre-paths to proper paths.
Step III) In order to extend the proof from pre-paths to paths we make use of the concept of shuffling.
For all l≥0, we will define paths γl that can be obtained by shuffling the pre-paths ρ0,ρ1,…,ρl.
The path γlmax, where lmax is the maximal layer of T, then has the desired properties and allows to conclude the lower bound proof with the following result:
Theorem 6.1
There are traces ζN with init(ζN)∈O(N) such that ζN ends in configuration (sN,νN) with νN(x)≥NvExp(x) for all variables x∈Var and we have
instance(ζN,t)≥NtExp(t) for all transitions t∈Trns(V).
With Lemma 7 we get the desired lower bounds from Theorem 6.1:
Corollary 2
vboundN(x)∈Ω(NvExp(x))* for all x∈Var and tboundN(t)∈Ω(NtExp(t)) for all t∈Trns(V).*
7 The Size of the Exponents
For the remainder of this section, we fix a VASS V for which Algorithm 1 does not report exponential complexity and we fix the computed tree T and bounds vExp, tExp.
Additionally, we fix a vector zl∈ZSt(V) for every layer l of T and a vector rη∈ZVar for every node η∈layer(l) as follows:
Let r,z be an optimal solution to constraint system (II) in iteration l+1 of Algorithm 1.
We then set zl=z.
For every η∈layer(l) we define rη by setting
rη(x)=r(x,η′),
where η′∈layer(l−vExp(x)) is the unique ancestor of η in layer l−vExp(x).
The following properties are immediate from the definition:
Proposition 2
For every layer l of T and node η∈layer(l) we have:
zl≥0* and rη≥0.*
2. 2)
rηTd+zl(s2)−zl(s1)≤0* for every transition s1ds2∈Trns(VASS(η));
moreover, the inequality is strict for all transitions t with tExp(t)=l+1.*
3. 3)
Let η′∈layer(i) be a strict ancestor of η.
Then, rη′Td+zi(s2)−zi(s1)=0
for every transition s1ds2∈Trns(VASS(η)).
4. 4)
For every x∈Var with vExp(x)=l+1 we have rη(x)>0 and
rη(x)=rη′(x) for all η′∈layer(l).
5. 5)
For every x∈Var with vExp(x)>l+1 we have rη(x)=0.
6. 6)
For every x∈Var with vExp(x)≤l there is an ancestor η′∈layer(i) of η such that rη′(x)>0 and rη′(x′)=0 for all x′ with vExp(x′)>vExp(x).
For a vector r∈ZVar, we define the potential of r by setting pot(r)=max{vExp(x)∣x∈Var,r(x)=0}, where we set max∅=0.
The motivation for this definition is that we have rTν∈O(Npot(r)) for every valuation ν reachable by a trace ζ with init(ζ)≤N.
We will now define the potential of
a set of vectors Z⊆ZVar.
Let M be a matrix whose columns are the vectors of Z and whose rows are ordered according to the variable bounds, i.e., if the row associated to variable x′ is above the row associated to variable x, then we have vExp(x′)≥vExp(x).
Let L be some lower triangular matrix obtained from M by elementary column operations.
We now define pot(Z)=∑column r of Lpot(r), where we set ∑∅=0.
We note that pot(Z) is well-defined, because the value pot(Z) does not depend on the choice of M and L.
We next state an upper bound on potentials.
Let l≥0 and let Bl={vExp(x)∣x∈Var,vExp(x)<l} be the set of variable bounds below l.
We set varsum(l)=1, for Bl=∅, and varsum(l)=∑Bl, otherwise.
The following statement is a direct consequence of the definitions:
Proposition 3
Let Z⊆ZVar be a set of vectors such that r(x)=0 for all r∈Z and x∈Var with vExp(x)>l.
Then, we have pot(Z)≤varsum(l+1).
We define pot(η)=pot({rη′∣η′ is a strict ancestor of η}) as the potential of a node η.
We note that pot(η)≤varsum(l+1) for every node η∈layer(l) by Proposition 3.
Now, we are able to state the main results of this section:
Lemma 9
Let η be a node in T.
Then, every trace ζ with init(ζ)≤N enters VASS(η) at most O(Npot(η)) times,
i.e., ζ contains at most O(Npot(η)) transitions sds′ with s∈St(VASS(η)) and s′∈St(VASS(η)).
Lemma 10
For every layer l, we have that vExp(x)=l resp. tExp(t)=l implies
vExp(x)≤varsum(l) resp. tExp(t)≤varsum(l).
The next result follows from Lemma 10 only by arithmetic manipulations and induction on l:
Lemma 11
Let l be some layer.
Let k be the number of variables x∈Var with vExp(x)<l.
Then, varsum(l)≤2k.
Theorem 4.3 is then a direct consequence of Lemma 10 and 11 (using k≤∣Var∣).
8 Exponential Witness
The following lemma from [15] states a condition that is sufficient for a VASS to have exponential complexity222Our formalization differs from[15], but it is easy to verify that our conditions a) and b) are equivalent to the conditions on the cycles in the ‘iteration schemes’ of [15]..
We will use this lemma to prove Theorem 4.1:
Let V be a connected VASS, let U,W be a partitioning of Var and let C1,…,Cm be cycles such that a) val(Ci)(x)≥0 for all x∈U and 1≤i≤m, and b) ∑ival(Ci)(x)≥1 for all x∈W.
Then, there is a c>1 and paths πN such that 1) πN can be executed from initial valuation N⋅1, 2) πN reaches a valuation ν with ν(x)≥cN for all x∈W and 3) (Ci)cN is a sub-path of πN for each 1≤i≤m.
We now outline the proof of Theorem 4.1:
We assume that Algorithm 1 returned “V has at least exponential complexity” in loop iteration l.
According to Lemma 8, there are cycles C(η), for every node η∈layer(l), that contain μ(t) instances of every transition t∈Trns(VASS(η)).
One can then show that the cycles C(η) and the sets U={x∈Var∣vExp(x)≤l}, W={x∈Var∣vExp(x)>l} satisfy the requirements of Lemma 12, which establishes Theorem 4.1.
”⇐”:
We consider some multi-cycle M with μ(t) instances of each transition t and val(M)≥0.
Clearly, μ≥0 because the number of instances of a transition is always non-negative.
Because of val(M)≥0 and val(M)=Dμ, we have Dμ≥0.
Because M is a multi-cycle we have that μ satisfies the flow constraint Fμ=0, which encodes for every state that the number of incoming transitions equals the number of out-going transitions.
”⇒”:
We assume that μ is a solution to constraint system (P).
Hence, we have μ≥0.
We now consider the multi-graph which contains μ(t) copies of every transition t.
From the flow constraint Fμ=0 we have that the multi-graph is balanced, i.e., the number of incoming edges equals the number of outgoing edges for every state.
It follows that every strongly connected component has an Eulerian cycle.
Each of these Eulerian cycles gives us a cycle in the original VASS.
The union of these cycles is the desired multi-cycle because we have Dμ≥0 by assumption. ∎
The first item holds because r,z satisfy the constraints r≥0 and z≥0 of constraint system (Q).
For the second item, we consider a transition t=s1ds2∈Trns(V) and valuations ν1,ν2∈Val(V) with ν2=ν1+d.
We have rank(r,z)(s2,ν2)=rTν2+z(s2)=rT(ν1+d)+z(s2)=rTν1+rTd+z(s2)=rTν1+z(s1)+dTr+z(s2)−z(s1)≤rTν1+z(s1)=rank(r,z)(s1,ν1),
where we have the inequality because r,z
satisfies the constraint DTr+FTz≤0 of constraint system (Q).
We further observe that the inequality is strict for every t with (DTr+FTz)(t)<0. ∎
The proof of Lemma 3 will be obtained by two applications of Farkas’ Lemma.
We will employ the following version of Farkas’ Lemma, which states that for matrices A,C and vectors b,d, exactly one of the following statements is true:
[TABLE]
We now consider the constraint systems (At) and (Bt) stated below.
Both constraint systems are parameterized by a transition t∈Trns(V) (we note that only Equations (1) and (2) are parameterized by t).
[TABLE]
We recognize constraint system (At) as the dual of constraint system (Bt)
in the following Lemma:
Lemma 13
Exactly one of the constraint systems (At) and (Bt) has a solution.
Proof
We fix some transition t.
We denote by chart∈ZSt(V) the vector with chart(t′)=1, if t′=t, and chart(t′)=0, otherwise.
Using this notation we rewrite (At) to the equivalent constraint system (At′):
[TABLE]
Using Farkas’ Lemma, we see that either (At′) is satisfiable or the following constraint system (Bt′) is satisfiable:
[TABLE]
We observe that solutions of constraint system (Bt′) are invariant under shifts of z, i.e, if r, y, z is a solution, then r, y, z+c⋅1 is also a solution for all c∈Z (because every row of FT either contains exactly one −1 and 1 entry or only [math] entries).
Hence, we can force z to be non-negative.
We recognize that constraint systems (Bt′) and (Bt) are equivalent. ∎
We now consider the constraint systems (Cx) and (Dx) stated below.
Both constraint systems are parameterized by a variable x∈Var (we note that only Equations (3) and (4) are parameterized by x).
[TABLE]
We recognize constraint system (Cx) as the dual of constraint system (Dx) in the following Lemma:
Lemma 14
Exactly one of the constraint systems (Cx) and (Dx) has a solution.
Proof
We fix some variable x∈Var.
We denote by charx∈ZVar the vector with charx(x′)=1, if x′=x, and charx(x′)=0, otherwise.
Using this notation we rewrite (Ax) to the equivalent constraint system (Ax′):
[TABLE]
Using Farkas’ Lemma, we see that either (Cx′) is satisfiable or the following constraint system (Dx′) is satisfiable:
[TABLE]
We observe that solutions of constraint system (Dx′) are invariant under shifts of z, i.e, if r, y, z is a solution, then r, y, z+c⋅1 is also a solution for all c∈Z (because every row of FT either contains exactly one −1 and 1 entry or only [math] entries).
Hence, we can force z to be non-negative.
We recognize that constraint systems (Dx′) and (Dx) are equivalent. ∎
By Lemma 1 there is a multi-cycle M with μ(t) instances of every transition t∈U.
By Lemma 3 we have U∖R={t∈U∣μ(t)≥1}.
Hence, every transition t∈U∖R is part of a cycle that uses only edges from U∖R.
Thus, every transition t∈U∖R must belong to some SCC of (St(VASS(η)),Trns(VASS(η))∖R) for some η∈layer(l−1).
We get that U∖R=⋃η∈layer(l)Trns(VASS(η)).
We note that l is incremented in every iteration of Algorithm 1.
Hence, if the values of vExp and tExp are not changed, then the condition ‘there are no t∈Trns(V), x∈Var with l<tExp(t)+vExp(x)<∞’ will eventually become true.
Hence, Algorithm 1 either terminates after finitely many iterations or there is a change in the values of vExp and tExp.
Now we recall that the value of vExp(x) and tExp(t) is changed at most once for every t∈Trns(V) and x∈Var.
Hence, Algorithm 1 must terminate after finitely many iterations. ∎
We consider the run of Algorithm 1 on V.
In case Algorithm 1 returns “V has at least exponential complexity”,
then compV(N)∈2Ω(N) by Theorem 4.1.
Otherwise, we have tExp(t)=∞ and vExp(x)=∞ for all t∈Trns(V) and x∈Var.
Let i=maxt∈Trns(V)tExp(t).
Using Theorem 4.2 we get that length(ζ)=∑t∈Trns(V)instance(ζ,t)∈O(Ni) for every trace ζ of V with init(ζ)≤N.
Hence, compV(N)∈O(Ni).
For the lower bound, we consider a transition t∈Trns(V) with i=tExp(t).
From Theorem 4.2 we get that there are traces ζN of V with init(ζN)≤N and instance(ζN,t)∈Ω(Ni).
Because of instance(ζN,t)≤length(ζN) for all N≥0, we get
compV(N)∈Ω(Ni). Thus, we have shown compV(N)∈Θ(Ni).
Finally, i≤2∣Var∣ by Theorem 4.3.
∎
We consider the point in time when the execution of Algorithm 1 reaches line l:=l+1 during some loop iteration l≥1.
Let RelevantLayers={tExp(t)+vExp(x)∣x∈Var,t∈Trns(V)} and let l′=min{l′∣l′>l,l′∈RelevantLayers}.
We begin by stating the main consequence of the definition of l′:
For every variable x∈Var, every node η∈layer(l−vExp(x)) and every layer l<i<l′ there is a node η′∈layer(i−vExp(x)) such that VASS(η)=VASS(η′) (+).
Assume that this is not the case.
Then there is a variable x∈Var, a node η∈layer(l−vExp(x)) and a transition t∈Trns(VASS(η)) such that
l−vExp(x)<tExp(t)<l′−vExp(x).
However, this implies l<tExp(t)+vExp(x)<l′, which contradicts the definition of l′.
Let U=⋃η∈layer(l−1)Trns(VASS(η)) be the transitions, Varext be the variables
and let Dext be the update matrix considered by Algorithm 1 during loop iteration l.
Let μ and r, z be optimal solutions to constraint systems (I) and (II), and let R={t∈U∣(DextTr+F∣UTz)(t)<0} be the transitions removed during loop iteration l.
We set U∘=U∖R.
By Lemma 4, we have
U∘=⋃η∈layer(l)Trns(VASS(η)).
We define μ∘ and D∘ as the restriction of μ and Dext to U∘, i.e.,
we set μ∘=μ∣U∘ and D∘=Dext∣U∘.
From Lemma 3 we get that U∘={t∣μ(t)≥1},
and hence Dextμ=D∘μ∘.
From this and the fact that μ∈ZU is a solution to constraint system (I) we get that D∘μ∘≥0, μ∘≥1 and
F∣U∘μ∘=0 (*).
From Lemma 3 we further get
that (D∘μ∘)(x)=(Dextμ)(x)≥1 for all variables x with vExp(x)>l (#).
We now consider the layers l≤i<l′.
We will show by induction that U∘=⋃η∈layer(i−1)Trns(VASS(η)) for all l≤i<l′, and that vExp(x)=i and tExp(t)=i for all l<i<l′, x∈Var and t∈Trns(V).
For i=l the statement trivially holds.
We now consider some layer l<i<l′.
Layer i is constructed from layer i−1 during loop iteration i.
By induction assumption we have U∘=⋃η∈layer(i−1)Trns(VASS(η)).
During iteration i, thus, Algorithm 1 considers the update matrix
Di∈ZVari×U∘ for the set of (extended) variables Vari={(x,η)∣η∈layer(i−vExp(x))}.
From (+) we have that there is a bijective function f:Varext→Vari with f(x,η)=(x′,η′) if and only if x=x′ and VASS(η)=VASS(η′).
Hence, we have f(D∘)=Di
333For a function f:I→K and a matrix A∈SI×J we denote by f(A)∈SK×J the matrix defined by f(A)(i,j)=A(f(i),j) for all i,j∈I×J., i.e., the matrices Di and D∘ are identical up to renaming of the variables.
Thus, from (*) we get that Diμ∘≥0, μ∘≥1 and
F∣U∘μ∘=0, i.e., we have that
μ∘ is a solution to constraint system (I) during loop iteration i.
Hence, by Lemma 3 we have that
DiTr+F∣U∘Tz=0 for every optimal solution r, z to constraint system (II), i.e.,
no transition is removed during loop iteration i.
Thus, we get U∘=⋃η∈layer(i)Trns(VASS(η)) and tExp(t)=i for all t∈Trns(V).
Further, by (#) we have that
(Diμ∘)(x)≥1 for all variables x with vExp(x)>l.
Again by Lemma 3 we
have for every variable x with vExp(x)>l and every optimal solution r, z to constraint system (II) that
r(x,ι)=0, i.e., vExp(x)=i for all x∈Var.
∎
We prove the claim by induction on loop iteration l of Algorithm 1.
We consider some l≥1.
Let U=⋃η∈layer(l−1)Trns(VASS(η)) be the transitions, Varext be the set of extended variables and Dext∈ZVarext×U be the update matrix considered by Algorithm 1 during loop iteration l.
For every transition t∈Trns(V)∖U we have tExp(x)<l, and hence we can assume tboundN(t)∈O(NtExp(t)) by the induction assumption.
Further, we can apply the induction assumption for variables x∈Var with vExp(x)<l and assume vboundN(x)∈O(NvExp(x)).
Let r,z be some optimal solution to constraint system (II) computed by Algorithm 1 during loop iteration l.
As discussed earlier, we define the witness function w using the quasi-ranking function from Lemma 2.
We note that we have
[TABLE]
We have already argued that w maps configurations to the non-negative integers, that condition 1) of the Bound Proof Principle is satisfied,
and that the witness function w decreases for transitions t with tExp(t)=l (*).
It remains to establish condition 2) of the Bound Proof Principle.
We will show that there are increase certificates inct(N)∈O(Nl−tExp(t)) for all transitions t∈Trns(V)∖U.
We fix some transition t∈Trns(V)∖U.
Let (s1,ν1)d(s2,ν2) be a step with s1ds2=t in a trace ζ of V with init(ζ)≤N.
We note that ν2=ν1+d.
We will now show that w(s2,ν2)−w(s1,ν1)∈O(Nl−tExp(t)), which is sufficient to conclude that there is an increase certificate inct with inct(N)∈O(Nl−tExp(t)).
Let (x,η)∈Varext be a variable with vExp(x)≤l−tExp(t).
For both i=1 or i=2,
we consider the extended valuation extsi(νi)(x,η).
In case of si∈St(VASS(η)) we have extsi(νi)(x,η)=νi(x)∈O(NvExp(x)) because of vExp(x)≤l−tExp(t)<l, using the induction assumption for x.
In case of si∈St(VASS(η)) we have extsi(νi)(x,η)=0.
The case analysis allow us to conclude that
exts2(ν2)(x,η)−exts1(ν1)(x,η)∈O(NvExp(x)).
Let (x,η)∈Varext be a variable with vExp(x)>l−tExp(t).
We note there is a unique node η′∈layer(l−vExp(x)) in layer such that t∈Trns(VASS(η)) (because of tExp(t)>l−vExp(x)).
In case of η=η′, we have s1,s2∈St(VASS(η)), and hence exts2(ν2)(x,η)=ν2(x)=ν1(x)+d(x)=exts1(ν1)(x,η)+d(x).
In case of η=η′, we have
s1,s2∈St(VASS(η)) because VASS(η) is disjoint from VASS(η′), and hence
exts2(ν2)(x,η)=exts1(ν1)(x,η)=0.
In both cases we get
exts2(ν2)(x,η)−exts1(ν1)(x,η)∈O(1).
Using the above stated facts, we obtain
[TABLE]
We are now ready to apply the Bound Proof Principle from Proposition 1.
We observe that
[TABLE]
because w(s,ν)=rTexts(ν)+z(s) is a linear expression for all s∈St(V), and we consider valuations ν with ∥ν∥≤N.
Further, by the above, we have
[TABLE]
using the induction assumption for t∈Trns(V)∖U.
With (*) we can now conclude from the Bound Proof Principle that tboundN(t)∈O(Nl) for all transitions t with tExp(t)=l.
Next, we argue that we can also deduce the desired variable bounds.
We recall that for each variable x with vExp(x)=l we have r(x,ι)>0.
Hence, w(s,ν)=rTexts(ν)+z(s)≥r(x,ι)⋅ν(x)≥ν(x) for all (s,ν)∈Cfg(V).
Thus, we can conclude from the Bound Proof Principle that vboundN(x)∈O(Nl) for all variables x with vExp(x)=l. ∎
Assume that there is a c>0 and that there are traces ζN with init(ζN)≤cN and instance(πN,t)≥Ni.
We set N′=cN.
We get that there are traces ζN′ with init(ζN′)≤N′ and instance(ζN′,t)≥(c1)iN′i.
Hence, tboundN(t)∈Ω(Ni).
The second claim can be shown analogously. ∎
Let U∖R=⋃η∈layer(l)Trns(VASS(η)) be the transition of the layer constructed during loop iteration l of Algorithm 1.
As we have argued in the proof of Lemma 4,
we have U∖R={t∣μ(t)≥1} and there is a multi-cycle M with μ(t) instances of every transition t∈U.
Because the VASS(η) of the nodes η in layer l are disjoint, we have that the transitions of every cycle of M belong to only a single set Trns(VASS(η)) for some η∈layer(l).
We can now shuffle all cycles that use transitions from the same VASS(η) into a single cycle.
We obtain a single cycle for each η∈layer(l) that uses exactly μ(t) instances of every transition t∈Trns(VASS(η)).
∎
We will need the following two properties about pre-paths:
Proposition 4
Let σ be a pre-path that can be obtained by shuffling the two pre-paths σa and σb.
If σa resp. σb are executable from some valuation νa resp. νb,
then σ is executable from valuation νa+νb;
moreover, if σa reaches a valuation νa′ from νa and σb reaches a valuation νb′ from νb, then σ reaches valuation νa′+νb′ from νa+νb.
Proof
Let
σa=t1⋯tk resp. σb=t1′⋯tl′
be the sequences of transitions ti=sidisi+1 resp.
ti′=si′di′si+1′.
By assumption there are injective monotone functions f:[1,k]→[1,k+l] and g:[1,l]→[1,k+l] with f([1,k])∩g([1,l])=∅ that define σ=t1′′⋯tk+l′′, i.e., we have tf(i)′′=ti for all i∈[1,k] and tg(i)′′=ti′ for all i∈[1,l].
We define functions u(i)=max{h∈[1,k]∣f(h)≤i} and v(i)=max{h∈[1,l]∣g(h)≤i} for all 0≤i≤l+k, where we set max∅=0.
Because σa resp. σb are executable from some valuation νa resp. νb,
there are valuations νi≥0 and νi′≥0 such that νa=ν0 and νi+1=νi+di+1 for all 0≤i<k as well as νb=ν0′ and νi+1′=νi′+di+1′≥0 for all 0≤i<l.
We now set νi′′=νu(i)+νv(i)′ for all 0≤i≤k+l.
We observe ν0′′=νu(0)+νv(0)′=νa+νb and νk+l′′=νu(k+l)+νv(k+l)′=νa′+νb′.
Clearly, νi′′≥0 for all 1≤i≤k+l.
We now observe that either u(i)=u(i+1) and v(i)=v(i+1) or u(i)=u(i+1) and v(i)=v(i+1) for all 0≤i<k+l.
In particular,
νi+1′′=νu(i+1)+νv(i+1)′=νu(i)+du(i+1)+νv(i)′=νi′′+du(i+1) or
νi+1′′=νu(i+1)+νv(i+1)′=νu(i)+νv(i)′+dv(i+1)′=νi′′+du(i+1) for all 0≤i<k+l.
Hence, the claim holds. ∎
Proposition 5
Let U,W be a partitioning of Var.
Let d≥1 be a natural number and let σ be a pre-path such that val(σ)(x)≥0 for all x∈U.
If σ can be executed from some valuation ν,
then σd can be executed from valuation νd with νd(x)=ν(x) for x∈U, and νd(x)=dν(x), for x∈W.
Proof
Let ν be a valuation from which σ can be executed and let ν′ be the valuation reached by σ from ν.
Because of ν+val(σ)=ν′≥0, we get that val(σ)≥−ν (*).
We now prove the claim by induction on d≥1.
Clearly the claim holds for d=1.
We consider some d>1.
Because of νd≥ν we have that σ can be executed from valuation νd.
Let νd′ be the valuation reached from νd by executing σ.
By (*) we have νd′(x)≥νd(x)−ν(x)=νd−1(x) for all x∈W.
Because of val(σ)(x)≥0 for all x∈U we have νd′(x)≥νd(x)=ν(x)=νd−1(x) for all x∈U.
Hence, the claim follows from the induction assumption. ∎
0.K.1 Step I
The properties stated in the two lemmata below are needed for the construction of the pre-paths τl along the tree T.
These properties are direct consequences of
constraint system (I), and are the key ingredient for the lower bound proof.
Lemma 15
Let 0≤i<l be some layers.
For every η∈layer(i) and variable x∈Var with vExp(x)≤l−i we have
[TABLE]
Proof
We first start with a statement that will be helpful to prove the claim.
Let x∈Var be a variable with vExp(x)≤l.
Let μ be the optimal solution to constraint system (I) during loop iteration l of Algorithm 1.
We consider some node η∘∈layer(l−vExp(x)) in layer l−vExp(x) of T.
Because μ is a solution to (I) we have that
[TABLE]
We recall that we have
val(C(η))=∑t∈Trns(VASS(η))D(t)⋅μ(t) for all η∈layer(l) by the definition of the cycles C(η).
With (*) we get
[TABLE]
We are now ready to prove the claim.
We now consider some node η∈layer(i) and some variable x∈Var with vExp(x)≤l−i.
We have
[TABLE]
where we have the last inequality from (#). ∎
Lemma 16
Let l≥1 be a layer.
Then we have
[TABLE]
for variables x∈Var with vExp(x)>l.
Proof
Let x∈Var be some variable with vExp(x)>l.
Let μ and r,z be the optimal solutions to constraint systems (I) and (II) during loop iteration l of Algorithm 1.
Because μ is a solution to (I) we have that
[TABLE]
Because of vExp(x)>l we must have vExp(x)=∞ during iteration l of Algorithm 1.
We now observe that we must have r(x,ι)=0 (otherwise Algorithm 1 would set vExp(x):=l during loop iteration l, contradicting the assumption vExp(x)>l).
From the dichotomy stated in Lemma 3 we then get that the inequality (*) must be strict.
Now the claim follows because of
val(C(η))=∑t∈Trns(VASS(η))D(t)⋅μ(t) by definition of the cycles C(η). ∎
For the construction of the pre-paths τl, we need the following convention:
For every layer l≥0 and every node η∈layer(l), we consider the cyclic path C(η), and fix once and for all a decomposition C(η)=π0π1π2⋯πd and an ordering of the children η1,…,ηd of η such that each πj has the same start state as C(ηj) (e.g., we can order the children η1,…,ηd of η according to the first appearance of the start state of the path C(ηj) in the path C(η)).
We will now define the pre-paths τl along the structure of the tree T.
In order to do so, we will define pre-paths σl(η) for all layers l≥1 and nodes η∈layer(i) with 0≤i≤l.
We will then set τl=σl(ι)N for all layers l≥1.
We define the pre-paths σl(η) inductively, starting from i=l downto i=0.
For η∈layer(l) we set σl(η)=C(η).
We now consider some η∈layer(i) with 0≤i<l.
Let C(η)=π0π1π2⋯πd be the fixed decomposition and η1,…,ηd the corresponding ordering of the children of η such that each πj has the same start state as C(ηj).
We set σl(η)=σl(η1)Nσl(η2)N⋯σl(ηd)N.
We now set τl=σl(ι)N for all layers l≥1.
We show the following properties of the pre-paths σl(η):
Lemma 17
For all l≥1 and nodes η∈layer(i) with 0≤i≤l we have:
For every η′∈layer(l) that is a descendant of η and every transition t∈Trns(VASS(η′)) we have instance(σl(η),t)≥Nl−i .
2. 2)
val(σl(η))=Nl−i∑η′∈layer(l),η′ is descendent of ηval(C(η′))* .*
3. 3)
val(σl(η))(x)≥0* for every x∈Var with vExp(x)≤l−i.*
4. 4)
σl(η)* is executable from some valuation ν with*
a)
ν(x)∈O(NvExp(x))* for x∈Var with vExp(x)≤l−i, and*
2. b)
ν(x)∈O(Nl−i)* for x∈Var with vExp(x)≥l−i+1.*
Proof
We prove the properties for nodes η∈layer(i) by induction, starting from i=l downto i=0.
Assume i=l:
We fix some η∈layer(l).
We have that σl(η)=C(η) contains at least one instance of each transition t∈Trns(VASS(η)).
Hence, Property 1) holds.
We have val(σl(η))=val(C(η)) because of σl(η)=C(η).
Hence, Property 2) holds.
We note that vExp(x)>l−i=0 for all variables x∈Var ().
Hence, Property 3) trivially holds.
Because of (), we only have to establish 44b).
We observe that there is a c>0 such that σl(η)=C(η) can be executed from valuation c⋅1.
Hence, Property 4) holds.
Assume i<l:
We fix some η∈layer(i).
Let C(η)=π0π1π2⋯πd be the fixed decomposition and η1,…,ηd the corresponding ordering of the children of η such that each πj has the same start state as C(ηj).
We show Property 1):
By induction assumption we have for every 1≤j≤d and every node η′∈layer(l) that is a descendant of ηj that σl(ηj) contains at least Nl−i−1 instances of every t∈Trns(VASS(η′)).
The claim then follows because σl(η) contains N copies of each σl(ηj).
We show Property 2):
From the induction assumption we get
val(σl(ηj))=Nl−i−1∑η′∈layer(l),η′ is descendent of ηjC(η′)
for all 1≤j≤d.
Hence, we have
val(σl(η))=N∑1≤j≤dval(σl(ηj))=
N∑1≤j≤dNl−i−1∑η′∈layer(l),η′ is descendent of ηjval(C(η′))=
Nl−i∑1≤j≤d∑η′∈layer(l),η′ is descendent of ηjval(C(η′))=
Nl−i∑η′∈layer(l),η′ is descendent of ηval(C(η′)),
where the last equality holds because every η′ that is a descendent of η is also a descendent of some ηj.
We show Property 3):
The property is a direct consequence of Property 2) and Lemma 15.
We show Property 4):
By induction assumption we have that each σl(ηj) can be executed from some valuation νj with νj(x)∈O(NvExp(x)), for x∈Var with vExp(x)≤l−i−1, and νj(x)∈O(Nl−i−1), otherwise.
By Property 3) we have for each σl(ηj) that val(σl(ηj))(x)≥0 for every x∈Var with vExp(x)≤l−i−1.
With Proposition 5 we get that each σl(ηj)N can be executed from some valuation νj with νj(x)∈O(NvExp(x)), for x∈Var with vExp(x)≤l−i−1, and νj(x)∈O(Nl−i), otherwise.
With Proposition 4 we get that σl(η)=σl(η1)Nσl(η2)N⋯σl(ηd)N
can be executed from some valuation ν with ν(x)∈O(NvExp(x)), for x∈Var with vExp(x)≤l−i−1, and ν(x)∈O(Nl−i), otherwise.
We note that the last statement implies Property 4).
∎
We show the following properties of the pre-paths τl:
Lemma 18
For all l≥1 we have:
instance(τl,t)≥Nl+1* for all transitions t∈⋃η∈layer(l)Trns(VASS(η)).*
2. 2)
val(τl)=Nl+1∑η∈layer(l)val(C(η′)).
3. 3)
val(τl)(x)≥0* for every x∈Var with vExp(x)≤l.*
4. 4)
val(τl)(x)≥Nl+1* for every x∈Var with vExp(x)≥l+1.*
5. 5)
τl* is executable from some valuation ν with*
a)
ν(x)∈O(NvExp(x))* for x∈Var with vExp(x)≤l, and*
2. b)
ν(x)∈O(Nl)* for x∈Var with vExp(x)≥l+1.*
Proof
Let l≥1 be some layer.
We consider the pre-path σl(ι).
Using the fact that every node in layer l is a descendant of the root node ι,
we get from Property 2) in Lemma 17 that
val(σl(ι))=Nl∑η∈layer(l)val(C(η)) (*).
From Lemma 16 we now get that val(σl(ι))(x)≥Nl for every x∈Var with vExp(x)≥l+1 (#).
From Property 3) in Lemma 17 and (#) we get in particular that val(σl(ι))(x)≥0 for all x∈Var (+).
We recall that we defined τl=σl(ι)N, i.e., that τl consists of N copies of σl(ι).
Then, Properties 1) and 3) directly follow from the corresponding properties in Lemma 17.
Properties 2) and 4) follow from (*) and (#).
Property 5)
follows from Property 4 in Lemma 17 using (+) and
Proposition 5.
∎
0.K.2 Step II
By Property 5) of Lemma 18 we can choose a sufficiently large k>0 such that every pre-path τl, for l≥1, is executable from valuation νl with
a)
νl(x)=kNvExp(x) for x∈Var with vExp(x)≤l, and
2. b)
νl(x)=kNl for x∈Var with vExp(x)≥l+1.
For every l≥0, we now define the pre-path
ρl=τ0kτ1kτ2k⋯τlk (the concatenation of k copies of the pre-paths τi for all 0≤i≤l),
where we set τ0=C(ι)N.
The following lemma shows that the pre-path ρlmax, where lmax is the maximal layer of T, would be sufficient to conclude the lower bound proof except that we will need to extend the proof from pre-paths to proper paths.
Lemma 19
For every l≥0, the pre-path ρl can be executed from a valuation ν and reaches a valuation ν′ with
∥ν∥∈O(N),
2. 2)
ν′(x)≥kNvExp(x)* for all x∈Var with vExp(x)≤l, and*
3. 3)
ν′(x)≥kNl+1* for all x∈Var with vExp(x)≥l+1.*
Proof
The proof proceeds by induction on l.
We consider l=0.
We have ρ0=τ0k=C(ι)kN.
Clearly, there is a c>0 such that C(ι)kN can be executed from valuation cN⋅1 such that cN⋅1+kN⋅val(C(ι))≥kN⋅1.
This establishes the base case.
We consider some l≥1 and assume the induction assumption for ρl−1.
We observe that ρl=ρl−1τlk.
By Property 2) of Lemma 18 we have val(τl)=Nl+1∑η∈layer(l)val(C(η)).
By Properties 3) and 4) of Lemma 18 we have
τl(x)≥0, for every x∈Var with vExp(x)≤l, and val(τl)(x)≥Nl+1 for every x∈Var with vExp(x)≥l+1 ().
Hence, we have
val(τlk)(x)≥0, for variables x∈Var with vExp(x)≤l, and val(τlk)(x)≥kNl+1, for x∈Var with vExp(x)≥l+1.
By the definition of k we have that τl can be executed from valuation ν(x)=kNvExp(x), for x∈Var with vExp(x)≤l, and ν(x)=kNl, for x∈Var with vExp(x)≥l+1.
By Proposition 5 and (), τlk can be executed from valuation ν(x)=kNvExp(x), for x∈Var with vExp(x)≤l, and ν(x)=kNl, for x∈Var with vExp(x)≥l+1.
Because of ρl=ρl−1τlk, the claim now follows from the induction assumption. ∎
0.K.3 Step III
In order to extend the proof from pre-paths to paths we make use of the concept of shuffling.
For all l≥0, we will define paths γl that can be obtained by shuffling the pre-paths ρ0,ρ1,…,ρl.
We will first define paths βl analogously to the pre-paths τl.
We will then set γl=β0kβ1k⋯βlk for all l≥0, where k is the constant from Step II.
We will define the paths βl along the structure of T.
In order to do so, we will define paths αl(η) for all layers l≥0 and nodes η∈layer(i) with 0≤i≤l.
We will then set βl=αl(ι)N for all l≥0.
We define the paths αl(η) inductively, starting from i=l downto i=0.
For η∈layer(l) we set αl(η)=C(η).
We consider some η∈layer(i) with 0≤i<l.
Let C(η)=π0π1π2⋯πd be the fixed decomposition and η1,…,ηd the corresponding ordering of the children of η such that each πj has the same start state as C(ηj).
We set αl(η)=π0αl(η1)Nπ1αl(η2)Nπ2⋯αl(ηd)Nπd.
We finally set βl=αl(ι)N for all l≥0.
Lemma 20
The pre-path σl(η) can be shuffled with the path αl−1(η) to obtain the path αl(η) for every η∈layer(i) with 0≤i<l.
Further, the pre-path τl can be shuffled with the path βl−1 to obtain the path βl for every l≥1.
Proof
For the first claim, we consider some η∈layer(i) with 0≤i<l.
Let C(η)=π0π1π2⋯πd be the fixed decomposition and η1,…,ηd the corresponding ordering of the children of η such that each πj has the same start state as C(ηj).
We proceed by induction, starting from i=l−1 downto i=0.
Assume i=l−1:
By definition, we have
σl(η)=C(η1)NC(η2)N⋯C(ηd)N, αl−1(η)=C(η)=π0π1π2⋯πd and
αl(η)=π0C(η1)Nπ1C(η2)Nπ2⋯C(ηd)Nπd.
Clearly, we can shuffle C(η1)NC(η2)N⋯C(ηd)N with π0π1π2⋯πd in order to obtain π0C(η1)Nπ1C(η2)Nπ2⋯C(ηd)Nπd.
Hence, the claim holds.
Assume i<l−1:
By definition, we have
σl(η)=σl(η1)Nσl(η2)N⋯σl(ηd)N,
αl−1(η)=π0αl−1(η1)Nπ1αl−1(η2)Nπ2⋯αl−1(ηd)Nπd and
αl(η)=
π0αl(η1)Nπ1αl(η2)Nπ2⋯αl(ηd)Nπd.
By induction assumption, we have that each σl(ηj) can be shuffled with αl−1(ηj) to obtain αl(ηj).
Clearly, then also σl(ηj)N can be shuffled with αl−1(ηj)N to obtain αl(ηj)N.
We then get that σl(η) can be shuffled with αl−1(η) to obtain the path αl(η).
For the second claim we consider some l≥1.
By the above, we have that σl(ι) can be shuffled with αl−1(ι) to obtain the path αl(ι).
Clearly, then also τl=σl(ι)N can be shuffled with βl−1(ι)N to obtain βl=αl(ι)N.
∎
We now set γl=β0kβ1k⋯βlk for all l≥0, where k is the constant from Step II.
The main property of the paths γl is stated in the next lemma:
Lemma 21
For every l≥0, γl can be obtained by shuffling the pre-paths ρ0,ρ1,…,ρl.
Proof
The proof is by induction on l≥0.
We first consider l=0.
Then, we have ρ0=γ0=C(η)kN and the claim trivially holds.
We assume l≥1.
By induction assumption
we can obtain γl−1 by shuffling
ρ0,ρ1,…,ρl−1. We will now argue that we can obtain
γl=β0kβ1k⋯βlk
by shuffling ρl with γl−1=β0kβ1k⋯βl−1k
By definition we have ρl=τ0kτ1k⋯τlk.
By Lemma 20, τi can be shuffled with βi−1 to obtain βi for every 0<i≤l.
But then we can also shuffle τik with βi−1k to obtain βik for every 0<i≤l.
Because τik and βi−1k appear in the same order in τ1kτ2k⋯τlk and β0kβ1k⋯βl−1k, we can shuffle these two (pre-)paths and obtain β1k⋯βlk.
The claim then follows because of β0=τ0=C(η)N. ∎
Let lmax be the maximal layer of T.
We will now argue that the path γlmax gives rise to traces with the desired properties.
By Lemma 19, each pre-path ρi, for 0≤i≤lmax, can be executed from a valuation ν with ∥ν∥∈O(N), and ρlmax reaches a valuation ν′ with ν′(x)≥NvExp(x) for all x∈Var.
From Proposition 4 we get that the path γlmax,
which can be obtained by shuffling ρ0,ρ1,…,ρlmax,
can be executed from a valuation ν
with ∥ν∥∈O(N) and reaches a valuation ν′ with ν′(x)≥NvExp(x) for all x∈Var.
We consider a transition t with tExp(t)=i for some 1≤i≤lmax.
There is a node η∈layer(i−1) such that t∈Trns(VASS(η)).
By Property 1) of Lemma 17 we have that τi−1 contains at least Ni instances of t.
Hence, ρi−1=τ0kτ1kτ2k⋯τi−1k also contains at least Ni instances of t.
Thus, γlmax,
which has been obtained from shuffling ρ0,ρ1,…,ρlmax,
also contains at least Ni instances of t.
∎
Let L be a lower triangular matrix with pot(Z)=∑column r of Lpot(r).
Because L is a lower triangular matrix, we have that for every variable x∈Var there is at most one column vector r
such that r(x)=0 and r(x′)=0 for all variables x′ such the row associated to variable x′ is above the row associated to variable x.
Now the claim follows because we have pot(r)=vExp(x) for every column vector r of L and every variable x such that r(x)=0 and r(x′)=0 for all variables x′ such the row associated to variable x′ is above the row associated to variable x.
∎
The proof proceeds by induction on the layer l of η∈layer(l).
Clearly, the claim holds for the root ι∈layer(0).
We now assume that the claim holds for l≥0 and prove the claim for l+1.
We fix some node η∈layer(l+1).
Let ηp∈layer(l) be the parent of η.
We will apply the Bound Proof Principle from Section 5 in order to show that
every trace ζ with init(ζ)≤N enters VASS(η) at most O(Npot(η)) times.
We first need to prepare for the definition of the witness function.
By Property 1) of Proposition 2 we have
rηpTd+zl(s2)−zl(s1)≤0 for all s1ds2∈Trns(VASS(ηp)) ().
Further, by Property 2) of Proposition 2 we have for every strict ancestor η′∈layer(i) of ηp that
rη′Td+zi(s2)−zi(s1)=0 for all s1ds2∈Trns(VASS(ηp)) (#).
Now we can choose coefficients λη′∈Z, for every strict ancestor η′ of ηp, and a coefficient ληp∈Z with ληp>0 such that the vector r∘=ληprηp+∑strict ancestor η′ of ηpλη′rη′ satisfies the equation pot(r∘)+pot(ηp)=pot(η)
(the coefficients λη′ and ληp can be chosen according to the elementary column operations in the definition of pot(η)).
Because of Property 6 of Proposition 2 we can in fact choose the coefficients λη′ such that r∘=ληprηp+∑strict ancestor η′ of ηpλη′rη′≥0.
We now consider the vector z∘=ληpzηp+∑0≤i<lλη′zi.
By () and (#) we get that
r∘Td+z∘(s2)−z∘(s1)≤0 for all s1ds2∈Trns(VASS(ηp)) (+);
we note that this inequality is strict for all transitions t for which inequality (*) is strict, i.e., for all t∈Trns(VASS(ηp)) with tExp(t)=l+1.
Further, the inequality (+) remains valid, if we add the vector c⋅1 to z∘ for any c∈Z; hence, we can assume z∘≥0.
We now define the witness function w:Cfg(V)→N by setting w(s,ν)=r∘Tν+z∘(s), for s∈St(VASS(ηp)), and w(s,ν)=0, otherwise.
We note that w is well-defined,
i.e., w(s,ν)≥0 for all (s,ν)∈Cfg(V), because we have shown above that r∘≥0 and z∘≥0.
By (+) we have already established condition 1) of the Bound Proof Principle.
It remains to establish condition 2).
We observe that only transitions that enter VASS(ηp) can increase the value of w.
Let t=s1ds2 be such a transition and let (s1,ν1)d(s2,ν2) be some step in a trace ζ of V with init(ζ)≤N.
Then, p(s2,ν2)−p(s1,ν1)=p(s2,ν2)=r∘Tν2+z∘(s)∈O(Npot(r∘)).
Hence, there is an increase certificate inct with inct(N)∈O(Npot(r∘)).
We further note that by induction assumption we have that ζ enters VASS(ηp) at most O(Npot(ηp)) times.
Hence, we have tboundt(N)⋅inct(N)=O(Npot(ηp))⋅O(Npot(r∘))=O(Npot(ηp)+pot(r∘))=O(Npot(η)).
We are now ready to apply the Bound Proof Principle from Proposition 1.
We observe that max(s,ν)∈Cfg(V),∥ν∥≤Nw(s,ν)∈O(N) because w(s,ν) is a linear expression for all s∈St(V), and we consider valuations ν with ∥ν∥≤N.
From the Bound Proof Principle we now get that tboundt(N)∈O(Npot(η)) for all transitions t∈Trns(VASS(ηp)) with tExp(t)=l+1.
Finally, we observe that every transition t that enters VASS(η) either also enters VASS(ηp) or belongs to VASS(ηp) and we have tExp(t)=l+1.
This concludes the proof.
∎
We observe that vExp(x)=1 resp. tExp(t)=1 for the bounds discovered in the first iteration and vExp(x)>1 resp. tExp(t)>1 for variable and transition bounds discovered in later iterations of Algorithm 1.
We prove the claim by induction on l.
The claim holds for l=1 because we have {vExp(x)∣x∈Var,vExp(x)<1}=∅ and thus varsum(1)=1.
We consider some l≥1 and prove the claim for l+1.
We will apply the Bound Proof Principle from Section 5 in order to show that vExp(x)=l+1 resp. tExp(t)=l+1 implies
vExp(x)≤varsum(l+1) resp. tExp(t)≤varsum(l+1).
Concretely, we will show vboundx(N)∈O(Nvarsum(l+1)) resp. tboundt(N)∈O(Nvarsum(l+1)) for all variables x with vExp(x)=l+1 and transitions t with tExp(t)=l+1,
and then get vExp(x)≤varsum(l+1) and tExp(t)≤varsum(l+1) from vboundN(x)∈Ω(NvExp(x)) and tboundN(t)∈Ω(NtExp(t)) (Corollary 2) .
We first need to prepare for the definition of the witness function.
We define a vector q∈ZVar by setting
q(x)=0 for variables x with vExp(x)=l+1, and q(x)=rη(x) for variables x with vExp(x)=l+1,
where η∈layer(l) is arbitrarily chosen.
We now argue that for every η∈layer(l) there are vectors rη∘∈ZVar, zη∘∈ZSt(V) and a coefficient λη>0 such that pot(rη∘)+pot(η)≤varsum(l+1),
rη∘≥0, zη∘≥0,
and (rη∘+ληq)Td+zη∘(s2)−zη∘(s1)≤0 for all s1ds2∈Trns(VASS(η)) (+).
This is done as follows:
We fix some η∈layer(l).
By Property 1) of Proposition 2 we have
rηTd+zl(s2)−zl(s1)≤0 for all s1ds2∈Trns(VASS(η)) ();
we note that this inequality is strict for all transitions t∈Trns(VASS(η)) with tExp(t)=l+1.
Further, by Property 2) of Proposition 2 we have for every strict ancestor η′∈layer(i) of ηp that
rη′Td+zi(s2)−zi(s1)=0 for all s1ds2∈Trns(VASS(η)) (#).
Now we can choose coefficients λη′∈Z, for every strict ancestor η′ of ηp, and a coefficient λη∈Z with λη>0 such that the vector rη∘=λη(rη−q)+∑strict ancestor η′ of ηpλη′rη′ satisfies the equation pot(r∘)+pot(η)=pot({rη′∣η′ is a strict ancestor of η}∪{rη−q}).
By Property 4 of Proposition 2 we have that the vector rη−q has non-zero coefficients only for variables x with vExp(x)≤l.
Thus, we obtain pot(r∘)+pot(η)=pot({rη′∣η′ is a strict ancestor of η}∪{rη−q})≤varsum(l+1) from Proposition 3.
Because of Property 6 of Proposition 2 we can in fact choose the coefficients λη′ such that rη∘=λη(rη−q)+∑strict ancestor η′ of ηpλη′rη′≥0.
We now consider the vector zη∘=ληzη+∑0≤i<lλη′zi.
By () and (#) we get that
(rη∘+ληq)Td+zη∘(s2)−zη∘(s1)≤0 for all s1ds2∈Trns(VASS(η));
we note that this inequality is strict for all transitions t for which inequality (*) is strict, i.e., for all t∈Trns(VASS(η)) with tExp(t)=l+1.
Further, the inequality remains valid, if we add the vector c⋅1 to zη∘ for any c∈Z; hence, we can assume zη∘≥0.
We are now ready to define the witness function w:Cfg(V)→N.
Let λ>0 be the least common multiple of the coefficients λη for η∈layer(l).
We define w by setting w(s,ν)=(ληλrη∘+λq)Tν+ληλzη∘(s), if there is a node η∈layer(l) with s∈St(VASS(η)), and w(s,ν)=λqTν, otherwise.
We note that w is well-defined,
i.e., w(s,ν)≥0 for all (s,ν)∈Cfg(V), because of λ>0, q≥0 and because of rη∘≥0, zη∘≥0 for all η∈layer(l).
Let U=⋃η∈layer(l)Trns(VASS(η)) be the transitions associated to the nodes in layer l of the tree.
By (+) we have already established condition 1) of the Bound Proof Principle for all t∈U.
It remains to establish condition 2).
We will argue that for every t∈Trns(V)∖U we can define increase certificates inct(N) such that tboundt(N)⋅inct(N)≤O(Nvarsum(l+1)).
Let s1ds2=t∈Trns(V)∖U be a transition and let (s1,ν1)d(s2,ν2) be a step in a trace ζ of V with init(ζ)≤N.
We note that ν2=ν1+d.
We proceed by a case distinction on whether t enters some VASS(η) for η∈layer(l).
In case t does not enter VASS(η) for any η∈layer(l), we have that there is no node η∈layer(l) with s2∈St(VASS(η)).
Hence, we have w(s2,ν2)=qTν2.
We get that w(s2,ν2)−w(s1,ν1)≤λqTν2−λqTν1=λqTd∈O(1) and we can set inct(N) to a constant function.
Because of t∈Trns(V)∖U, we have tExp(t)=l′
for some layer l′≤l.
By induction assumption we have
tExp(t)≤varsum(l′).
Because varsum is a monotone function, we have varsum(l′)≤varsum(l)≤varsum(l+1).
Hence, we get tExp(t)≤varsum(l+1).
With tboundt(N)∈O(NtExp(t)) (by Theorem 5.1) we now get that tboundt(N)⋅inct(N)≤O(NtExp(t))⋅O(1)=O(Nvarsum(l+1)).
In case t does enter some VASS(η) with η∈layer(l), we have
w(s2,ν2)−w(s1,ν1)≤(ληλrη∘+λq)Tν2+ληλzη∘(s2)−λqTν1=ληλrη∘Tν2+λqTd+ληλzη∘(s2)∈O(Npot(rη∘)).
With tboundt(N)≤O(Npot(η)) (by Lemma 9) we get tboundt(N)⋅inct(N)≤O(Npot(η))⋅O(Npot(rη∘))=O(Npot(η)+pot(rη∘))≤O(Nvarsum(l+1)).
We are now ready to apply the Bound Proof Principle from Proposition 1.
We observe that max(s,ν)∈Cfg(V),∥ν∥≤Nw(s,ν)∈O(N) because w(s,ν) is a linear expression for all s∈St(V), and we consider valuations ν with ∥ν∥≤N.
From the Bound Proof Principle we now get that tboundt(N)∈O(Nvarsum(l+1)) for all transitions t∈Trns(VASS(η)) with tExp(t)=l+1.
Next, we argue that we can also deduce the desired variable bounds.
We consider a variable x∈Var with vExp(x)=l+1.
For all (s,ν)∈Cfg(V) we have w(s,ν)≥qTν≥q(x)⋅ν(x)≥ν(x) .
Hence, we get from the Bound Proof Principle that
vboundN(x)∈O(Nvarsum(l+1)) for all variables x with vExp(x)=l+1.
∎
For l=0, we have {vExp(x)∣x∈Var,vExp(x)<0}=∅ and varsum(l)=1=20.
Thus, the claim holds.
We assume the claim holds for some l≥0 and show the claim for some l+1.
Let m be the number of variables x∈Var such that vExp(x)<l.
By induction assumption we have varsum(l)≤2m.
We now consider a variable x with vExp(x)=l.
From Lemma 10 we have that vExp(x)≤varsum(l)≤2m.
There are (k−m) variables x such that vExp(x)=l.
Hence, we have
By assumption there are no t∈Trns(V), x∈Var with l<tExp(t)+vExp(x)<∞ (*).
We now will argue that the cycles C(η) and sets U={x∈Var∣vExp(x)≤l}, W={x∈Var∣vExp(x)>l} satisfy the requirements of Lemma 12.
The claim then directly follows from the application of Lemma 12.
By Lemma 16 we have
∑η∈layer(l)val(C(η))(x)≥1 for variables x∈Var with vExp(x)>l.
It remains to show val(C(η))(x)≥0 for variables x∈Var with vExp(x)≤l and nodes η∈layer(l).
Let η∈layer(l) be a node in layer l and let x∈Var be a variable with vExp(x)≤l.
Let η′∈layer(l−vExp(x)) be the unique ancestor of η in layer l−vExp(x).
We show that VASS(η)=VASS(η′).
Assume otherwise.
Then there is a transition t∈Trns(VASS(η′))∖Trns(VASS(η)) with l−vExp(x)<tExp(t).
However, this contradicts the assumption (*).
Hence we get that VASS(η)=VASS(η′).
Thus, η is the sole descendant of η′ in layer l.
We can then deduce val(C(η))(x)≥0 from Lemma 15.
∎
Bibliography20
The reference list from the paper itself. Each links out to its DOI / PubMed record.
1[1] Parosh Aziz Abdulla, Giorgio Delzanno, and Laurent Van Begin. A language-based comparison of extensions of Petri nets with and without whole-place operations. In LATA , pages 71–82, 2009.
2[2] Benjamin Aminof, Sasha Rubin, and Florian Zuleger. On the expressive power of communication primitives in parameterised systems. In LPAR , pages 313–328, 2015.
3[3] Benjamin Aminof, Sasha Rubin, Florian Zuleger, and Francesco Spegni. Liveness of parameterized timed networks. In ICALP , pages 375–387, 2015.
4[4] Roderick Bloem, Swen Jacobs, Ayrat Khalimov, Igor Konnov, Sasha Rubin, Helmut Veith, and Josef Widder. Decidability in parameterized verification. SIGACT News , 47(2):53–64, 2016.
5[5] Tomás Brázdil, Krishnendu Chatterjee, Antonín Kucera, Petr Novotný, Dominik Velan, and Florian Zuleger. Efficient algorithms for asymptotic bounds on termination time in VASS. In LICS , pages 185–194, 2018.
6[6] Leonard Dickson. Finiteness of the odd perfect and primitive abundant numbers with n distinct prime factors. Am. J. Math , 35:413––422, 1913.
7[7] Javier Esparza and Mogens Nielsen. Decidability issues for Petri nets - a survey. Elektronische Informationsverarbeitung und Kybernetik , 30(3):143–160, 1994.
8[8] Alain Finkel, Gilles Geeraerts, Jean-François Raskin, and Laurent Van Begin. On the omega -language expressive power of extended Petri nets. TCS , 356(3):374–386, 2006.