Reachability in 3-VASS Is Elementary
Abstract
The reachability problem in 3-dimensional vector addition systems with states (3-VASS) is known to be PSpace-hard, and to belong to Tower. We significantly narrow down the complexity gap by proving the problem to be solvable in doubly-exponential space. The result follows from a new upper bound on the length of the shortest path: if there is a path between two configurations of a 3-VASS then there is also one of at most triply-exponential length. We show it by introducing a novel technique of approximating the reachability sets of 2-VASS by small semi-linear sets.
Keywords and phrases:
vector addition systems, Petri nets, reachability problem, dimension three, doubly exponential space, length of shortest pathCategory:
Track B: Automata, Logic, Semantics, and Theory of ProgrammingFunding:
Wojciech Czerwiński: Supported by the ERC grant INFSYS, agreement no. 950398.Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Parallel computing modelsAcknowledgements:
We thank Radosław Piórkowski for many inspiring discussions about cones in VASS a few years ago and Filip Mazowiecki for the discussions about the reachability problem for -vass. We thank also Henry Sinclair-Banks for helpful discussions about [4, Thm 4.16]. We thank Qizhe Yang and Yangluo Zheng for the discussions on -VASS, which are geometrically -dimensional. Finally, we thank anonymous reviewers for helpful comments.Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele PuppisSeries and Publisher:

1 Introduction
Petri nets are an established model of concurrent systems with extensive applications in various areas of theoretical computer science. For most algorithmic questions, the model is equivalent to vector addition systems with states (vass in short). A -dimensional vass (-vass in short) is a finite automaton equipped additionally with a finite number of nonnegative integer counters that are updated by transitions, under the proviso that the counter values can not drop below zero. Importantly, vass have no capability to zero-test counters, and hence the model is not Turing-complete.
One of the central algorithmic problems for VASS is the reachability problem which asks, if in a given vass there is a path (a sequence of executions of transitions) from a given source configuration (consisting of a state together with counter values) to a given target configuration:
-
vass reachability problem
-
Input: vass , source and target configurations .
-
Question: Is there a path from to ?
Already in 1976, the problem was shown to be ExpSpace-hard by Lipton [21], and few years later decidability was shown by Mayr [22]. Later improvements [15, 16] simplified the construction, but no complexity upper bound was given until Leroux and Schmitz showed that the problem can be solved in Ackermannian complexity [18, 19]. At the same time the lower bound was lifted to Tower-hardness [8], and soon afterwards, in 2021, improved to Ackermann-hardness [17, 9].
Although the complexity of the reachability problem is now settled to be Ackermann-complete, various complexity questions remain still widely open. One of them is the complexity of the reachability problem parametrised by dimension, namely in -dimensional vass (-vass) for fixed . Although the question has been investigated for a few decades, exact bounds are only known for dimensions 1 and 2 (both for unary or binary representations of numbers in counter updates). In the case of binary encoding, the reachability problem is NP-complete for -vass [12] and PSpace-complete for -vass [2], and in case of unary encoding the problem is NL-complete both for -vass (folklore) and for -vass [10]. For higher dimension almost nothing is known.
All the upper complexity bounds for dimension 1 or 2 were obtained by estimating the length of the shortest path, or of its representation. For unary -vass, it is a folklore that if there is a path between two configurations then there is also one of polynomial length (see [3] for more demanding quadratic upper bound), which implies NL-completeness. For binary -vass, a polynomial-size representation of the shortest path was provided by [12]. Concerning binary -vass, already in 1979 Hopcroft and Pansiot showed that the reachability sets of -vass are effectively semi-linear, and therefore the reachability problem is decidable [13]. Subsequently, 2-ExpTime upper complexity bound for binary -vass was established by [14]. In [20] Leroux and Sutre showed that even the reachability relation is semi-linear, and that the relation is flattable, namely that it can be described by a finite number of simple expressions called linear path schemes. Only in 2015, careful examination of these linear path schemes led to exponential upper bound on the length of the shortest path, and consequently to PSpace upper bound [2]. Concerning unary -vass, polynomial upper bound on the length of the shortest path was shown [10, 1], thus yielding NL-completeness.
Our understanding of the model drops drastically for dimensions larger than 2, as most of good properties admitted in dimension 1 or 2 vanish. For instance, already since the seminal paper [13] it is known that reachability sets of -vass are not necessarily semi-linear. Investigation of -vass was advocated by many papers cited above, e.g. [13, 2, 1], but until now no specific complexity bounds for -vass are known, except for generic parametric bounds known for -vass in arbitrary fixed dimension . By [19], the reachability problem in -vass is in ,111The complexity class corresponds to the -th level of Grzegorczyk’s fast-growing hierarchy [25]. later improved to [11]. In case of -vass, this yields membership in . On the other hand, no lower bound is known for binary -vass except for the PSpace lower bound inherited from binary -vass (for unary -vass, NP-hardness has been recently shown by [4]). The complexity gaps remains thus huge, namely between PSpace and Tower. As our main result, we narrow down this gap significantly.
Contribution.
In this paper we investigate complexity of the reachability problem in -vass. Our main result is the first elementary upper complexity bound for the problem:
Theorem 1.
The reachability problem in -vass is in 2-ExpSpace, under binary encoding.
In particular, this refutes the natural conjecture that for every , the reachability problem for -vass is -complete and provides the first algorithm, which solves the problem for vass with finite reachability sets faster than exhaustive search.
Our way to prove Theorem 1 is by bounding triply-exponentially the length of the shortest path between the given source and target configurations. This main technical result, formulated in Lemma 2 below, applies to sequential -vass, which are sequences of strongly connected components linked by single transitions (see Figure 1; the rigorous definition is given in Section 2).
Given a vass and source and target configurations , by we mean the sum of absolute values of all the numbers occurring in transitions of , and , plus the number thereof.
Lemma 2.
If there is a path from to in a sequential -vass , then there is one of length at most , where is the number of components of .
Therefore the length of the shortest path in a -component -vass is bounded by , where is the size of input, under unary encoding. This is the first bound on the shortest path in vass of dimension higher than 2, that is not based on the size of (finite) reachability sets. Indeed, in a -vass of size , the size of finite reachability sets may be an arbitrary high tower of exponentials.
In consequence of Lemma 2, Theorem 1 follows immediately: the upper bound of Lemma 2 is triple-exponential in the size of input, irrespectively whether unary or binary encoding is used, which implies the same bound on norms of configurations along the shortest path. This yields a nondeterministic double-exponential space algorithm that first guesses a sequence of components leading from the source state to the target one, and then searches for a witnessing path. Note that the complexity bound under unary encoding is not better than under binary encoding.
Lemma 2 immediately yields further upper bounds for the reachability problem, when the number of components is fixed:
Corollary 3.
For every fixed , the reachability problem in -component -vass is:
-
in NL, under unary encoding,
-
in PSpace, under binary encoding.
Indeed, for every fixed , the bound of Lemma 2 is polynomial with respect to unary input size. Therefore the length of the shortest path, as well as the norm of configurations along this path, are polynomially bounded in case of unary encoding, and exponentially bounded in case of binary encoding. This bounds yield membership in NL and PSpace, respectively. Thus for every fixed , the complexity of -component -vass matches the complexity of -vass.
Organisation of the paper.
We start by introducing notation and basic facts in Section 2. Overview of the proof of our main result, Lemma 2, is presented in Section 3. In Section 4 we focus on 1-component -vass, thus establishing the base of induction for Lemma 2. Next, in Section 5 we introduce the fundamental concept of polynomially approximable sets, and formulate our core technical result: reachability sets of -vass are polynomially approximable. The result is then applied in the inductive proof of Lemma 2 in Section 6. We conclude in Section 7.
2 Preliminaries
Let denote the set of all, nonnegative, and positive rationals, respectively, and likewise let denote the respective sets of integers. For , , let denote the set . The th coordinate of a vector we write as . Thus . For , by we denote the constant vector .
Vector addition systems with states.
Let . A -dimensional vector addition system with states (-vass in short) consists of a finite set of states, and a finite set of transitions . A configuration of consists of a state and a nonnegative vector , and is written as . A transition induces steps between configurations, where . We refer to the vector as the effect of the transition or of an induced step. A path in is a sequence of steps with the proviso that the target configuration of every step matches the source configuration of the next one:
(1) |
The effect of a path is the sum of effect of all steps, and its length is the number of steps. We say that the path is from to , call source and target configuration, respectively, of the path, and write . We also write if there is some path from to . A path in with the same source and target state we call a cycle. A cycle is simple if the only equality of states along the cycle is the equality of source and target states. When dimension is irrelevant, we write vass instead of -vass.
By the geometric dimension of a -vass we mean the dimension of the vector space spanned by effects of all its simple cycles. In the sequel we most often consider -vass and -vass, but also geometrically 2-dimensional -vass, i.e., -vass of geometric dimension at most 2.
Two paths and can be concatenated (composed), written , if the target configuration of equals the source one of . As long as it does not lead to confusion, we adopt a convention that when concatenating paths , the latter path is silently moved so that its source matches the target of , under assumption that the source state of is the same as the target state of . For instance, we write to denote the -fold concatenation of a cycle , even if .
We use the following notation for measuring size of representation of a vass. By norm of a vector , denoted , we mean the sum of absolute values of all numbers appearing in it: ; and by norm of a set of vectors we mean the sum of norms of its elements: . By norm of a configuration , or of a transition , we mean the norm of its vector . By size of a vass , denoted , we mean the sum of norms of all its transitions, plus the number of transitions . The norm of a vass is the maximal norm of its transition.
We often implicitly extend a vass with source configuration , or with a pair of source and target configurations . Slightly overloading terminology, a pair and a triple we call a vass too. For convenience we overload further and put and . The reverse of a vass is defined as , where is obtained by reversing all transitions in : . Overloading the notation again, we put .
Given a vass together with an initial configuration , we write to denote the set of configurations such that has a path from to . For every state we write to denote the set of vectors such that . We write shortly and if the vass is clear from the context. If we say that is reachable from . If for some , we say that is coverable from .
We consider a variant of vass, called -vass, where the nonnegativeness constraint is dropped. Syntactically, -vass is the same as vass, namely consists of a finite set of states and a finite set of transitions . Semantically, configurations of a -vass are , while all definitions (path, reachability set, etc.) are the same as in case of vass. Equivalently, we may also speak of -configurations and -paths of a vass, i.e., configurations and paths where the nonnegativeness constraint is dropped. Note that every -path may be lifted to become a path , for some .
Sequential vass.
We define the state graph of a vass : nodes are states , and there is an edge if contains a transition for some . A vass is called strongly connected if its state graph is so. A vass is called sequential, if it can be partitioned into a number of strongly connected vass with pairwise disjoint state spaces, and transitions , for , where and (recall Figure 1). Thus and . We call a -component sequential vass, or -component vass in short, and write down succinctly as The vass are called components, and transitions bridges. By definition, a -component sequential vass is just a strongly connected vass.
Integer solutions of linear systems.
Lemma 4 ([5], Prop. 4).
Consider a system of Diophantine linear equations with unknowns, where absolute values of coefficients are bounded by . Every pointwise minimal nonnegative integer solution has norm at most .
Diagonal property.
We prove that if there is a path in a vass achieving a large value on every coordinate, then there is a path of bounded length that achieves simultaneously large values on all coordinates.222Lemma 5 is inspired by [19, Lemma 4.13], but the statement and the proof are different. We consider a general case of arbitrary dimension, as we believe it is of an independent interest, but in the sequel we will use it only for dimension .
Lemma 5.
For every there are nondecreasing polynomials such that for every -vass of norm , with states, and for every , if has a path from that for every contains a configuration with , then has also a path of length at most such that for every .
Length-bound on shortest path.
A function is called nondecreasing if for every , and for all . Functions used in the sequel are most often nondecreasing. We say that a class of vass or -vass is length-bounded by a non-decreasing function if for every in , if then for some path of length at most . A class which is length-bounded by some nondecreasing polynomial we call polynomially length-bounded. It is known that -vass have this property:
Lemma 6 ([1], Theorem 3.2).
-vass are polynomially length-bounded.333[1] adopts a slightly different, but equivalent up to a constant multiplicative factor, definition of norm and size.
As a corollary of Lemmas 6 and 4, respectively, we derive the property for geometrically 2-dimensional -vass (using [27, Lemma 5.1]) and --vass, respectively:
Lemma 7.
Geometrically 2-dimensional -vass are polynomially length-bounded.
Lemma 8.
--vass are polynomially length-bounded.
Lemma 2 states that there exists a constant such that for every , the -component -vass are length-bounded by the function . Therefore for every fixed , the -component -vass are polynomially length-bounded, even if the degree of polynomial grows doubly exponentially in .
3 Overview
In this section we present an overview of the proof of our main result, namely of Lemma 2. The proof proceeds by an induction on the number of components in a sequential -vass. The main idea is that either the situation is easy (a short path can be obtained by lifting up a -path) or the first component can be transformed into a finite union of essentially two-dimensional vass (more precisely, finite union of geometrically 2-dimensional -vass), each of size bounded polynomially. This transformation is shown in Lemma 28. The induction base is shown in Section 4. We present the proof of the one component case in detail, as it illustrates the main concepts of the proof of Lemma 28, but in a much simpler setting. When the first component is transformed into essentially a -vass, we can use the fact that reachability sets in -vass are semi-linear and the size of the semi-linear representation is at most exponential [2] (the result is true as well in geometrically 2-dimensional -vass). This fact can be exploited to reduce reachability for -component -vass to reachability for -component -vass of exponentially larger size, the details of this reduction are explained in Section 5 in the paragraph about the idea of the proof of Lemma 2. However, if we use semi-linear sets, the exponential blowup in unavoidable and this approach gives us a Tower algorithm resulting from a linear number of exponential blowups (thus not better than [11]). In order to improve the complexity we introduce a novel notion of suitable over- and under-approximations of semi-linear sets. One of our key technical contributions is Lemma 20 stating that reachability sets of -vass can be well approximated. Intuitively speaking, the precision of the approximation has to be good enough for correctness of the inductive proof; the better the precision, the bigger the representation of approximants gets. This approach allows us to reduce reachability for -component -vass to reachability in -component -vass of size which is not anymore exponential, but is polynomial in , where is the minimal length of a path in -component -vass. This means that bound on the minimal path length for -component -vass implies roughly a bound on the minimal path length for -component -vass. The transformation applied linear number of times results in triply-exponential upper bound for the minimal length of a path in -vass.
4 1-component -VASS are polynomially length-bounded
This section is devoted to the proof of the induction base for the proof of Lemma 2:
Lemma 9.
1-component -vass are polynomially length-bounded.
We also develop a framework to be exploited in the induction step in Section 6. We may safely restrict to -vass of geometric dimension 3, as otherwise Lemma 7 immediately implies Lemma 9.
Case distinction.
A -vass , where and , is forward-diagonal if in for some . Symmetrically, is backward-diagonal if is diagonal, i.e., if in for some . Finally, is diagonal if it is both forward- and backward-diagonal. Obviously, the vectors and need not be equal in general.
Let be the effects of simple cycles of . We define the (rational) open cone generated by this set to contain all positive rational combinations of vectors from :
is thus an open cone inside . A 1-component -vass is called wide if , i.e., if includes the whole positive orthant.
Let denote the set of lengths of paths in . We need to argue that there is a nondecreasing polynomial such that every 1-component -vass with a path , has such path of length at most , where . We split the proof into three cases:
-
1.
If is diagonal and wide, we exploit the fact that --vass are polynomially length-bounded, and use diagonality and wideness to lift a short -path into a path.
-
2.
If is diagonal but non-wide, we show that is length-equivalent to a geometrically 2-dimensional -vass of polynomially larger size, namely .
-
3.
Finally, if is non-diagonal, we show that is length-equivalent to a set of three geometrically 2-dimensional -vass , namely of polynomially larger size.
In the two latter cases we rely on the fact that geometrically 2-dimensional -vass are polynomially length-bounded (Lemma 7). In consequence, is to be the sum of polynomials claimed in the respective cases. In the sequel let be a fixed 1-component -vass with , where and .
Case 1. is diagonal and wide.
By diagonality, and for some .
Let be a nondecreasing polynomial witnessing Lemma 8, i.e., --vass are length-bounded by . As there is a path in , there is also a -path , and by Lemma 8 there is a -path of length at most . The maximal norm of -configurations along is thus bounded by , as every step may update counters by at most .
By diagonality, the configuration is coverable in from , and symmetrically the configuration is coverable in from . Due to the upper bound of Rackoff [24, Lemma 3.4], there is a nondecreasing polynomial such that in every -vass of size , the length of a covering path is at most . Therefore the lengths of both paths and in , where , may be assumed to be at most . We argue that there is a cycle from the source configuration that increases by some multiplicity of :
Lemma 10.
There is a path of length , for some .
Before proving the lemma we use it to complete Case 1. We build a path by concatenating paths given below. The first one is given by Lemma 10. Note that is necessarily also bounded by . We replace by its sufficiently large multiplicity to enforce , which makes the length of and only bounded by . The multiplicity guarantees that the -path lifted by , becomes a path:
The length of is bounded by . Finally, let be the -fold concatenation of the cycle :
The length of this path is bounded by . We concatenate the three paths, , to get a required path
of length bounded by . It thus remains to prove Lemma 10 in order to complete Case 1.
Proof of Lemma 10.
Let be a cycle that visits all states (it exists since the considered vass is strongly connected), and let be its effect. Relying on , take a sufficiently large multiplicity so that is a path with nonnegative effect. The path is a cycle and its effect is .
As , there is such that , and hence, by wideness of , we have , namely
for some positive rationals . By Carathéodory’s Theorem [26, p.94], is a combination of some vectors among , say :
for some positive rationals . Therefore, the system of equations
with unknowns , has a positive integer solution. We rewrite the system to:
(2) |
Let be simple cycle of effect , for . Let be a -path that starts (and ends) in state and consists of -fold concatenation of the cycle , with attached -fold concatenation of , -fold concatenation of , and -fold concatenation of (since visits all states, this is possible). The effect of is the right-hand side of (2), and therefore is a -path from to :
It need not be a path in general, and therefore we are going to lift it. Let be a multiplicity large enough so that becomes a path when lifted by , i.e., when starting in , and also becomes a path when lifted by , i.e., when ending in . In this case, the -fold concatenation of is also a path:
(3) |
since all points visited in the inner iterations of are bounded from both sides by corresponding points visited in the first and the last iteration of . Precomposing this path with yields a path , as required.
We now (roughly) bound the magnitudes of all items involved in the above reasoning by a constant power of . W.l.o.g. we may assume that the cycle uses every transition at most times, and thus both the length and norm of the effect of are bounded by . In consequence, may decrease counters by at most . Therefore , and norms of vectors are all bounded by . The effects of simple cycles are at most , as no transition repeats along a simple cycle. Therefore by Lemma 4, the system (2) has a solution of norm at most , and has length at most (since has length at most ). Therefore we deduce , and hence the path (3) has length at most . In consequence of the above bounds, , and the final path has length at most .
Case 2. is non-wide.
Every non-zero vector defines an open half-space
where stands for the inner product of and . As is assumed to be of geometric dimension 3, is an intersection of open half-spaces:
Claim 11.
is an intersection of finitely many open half-spaces , with .
Proof.
Norms of vectors generating – i.e., effects of simple cycles – are at most , as no transition repeats along a simple cycle. Consider vectors orthogonal to some of the facets of , i.e., orthogonal to two of the vectors generating . The vector is thus an integer solution of a system of 2 linear equations with 3 unknowns, where absolute values of coefficients are bounded by . By Lemma 4, there is such an integer solution with . This completes the proof.
As is non-wide, due to Claim 11 we know that is a non-empty intersection of half-spaces . Therefore for some of these we have , i.e., all points have positive inner product . This implies that the value of inner product with may not decrease along any cycle in :
Claim 12.
The effect of every simple cycle has nonnegative inner product .
In consequence, on every path the value of inner product with is polynomially bounded:
Claim 13.
Every configuration on a path from to satisfies , where .
Proof.
Let and , and let and . Every path may be decomposed into simple cycles, whose effect may only preserve or increase the inner product with , plus a short path without cycles, and hence without repetitions of a transitions. The effect of the latter path is thus in . Therefore, as inner product may at most multiply norms, every configuration on a path from to satisfies . Knowing that , , and that inner product may at most multiply norms, by Claim 11 we deduce
and therefore , which implies the claim.
We define a geometrically 2-dimensional -vass by extending states with the possible values of inner product with (bounded polynomially by Claim 13). We call the (, )-trim of . The set of states contains states of the form , where and , with the intention that every configuration of has a corresponding configuration in , where . Therefore, for each transition and for all such that , we add to the transition
(4) |
Claim 14.
is a geometrically 2-dimensional -vass.
Proof.
By construction, the effect of each cycle in is orthogonal to , and therefore is included in a -dimensional vector space. Relying on Claim 13, paths in have corresponding paths in , and hence we get:
Claim 15.
.
Finally, we argue that the size of is bounded polynomially with respect to the size of :
Claim 16.
Proof.
Recalling Claims 11 and 13, namely , , we deduce that transitions (4) contribute at most to the size of . We are now prepared to complete Case 2. Let be the polynomial witnessing Lemma 7, i.e., geometrically 2-dimensional -vass are length-bounded by . As has a path , By Claim 15, has a path . By Lemma 7, has thus a path of length at most , i.e., relying on Claim 16, of length at most . By Claim 15 again, we get a path in of length . This completes Case 2.
Case 3. is non-diagonal.
W.l.o.g. assume that is not forward-diagonal (otherwise replace by ). Therefore for all states the configuration is not coverable from . Indeed, using strong-connectedness of , if were coverable from then the configuration would be coverable form , by extending the covering path of with an arbitrary shortest path back to state (that cannot decrease a counter by more than ), which would contradict forward non-diagonality.
By Lemma 5, in every path from , some coordinate is bounded by (we take as an upper bound for and , relying on being nondecreasing, and take ). This property allows us, intuitively speaking, to describe all the paths of by paths of three geometrically 2-dimensional -vass , for , where behaves exactly like except that dimension is additionally kept in state. Formally, let , where
The source and target configurations in are and , and there is a tight correspondence between paths in and paths in :
Claim 17.
.
The size of each of is bounded polynomially with respect to the size of :
Claim 18.
The size of each of is at most .
5 Polynomially approximable reachability sets
In this section we introduce the crucial concept of polynomially approximable sets. In order to motivate it, we start by sketching the overall idea of the proof of Lemma 2 (given in Section 6).
Given a finite set and , we set:
Sets of the form , for and finite , are called linear, and finite unions of linear sets are called semi-linear.
Idea of the proof of Lemma 2.
Let be a -component -vass that has a path . If is diagonal and wide, we use the pumping cycles in and in to lift a -path , polynomially length-bounded due to Lemma 8, until it becomes a path (as in Case 1 in the proof of Lemma 9).
On the other hand, if is non-diagonal or non-wide, our strategy is to reduce the number of components by 1, and to rely on the induction assumption for , by replacing the first component by one of finitely many geometrically 2-dimensional -vass (as in Cases 2 and 3 of the proof of Lemma 9). Relying on the fact that the reachability sets in a geometrically 2-dimensional -vass are semi-linear [11], the proof could go as follows (yielding however only the already known Tower upper bound [11]). Using any of the linear sets describing the set , where is the source state of the second component , transform into a -component -vass by dropping the first component and the first bridge , and by adding to the remaining -component -vass the self-looping transitions one for every period . The source configuration of is , i.e., its vector is the base of . The transformation preserves behaviour of . In one direction, a path in crossing through for some has a corresponding path in . Conversely, each path in gives rise to a path in , by replacing executions of the self-looping transitions (w.l.o.g. executed in the beginning), by a path in , bounded polynomially due to Lemma 9. However, may blow-up exponentially with respect to , as bases and periods of are only bounded exponentially, and therefore this approach could only yield a -fold exponential bound on the length of the shortest path in -component -vass.
Polynomially approximable sets are designed as a remedy against the -fold exponential blowup. The idea is to measure the norms of base and periods of a semi-linear set parametrically with respect to, intuitively speaking, the prospective length of a path in . This allows us to control the blow-up of size of , also parametrically with , but requires going outside of semi-linear sets and considering their -approximations, namely sets sandwiched between and , good enough for correctness of the above-described transformation of to . As the outcome, the exponent of our bound on length of the shortest path in -component -vass is, roughly speaking, square of the exponent of the respective bound in -component -vass. For -component -vass this yields exponent doubly-exponential in , and hence the bound triply-exponential in . The rigorous reasoning is given in the proof of Lemma 25 in Section 6.
Polynomially approximable sets.
Let . By a -approximation of a linear set we mean any set satisfying A set is (, )-approximately semi-linear if it is a finite union of:
-
linear sets with and ; and
-
-approximations of linear sets with and .
Thus either includes -approximation of a linear set , whose norm of base is bounded by , or includes a whole linear set , whose norm of base is only bounded by . In both cases, norms of periods are bounded by .
We say that a class of -vass is -approximable for a function , if for every vass in , its state , and , the set is (, )-approximately semi-linear, where . The class is polynomially approximable if it is -approximable, for some nondecreasing polynomial .
Example 19.
For , let be a -component -vass, where each component has just one state and one transition: for odd , and for even . Bridge transitions are . Figure 2 shows (left) and a path in from to together with the reachability set (middle). In general,
(5) |
Even if the size of the reachability set is exponential in , for small it is periodic and the periods are small. The set can be over-approximated by for and (shown on the right of Figure 2), namely for every and , the set is (, )-approximately semi-linear. For illustration, consider . If then is a -approximation of with . Otherwise, there is some , and then is larger than :
Therefore by (5), each satisfies , and thus , seen as a union of singletons, is a union of linear sets with norm of base bounded by and empty set of periods. In both cases, is (, )-approximately semi-linear.
In our subsequent reasoning we rely on the core technical fact:
Lemma 20.
-vass are polynomially approximable.
We sketch here the intuition behind Lemma 20, since it is one of our main technical contributions. We first show that it is enough to show Lemma 20 for a simple class of -vass, called 2-slps, which are of the form , where are fixed sequences of transitions and the loops are single transitions. This reduction uses standard techniques, namely Theorem 1 in [2] stating that the reachability relation of a -vass can be expressed as a union of reachability relations of a 2-lps (2-lps are 2-slps without the assumption that are single transitions) and Theorem 15 in [10] providing the reduction from 2-lps to 2-slps. Next, we simplify the 2-slps even more, using Theorem 4.16 in [4], which states that any two vectors reachable by an 2-slps can be reached also by a path of the 2-slps of a special form: except a short prefix and suffix it zigzags all the time between configurations close to vertical axis to configurations close to horizontal axis. Thus, to prove Lemma 20 it essentially remains to show polynomial approximability for zigzagging paths. To achieve that, we roughly speaking investigate how application of two consecutive loops and affects the set of reachable configurations on some vertical line close to the vertical axis. We show that arithmetic sequence is transformed into a finite union of arithmetic sequences such that the difference is kept at most polynomial in size of the 2-slps and the first term grows additively by at most a polynomial value. All that allows us to conclude that the set of vectors reachable by zigzagging paths is a union of sets of a form similar to for some , , and . This quite easily implies polynomial approximability.
In the proof of Lemma 2 we actually need polynomial approximability not only for -vass, but also for its generalisation, geometrically 2-dimensional -vass. It is stated below and shown in the Appendix using Lemma 20.
Lemma 21.
Geometrically 2-dimensional -vass are polynomially approximable.
6 Proof of Lemma 2
In this section we prove Lemma 2, by induction on . The base of induction, when , follows by Lemma 9: 1-component -vass are polynomially length-bounded. Before engaging in the induction step we need to generalise wideness, defined up to now for 1-component -vass only, to all sequential -vass.
Sequential cones.
Consider a -component -vass . By a cascade we mean a tuple of vectors such that the partial sum for every . Then the sequential cone of , denoted , is the set of sums of all cascades whose every th vector belongs to :
Claim 22.
If is 3-dimensional then is a finitely generated open cone.
We prove the fundamental property: all reachable configurations are at close distance to the sequential cones. We focus on -vass, but actually the same proof works for vass in any other fixed dimension. Below, let denote Euclidean distance between and , and let denote the distance between and a set , that is .
Lemma 23.
There exists a nondecreasing polynomial such that each reachable configuration in a forward-diagonal sequential -vass , satisfies .
Proof.
Let be a -component sequential -vass, and . Let and suppose . W.l.o.g. we assume that is in the last component ; indeed, if is in for some , we prove that claim for and rely on the inclusion . Our aim is to define a polynomial and a point such that . The path decomposes into where are bridge transitions. Let be the source state of and be the target state of . Let be a shortest path from to (there is such a path because they are in the same strongly connected component ). Let be the effect of , which is a cycle in .
As is an open cone, we are not guaranteed that . In order to ensure this property, we add to some small multiples of all the simple cycles in . For each , let be the sum of effects of all simple cycles in and let be a small positive rational such that for all we have . Then .
By forward-diagonality, the configuration is coverable in from . Due to the upper bound of Rackoff [24, Lemma 3.4], instantiated to the fixed dimension 3, for some nondecreasing polynomial the length of such a covering path , and the norm of , are both at most . For some , the vector belongs to and the -tuple
(6) |
is a cascade. Therefore the sum . We argue that is is enough to use polynomially bounded value of . Since starts in , each its prefix can drop by at most on any coordinate. Thus, for each we have . As are single transitions, we also have . In consequence, . Moreover, the sum of norms of effects of all the paths is at most , which implies that . Finally, for each we have . Therefore, setting guarantees that the tuple (6) is a cascade.
Let , and . We have , and . Therefore satisfies , and we get the bound
that implies , and hence as required. We say that a -component -vass is wide if or . For , the definition relaxes the definition of Section 4.
Proof of Lemma 2.
Lemma 26, formulated below, is a refinement of Lemma 2 suitable for inductive reasoning. When proving the lemma, we distinguish 2 cases, depending on whether a -vass is diagonal and wide (we call the -vass easy in this case), or not (we call it non-easy then), and rely on the following two facts:
Lemma 24.
Easy sequential -vass are length-bounded by , where is the number of components.
Lemma 25.
There is a nondecreasing polynomial such that for every , if -component -vass are length-bounded by a function then non-easy -component -vass are length-bounded by the function .
For stating Lemma 26, we define inductively a sequence of polynomials , where is the polynomial witnessing Lemma 9 (thus 1-component -vass are length-bounded by ), and
W.l.o.g. we also assume that dominates the polynomial of Lemma 24, namely for every .
Lemma 26.
For every , -component -vass are length-bounded by .
Proof.
The induction base is given by Lemma 9. For the induction step, suppose -component -vass are length-bounded by . Easy -component -vass are length-bounded by due to Lemma 24 and the above-assumed domination, without referring to induction assumption, while non-easy -component -vass are length-bounded by due to Lemma 25. Let be large enough so that for every , and let .
Claim 27.
for all .
Lemma 26 implies Lemma 2, as the right-hand side of the inequality in Claim 27 is bounded by . Lemma 2 is thus proved (once we prove Lemmas 24 and 25).
The proof of Lemma 24 generalises Case 1 of the proof of Lemma 9. The proof of Lemma 25 makes crucial use of polynomially approximable sets introduced in Section 5, and builds on Lemma 28, stated below, whose proof generalises Cases 2 and 3 of the proof of Lemma 9.
For stating and proving Lemma 28 we need a variant of sequential -vass: a good-for-induction -component -vass is defined exactly like -component sequential -vass, except that the first component is an arbitrary geometrically 2-dimensional -vass, not necessarily being strongly connected.
Lemma 28.
There is a nondecreasing polynomial such that every non-easy -component -vass is length-equivalent to a finite set of good-for-induction -component -vass of size at most , namely .
Proof of Lemma 25.
Relying on Lemma 28, assume w.l.o.g. that is a good-for-induction -component -vass of size , where is a polynomial of Lemma 28. Let , , in and in . Let be a nondecreasing polynomial witnessing Lemma 21, and let . Let be a nondecreasing polynomial witnessing Lemma 7, and let .
Let , namely the length-bound for -component vass of size . Assuming in , we aim at proving that there is such a path of length at most . Decompose the path into
(7) |
where is the first configuration of appearing on . As is a geometrically 2-dimensional -vass, so is the lollypop -vass obtained by adding to the first bridge transition (indeed, adding a bridge transition does not create any new cycles). As and is the polynomial witnessing Lemma 21, by Lemma 21 we get:
Claim 29.
The set is (, )-approximately semi-linear.
Thus , where is a linear set () or a -approximation thereof (). In both cases , for . We construct a -component -vass as follows. is obtained from by adding, for every period vector , a self-looping transition to . As the source configuration we take , and keep as the target configuration.
As is nondecreasing, and we have . As is obtained from of by removing from the part , adding transitions of total norm at most equal and setting therefore we estimate as Recall that in the case when is a linear set () we have , , while in the case when is a -approximation () we have , in our case . Thus the estimations look as follows:
as was defined exactly as . Note that the latter bound is dominated by the former one, thus in both cases .
There is a path in , namely the concatenation of a path using the just added self-looping transition in the state , with the suffix of (7):
By induction assumption, there is a path in of length at most
W.l.o.g. we may assume that the path executes all just added self-looping transitions in the beginning, and therefore it splits into:
such that the suffix is actually a path in . Since the length of the prefix is at most , we bound . If is a linear set, the following claim is obvious since . On the other hand, the claim requires a proof in case when is a -approximation of a linear set:
Claim 30 ().
There is a path in the lollypop -vass .
Indeed, since the length of the path in is at most and , we deduce that , and therefore in .
By Lemma 7, there is a path in of length at most . Concatenating the two paths and we get a path
in , of length at most Taking , the sum of polynomials and , we get the bound , as required.
7 Future research
Below we list a few research questions, which we find interesting and particularly promising directions after our contribution.
Exact complexity for -VASS.
We have shown that shortest paths in binary -VASS are of at most triply-exponential length. It is tempting to conjecture that actually the upper bound for the length of the paths is shorter, at most doubly-exponential. We conjecture that it is possible with techniques similar to the developed ones, but with more focus on polynomials growing linearly with respect to norms of source and target. We leave proving this conjecture to the future research.
Example of a -VASS with doubly-exponential path.
We have shown that shortest paths in binary -VASS are of at most triple-exponential length. However, currently we still do not know any example in which even a path of doubly-exponential length is needed, it might be that paths of exponential length are sufficient leading to PSpace-completeness for binary -VASS. It would be very interesting to find an example of a binary -VASS with shortest path between two configurations being doubly exponential. An example of binary -VASS of doubly-exponential shortest path is known (see Section 5 in [7]). Maybe some modification of this -VASS would allow to design a -VASS with similar properties.
Reachability for -VASS with .
It is a natural question whether our techniques extend to higher dimensions. The answer is: possibly yes, but we would need a few other structural results for -VASS to make a similar approach to -VASS possible. In the proof of Lemma 2 we do not only use -VASS reachability as a black box, but we use a deep understanding of the reachability relation in -VASS from [4]. Probably a similar understanding of the reachability relation for -VASS would be needed to advance understanding of -VASS along our lines.
In general it is very interesting to determine the complexity of the reachability problem for -VASS. We have excluded that for each the problem is -completely, but it is still possible that the problem is -complete for some constant and big enough. Recall that in [6] it was shown that the reachability problem for -VASS is -hard for any and this is the best currently known lower bound for arbitrary dimension. Therefore the other natural possibility is that the reachability problem for -VASS is -complete for some constant .
Applications of the approximation technique.
Another natural research direction is to search for other applications of the technique of approximating the reachability sets, which allows to lower the complexity down, below the size of the reachability set. One particular case, which seems to be prone to such techniques is the -VASS with some number of -counters, namely counters, which can take values below zero. The best complexity lower bound for the reachability problem in this model is PSpace-hardness inherited from [2], while the best upper bound is Ackermann membership inherited from VASS reachability [19]. The reachability sets for that systems are not necessarily semilinear. This disqualifies most of the techniques relying on the semilinearity of reachability sets, but our techniques seem to be promising for that model.
References
- [1] Michael Blondin, Matthias Englert, Alain Finkel, Stefan Göller, Christoph Haase, Ranko Lazic, Pierre McKenzie, and Patrick Totzke. The Reachability Problem for Two-Dimensional Vector Addition Systems with States. J. ACM, 68(5):34:1–34:43, 2021. doi:10.1145/3464794.
- [2] Michael Blondin, Alain Finkel, Stefan Göller, Christoph Haase, and Pierre McKenzie. Reachability in Two-Dimensional Vector Addition Systems with States Is PSPACE-Complete. In Proceedings of LICS 2015, pages 32–43. IEEE Computer Society, 2015. doi:10.1109/LICS.2015.14.
- [3] Dmitry Chistikov, Wojciech Czerwiński, Piotr Hofman, Michal Pilipczuk, and Michael Wehar. Shortest paths in one-counter systems. Log. Methods Comput. Sci., 15(1), 2019. doi:10.23638/LMCS-15(1:19)2019.
- [4] Dmitry Chistikov, Wojciech Czerwinski, Filip Mazowiecki, Lukasz Orlikowski, Henry Sinclair-Banks, and Karol Wegrzycki. The tractability border of reachability in simple vector addition systems with states. In Proceedings of FOCS 2024, pages 1332–1354. IEEE, 2024. doi:10.1109/FOCS61266.2024.00086.
- [5] Dmitry Chistikov and Christoph Haase. The Taming of the Semi-Linear Set. In Proceedings of ICALP 2016, volume 55 of LIPIcs, pages 128:1–128:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016. doi:10.4230/LIPICS.ICALP.2016.128.
- [6] Wojciech Czerwiński, Ismaël Jecker, Sławomir Lasota, Jérôme Leroux, and Lukasz Orlikowski. New Lower Bounds for Reachability in Vector Addition Systems. In Proceedings of FSTTCS 2023, volume 284 of LIPIcs, pages 35:1–35:22, 2023. doi:10.4230/LIPICS.FSTTCS.2023.35.
- [7] Wojciech Czerwiński, Sławomir Lasota, Ranko Lazic, Jérôme Leroux, and Filip Mazowiecki. Reachability in fixed dimension vector addition systems with states. In Proceedings of CONCUR 2020, pages 48:1–48:21, 2020.
- [8] Wojciech Czerwiński, Sławomir Lasota, Ranko Lazic, Jérôme Leroux, and Filip Mazowiecki. The Reachability Problem for Petri Nets Is Not Elementary. J. ACM, 68(1):7:1–7:28, 2021. doi:10.1145/3422822.
- [9] Wojciech Czerwiński and Lukasz Orlikowski. Reachability in Vector Addition Systems is Ackermann-complete. In Proceedings of FOCS 2021, pages 1229–1240. IEEE, 2021. doi:10.1109/FOCS52979.2021.00120.
- [10] Matthias Englert, Ranko Lazic, and Patrick Totzke. Reachability in Two-Dimensional Unary Vector Addition Systems with States is NL-Complete. In Proceedings of LICS 2016, pages 477–484, 2016. doi:10.1145/2933575.2933577.
- [11] Yuxi Fu, Qizhe Yang, and Yangluo Zheng. Improved Algorithm for Reachability in d-VASS. In Proceedings of ICALP 2024, volume 297 of LIPIcs, pages 136:1–136:18, 2024. doi:10.4230/LIPICS.ICALP.2024.136.
- [12] Christoph Haase, Stephan Kreutzer, Joël Ouaknine, and James Worrell. Reachability in Succinct and Parametric One-Counter Automata. In Proceedings of CONCUR 2009, pages 369–383, 2009. doi:10.1007/978-3-642-04081-8_25.
- [13] John E. Hopcroft and Jean-Jacques Pansiot. On the reachability problem for 5-dimensional vector addition systems. Theor. Comput. Sci., 8:135–159, 1979. doi:10.1016/0304-3975(79)90041-0.
- [14] Rodney R. Howell, Louis E. Rosier, Dung T. Huynh, and Hsu-Chun Yen. Some Complexity Bounds for Problems Concerning Finite and 2-Dimensional Vector Addition Systems with States. Theor. Comput. Sci., 46(3):107–140, 1986. doi:10.1016/0304-3975(86)90026-5.
- [15] S. Rao Kosaraju. Decidability of reachability in vector addition systems (preliminary version). In Proceedings of STOC 1982, pages 267–281, 1982. doi:10.1145/800070.802201.
- [16] Jean-Luc Lambert. A structure to decide reachability in Petri nets. Theor. Comput. Sci., 99(1):79–104, 1992. doi:10.1016/0304-3975(92)90173-D.
- [17] Jérôme Leroux. The Reachability Problem for Petri Nets is Not Primitive Recursive. In Proceedings of FOCS 2021, pages 1241–1252. IEEE, 2021. doi:10.1109/FOCS52979.2021.00121.
- [18] Jérôme Leroux and Sylvain Schmitz. Demystifying Reachability in Vector Addition Systems. In Proceedings of LICS 2015, pages 56–67. IEEE Computer Society, 2015. doi:10.1109/LICS.2015.16.
- [19] Jérôme Leroux and Sylvain Schmitz. Reachability in Vector Addition Systems is Primitive-Recursive in Fixed Dimension. In Proceedings of LICS 2019, pages 1–13. IEEE, 2019. doi:10.1109/LICS.2019.8785796.
- [20] Jérôme Leroux and Grégoire Sutre. On Flatness for 2-Dimensional Vector Addition Systems with States. In Proceedings of CONCUR 2004, volume 3170 of Lecture Notes in Computer Science, pages 402–416, 2004. doi:10.1007/978-3-540-28644-8_26.
- [21] Richard J. Lipton. The reachability problem requires exponential space. Technical report, Yale University, 1976.
- [22] Ernst W. Mayr. An Algorithm for the General Petri Net Reachability Problem. In Proceedings of STOC 1981, pages 238–246, 1981. doi:10.1145/800076.802477.
- [23] Loïc Pottier. Minimal Solutions of Linear Diophantine Systems: Bounds and Algorithms. In Rewriting Techniques and Applications, 4th International Conference, RTA-91, Como, Italy, April 10-12, 1991, Proceedings, volume 488 of Lecture Notes in Computer Science, pages 162–173. Springer, 1991. doi:10.1007/3-540-53904-2_94.
- [24] Charles Rackoff. The covering and boundedness problems for vector addition systems. Theor. Comput. Sci., 6:223–231, 1978. doi:10.1016/0304-3975(78)90036-1.
- [25] Sylvain Schmitz. Complexity hierarchies beyond elementary. ACM Trans. Comput. Theory, 8(1):3:1–3:36, 2016. doi:10.1145/2858784.
- [26] Alexander Schrijver. Theory of linear and integer programming. Wiley-Interscience series in discrete mathematics and optimization. Wiley, 1999.
- [27] Yangluo Zheng. Reachability in vector addition system with states parameterized by geometric dimension, 2024. doi:10.48550/arXiv.2412.14608.