Coverability in 1-VASS with Disequality Tests
Shaull Almagor, Nathann Cohen, Guillermo A. P\'erez, Mahsa, Shirmohammadi, James Worrell

TL;DR
This paper investigates the coverability problem in 1-dimensional VASS with disequality tests, showing it is solvable in polynomial time, extending previous results on reachability in weighted graphs.
Contribution
It generalizes the control-state reachability problem to include disequality constraints, proving polynomial-time solvability for 1-VASS with these tests.
Findings
Coverability in 1-VASS with disequality tests is in P.
The problem remains solvable despite exponential shortest paths.
The work extends known complexity results for VASS reachability.
Abstract
We study a class of reachability problems in weighted graphs with constraints on the accumulated weight of paths. The problems we study can equivalently be formulated in the model of vector addition systems with states (VASS). We consider a version of the vertex-to-vertex reachability problem in which the accumulated weight of a path is required always to be non-negative. This is equivalent to the so-called control-state reachability problem (also called the coverability problem) for 1-dimensional VASS. We show that this problem lies in NC: the class of problems solvable in polylogarithmic parallel time. In our main result we generalise the problem to allow disequality constraints on edges (i.e., we allow edges to be disabled if the accumulated weight is equal to a specific value). We show that in this case the vertex-to-vertex reachability problem is solvable in polynomial time even…
Click any figure to enlarge with its caption.
Figure 1Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Technion, Israel0000-0001-9021-1175has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 837327. CNRS & LRI, France University of Antwerp, Belgium0000-0002-1200-4952 CNRS & IRIF, Université de Paris, France University of Oxford, UKSupported by EPSRC Fellowship EP/N008197/1.
\CopyrightShaull Almagor, Nathann Cohen, Guillermo A. Pérez, Mahsa Shirmohammadi, James Worrell \ccsdesc[500]Theory of computation Models of computation
Acknowledgements.
We thank P. Offtermatt for pointing us to literature on NC-algorithms.\hideLIPIcs\EventEditorsJohn Q. Open and Joan R. Access \EventNoEds2 \EventLongTitle42nd Conference on Very Important Topics (CVIT 2016) \EventShortTitleCVIT 2016 \EventAcronymCVIT \EventYear2016 \EventDateDecember 24–27, 2016 \EventLocationLittle Whinging, United Kingdom \EventLogo \SeriesVolume42 \ArticleNo23
Coverability in 1-VASS with Disequality Tests
Shaull Almagor
Nathann Cohen
Guillermo A. Pérez
Mahsa Shirmohammadi
James Worrell
Abstract
We study a class of reachability problems in weighted graphs with constraints on the accumulated weight of paths. The problems we study can equivalently be formulated in the model of vector addition systems with states (VASS). We consider a version of the vertex-to-vertex reachability problem in which the accumulated weight of a path is required always to be non-negative. This is equivalent to the so-called control-state reachability problem (also called the coverability problem) for 1-dimensional VASS. We show that this problem lies in \NC: the class of problems solvable in polylogarithmic parallel time. In our main result we generalise the problem to allow disequality constraints on edges (i.e., we allow edges to be disabled if the accumulated weight is equal to a specific value). We show that in this case the vertex-to-vertex reachability problem is solvable in polynomial time even though a shortest path may have exponential length. In the language of VASS this means that control-state reachability is in polynomial time for 1-dimensional VASS with disequality tests.
keywords:
Reachability, Vector addition systems with states, Weighted graphs
1 Introduction
In this paper we study reachability problems in weighted graphs with constraints on the accumulated weight along a path. We show that the vertex-to-vertex reachability problem is in \NC if the constraint is that the accumulated weight must always be non-negative, and the problem is in polynomial time if we additonally allow disequality constraints on edges (i.e., constraints that prevent an edge from being taken in a path if the accumulated weight prior to taking the edge is equal to a specific value). In both cases a shortest path satisfying the constraints may have length exponential in the problem description. Several related problems have been studied in the literature, including the problem of finding a path from a source vertex to target vertex that has a specific total weight [12].
The problems we study can naturally be formalised as reachability problems for types of one-counter machines, and the majority of the related work has been presented in this context. Under this correspondence, the value of the counter represents the accumulated weight along a path, and tests on the counter encode constraints on allowable paths. Algorithmic properties of one-counter machines have been studied by many authors over several decades [2, 4, 6, 7, 8, 9, 10, 11]. The above references are a small subset of the extensive literature on one-counter machines, but they well illustrate that there are many variations on the basic model and that these variations can lead to the model having substantially different algorithmic properties. Particular features mentioned in the references above, driven by applications to automated verification and program analysis, include equality tests, disequality tests, inequality tests, parametric tests, binary updates, polynomial updates, and parametric updates.
Analysing the complexity of reachability in the presence of the features listed above leads to a rich complexity landscape. It is shown in [11] that control-state reachability is decidable in \NL for a “plain vanilla” model of one-counters machine—namely with a counter taking values in the nonnegative integers with operations increment, decrement, and zero testing. Thinking of one-counter machines as one-dimensional vector addition systems with states (1-VASS), it is natural to allow the counter to be updated by adding integer constants in binary. In this case, still with equality tests, control-state reachability becomes \NP-complete [10]. The \NP upper bound here is non-trivial since, due to the binary encoding of integers, a computation that reaches the goal state may have length exponential in the size of the machine. If one enriches the model further by introducing inequality tests (comparing the counter with an integer constant) then control-state reachability becomes \PSPACE-complete [7]. A model of intermediate complexity is one with equality and disequality tests (introduced in [6], with applications to temporal-logic model checking). In this case the complexity of control-state reachability is open (between \NP and \PSPACE).
In this paper we consider 1-VASS with disequality tests, but no equality tests. In terms of 1-VASS, our main result states that the control-state reachability problem is solvable in polynomial time for 1-VASS with disequality tests. This result confirms the intuition that disequality tests are weaker than equality tests. The main technical challenge to obtaining a polynomial-time bound is that a run witnessing that a given control state is reachable may have length exponential in the description of the counter machine. A standard way to overcome this obstacle in related settings is to show that one may restrict attention to computations that fit a regular pattern (usually in terms of iterating a “small” number of cycles). Here the presence of disequality tests proves to be surprisingly disruptive: it destroys the monotonicity of the transition relation and prevents from freely iterating positive-weight cycles. (For example, the lack of monotonicity means that it is \coNP hard to determine whether, given a control state , for all counter values the configuration is unbounded, i.e., can reach infinitely many configurations—see Figure 1—whereas the same problem for 1-VASS without tests is easily seen to be decidable in polynomial time.) Resolving the complexity of reachability for 1-VASS with both equality and disequality tests remains open. We hope that the techniques developed here can help solve this challenging problem.
To complement our main result, we show that for 1-VASS without tests control-state reachability (and hence also boundedness) is decidable in \NC, i.e., the subclass of ¶ consisting of problems solvable in polylogarithmic parallel time. Problems in \NC are in particular solvable in polylogarithmic space. Related to this, Rosier and Yen [16] have shown that boundedness for VASS is \NL-complete in case there are absolute bounds on the dimension and bit-size of integer vectors.
2 Definitions
We write to denote the set of all nonnegative integers In presenting our results we assume familiarity of the reader with basic graph theory and computational complexity.
One-Dimensional Vector Addition Systems with States and Tests.
A 1-VASS with disequality tests is a tuple , where is a set of states, is a collection of cofinite subsets , is a set of transitions, and is a function that assigns an integer weight to each transition. In the special case that each equals , we simply call a 1-VASS (and we omit the collection ).
A configuration of is a pair comprising a state and a nonnegative integer referred to as the counter value. We write for the set of all configurations. We define a partial order on by if and only if and . A configuration is valid if .
A path in is a sequence of states such that for all . We sometimes refer to such a path as a - path. Let be another path such that , we define . Given states , a set of - paths, and a set of - paths, we define . The weight of is defined to be . A (possibly empty) prefix of is said to be minimal if it has minimal weight among all prefixes of . Define to be the weight of a minimal prefix of .
A run is a sequence of configurations of such that there is a path with for . We write to denote such a run. Observe that runs are not allowed to reach negative counter values. A valid run is a run whose configurations are all valid. Intuitively, a valid run through can proceed if and only if the current counter value is in . We say that a configuration is reachable from if there is a valid run such that .
In computational problems all numbers in the description of are given in binary. Given a state we represent the cofinite set as the complement of an explicitly given subset of . Given this convention, we can assume without loss of generality that for all states the set is either or for some ; see Appendix B. For states with , we refer to the single missing value in the domain as the disequality guard on .
The Coverability and Unboundedness Problems.
Let be a 1-VASS with disequality tests, and let and be two distinguished states of . The Coverability Problem asks whether there exists a valid run in from to for some (in which case we say that can cover ). The Unboundedness Problem asks whether the set of configurations reachable from is infinite (in which case we say that is unbounded).
The Coverability problem reduces to the Unboundedness problem by, intuitively, forcing to be unbounded using a positive cycle, and removing all states that cannot reach in the underlying graph of . In fact, the following holds.
Lemma 2.1**.**
There is an -computable many-one reduction from the Coverability Problem to the Unboundedness Problem.
Henceforth, we focus on the complexity of deciding the Unboundedness Problem. In Section 3 we prove that the Unboundedness Problem for 1-VASS with disequality tests is decidable in polynomial time. Since , by Lemma 2.1 we also have that the Coverability Problem in this setting is decidable in polynomial time. In Section 4 we prove that the Unboundedness Problem for 1-VASS (without disequality tests) is in , and we deduce that the Coverability Problem for 1-VASS is decidable in .
3 Unboundedness for 1-VASS with Disequality Tests
Fix a -VASS with disequality tests and a distinguished state . We are interested in determining whether the configuration is unbounded.
For a (possibly infinite) path , denote by the set of such that the unique induced run from either contains a negative counter value or violates a disequality guard. That is, does not lift to a valid run from the configuration .
Example 3.1**.**
In Figure 2, since is the guard on the run is not valid and . Observe that and .
Recall that for a path , is the weight of a minimum-weight prefix of . Let be the set of states such that there is a positive-weight simple cycle on in the underlying graph of . For we pick a simple cycle such that for any other positive-weight simple cycle on ; write for .111Note that does not necessarily have maximal weight among the positive simple cycles on . Define .
Define a path to be primitive if no proper infix is a positive cycle (note though that a primitive path may itself be a positive cycle). We say that a run is primitive if the underlying path is primitive. Observe that if is a valid run, none of whose internal configurations (i.e. excluding the first and last configurations) lies in , then is primitive.
Example 3.2**.**
In Figure 2, for we pick the simple cycle with . Since , we have that . Moreover, the path is primitive, but is not primitive.
Proposition 3.3**.**
A configuration is unbounded if, and only if, can reach an unbounded configuration in .
In order to decide whether is unbounded, by Proposition 3.3, it suffices to compute the set of unbounded configurations in and determine whether can reach this set. Define to be the set of all unbounded configurations in . Observe that every configuration with can take the cycle arbitrarily many times and is thus included in . However, even if , it may still be the case that is unbounded, by traversing more complicated paths.
Example 3.4**.**
In Figure 2, all configurations with in are trivially unbounded and thus included in . It will transpire that even though .
In order to reason about the aforementioned complicated paths, we proceed as follows. In Section 3.1 we introduce residue classes and chains, which form a partition of , and are the building blocks of our analysis. In Section 3.2 we characterize as the limit of an inductive construction. This enables us to reason about the structure of in Section 3.3. Finally, in Section 3.4 we show how to compute and decide unboundedness.
3.1 Residue Classes and Chains
Given and , we call the set of configurations a -residue class. We simply speak of a residue class if we do not want to specify the state . Given a -residue class , a set is called a -chain if it is a maximal subset of for the property that every pair of configurations with is connected by a valid run obtained by iterating the cycle . Again, we speak of a chain if we do not want to specify the state .
We draw a distinction between bounded chains and unbounded chains, where a chain is bounded if and only if the associated set of counter values is bounded. An unbounded -chain is contained in since the cycle can be taken arbitrarily many times from any configuration in to yield a valid run.
Remark 3.5**.**
Let us write For each -residue class , every such that , for some , induces at most two bounded chains. Namely, the set of configurations below form a chain; and the singleton is also (vacuously) a chain. Note that every residue class also has one unbounded chain. That is, the set of configurations above with the maximal “induced guard” on . Since there are at most guards, each residue class decomposes as a disjoint union of at most bounded chains and a single unbounded chain.
Intuitively, within each bounded chain we can iterate the cycle until hitting a guard. We call a residue class trivial if it consists solely of a single unbounded chain. Note that the union of all bounded -chains is equal to .
Example 3.6**.**
As indicated in Figure 3 for the running example, the residue classes with are indeed trivial, while each residue class with consists of two bounded chains and , and a single unbounded chain .
One of the main ideas in this section is to show that a configuration is unbounded if and only if it can reach an unbounded chain via a valid run whose underlying path has the form
[TABLE]
where are primitive paths and are non-negative integers. Moreover, we give a polynomial bound on the length of the and the magnitude of in terms of the size of the underlying 1-VASS (in general, the exponents may be exponential in the size of the 1-VASS). We also show how to detect the existence of such a path in polynomial time.
Recall the structure of as a partially ordered set. We will use standard order-theoretic terminology and notation to refer to sets of configurations: in particular given sets of configurations , we say that is downward closed in if for all and with , we have .
3.2 Inductive Characterization of
We now give an inductive backward-reachability construction of the set of all configurations in that can reach an unbounded chain. Since unbounded configurations can, in particular, reach unbounded chains (as above the maximal disequality guard, all chains are unbounded), this set is exactly .
In order for our inductive construction to converge in a polynomial number of steps, we essentially consider meta-transitions of the form for a simple cycle, , and a primitive path. Formally, we define an increasing sequence of subsets of such that . Define to be the union of the collection of unbounded chains. Given we inductively construct as follows. First, define as the set of configurations whose distance to is minimal among all configurations in (here the distance of a configuration to is the length of the shortest valid run from to ). Now define to be the smallest set such that and is downward closed in every chain . Then is the set of configurations in that can reach an unbounded chain which, as noted above, is equal to .
Remark 3.7**.**
By definition, a shortest run from a configuration to has no internal configurations in , and is therefore primitive.
Example 3.8**.**
Figure 3 indicates the set for the running example. Note that contains all trivial residue classes. Observe that ; see Figure 4(a). These two configurations belong to two distinct chains. The downward closure of in its chain is , and the downward closure of in its chain is . We have that . The second iteration to compute only adds the configuration to ; see Figure 4(b). The sequence stabilizes in this iteration.
3.3 The Structure of
In this section we analyze the structure of , based on its inductive characterization. This analysis will be key in obtaining a polynomial-time algorithm to compute .
The guiding intuition is that for all the set is almost upward closed in each residue class . By this we mean that if is the least configuration in , then all but polynomially many configurations of above are also in . More specifically, we show that for any bounded chain in that lies above , although the number of configurations in may be exponential in , the size of is bounded by a polynomial in . (Note here that the unique unbounded chain in is contained in and hence is contained in for all .) Using this observation, we provide a polynomial bound on the number of iterations until the inductive construction converges. Indeed, in every iteration, unless a fixed point has been reached, there must exist some bounded chain such that the size of strictly decreases. After showing that is of polynomial size, we obtain a polynomial bound on the number of iterations until converges by Remark 3.5.
We start by characterizing the paths between chains.
Proposition 3.9**.**
Let and let be a (not necessarily valid) run such that is a primitive path. Then there exists a run of length at most such that
, 2. 2.
, and 3. 3.
the -residue class of is either trivial or identical to that of .
Given a -residue class , in general is not an upward closed subset of . The following definitions are intended to measure the defect of in this regard.
We say that a bounded chain that is contained in a residue class is -active if there exists a configuration in that lies below some configuration in . Let be an -active chain. Recall that is downward closed in and hence is upward closed in . Suppose that is non-empty, write and , and define222We omit from the definition of for brevity.
[TABLE]
Thus contains all configurations in , as well as all configurations “between” elements of , apart from those that are themselves in . If then we define . Finally for a residue class we write
[TABLE]
For the least element in we have that .
Example 3.10**.**
In Figure 4(a) consider the chain , which is -active as . Since we have that .
Lemma 3.11**.**
For all and every chain we have that .
We now come to the central technical part of the paper, controlling the growth of as a function of :
Lemma 3.12**.**
There exists a polynomial such that for each residue class and all we have if contains a chain that is -active but not -active.
Before proceeding to prove Lemma 3.12, we demonstrate the underlying intuition. Consider a configuration that has a primitive path to a configuration . To prove Lemma 3.12, we argue that lifts to a valid run from a “dense” subset of configurations in . There are two main cases in this argument based on whether one of the larger configurations in the chain induces a valid run ending in a trivial residue class.
Example 3.13**.**
The first case occurs in obtaining from in the running example; see Figure 4(a). Consider the chain . The primitive path from the largest configuration in leads to a non-trivial -residue class (out of ). However, one among the -next largest configurations in , for , lifts to a valid run to a trivial -residue class. In the example, this is the case for . The second case occurs in obtaining from in the running example; see Figure 4(b). Consider the chain . The primitive path , from none of the configurations in this chain, ends in a trivial -residue class. However, we provide a subtle argument to bound with .
Proof 3.14** (Proof of Lemma 3.12).**
Pick the minimal element . Moreover, let and be such that is a shortest run from to . By Remark 3.7, is a primitive path.
By Proposition 3.9 there is a run , for some , such that has length at most , and the residue class of is either trivial or the same as the residue class of .
Note that we do not claim that , nor that lifts to a valid run. In what follows we will argue that if there are more than some polynomial number of configurations above in , where is an -active chain of , then does lift to a valid run from one of them. Moreover, the run leads to some configuration in the same residue class as or to a trivial residue class. Observe that, intuitively, this means we “pump” before taking so if we wanted to reach the same residue class as we would need some nonnegative integer such that
[TABLE]
Based on this intuition, we now identify two cases according to the order of in the group of integers modulo , which is . Recall that this quantity is the smallest integer such that .
Case (i):
. We first show that for every -active chain in .
Let be an -active chain of and suppose for a contradiction that . Since is -active, for every configuration we have . Further, since , can only be blocked on a configuration due to a violation of a disequality guard. Since the length of is at most , it follows that at most elements of lie in .
Recall that is upward closed in , so by the assumption that , there exists a set of “consecutive” elements of , for some , such that no element of lies in . Then lifts to a valid run from each element of . Moreover, since the order of in is assumed to be greater than , the images of the elements of , after following , lie in pairwise distinct -residue classes. But the number of non-trivial -residue classes is at most and hence some configuration in has a run over to a trivial -residue class and hence to . But then such a configuration lies in , which is a contradiction.
We conclude that for every -active chain in . But then by Lemma 3.11. Finally, since comprises at most bounded chains by Remark 3.5, we have that .
Case (ii):
. For the residue classes and as above, define an injective partial mapping by if and only if and . We will prove that is defined on all but many configurations in , for some polynomial , thereby showing that . To this end, it suffices to show that is defined on all but many configurations in for every -active chain in , for some polynomial .
Let be an -active chain in and let be a list, given in increasing order, of the chains in that are mapped into by from some configuration in . Then are all -active (as they are above ). For , write for the minimum configuration in that is mapped by to and write for the maximum configuration in that is mapped to . Then for each , every configuration such that and is mapped by to . Thus, writing and respectively for maximum and minimum configurations in , we have that is defined on all non-blocked elements of lying outside the set below.
[TABLE]
Since contains at most elements, it remains to prove that the set (2) has polynomial cardinality. We claim its size is at most , for some polynomial . For this it will suffice to show that any sub-interval of of the form , where , and such that it does not meet the domain of , has cardinality at most . (Indeed, note that (2) is a union of at most such intervals since there are at most chains in by Remark 3.5.)
*Let . Since has cardinality at most , if we take consecutive elements of then there are at least consecutive elements that lie outside and at least one of these elements—say —has a valid run over to the residue class by the assumption that . Since we have that and hence is in the domain of . We conclude that any sequence of at least consecutive elements of meets the domain of . Hence any sub-interval , as defined above, contains at most elements of and, by Lemma 3.11, contains at most elements in total. *
Proposition 3.15 follows from Lemma 3.12 by induction, as follows.
Proposition 3.15**.**
There exists a polynomial such that for each residue class and all we have .
Proof 3.16**.**
Let be the number of chains in that are -active. Since -active chains are by definition bounded, we have that for all (see Remark 3.5). We argue by induction on that for all and all residue classes . We conclude that .
The base case is trivial as there are no [math]-active chains and is empty for all residue classes. The induction step has two cases. First, suppose that , i.e., all chains in that are -active were already -active. Since , we have that for all chains in . We conclude that and so . Since by induction hypothesis, and we get that .
The second case is that . Then by Lemma 3.12 we have . Since the right-hand side of the latter is at most , by induction hypothesis, and we get that .
Recall that is a monotone sequence. Furthermore, observe that by the proof of Lemma 3.12 the sequence either strictly decreases, or possible increases if contains a chain that is -active but not -active. Since the latter can only take place times, then can take a polynomial number of distinct values before converging. Thus, as a consequence of Proposition 3.15 we have:
Corollary 3.17**.**
The sequence stabilizes in at most steps.
3.4 Computing and Deciding Unboundedness
In this section we show how to compute in polynomial time and how to decide in polynomial time whether the initial configuration can reach .
We start by showing that if a configuration can reach via a primitive run, then it can also reach via a polynomial-length run (see Appendix G for the proof).
Proposition 3.18**.**
There exists a polynomial such that the following holds. Let and let be a valid run such that and is primitive. Then there is a valid run such that and has length at most
Recall that consists of all configurations in with minimal distance to . Combining Remark 3.7 and Proposition 3.18, we have that the minimal distance from a configuration to is at most . It follows that we can restrict the search for configurations that can reach , to those within a polynomially-bounded distance to . By itself this is not sufficient to obtain a polynomial-time algorithm to decide whether is reachable. However, using our analysis of the structure of in Section 3.3, we are able to formulate the bounded reachability problem above in a form that admits a polynomial-time algorithm.
Specifically, we consider the Bounded Coverability problem with a Disequality Objective: Given as input a 1-VASS with a distinguished state , a positive integer (written in unary), an initial configuration , and a coverability objective of the form
[TABLE]
where and the and are non-negative integers given in binary, decide whether is reachable from via a valid run of length at most .
Proposition 3.19**.**
The Bounded Coverability problem with a Disequality Objective is decidable in polynomial time.
We now show how to compute in polynomial time. By Corollary 3.17, the sequence converges in at most steps. It remains to show how to compute from in polynomial time for each .
Recall that all unbounded chains are contained in and hence are contained in for all . Recall also that the total number of bounded chains is at most and that is downward closed in each bounded chain. Thus is determined by giving, for every bounded chain such that , the maximum configuration in . In particular, can be described in space polynomial in the description of the given 1-VASS.
Recall that is obtained from by adding the configurations in that have minimum distance to and then closing downward in each bounded chain. By Remark 3.7 and Proposition 3.18, a configuration in that has minimum distance to has distance at most . The idea to compute from is as follows:
For each bounded chain , and each configuration that is among the top configurations in , we determine the distance of to up to a bound of . To do this we use the procedure described in Proposition 3.19, having first written as a polynomial-size union of sets of the form (3)—see below for details. The reason that it suffices to look only among the top configurations in each bounded chain is because we know from Proposition 3.15 that for every -active chain .
We next show how to decompose into a polynomial union of sets of the form (3) in order to apply Proposition 3.19. Fixing , let be a list of the non-trivial -residue classes and for each , write for the corresponding residue modulo and define . Moreover, let be a list of the counter values such that for all we have and for some . Note that and , and the corresponding classes and numbers can be enumerated in polynomial time. We decompose the set of configurations into the following two components:
, i.e., all configurations in trivial -residue classes, 2. 2.
for all , the set , which includes for the non-trivial residue class .
Finally, it remains to decide whether the configuration is unbounded. By Proposition 3.3, is unbounded if and only if it can reach . Now a shortest run from to is necessarily primitive: if an internal configuration in such a run lies in then it is also in —a contradiction. By Proposition 3.18, a shortest run from to has length at most . Thus we can decide whether such a run exists in polynomial time using Proposition 3.19. In conclusion we have
Theorem 3.20**.**
The Unboundedness Problem and the Coverability Problem for 1-VASS with disequality tests are decidable in polynomial time.
4 Unboundedness for 1-VASS
In this section we show that the Unboundedness Problem for 1-VASS (i.e., with no disequality tests) is in . Recall that is the class of decision problems solvable in time , with the size of the input, on a parallel computer with a polynomial number of processors [13, 1].
Let be a 1-VASS with a distinguished state . We want to decide whether the configuration is unbounded. Since has no disequality tests, deleting a negative-weight or zero-weight cycle that appears as an infix of a valid run yields another valid run. It follows that is unbounded if and only if there is a valid run from consisting of a simple path (of length at most ) followed by a positive-weight simple cycle (again, of length at most ). We call such a run a lasso.
Let be a 1-VASS and let be a path in . Recall that a (possibly empty) prefix of is said to be minimal if it has minimal weight among all prefixes of . Likewise a (possibly empty) suffix of is said to be maximal if it has maximal weight among all suffixes. It is clear that is a minimal prefix of if and only if is a maximal suffix. In such a case let us call a nadir of (the nadir is the lowest point reached in any run over ). Recall that is the weight of a minimal prefix of ; correspondingly we define to be the weight of a maximal suffix.
Given paths and , say that is dominated by if and . Observe that if is dominated by then .
Example 4.1**.**
In Figure 5, the path dominates . However, despite it being the case that , does not dominate since the weight of a minimal prefix of the former is smaller than that of the latter.
Fix two states and let be a set of - paths. We say that a set of - paths is a Pareto set for if for every there exists such that is dominated by .
We observe some simple properties of Pareto sets:
Lemma 4.2**.**
Let . Then all of the following statements hold:
If are sets of -* paths such that is a Pareto set of and is a Pareto set of , then is a Pareto set of .* 2. 2.
If are sets of -* paths with respective Pareto sets , then is a Pareto set for * 3. 3.
If is a set of -* paths and is a set of - paths with respective Pareto sets , then is a Pareto set of .*
Proposition 4.3**.**
Let . Then every set of - paths of length at most has a Pareto set of cardinality at most such that each path in has length at most . Moreover such a set can be computed from in .
An Upper Bound
Theorem 4.4**.**
The Unboundedness Problem and the Coverability Problem for 1-VASS are decidable in .
Proof 4.5**.**
By Lemma 2.1, it will suffice to show that Unboundedness is in .
Let be a 1-VASS. Given and , denote by the set of all - paths in of length at most .
Given a state , recall that is unbounded if and only if there exists a lasso run that starts at . To determine the existence of such a run we compute a Pareto set for and a Pareto set for for every state . Having done this we look for and paths and such that induces a valid run from and has positive weight.
It remains to show how to compute a Pareto set of for all pairs of states (together with the values and for every path in the Pareto set) in .
For , we show how to compute a family such that for all :
* is a Pareto set for ;* 2. 2.
; 3. 3.
.
By Item 1, if then is a Pareto set for . (Note that for , consists of paths of length at most .)
The construction of is by induction on . Suppose we have computed with Properties 1-3 above. Fix . In order to compute we observe that
[TABLE]
is a Pareto set for by Items 2 and 3 of Lemma 4.2. Applying Proposition 4.3, we obtain a Pareto set for of cardinality at most . By Item 1 of Lemma 4.2, is a Pareto set for . Finally, it is clear from the length bound in Proposition 4.3 that all paths in have length at most . Thus we define .
It remains to establish the complexity bound for computing . For this it suffices to show that for all the computation of from can be carried out in . But we may compute each set in parallel (over ), and the computation of each such set can be done in by Proposition 4.3.
5 Conclusion
We have shown that control-state reachability for 1-VASS with disequality tests can be solved in polynomial time. The complexity of reaching a given configuration in this model is open (being equivalent to control-state reachability in the presence of both equality and disequality tests), lying between NP and PSPACE. For multi-dimensional VASS with disequality tests, the classical argument of Rackoff [15] easily generalises to show that control-state reachability remains in EXPSPACE. By contrast, decidability of reachability is open to the best of our knowledge. For comparison, recall that without disequality tests reachability is decidable but non-elementary [5].
Appendix A Proof of the reduction in Figure 1
Let us recall that for every value , the assignment is defined by if and only if . For convenience, define the domain containing all allowable counter values in state (exclude all disequality guards on ).
The key observation is the following: let , and consider a clause , where is a literal of variable , then satisfies iff there exists some such that .
Indeed, note that for every and every we have that iff . Recall that iff , and observe that since , there exists such that . We thus have that satisfies iff satisfies , iff .
Now, assume is satisfiable, and let be a satisfying assignment. We associate with the number (note that taking modulo simply means that if the product is exactly , we take ). Clearly . We claim that is bounded. Indeed, the only paths possible from start by choosing a state , and then repeatedly applying the cycle of cost . However, since satisfies all clauses, then by the above, all such paths are blocked by a disequality guard after taking the for times, for some (which depends on ). Thus, is bounded.
Conversely, assume is bounded for some value , we claim that satisfies . Indeed, by the same reasoning above, it follows that for every cycle of cost , we have for some , so satisfies . Since this is true for all clauses, we have that satisfies .
We conclude that is satisfiable iff some configuration is bounded, which completes the reduction.
Finally, we note that the reduction indeed takes polynomial time — indeed, the construction clearly has polynomially many states. Also, the first primes can be listed in time polynomial in , and are representable in polynomially many bits. Therefore, the binary representation of the transition values and the amount of missing elements in the domain of each state are both polynomial.
Appendix B Single disequality guards suffice
Given a 1-VASS with disequality tests, we can assume that for all states the set is either or for some . This assumption is without loss of generality, as a state with can be replaced with a sequence of new states , connected with [math]-weight transitions, such that for . The transformation yields only a polynomial blow-up in the size of the 1-VASS, and there is a natural correspondence between runs in the original 1-VASS and the modified one.
Appendix C Proof of Lemma 2.1
Consider a 1-VASS with disequality tests, and let . We reduce the Coverability problem to the Unboundedness problem as follows.
We obtain from a new 1-VASS as follows. First, we remove from all the states that cannot reach in the underlying graph. Second, we introduce a new state with a self-loop of weight , that is reachable from with a transition of weight [math]. The output of the reduction is with the distinguished state .
Recall that reachability in directed graphs can be decided in , and hence this reduction is -computable.
Henceforth assume that can reach in the underlying graph of (otherwise cannot cover , and the reduction can output a trivial negative instance). We proceed to prove the correctness of the reduction.
First, if can cover in , then in particular it can only cover using states in . We now have that is unbounded in , by covering , and then taking the transition to and repeating the self loop unboundedly. Note that crucially, there are no disequality guards on , and therefore once is reached, we can take the transition to and repeat the self loop unboundedly.
Conversely, suppose is unbounded in , then either there is a valid run in from to for some , in which case can cover in , or is unbounded already in and, moreover, it is unbounded in using only states that can reach in the underlying graph. We claim that in the latter case, can cover in . Indeed, from there is a valid run to a configuration with that is large enough, such that a simple path from to in the underlying graph lifts to a valid run from to for some . Specifically, taking where is the maximal absolute value of the weight of a transition in , and is the maximal disequality guard, suffices for such a run.
Appendix D Proof of Proposition 3.3
Clearly if can reach an unbounded configuration in then it is unbounded.
Conversely, if is unbounded, then there is a state such that for all , there exist and a valid run starting in that visits and ends in . Thus, there is a positive cycle on . The positive cycle on may not be simple, but it certainly visits a state with a simple positive cycle on it. Pick such that . for all (Note that is finite since is a positive cycle. The maximum is thus well-defined.) Hence, there is a valid run from to where . Observe that and it is unbounded.
Appendix E Proof of Proposition 3.9
Suppose that has length strictly greater than . By the Pigeonhole principle, we can find distinct proper prefixes (i.e. prefixes that are not just the initial state, or the entire path) of that end in the same state. That is, proper cycles on the same state. Let be a list of these prefixes, given in order of increasing length, and let the corresponding suffixes be . We now consider two cases.
First, suppose that there exist such that and have the same residue modulo . Then define . In this case path lifts to a run from to such that lies in the same -residue class as . The second case is that the respective residue classes of modulo are all distinct. Then there exists such that, defining , the path lifts to a run from to such that lies in a trivial -residue class (as there are at most non-trivial residue classes).
Continuing in this fashion we can recursively remove cycles from the original path to eventually obtain a path that has length at most and such that Item 3 is satisfied. Consider all maximal infixes that were removed from to obtain . Note that each such infix must necessarily be a cycle as they arise from iteratively removing cycles. Since was primitive, all of them must have non-positive weight. Hence, Items 1 and 2 also hold333Note that we do not claim that the intermediate paths obtained in the procedure are primitive nor that the individual cycles removed in this process are negative. Rather the observation is that can equivalently be obtained from in one step by simultaneously removing a disjoint family of infixes, where each infix is a cycle (necessarily non-positive)..
Appendix F Proof of Lemma 3.11
Consider two “consecutive” configurations , then all configurations for lie in pairwise-distinct -residue classes. In particular, since there are at most non-trivial residue classes, and since trivial residue classes are contained in , we have that at most such elements are in .
Appendix G Proof of Proposition 3.18
By Proposition 3.15 we can find a polynomial such that
[TABLE]
for all .
Set , and consider a valid, primitive path such that and .
Since has length greater than , there exists a state that occurs at least times in internal configurations within the first configurations of . Thus, there exists a sequence of proper prefixes of that all end in and such that one of the following two cases holds.
- (i)
The numbers all have the same residue modulo . 2. (ii)
The numbers have pairwise distinct residues modulo .
Indeed, since there are prefixes to choose from, either Case (i) holds, or there are strictly less than prefixes per residue class. If the latter holds then there must be least such distinct residue classes, so Case (ii) holds.
In either case, we decompose the computation as . Observe that since is primitive, then so is . Applying Proposition 3.9 to we obtain a path of length at most such that leads from to either the same residue class as or to a trivial -residue class.
It is important to note that we cannot assume is not blocked after the prefix . However, since , we can remove from the list of prefixes at most prefixes such that the remaining prefixes do not cause to block. (Indeed, we will not modify the path by literally removing prefixes but rather cycles which correspond to the path from a prefix to a longer prefix. For now, we are only speaking about removing elements from the collection of prefixes we can choose from.) W.l.o.g, let be the remaining prefixes.
Consider the family of paths for . Note that every is of length at most , and since the are obtained by removing -cycles, and since is primitive, the configurations reached by are above . We claim that one of the is a valid run from to .
We separate the analysis according to the cases above.
- •
In Case (i), if leads to a trivial residue class, then all the reach , and we are done. Otherwise, leads to the same residue class as . By our choice of in (5), we have that . That is, there are more prefixes that do not cause to block than there are missing elements above in . We conclude that some reaches .
- •
In Case (ii), the paths all reach distinct residue classes. In particular, since there are more than such prefixes — i.e. by our choice of — then some reach trivial residue classes, and thus reach .
Appendix H Proof of Proposition 3.19
We carry out a forward reachability analysis starting from the initial configuration . The algorithm runs for rounds. In the -th round, we maintain for each state a set of configurations that are reachable from by valid runs of length . Let denote the set of all configurations that are reachable from by valid runs of length . We maintain the invariant that if some configuration can reach the objective in steps via a path then some configuration can also reach via the same path . We output that the objective is reachable if and only if one of the sets for some intersects . This last step is clearly sound, given the invariant.
The key to obtaining a polynomial-time runtime bound is to suitably prune the sets to keep them of polynomial size. In order to compute from we proceed as follows. First define to be the indexed set of all valid configurations reachable in one step from . Now we obtain from by the following two steps:
- •
First, we delete from all configurations such that there are configurations in with and .
- •
Secondly, we delete from all configurations such that there are configurations in with .
Clearly each set has cardinality at most , and moreover, it can be computed from the collection of sets in polynomial time.
It remains to argue that the invariant is maintained between rounds. To this end, suppose some state can reach the objective in steps via a path . Then there exists a state that can reach the objective in steps via the path . By the loop invariant there exists a state that can also reach the objective via the path . Hence there is a state that can reach the objective via the path . Now if is deleted in the first stage of pruning then there is some configuration such that , , and yields a valid computation from to the objective . After the first stage of pruning, each residue class in contains at most elements. Hence if is deleted in the second stage of pruning, there are at least configurations in that are above and are such that the run over from leads to a configuration with . Now from one of these configurations yields a valid run that reaches since one of choices of will avoid and lead to a configuration such that .
Appendix I Proof of Lemma 4.2
Items 1 and 2 are obvious. Item 3 follows from the fact that if is dominated by and is dominated by then is dominated by . Indeed,
[TABLE]
We can similarly argue that .
Appendix J Proof of Proposition 4.3
Fix a state . Consider all - paths that appear as a minimal prefix of some path in . Pick a single such prefix of maximum weight. Likewise consider all - paths that appear as a maximal suffix of some path in and pick a single such suffix of maximum weight. Now form the path . This path dominates any path in with nadir . We define to be the set of paths formed in this way as runs through . By taking large enough, we can suppose without loss of generality, that the absolute weight of all paths in is at most . That is, it can be encoded in binary using bits.
The bound on computing relies on the well-known fact that the sum of a list of binary integers can be computed in [17, Chapter 1]. To obtain we compute the weight of each prefix and suffix of every path in in parallel. According to [17], this can be done in time on a parallel computer with processors: one for each element of and each midpoint . Finally, for each state in parallel, we find a maximum-weight prefix of a path in that connects and and a maximum-weight suffix of a path in that connects and . It is straightforward to prove the latter is also in since sorting a list of numbers can be done in , [14, 3] thus completing the proof.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Sanjeev Arora and Boaz Barak. Computational Complexity - A Modern Approach . Cambridge University Press, 2009. URL: http://www.cambridge.org/catalogue/catalogue.asp?isbn=9780521424264 .
- 2[2] Benedikt Bollig, Karin Quaas, and Arnaud Sangnier. The complexity of flat freeze LTL. In 28th International Conference on Concurrency Theory, CONCUR , volume 85 of LIP Ics , pages 33:1–33:16, 2017.
- 3[3] Daniel P. Bovet and Pierluigi Crescenzi. Introduction to the theory of complexity . Prentice Hall international series in computer science. Prentice Hall, 1994.
- 4[4] Daniel Bundala and Joël Ouaknine. On parametric timed automata and one-counter machines. Inf. Comput. , 253:272–303, 2017.
- 5[5] Wojciech Czerwinski, Slawomir Lasota, Ranko Lazic, Jérôme Leroux, and Filip Mazowiecki. The reachability problem for petri nets is not elementary. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019 , pages 24–33. ACM, 2019.
- 6[6] S. Demri, R. Lazic, and A. Sangnier. Model checking memoryful linear-time logics over one-counter automata. Theor. Comput. Sci. , 411(22-24):2298–2316, 2010.
- 7[7] John Fearnley and Marcin Jurdzinski. Reachability in two-clock timed automata is pspace-complete. In Automata, Languages, and Programming - 40th International Colloquium, ICALP 2013, Riga, Latvia, July 8-12, 2013, Proceedings , volume 7966 of Lecture Notes in Computer Science , pages 212–223. Springer, 2013.
- 8[8] Alain Finkel, Stefan Göller, and Christoph Haase. Reachability in register machines with polynomial updates. In Mathematical Foundations of Computer Science 2013 - 38th International Symposium, MFCS , volume 8087 of Lecture Notes in Computer Science , pages 409–420. Springer, 2013.
