# Universality Problem for Unambiguous VASS

We study languages of unambiguous VASS, that is, Vector Addition Systems with States, whose transitions read letters from a finite alphabet, and whose acceptance condition is defined by a set of final states (i.e., the coverability language). We show that the problem of universality for unambiguous VASS is ExpSpace-complete, in sheer contrast to Ackermann-completeness for arbitrary VASS, even in dimension 1. When the dimension d is fixed, the universality problem is PSpace-complete if d is at least 2, and coNP-hard for 1-dimensional VASSes (also known as One Counter Nets).

## Authors

• 10 publications
• 5 publications
• 7 publications
04/28/2021

### Reachability in Vector Addition Systems is Ackermann-complete

Vector Addition Systems and equivalent Petri nets are a well established...
02/16/2022

### Language Inclusion for Boundedly-Ambiguous Vector Addition Systems is Decidable

We consider the problems of language inclusion and language equivalence ...
06/15/2020

### Some complete ω-powers of a one-counter language, for any Borel class of finite rank

We prove that, for any natural number n ≥ 1, we can find a finite alphab...
02/15/2022

### The aperiodic Domino problem in higher dimension

The classical Domino problem asks whether there exists a tiling in which...
07/17/2020

Vector addition system with states is an ubiquitous model of computation...
08/26/2020

### Countdown games, and simulation on (succinct) one-counter nets

We answer an open complexity question by Hofman, Lasota, Mayr, Totzke (L...
10/07/2019

### The Well Structured Problem for Presburger Counter Machines

We introduce the well structured problem as the question of whether a mo...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Determinism is a central notion of computational models, it ensures that there is one way to proceed for every input. It often enables constructions which would not be possible without it and allows for efficient algorithms. While the relation between deterministic vs non-deterministic models is extensively studied, there exists also a less understood middle ground of unambiguous systems. In the case of models accepting word languages, a model is said to be unambiguous if for every word in its language, there is exactly one accepting run, which is a much weaker restriction than determinism. Unambiguity, although featuring non-determinism, often causes some problems to be computationally easier. As a prominent example, the universality problem for finite automata (i.e., whether all words over the alphabet are accepted by the automaton), which is PSpace-complete in general, is known to be in PTime in the unambiguous case [14] and even in NC [15]. While the study of unambiguous models of computation has lately attracted some attention, in some settings it remains, by and large, an unexplored area.

In particular, there has been considerable volume of research on unambiguous finite automata (see [1] for a nice overview). One way to design a polynomial time algorithm for the universality problem on finite automata is to show that the shortest word which is not in the language, if any, is of at most linear length. Then, by counting the number of linear length runs one may answer the problem. The existence of a linear counterexample for universality and its PTime algorithm, led to the conjecture, formulated by Colcombet [1], that for every unambiguous finite automaton (UFA) there exists another UFA of polynomial size accepting the complement of its language. This conjecture was later shown false by Raskin [12]. As it turns out, there is a family of UFA such that for accepting the complement of UFA with states even nondeterministic finite automaton (NFA) needs a super-polynomial number of states —at least . The universality problem for UFA is actually known to be not only in PTime, but even in NC [15], the class of problems solvable by uniform families of circuits with depth and binary fan-in. The work [15] in fact solves the more general problem of path equivalence for two NFA: is the number of accepting runs on the same for both automata, for every word ? However, to the best of our knowledge the best known lower bound for the problem is NL-hardness, so the exact complexity of universality problem for UFA is still open even in the simplest possible setting of finite automata.

There was also research about the universality problem and related ones for unambiguous register automata. In [9] authors have shown that the containment problem for unambiguous register automata is in 2ExpSpace and even in ExpSpace if the number of registers is fixed, which implies similar upper bounds for the universality problem. Without the unambiguity assumption, even the universality problem (and even with just one register) can be shown undecidable [10] or Ackermann-hard [3] depending on the concrete model of register automata.

It is not by accident that existing research focuses on universality, equivalence and containment of languages of unambiguous systems, and that there are efficient algorithms for these problems under the assumption of unambiguity. Unambiguity speaks about the language of a system, so it is natural to hope that problems related to the language of the systems may become more tractable. But for the most natural problem concerning the language, i.e., for the emptiness problem one cannot hope for improvement. This is because for most of the systems one can relabel transitions giving each one a unique label. Then the system becomes deterministic and in consequence unambiguous. The language changes, but it is empty iff the original language was empty, which intuitively explains why the emptiness problem shouldn’t be any easier for unambiguous systems compared to general non-deterministic ones. On the other hand, it is more reasonable to expect that the universality problem might be easier since both the universality problem and the unambiguity property are universal properties of the form “For all words, […]”.

#### Our contribution

The foremost goal of this paper is to push the understanding of unambiguity further. We focus on the universality problem, which is arguably the most natural first step, that may open the way for further studies on the equivalence, co-finiteness, containment and other problems for languages. The universality problem was studied for finite automata and register automata under the unambiguity assumption. In our opinion, the most interesting yet unsolved cases in which one can expect some progress assuming unambiguity are One Counter Nets (called also 1-dimensional VASS here) and its generalization Vector Addition Systems with States (VASS).

The universality checking for VASS with state acceptance is known to be decidable by the use of well quasi-order techniques [6] (the paper shows decidability of trace universality, but language universality can be reduced to that problem). However the problem is also known to be Ackermann-complete even for 1-dimensional VASS [5], so hardly tractable. For deterministic VASS it is quite easy to show that the universality problem can be decided in PTime. Therefore, it is natural to hope for improvement under the unambiguity restriction.

Our main contribution is ExpSpace membership of the universality problem for unambiguous VASS. We believe that it is the most interesting result and it was as well the most challenging problem and technically involved solution. We actually have shown that this problem is ExpSpace-complete. For the completeness of the picture we have also analyzed the complexity of the problem for -dimensional VASS for fixed . We have shown that the problem is PSpace-complete for every . For we have shown coNP-hardness, although we do not have the matching upper bound, we conjecture that it is coNP-complete. We additionally consider the variant of the problem in which the numbers in the input are encoded in unary. Finally, we study also the problem of unambiguity checking (i.e., given a VASS, is it unambiguous?). All our results are listed in Section 3.

## 2 Preliminaries

We use the letter to denote a finite alphabet, to denote the set of all integers, and the set of non-negative integers. We use to denote the empty string, and to denote . We use to denote that is a finite subset of , and to denote the set of all finite subsets of . We use to denote vectors of numbers, and we use to denote the all- vector and to denote the all- vector. We use for , to denote the set . For a vector and we denote by the -th coordinate of . For a word and , we denote by the -th letter of . For we write if for all we have . We define the minimum of and as for any .

We consider a Vector Addition Systems with States (VASS) of dimension as a tuple where is a finite alphabet, is a finite state space, is the initial state, is the set of final states, and is the set of transitions. We often write transition as . We will henceforth write -VASS to denote a VASS of fixed dimension . A configuration of is a pair of a state and a vector , that we usually note . If is a configuration, we write to denote the -th coordinate of the vector it contains. A run of from a configuration to a configuration reading the word is a sequence of transitions such that: (i) and , (ii) for every ; (iii) ; (iv) for every ; and (v) . If we further have , we say that such run is accepting. We henceforth say that a configuration is reachable from a configuration if there is a run from to . The effect of a transition is the vector , the effect of a run is the sum of effects of the transitions therein. The norm of a VASS is the maximal absolute value of a number occurring in its transition, and we denote it by . The language of a configuration in , denoted by , is the set of all with an accepting run from . We call the initial configuration where is the initial state. If is the initial configuration then we just say language of and write instead of . A VASS is unambiguous if for every there is no more than one accepting run starting from the initial configuration and reading . The unambiguity checking problem for VASS is the problem of, given a VASS , decide whether it is unambiguous. An automaton over (finite automaton or VASS) is universal if it accepts the language . The universality problem for VASS is the problem of, given a VASS , decide whether it is universal. We will henceforth assume that the numbers contained in the transitions of VASSes are always encoded in binary if not explicitly indicated otherwise.

Observe that we work with VASS with -transitions, the reason for doing so is that it is a natural model, the upper bounds still hold in this more general setup, and we can also derive tight lower bounds by making use of -transitions. We do not know whether adding -transitions increases the class of recognized languages, not even in the non-deterministic case. It seems to us a rather difficult question.

Let us recall now the main result of the Rackoff construction [11]. Let us denote . We present here an adaptation of the Rackoff argument with an explicit bound on the length of an accepting run.

###### Proposition 1 (Adaptation of the Rackoff construction)

If a language of a -VASS with norm and states is nonempty then there exists an accepting run of length at most .

###### Proof

Let . We proceed by induction on . For assume there is some accepting run with no configuration repeating. Then in its prefix of length there is definitely first a configuration and later a configuration for some state and counter values . Then we can change this accepting run into an accepting run of length at most . We first pump the infix from do exactly times obtaining then a configuration with . As some accepting state is reachable from then it is also reachable by a run of length smaller than . This run (and any of its prefixes) can, at worst, have a negative effect of value , and thus it can be triggered from , since . In this way, we get an accepting run of length at most , proving the base case.

For the inductive step, assume that there is an accepting run in a -VASS with norm and states. Let . We distinguish two cases:

1. the norm of every configuration on is bounded by ;

2. the norm of some configuration on exceeds .

Without loss of generality we can assume that no configuration on appears more than once, otherwise we can “unpump” to obtain a shorter one. Observe that in the first case (i), the length of is bounded by (we will bound later on).

In the second case (ii), the run might be long, but we will show that there is another short accepting run . Let be the first configuration on with norm exceeding . Let . Clearly, the length of is bounded by by a similar reasoning as in the case (i). We will replace with a “short” run , so that . First note that some coordinate of must have value greater or equal to ; without loss of generality, assume it is the last one, that is, the -st coordinate. Let us now ignore the last coordinate in the VASS. By inductive hypothesis, there is a sequence of transitions of length at most such that , where is the result of ignoring the last coordinate of , and are the results of ignoring the last coordinate of . Consider now the sequence of transitions starting in . Its length is bounded by , so its effect on the -st coordinate is not smaller than . Since , then is indeed a valid run from to for some . Therefore, the run is accepting from as . The length of is at most .

In order to finish the argument in case (ii) we need to show that

, through the following sequence of (very rough) estimations

 D+Kd ≤2D≤C⋅D=C⋅(C⋅Kd)d+1=C⋅((C⋅C(4d)d−1)d+1 =C((4d)d−1+1)(d+1)+1≤C4(4d)d−1⋅(d+1)≤C(4(d+1))d=Kd+1.

Observe that in case (i), the bound is trivial.

The language emptiness problem for VASS (i.e., given a VASS, does it accept at least one word?) is, basically, equivalent to the coverability problem, which is known to be ExpSpace-complete as shown by the lower bound of Lipton [8] and the upper-bound of Rackoff [11]. The coverability problem is the problem of, given a VASS and two configurations , whether there is a run from to some configuration such that . In our setting, this result can be restated as the language emptiness problem for VASS being ExpSpace-complete, even when all transitions are -transitions, and hence the language is either or . What is more, the construction of Lipton is unambiguous: if there is an accepting run, there is exactly one. Indeed, the only situation in which Lipton’s construction is ambiguous along a run is when it guesses whether the value of some counter is zero or non-zero. However, the run of a wrong guess is never an accepting one, as the guess is always followed by a verification. This is formalized in the next lemma. Let us denote by -VASS, a VASS whose every transition reads (and thus the alphabet is not important here).

###### Lemma 1 (consequence of [8, 11])

The problem of whether an unambiguous -VASS has an empty language is ExpSpace-complete.

## 3 Results

We summarize all our results in the next two theorems. Detailed proofs will come in the sections that follow.

###### Theorem 3.1

The universality problem for

1. VASS is ExpSpace-complete, both with binary and unary encodings;

2. -VASS with unary encoding is in NC and NL-hard, for every ;

3. -VASS with binary encoding is PSpace-complete, for every ;

4. -VASS (One Counter Net) with binary encoding is coNP-hard.

###### Theorem 3.2

The unambiguity checking problem for

1. VASS is ExpSpace-complete, both with binary and unary encodings;

2. -VASS with unary encoding is NL-complete, for every ;

3. -VASS with binary encoding is PSpace-complete, for every ;

4. -VASS with binary encoding is coNP-hard.

The main technical contribution lies in the ExpSpace bounds on the universality problem in Theorem 3.1(i). The upper bound will need some insights on the structure of accepting runs in unambiguous VASS which happen to have a universal language. The remaining upper bounds will follow easily from this one. The PSpace, and coNP lower bounds of items (iii), and (iv) are also of interest, as they reveal different ways in which unambiguity can encode non-trivial properties. The ExpSpace lower bound of item (i) follows easily from Lemma 1. All the remaining results of Theorems 3.1 and 3.2 are either easy, or follow from simple adaptations of the three results just mentioned.

It is interesting to observe that complexity results on universality seem to coincide with the complexity of emptiness for the non-deterministic version of the considered classes. Notice also that closing the ‘gap’ between NC and NL in Theorem 3.1(ii) would imply in particular solving the corresponding problem for UFA, which is an open question.

We observe that, as a corollary, we obtain procedures for testing the equivalence problem between an unambiguous VASS and a regular language. Indeed, the language of an unambiguous VASS is equal to a regular language if, and only if, the VASS resulting from the union of and the DFA corresponding to the complement of is unambiguous and universal.

#### Organization

We will prove Theorem 3.1 in Section 4 and Theorem 3.2 in Section 5. Each of these sections is divided into an “upper bounds” and “lower bounds” subsections. For reference, the upper and lower bounds of item (i) of Theorem 3.1 are shown in Propositions 2 and 5 respectively; item (ii) in Propositions 4 and 8; item (iii) in Propositions 3 and 6; and item (iv) in Proposition 7. The upper and lower bounds of item (i) of Theorem 3.2 are shown in Propositions 9 and 10 respectively; item (ii) in Propositions 9 and 11; item (iii) in Propositions 9 and 12; and item (iv) in Proposition 13.

## 4 Testing for Universality

In this section we will prove Theorem 3.1. Most of the section will be dedicated to proving the ExpSpace upper bound of item (i).

### 4.1 Upper bounds

###### Proposition 2 (Theorem 3.1(i) upper bound)

The universality problem for unambiguous VASSes is in ExpSpace.

The proof strategy is as follows. First, we define an abstraction of a configuration, called an -profile, for , which is the result of replacing every number bigger than or equal to with in a configuration. The intuition is that any number bigger or equal is so big that we can disregard its exact value. We next show that in certain circumstances, for any unambiguous -VASS with states two configurations having equal -profile have also the same language, where is some fixed doubly-exponential function. This fact allows us to construct an unambiguous finite automaton of doubly-exponential size, whose every state corresponds to one -profile, and such that is universal if, and only if, is universal. As universality of UFAs is in NC and therefore in PolyLogSpace, this gives us an ExpSpace algorithm for checking universality.

For any number , the -profile of a configuration is the pair . Let , and let .

We start with a useful lemma which bounds the length of runs witnessing ambiguity.

###### Lemma 2

Let be a -VASS with norm and states. If is ambiguous then there exist two different runs accepting the same word of length at most each.

###### Proof

Consider the following -VASS , which accepts exactly these words, which have at least two different accepting runs from the initial configuration of . The VASS guesses two different runs of and simulates them, it is quite similar to a synchronized product of with itself. In its counters keeps counter valuations of two configurations of of the simulated runs. State of is a pair of states of

together with one bit of information indicating whether the two simulated runs have already differed or they are the same till that moment. VASS

accepts if states of both simulated runs are accepting and the bit indicates that they have differed (even if now they are in the same state). It is easy to see that indeed accepts words, which have two different accepting runs in . Therefore if is ambiguous then is nonempty. Notice that the norm of is bounded by , as the norm of is. Therefore by Proposition 1 if is nonempty then there is an accepting run of of length at most . Notice that the existence of such a run implies the existence of two different runs of over the same word, which additionally also have length bounded by . This finishes the proof.

We state two basic properties of VASS which will be useful throughout.

###### Claim

For any two configurations and of a VASS with equal -profile, if is an accepting run from of length at most then is also accepting from .

###### Claim (language monotonicity)

If and are two configurations of a VASS with then .

The following is the key lemma which will enable the improved complexity for the universality problem.

###### Lemma 3

Let be a universal, unambiguous -VASS with states. Then, any two configurations with equal -profile reachable from the initial configuration have the same set of accepting runs (in particular, they have the same language).

###### Proof

By means of contradiction, let be two configurations reachable from the initial configuration with the same -profile, but different sets of accepting runs. Let be an accepting run from but not from , reading the word .

Let . The word is accepted by since it is universal, so there must be a configuration such that and . Therefore is accepted both from configuration with the run and from configuration with some accepting run . There are two cases to consider: either (i) , or (ii) and .

For (i), let us first consider an (ambiguous) VASS , being the result of adding -labelled self-loops with effect in every state to . Clearly, for every configuration we have . Let us confider a -VASS , which is a synchronized product of with itself: transitions, initial and accepting states are defined in a natural way. Product is synchronized, so for any there is an -labelled transition in the product iff there exist -labelled transitions in the two components, both identical with . For two configurations and of we denote by the language . Notice that, by construction, is the intersection of and . Therefore the word belongs to . By Proposition 1 there exists an accepting run of of length at most reading a word from . Consider the projection of onto the first copy of . We know thus that is accepting from . Further, the absolute value of the effect of on every coordinate is at most . Recall that and have the same -profile, so by Section 4.1 if is accepting from then it is also accepting from . Therefore and , which means that there are two distinct accepting runs over in , contradicting the fact that it is unambiguous.

For (ii), we have that there are two distinct accepting runs for from , namely and . Then, by Lemma 2, there exist two different runs and from of length at most accepting the same word . Since and have the same -profile, where , by Claim 4.1 both and are accepting from configuration , and thus there are two distinct accepting runs over in , contradicting the fact that it is unambiguous.

###### Corollary 1

If a universal, unambiguous -VASS with states contains an accepting run with two configurations and such that occurs before , then

1. if and have equal -profile, then ;

2. for every , .

###### Proof

(i) By means of contradiction, let and be configurations with the same profile such that , meaning that for some . Let be an accepting run of , such that reaches the configuration from the initial configuration, and reaches the configuration from configuration . Since the effect of decrements component , it is easy to see that there is some such that is an accepting run from but not from , contradicting Lemma 3 above.

(ii) Suppose there is a decrement of at least at some coordinate . Since is at least the number of -profiles times the biggest effect of a transition, this means that at least distinct configurations occur in the run between and such that . Hence, among there must be two equal -profile configurations, contradicting the item (i) above.

This last statement can be informally understood as follows: if is universal, then it is still universal if configurations are abstracted by their -profiles. We now formalize what this means. Let us fix an unambiguous VASS , and let us henceforth write as short for . For any configuration let denote its -profile, that is, . Let be an unambiguous VASS. We construct a finite automaton in the following way:

• the set of states is the set of pairs ;

• the initial state is ;

• the set of final states consists of all the pairs having the first coordinate in , namely ;

• is the set of all transitions such that and .

We now show that is unambiguous, and that it is universal iff is universal.

###### Lemma 4

For every run of there is a run of such that for every .

###### Proof

This can by shown by induction on . It suffices to replace every transition of by a transition such that , which exists by construction.

As a consequence of the previous lemma, if there are two distinct accepting runs for a word in , then there are also two distinct accepting runs over in . In other words:

###### Lemma 5

If is unambiguous then is unambiguous.

###### Lemma 6

is universal if, and only if, is universal.

###### Proof

Observe first that by Lemma 4. Hence, if is universal, so is . For the converse direction, suppose is universal, and let us show that is universal as well. Let be the accepting run of in . Let us consider the run of , where and for every , . We claim that is an accepting run on . By means of contradiction, if is not a run, there must be some which is not a transition of . This can only happen if some configuration on reaches some big counter value at a position which later decreases by at least . More concretely, this means that there are, among the configurations reachable through , two configurations such that appears before and for some we have . But this would contradict Corollary 1-(ii). Hence, is an accepting run and thus is universal.

Notice that the automaton has a doubly-exponential number of states. As checking its universality is polynomial-time in its size [1], which is doubly exponential, the problem is in 2ExpTime. In order to design an ExpSpace algorithm we need a bit more work. The following lemma together with Lemma 6 finishes the proof of Proposition 2.

###### Lemma 7

Checking universality of is in ExpSpace.

###### Proof

Notice first that the function can be easily computed in ExpSpace. Indeed, a state of is described by a pair consisting of a state from and a vector , where is doubly exponential with respect to the description size of , and therefore it can be kept in ExpSpace. It is then possible to iterate through all the possible pairs in in ExpSpace and for every state output the transitions outgoing from this state.

By [15] checking universality of UFA without cycles containing only -labelled transitions (-cycles) is in NC, namely in the class of languages recognizable by uniform families of circuits of depth and binary branching, where is the number of inputs. A simple procedure which eliminates all the -cycles (i.e., all the transitions involved in -cycles) can be designed to be in NL. Observe that eliminating -cycles does not change the language of unambiguous automata, since no accepting run can contain a transition from an -cycle (such a run extended by the -cycle would be also accepting, which would violate the unambiguity assumption). Since NC and NC is closed under composition, we obtain that the universality problem for an arbitrary UFA (possibly with -transitions) is in NC as well. It is folklore that NC is included in poly-logarithmic space (actually in the deterministic space ). Indeed, one can simply simulate a circuit of depth and binary branching in space .

It is now enough to argue that the composition of ExpSpace and PolyLogSpace is included in ExpSpace. This result is also folklore, we sketch here a proof. Any algorithm in the composition of ExpSpace and PolyLogSpace can be seen as a PolyLogSpace algorithm inputting the output of an ExpSpace machine, potentially of a doubly exponential length. This doubly exponential output cannot be kept by an ExpSpace algorithm, but one can simulate the composition by a PolyLogSpace algorithm asking ExpSpace oracles for particular letters of its input. Such an algorithm in turn can be simulated easily in ExpSpace. We keep three exponential size pieces of the information: (i) the space of the oracle, (ii) the index of the doubly exponential input being currently transferred to the oracle, and (iii) the space of the poly-logarithmic algorithm, which is poly-logarithmic with respect to the doubly exponential input, hence exponential. Therefore indeed , which finishes the proof.

Let us now analyze the situation for a fixed dimension . The number of states of equals times , which for a fixed is a polynomial depending on and . This immediately implies that for represented in unary the size of is polynomial, while for represented in binary the size of is exponential in the size of the input. A proof almost identical to that of Lemma 7, where we substitute ExpSpace with PSpace, yields the following result.

###### Proposition 3 (Theorem 3.1(iii) upper bound)

For every fixed the universality problem for binary represented, unambiguous -VASS is in PSpace.

In a similar way we solve the case of unary represented -VASSes. In this case, we replace ExpSpace with the class of problems solvable in logarithmic space L. We also use the fact that L composed with NC is included in NC, which is immediately implied by a trivial closure of NC by composition and inclusion L NC. Then we get the following.

###### Proposition 4 (Theorem 3.1(ii) upper bound)

For every fixed the universality problem for unary represented, unambiguous -VASS is in NC.

### 4.2 Lower bounds

###### Proposition 5 (Theorem 3.1(i) lower bound)

The universality problem for unambiguous VASS is ExpSpace-hard, even on a one-letter alphabet.

###### Proof

We reduce from the problem of whether an unambiguous -VASS has an empty language, which is ExpSpace-hard as observed in Lemma 1. Given an unambiguous -VASS , we build an unambiguous VASS on a one-letter alphabet such that if and otherwise. is the result of adding a new final state to , and transitions for every .

###### Corollary 2

The co-finiteness problem for unambiguous VASS, that is, whether the complement of its language is finite, is ExpSpace-hard.

We leave open the question of whether the lower bound of Proposition 5 still holds for unambiguous VASS without epsilon transitions.

The following proposition proves the lower bound of Theorem 3.1(iii).

###### Proposition 6 (Theorem 3.1(iii) lower bound)

The universality problem for unambiguous 2-VASS is PSpace-hard.

###### Proof

We reduce from the bounded one-counter automata reachability problem, which is known to be PSpace-hard [4, Corollary 10]. This problem can be stated as follows: given a 1-VASS , a number encoded in binary, and a configuration , is there a run from to such that for every ? The alphabet is not important for this problem, we can consider that every transition reads the letter .

Let , , be the input of the aforementioned problem. We now construct, in polynomial time, an unambiguous 2-VASS , such that it is universal if, and only if, the answer to the input is negative — the statement then follows by closure under complement of PSpace. Concretely, the language of is essentially the set of all sequences of transitions in which do not contain a run from to as a prefix. Intuitively, the construction of from can be divided into two steps. First we change the -bounded 1-VASS into a 2-VASS by simulating configuration by . However, this 2-VASS might be far from being universal. Therefore, we add to it a lot of transitions such that it is almost universal: the only way for a word not to be accepted is to reach a configuration corresponding to .

The construction of is as follows. The alphabet is defined as ; the state set is defined as ; and the set of final states is , where is a sink state. will always keep the invariant that the sum of its two components is equal to on all configurations with state in reachable from the initial configuration . Further, the transition graph is as in but labels are used to enforce unambiguity. This is done by initializing the vector in as the first thing the automaton does (by adding a new initial state and transition from it to the initial state of ), and additionally translating every transition into . Now we need to assure that the only way to be not accepted is to reach configuration . For that purpose we add a special transition reading with effect and going from to the sink state . All the other sequences of transitions need to be made accepting. For that we add an extra accepting state and a lot of transitions leading to it. Concretely, has these transitions:

1. the initial transition for every ;

2. a ‘simulating’ transition for every ;

3. a transition from to reading with effect ;

4. a transition from every to reading with effect ;

5. two transitions from to reading , one with effect and one with effect ;

6. a transition from every to reading with effect if the -labelled transition is not outgoing from ;

7. a transition from every to reading with effect if the -labelled transition is outgoing from and has effect ;

8. -effect self-loops on , with all possible letters of .

Figure 1 contains a depiction of the construction.

We now show the correctness of the reduction. Observe first that, by construction, all configurations of reachable from are -bounded. Further, if the state of is from , then the sum of its components is equal to .

We show that is unambiguous. What is more, we will show that for every configuration reachable from and for every letter there is at most one outgoing transition from reading that can be applied to . By means of contradiction, suppose that there are two distinct transitions such that and . By construction, the only possibility is that one transition is a simulating transition as defined in (ii), and the other transition is as defined in (vii). In particular, must be a transition from , are states from , and . By the above observation, , and by construction (item (vii)), and . Since by the hypothesis , we can replace with the equality just observed, and we obtain . Since we also know that by the observation above, we can further replace with in , and we obtain . Note that this contradicts the hypothesis . The contradiction comes from assuming that both transitions were possible to trigger.

We finally show that is universal if, and only if, there is no -bounded run from to in . Observe first that for every word there is exactly one run of reading . If there is an -bounded run from to in , it follows that the run of reading ends in the sink state , and thus , witnessing the fact that is not universal. If, on the other hand, there is a run of ending in state , it must be reading a word of the form where is an -bounded run from to in . Since is the sole state which is not accepting and since, as observed before, for all words there is a run, it follows that if is universal, then there is no -bounded run in from to in .

Finally, we show coNP-hardness for universality of one counter nets.

###### Proposition 7 (Theorem 3.1(iv))

The universality problem for unambiguous 1-VASS is coNP-hard.

###### Proof

We equivalently will show that non-universality problem for unambiguous 1-VASSes is NP-hard. The reduction is from the Perfect Partition problem. In the Perfect Partition problem we are given a finite set of natural numbers and we are supposed to answer whether the set of indices can be partitioned into two subsets such that . Such a partition is called a perfect partition. All the numbers are binary represented. The Perfect Partition problem is known to be NP-hard [7].

For an instance of a Perfect Partition problem we build an unambiguous 1-VASS such that perfect partition for exists if and only if the 1-VASS is not universal. Let , note that the perfect partition exists iff there is a set of indices such that . Every word of length encodes a natural number in the following way: for we define . We will design in such a way that will always contain all the words of length different than . Among words of length language will contain exactly these for which . Then indeed would be not universal iff set has a perfect partition.

The 1-VASS is defined in Figure 2.

It consists of two parts: the top part, with states to accepts all the words of length different than , while the bottom part accepts some words of length .

It is immediate to see that the top part accepts all words of length different to , and all of them by exactly one run.

The bottom part consists of states: , , and , where only the state is accepting. Notice that transitions in states are mirrored with respect to transitions in states , namely effect of a transition over some letter from equals the effect of the transition over the other letter in . Let us inspect now how an accepting run over can look like. Every such run starts from and then goes to . Then it splits into two runs, to and and from this moment on there are two runs: one in some state and the other in the corresponding sta