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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varTheta (N^k)$$\end{document}Θ(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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1 \le k \le 2^n$$\end{document}1≤k≤2n, where n is the dimension of the considered vector addition system.


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: 1) 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]. 2) 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 Θ(N k ) 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 ≤ 2 n , where n is the dimension of the considered VASS.

Overview and Illustration of Results
We discuss our approach on the VASS V run , 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 s 1 , s 2 , s 3 , s 4 . In this paper we will always represent vectors using a set of variables Var , whose cardinality equals the dimension of the VASS. For V run 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 Θ(N kx ) for every variable x ∈ Var, where k x ∈ 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 V run , our approach establishes the linear variable bound Θ(N ) for x and y, and the quadratic bound Θ(N 2 ) for z. We note that because the variable bound of z is quadratic and not linear, V run cannot be analyzed by the procedure of [5]. Our approach establishes the bound Θ(N ) for the transitions s 1 → s 3 and s 4 → s 2 , the bound Θ(N 2 ) for transitions s 1 → s 2 , s 2 → s 1 , s 3 → s 4 , s 4 → s 3 , and the bound Θ(N 3 ) for all self-loops. The computational complexity of V run is then the maximum of all transition bounds, i.e., Θ(N 3 ). 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 Θ(N k ), with k computable in PTIME and 1 ≤ k ≤ 2 n , where n is the dimension of the considered VASS. We note that our upper bound 2 n 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 V n of VASSs, which illustrate that k can indeed be exponential in the dimension (the example can be skipped on first reading). V n uses variables x i,j and consists of states s i,j , for 1 ≤ i ≤ n and j = 1, 2. We note that V n has dimension 2n.  Figure 1 depicts V n for n = 3, where the vector components are stated in the order x 1,1 , x 1,2 , x 2,1 , x 2,2 , x 3,1 , x 3,2 . It is not hard to verify for all 1 ≤ i ≤ n that Θ(N 2 i−1 ) is the precise asymptotic variable bound for x i,1 and x i,2 , that s i,1 → s i,2 , s i,2 → s i,1 and s i,1 → s i+1,1 , s i+1,2 → s i,2 in case i < n, and that Θ(N 2 i ) is the precise asymptotic transition bound for s i,1 → s i,1 , s i,2 → s i,2 (Algorithm 1 can be used to find these bounds).

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.

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 S I for the set of vectors over S indexed by some set I. We write S I×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 ∈ S I , we write a(i) ∈ S for the entry at line i ∈ I of a, and a = max i∈I |a(i)| for the maximum absolute value of a. Given a ∈ S I and J ⊆ I, we denote by a| J ∈ S J the restriction of a to J, i.e., we set a| J (i) = a(i) for all i ∈ J. Given A ∈ S I×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 ∈ S I×J and K ⊆ J, we denote by A| K ∈ S I×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 0 otherwise. Given a, b ∈ S I we write a+b ∈ S I for component-wise addition, c · a ∈ S I for multiplying every component of a by some c ∈ S and a ≥ b for component-wise comparison. Given A ∈ S I×J , B ∈ S J×K and x ∈ S J , we write AB ∈ S I×K for the standard matrix multiplication, Ax ∈ S I for the standard matrix-vector multiplication, A T ∈ S J×I for the transposed matrix of A and x T ∈ S 1×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 states St(V) and a finite set of transitions Trns(V), where We define the length of π by length(π) = k and the value of π by val (π) = i∈[1,k] d i . Let instance(π, t) be the number of times π contains the transition t, i.e., the number of indices i such that t = s i di − → s i+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, Let V be a VASS. The set of valuations Val (V) = N Var consists of Varvectors over the natural numbers (we assume N includes 0). The set of configurations Cfg(V) = St(V) × Val(V) consists of pairs of states and valuations. A step is a triple (( − → · · · (s k , ν k ) of steps. We lift the notions of length and instances from paths to traces in the obvious way: we consider the path π = s 0 d1 − → s 1 d2 − → · · · s k 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 comp V (N ) = sup trace ζ of V,init(ζ)≤N length(ζ), 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 vbound x (N ) = sup trace ζ 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 tbound t (N ) = sup trace ζ of V,init(ζ)≤N instance(ζ, 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.

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 matrix D ∈ Z Var ×Trns(V) by setting D(t) = d for all transitions t = (s, d, s ′ ) ∈ Trns(V). We define the flow matrix F ∈ Z St (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 0 entries (in case the source and target of transition t are the same).
Example 1. We state the update and flow matrix for V run from Section 1: from left to right) and row order x, y, z for D resp. s 1 , s 2 , s 3 , s 4 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.
constraint system (P ): Maximization Objective: Maximize the number of inequalities with (Dµ)(x) > 0 and µ(t) > 0 constraint system (Q): Maximization Objective: Maximize the number of inequalities with r(x) > 0 and (D T r + F T z)(t) < 0 The solutions of (P ) and (Q) are characterized by the following two lemmata: Lemma 2 (Cited from [14]). µ ∈ Z Trns(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).
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 4. 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 (D T r + F T z)(t) < 0 or µ(t) ≥ 1.
Example 5. 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 V run , 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 tbound t (N ) ∈ O(N ) for t = s 1 → s 3 and t = s 4 → s 2 , because 1) rank (r, z) decreases for these two transitions and does not increase for other transitions (by Lemma 3), and because 2) 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(V run ) and every valuation ν with ν ≤ N . By a similar argument we get vbound x (N ) ∈ O(N ) and vbound y (N ) ∈ O(N ). The exact reasoning for deriving upper bounds is given in Section 5. From µ we can, by Lemma 2, obtain the cycles We will later show that the cycles C 1 and C 2 give rise to a family of traces that establish tbound t (N ) ∈ Ω(N 2 ) for all transitions t ∈ Trns(V run ) with t = s 1 → s 3 and t = s 4 → s 2 . Here we give an intuition on the construction: We consider a cycle C of V run that visits all states at least once. By (*), the updates along the cycles C 1 and C 2 cancel each other out. However, the two cycles are not connected. Hence, we execute the cycle C 1 some Ω(N ) times, then (s part of) the cycle C, then execute C 2 as often as C 1 , and finally the remaining part of C; this we repeat Ω(N ) times. This construction also establishes the bound vbound z (N ) ∈ Ω(N 2 ) because, by (*), we increase z with every joint execution of C 1 and C 2 . The precise lower bound construction is given in Section 6.

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): 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 Var ext := {(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 Var ext because ι ∈ layer(0) is the only node in layer 0. We define the extended update matrix D ext ∈ Z Var ext ×U by setting Figure 2 can be recognized as instantiation of constraint systems (P ) and (Q) with matrices D ext and F | U and variables Var ext , and hence the dichotomy stated in Lemma 4 holds. We comment on the choice of Var ext : Setting Var ext = {(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.

Constraint systems (I ) and (II ) stated in
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 (D T ext r + F | T U z)(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 .
Input: a connected VASS V with update matrix D and flow matrix F T := single root node ι with VASS(ι) = V; let Dext ∈ Z Var ext ×U be the matrix defined by find optimal solutions µ and r, z to constraint systems (I ) and (II ); return "V has at least exponential complexity" l := l + 1; until vExp(x) = ∞ and tExp(t) = ∞ for all x ∈ Var and t ∈ Trns(V); Algorithm 1: Computes transition and variable bounds for a VASS V constraint system (I ): Maximization Objective: Maximize the number of inequalities with (Dext µ)(x) > 0 and µ(t) > 0 constraint system (II ):

Fig. 2. Constraint Systems (I ) and (II ) used by Algorithm 1
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 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.

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 If this is not the case, then we can conclude that V is at least exponential (see Theorem 9 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 now state the main properties of Algorithm 1: Lemma 8. Algorithm 1 always terminates.
The proof of Theorem 9 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: The upper bounds of Theorem 10 will be proved in Section 5 (Theorem 16) and the lower bounds in Section 6 (Corollary 20).
We will prove in Section 7 that the exponents of the variable and transition bounds are bounded exponentially in the dimension of V: Theorem 11. 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 10 and 11:

Complexity of Algorithm 1
In the remainder of this section we will establish the following result: Theorem 13. 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 |Var ext | = |{(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 11 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 14. 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 : The effect of these two lines is that Algorithm 1 directly skips to the next relevant layer. Lemma 14, 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.

Proof of the Upper Bound Theorem
We begin by stating a proof principle for obtaining upper bounds.
We call such a function w a complexity witness and the associated inc t functions the increase certificates.
Let t ∈ U be a transition on which w decreases, i.e., we have w( Further, let x ∈ Var be a variable such that ν(x) ≤ w(s, ν) for all (s, ν) ∈ Cfg(V). Then, 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 vbound N (x) ∈ O(N l ) for every x ∈ Var with vExp(x) = l and that tbound N (t) ∈ O(N l ) 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, Var ext be the set of extended variables and D ext ∈ Z Var ext ×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 3 as witness function for the Bound Proof Principle. In order to apply Lemma 3 we need to consider the VASS associated to the matrices in constraint system (II ): Let V ext be the VASS over variables Var ext associated to update matrix D ext and flow matrix F | U . From Lemma 3 we get that rank (r, z) : Cfg(V ext ) → N is a quasi-ranking function for V ext . We now need to relate V to the extended VASS V ext in order to be able to use this quasi-ranking function. We do so by extending valuations over Var to valuations over Var ext . For every state s ∈ St(V) and valuation ν : Var → N, we define the extended valuation ext s (ν) : Var ext → N by setting As a direct consequence from the definition of extended valuations, we have that (s, ext s (ν)) ∈ Cfg(V ext ) for all (s, ν) ∈ Cfg(V), and that (s 1 , ext s1 (ν 1 )) We now define the witness function w by setting w(s, ν) = rank (r, z)(s, ext s (ν)) for all (s, ν) ∈ Cfg (V).
We immediately get from Lemma 3 that w maps configurations to the nonnegative integers and that condition 1) of the Bound Proof Principle is satisfied. Indeed, we get from the first item of Lemma 3 that w(s, ν) ≥ 0 for all (s, ν) ∈ Cfg(V), and from the second item that w(s 1 , ν 1 ) ≥ w(s 2 , ν 2 ) for every step , 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 inc t (N ) ∈ O(N l−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 for all x ∈ Var and tbound N (t) ∈ O(N tExp(t) ) for all t ∈ Trns(V).

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 17. 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) ≥ N i , then tbound N (t) ∈ Ω(N i ). If there are traces ζ N with init(ζ N ) ∈ O(N ) that reach a final valuation ν with ν(x) ≥ N i , then vbound N (x) ∈ Ω(N i ).
The lower bound proof uses the notion of a pre-path, which relaxes the notion of a path: A pre-path σ = t 1 · · · t k is a finite sequence of transitions t i = s i di − → s ′ i . 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 s ′ i = s i+1 . We generalize notions from paths to pre-paths in the obvious way, e.g., we set val (σ) = i∈ [1,k] d i 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 + d i+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 σ = t 1 · · · t k and σ ′ = t ′ 1 · · · t ′ l can be shuffled into a pre-path σ ′′ = t ′′ 1 · · · t ′′ k+l , if σ ′′ is an order-preserving interleaving of σ and σ ′ ; formally, there are injective monotone functions f : 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 18 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 18. 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: 1) instance(τ l , t) ≥ N l+1 for all transitions t ∈ η∈layer(l) Trns(VASS(η)). 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 = τ k 0 τ k 1 · · · τ k l (the concatenation of k copies of each τ i , setting τ 0 = C(ι) N ), can be executed from some valuation ν and reaches a valuation ν ′ with The above stated properties for the pre-path ρ lmax , where l max 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 l max is the maximal layer of T , then has the desired properties and allows to conclude the lower bound proof with the following result: for all variables x ∈ Var and we have instance(ζ N , t) ≥ N tExp(t) for all transitions t ∈ Trns(V).
With Lemma 17 we get the desired lower bounds from Theorem 19: for all x ∈ Var and tbound N (t) ∈ Ω(N tExp(t) ) for all t ∈ Trns(V).

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 z l ∈ Z St (V) for every layer l of T and a vector r η ∈ Z Var 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 z l = 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 21. For every layer l of T and node η ∈ layer(l) we have: 1) z l ≥ 0 and r η ≥ 0.

5) For every
For a vector r ∈ Z Var , 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 r T ν ∈ O(N pot(r) ) for every valuation ν reachable by a trace ζ with init(ζ) ≤ N . We will now define the potential of a set of vectors Z ⊆ Z Var . 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 L pot(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 B l = {vExp(x) | x ∈ Var , vExp(x) < l} be the set of variable bounds below l. We set varsum(l) = 1, for B l = ∅, and varsum(l) = B l , otherwise. The following statement is a direct consequence of the definitions: Proposition 22. Let Z ⊆ Z Var 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).

The next result follows from Lemma 24 only by arithmetic manipulations and induction on l:
Lemma 25. Let l be some layer. Let k be the number of variables x ∈ Var with vExp(x) < l. Then, varsum(l) ≤ 2 k . Theorem 11 is then a direct consequence of Lemma 24 and 25 (using k ≤ |Var |).

Exponential Witness
The following lemma from [15] states a condition that is sufficient for a VASS to have exponential complexity 2 . We will use this lemma to prove Theorem 9: Lemma 26 (Lemma 10 of [15]). Let V be a connected VASS, let U, W be a partitioning of Var and let C 1 , . . . , C m be cycles such that a) val (C i )(x) ≥ 0 for all x ∈ U and 1 ≤ i ≤ m, and b) i val (C i )(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) ≥ c N for all x ∈ W and 3) (C i ) c N is a sub-path of π N for each 1 ≤ i ≤ m.
We now outline the proof of Theorem 9: We assume that Algorithm 1 returned "V has at least exponential complexity" in loop iteration l. According to Lemma 18, 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 26, which establishes Theorem 9.

A Proof of Lemma 2
Proof. "⇐": 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.

B Proof of Lemma 3
Proof. The first item holds because r, z satisfy the constraints r ≥ 0 and z ≥ 0 of constraint system (Q).

C Proof of Lemma 4
The proof of Lemma 4 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: there exists x with We now consider the constraint systems (A t ) and (B t ) 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).

constraint system (A t ):
there exists µ ∈ Z Trns (V) with We recognize constraint system (A t ) as the dual of constraint system (B t ) in the following Lemma: Lemma 27. Exactly one of the constraint systems (A t ) and (B t ) has a solution.
Proof. We fix some transition t. We denote by char t ∈ Z St (V) the vector with char t (t ′ ) = 1, if t ′ = t, and char t (t ′ ) = 0, otherwise. Using this notation we rewrite (A t ) to the equivalent constraint system (A ′ t ): Using Farkas' Lemma, we see that either (A ′ t ) is satisfiable or the following constraint system (B ′ t ) is satisfiable: We observe that solutions of constraint system (B ′ t ) 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 F T either contains exactly one −1 and 1 entry or only 0 entries). Hence, we can force z to be non-negative. We recognize that constraint systems (B ′ t ) and (B t ) are equivalent.

⊓ ⊔
We now consider the constraint systems (C x ) and (D x ) stated below. Both constraint systems are parameterized by a variable x ∈ Var (we note that only Equations (3) and (4) are parameterized by x).
constraint system (C x ): We recognize constraint system (C x ) as the dual of constraint system (D x ) in the following Lemma: Lemma 28. Exactly one of the constraint systems (C x ) and (D x ) has a solution. Proof. We fix some variable x ∈ Var. We denote by char x ∈ Z Var the vector with char x (x ′ ) = 1, if x ′ = x, and char x (x ′ ) = 0, otherwise. Using this notation we rewrite (A x ) to the equivalent constraint system (A ′ x ): Using Farkas' Lemma, we see that either (C ′ x ) is satisfiable or the following constraint system (D ′ x ) is satisfiable: We observe that solutions of constraint system (D ′ x ) 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 F T either contains exactly one −1 and 1 entry or only 0 entries). Hence, we can force z to be non-negative. We recognize that constraint systems (D ′ x ) and (D x ) are equivalent.

⊓ ⊔
We are now ready to state the proof of Lemma 4: Proof. We consider optimal solutions µ and r,z to constraint systems (P ) and (Q). The claim then directly follows from Lemma 27 and Lemma 28. ⊓ ⊔

D Proof of Lemma 6
Proof. By Lemma 2 there is a multi-cycle M with µ(t) instances of every transition t ∈ U . By Lemma 4 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(η)).

E Proof of Lemma 8
Proof. 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. ⊓ ⊔

F Proof of Corollary 12
Proof. We consider the run of Algorithm 1 on V. In case Algorithm 1 returns "V has at least exponential complexity", then comp V (N ) ∈ 2 Ω(N ) by Theorem 9. Otherwise, we have tExp(t) = ∞ and vExp(x) = ∞ for all t ∈ Trns(V) and x ∈ Var . Let i = max t∈Trns(V) tExp(t). Using Theorem 10 we get that For the lower bound, we consider a transition t ∈ Trns(V) with i = tExp(t). From Theorem 10 we get that there are traces ζ N of V with init(ζ N ) ≤ N and instance(ζ N , t) ∈ Ω(N i ). Because of instance(ζ N , t) ≤ length(ζ N ) for all N ≥ 0, we get comp V (N ) ∈ Ω(N i ). Thus, we have shown comp V (N ) ∈ Θ(N i ). Finally, i ≤ 2 |Var | by Theorem 11.

G Proof of Lemma 14
Proof. We consider the point in time when the execution of Algorithm 1 reaches line l := l + 1 during some loop iteration l ≥ 1.
Let U = η∈layer(l−1) Trns(VASS(η)) be the transitions, Var ext be the variables and let D ext 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 | (D T ext r + F | T U z)(t) < 0} be the transitions removed during loop iteration l. We set U • = U \ R. By Lemma 6, we have U • = η∈layer(l) Trns(VASS(η)). We define µ • and D • as the restriction of µ and D ext to U • , i.e., we set µ • = µ| U• and D • = D ext | U• . From Lemma 4 we get that U • = {t | µ(t) ≥ 1}, and hence D ext µ = D • µ • . From this and the fact that µ ∈ Z U is a solution to constraint system (I ) we get that 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 D i ∈ Z Var i ×U• for the set of (extended) variables , the matrices D i and D • are identical up to renaming of the variables. Thus, from (*) we get that D i µ • ≥ 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 4 we have that D T i r + F | T U• z = 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 (D i µ • )(x) ≥ 1 for all variables x with vExp(x) > l. Again by Lemma 4 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 .

H Proof of Theorem 16
Proof. 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, Var ext be the set of extended variables and D ext ∈ Z Var ext ×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 tbound N (t) ∈ O(N tExp(t) ) by the induction assumption. Further, we can apply the induction assumption for variables x ∈ Var with vExp(x) < l and assume vbound N (x) ∈ O(N vExp(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 3. We note that we have w(s, ν) = rank (r, z)(s, ext s (ν)) = r T ext s (ν) + z(s) for all (s, ν) ∈ Cfg(V).
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 inc t (N ) ∈ O(N l−tExp(t) ) for all transitions t ∈ Trns(V) \ U .
Using the above stated facts, we obtain We are now ready to apply the Bound Proof Principle from Proposition 15. We observe that max because w(s, ν) = r T ext s (ν) + z(s) is a linear expression for all s ∈ St(V), and we consider valuations ν with ν ≤ N . Further, by the above, we have using the induction assumption for t ∈ Trns(V) \ U . With (*) we can now conclude from the Bound Proof Principle that tbound N (t) ∈ O(N l ) 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

I Proof of Lemma 17
Proof. Assume that there is a c > 0 and that there are traces ζ N with init(ζ N ) ≤ cN and instance(π N , t) ≥ N i . We set N ′ = cN . We get that there are traces ∈ Ω(N i ). The second claim can be shown analogously.

J Proof of Lemma 18
Proof. 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 6, 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(η)). ⊓ ⊔

K Proof of Theorem 19
We will need the following two properties about pre-paths: Proposition 29. 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 = t 1 · · · t k resp. σ b = t ′ 1 · · · t ′ l be the sequences of transitions By assumption there are injective monotone functions f : [1, k] → [1, k + l] and g : [1, l] 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 + d i+1 for all 0 ≤ i < k as well as 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 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 for all x ∈ U . Hence, the claim follows from the induction assumption.
⊓ ⊔ 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 31. Let 0 ≤ i < l be some layers. For every η ∈ layer(i) and variable 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 t∈Trns(VASS(η•)) and t∈Trns(VASS(η)) for some η∈layer (l) D(x, t) · µ(t) ≥ 0 ( * ).
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 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 where we have the last inequality from (#).
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 t∈Trns(VASS(η)) for some η∈layer(l) 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 4 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(η). ⊓ ⊔ , 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 31.
We show Property 4): By induction assumption we have that each σ l (η j ) can be executed from some valuation We note that the last statement implies Property 4).

⊓ ⊔
We show the following properties of the pre-paths τ l : Lemma 34. For all l ≥ 1 we have: ) for x ∈ Var with vExp(x) ≤ l, and b) ν(x) ∈ O(N l ) for x ∈ Var with vExp(x) ≥ l + 1.
⊓ ⊔ K. 2 Step II By Property 5) of Lemma 34 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) = kN vExp(x) for x ∈ Var with vExp(x) ≤ l, and b) ν l (x) = kN l for x ∈ Var with vExp(x) ≥ l + 1.
For every l ≥ 0, we now define the pre-path ρ l = τ k 0 τ k 1 τ k 2 · · · τ k l (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 l max 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.
⊓ ⊔ 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 = β k 0 β k 1 · · · β k l 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.
transition t with tExp(t) = i for some 1 ≤ i ≤ l max . There is a node η ∈ layer(i − 1) such that t ∈ Trns(VASS(η)). By Property 1) of Lemma 33 we have that τ i−1 contains at least N i instances of t. Hence, ρ i−1 = τ k 0 τ k 1 τ k 2 · · · τ k i−1 also contains at least N i instances of t. Thus, γ lmax , which has been obtained from shuffling ρ 0 , ρ 1 , . . . , ρ lmax , also contains at least N i instances of t.

L Proof of Proposition 22
Proof. Let L be a lower triangular matrix with pot(Z) = column r of L pot(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. ⊓ ⊔

M Proof of Lemma 23
Proof. 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(N pot(η) ) times.
We are now ready to apply the Bound Proof Principle from Proposition 15. We observe that max (s,ν)∈Cfg(V), ν ≤N w(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 tbound t (N ) ∈ O(N pot(η) ) 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.