Languages of Boundedly-Ambiguous Vector Addition Systems with States
Abstract
The aim of this paper is to deliver broad understanding of a class of languages of boundedly-ambiguous VASSs, that is -ambiguous VASSs for some natural . These are languages of Vector Addition Systems with States with the acceptance condition defined by the set of accepting states such that each accepted word has at most accepting runs. We develop tools for proving that a given language is not accepted by any -ambiguous VASS. Using them we show a few negative results: lack of some closure properties of languages of -ambiguous VASSs and undecidability of the -ambiguity problem, namely the question whether a given VASS language is a language of some -ambiguous VASS. In fact we show an even more general undecidability result stating that for any class containing all regular languages and only -ambiguous VASS languages for some it is undecidable whether a language of a given -dimensional VASS belongs to this class. Finally, we show that the regularity problem is decidable for -ambiguous VASSs.
Keywords and phrases:
vector addition systems, Petri nets, unambiguity, bounded-ambiguity, languagesCopyright and License:
2012 ACM Subject Classification:
Theory of computation Parallel computing modelsFunding:
Both authors are supported by the ERC grant INFSYS, agreement no. 950398.Acknowledgements:
We would like to thank David Purser for sharing with us a conjecture about language not recognised by an unambiguous VASS. We thank also Sławomir Lasota for suggesting us to reduce from 0-finite-reach instead of reducing from the halting problem for 2CM in the proof of Theorem 1. Additionally, we would like to thank Piotr Hofman for inspiring discussions and for reviewing the Master’s Thesis [35], which served as the foundation for the results presented in this paper.Editors:
Patricia Bouyer and Jaco van de PolSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Determinism is a central notion in computer science. Deterministic systems often allow for more efficient algorithms. On the other hand, usually deterministic systems are less expressive, so in many cases for a non-deterministic system there is no equivalent deterministic system and one cannot use more efficient techniques. For those reasons, there is recently a lot of research devoted to various notions restricting nondeterminism in a milder way than determinism. The hope is that systems having the considered properties are more expressive than the deterministic ones, but still allow for robust algorithms design. One prominent example of such a notion is unambiguity; a system is unambiguous if for every word there is at most one accepting run over this word. In the last decade unambiguous systems were intensely studied and for various classes of infinite-state systems the unambiguous case turns out to be much more tractable [8, 29, 25, 9, 18]. Similar notions were also investigated recently, like -ambiguity (each word is accepted by at most runs) and history-determinism (a weakened version of determinism), in both cases one can design more efficient algorithms in some cases [10, 7].
In this paper we focus on studying milder version of determinism for Vector Addition Systems with States (VASS). VASSs and related Petri nets are popular and fundamental models of concurrency with many applications both in theory and in practical modelling [30, Section 5]. Languages of VASSs with restricted nondeterminism were already studied for several years, mostly with the acceptance condition being the set of accepting states. In [9] it was shown that the universality problem for unambiguous VASSs is decidable in ExpSpace, in contrast to Ackermann-completeness of the problem for VASSs without that restriction. In [10, 11] the language equivalence problem was considered for unambiguous VASS and more generally for -ambiguous VASSs and it was shown to be decidable and Ackermann-complete, in contrast to undecidability in general [2], even in dimension one [21, Thm. 20]. The choice of universality and equivalence problems is deliberate here. The complexity of the seemingly more natural language emptiness problem (or equivalently of the reachability problem) does not depend on the unambiguity assumption. Indeed, one can always transform a system to a deterministic one by assigning all the transitions unique labels without affecting nonemptiness. Therefore, in order to observe a difference in complexity or decidability after restricting nondeterminism, one should consider problems, which do not simply ask about the existence of some object. Some natural problems concerning languages of that type are the universality problem and the language equivalence problem and these two problems were extensively studied for many models with the unambiguity assumption or some modification of it. First of all, the universality and equivalence problems are solvable in PTime [32] (and even in NC2 [33]) for unambiguous finite automata (UFA), in contrast to PSpace-hardness of both problems for NFA. The universality problem was also shown decidable for unambiguous register automata in a sequence of papers [25, 3, 14] with improving complexity, which contrasts undecidability in the case without restricted nondeterminism [26, Thm 5.1]. This line of research culminated in a very elegant contribution [6, 5], which showed in particular that not only the universality problem, but also the equivalence problem is solvable in ExpTime for unambiguous register automata, and in PTime in the case of fixed number of registers. Another popular restriction of nondeterminism was also studied recently: history-determinism. A system is history-deterministic if its nondeterminism can be resolved on the fly, based on the history of a particular run. The equivalence and inclusion problems were shown to be decidable for one-dimensional history-deterministic VASSs [27], but undecidable for two-dimensional history-deterministic VASSs [7].
Despite a lot of research on algorithms for unambiguous and boundedly-ambiguous (-ambiguous for some ) VASS not much is known about the class of languages recognisable by such models. In particular, to our best knowledge, till now it was even not known whether there exist any VASS language (we consider acceptance by states), which is not a language of an unambiguous VASS. The reason behind this lack of knowledge was absence of any technique, which can show that a given language of a VASS cannot be recognised by an unambiguous VASS. The quest for such a technique is natural and the question deserves investigation. Analogous problems were considered for other models of computation. For finite automata the question trivialises, as deterministic automata recognise all the regular languages. However, already for weighted automata over a field the problems are highly nontrivial and were recently studied in-depth [4, 28], in particular it is decidable whether a given weighted automaton is unambiguisable, so equivalent to some unambiguous weighted automaton [4]. The problem whether a given context-free language is unambiguisable is known to be undecidable since the 60s [17, 19]. The aim of this paper is deepening the understanding of the class of languages recognisable by boundedly-ambiguous VASS and its subclasses.
Our contribution.
In the paper we deliver several results, which help understanding unambiguous, -ambiguous and boundedly-ambiguous VASS languages. Our first main tool is Lemma 5, which delivers the first example of a VASS language, which is known to be not a -ambiguous VASS language. The second main tool is Lemma 8, which formulates a condition, which needs to be satisfied by all -ambiguous VASS languages. Using these two lemmas we can rather straightforwardly inspect closure properties of -ambiguous VASS languages in Lemma 10 and show several expressivity results in Section 4.2. Further building on Lemma 5 we obtain our main contribution.
Theorem 1.
For any class of languages containing all regular languages and contained in the class of all boundedly-ambiguous VASS languages it is undecidable to check whether the language of a given -VASS accepting by states belongs to .
Consequences of Theorem 1 are broad. It reproves undecidability of regularity of -dimensional VASSs (in short -VASSs) [12, Section 8] and undecidability of determinisability of -VASSs considered in [1]. It is important to emphasise that Theorem 1 gives us extensive flexibility wrt. the undecidability results. For example in [1] it was shown that for a given -VASS it is undecidable whether there is an equivalent deterministic -VASS. One can argue that possibly asking about equivalent deterministic VASS, without a bounding dimension, is a more natural question, which deserves independent research. Theorem 1 answers negatively all questions of that kind in one shot. We formulate below its corollary to illustrate variety of consequences we obtain. In particular we know now that for many classical restrictions of nondeterminism it is undecidable whether for a given -VASS there exists some equivalent one with nondeterminism restricted in that way.
Corollary 2.
It is undecidable whether the language of a given -VASS accepting by states is recognisable by some
-
unambiguous VASS,
-
-ambiguous VASS for given ,
-
boundedly ambiguous VASS,
-
deterministic VASS,
-
-ambiguous -VASS for given .
Our last main contribution is Theorem 22, which states that the regularity problem is decidable for boundedly-ambiguous VASSs, which contrasts undecidability without that assumption [2, 21]. One can see this result as an intuitive indication that boundedly-ambiguous VASSs are closer to deterministic VASSs rather than to general nondeterministic VASSs.
Organisation of the paper.
In Section 2 we introduce preliminary notions and recall useful lemmas. Section 3 is devoted to showing the two main technical tools, namely Lemmas 5 and 8. In Section 4 we present closure properties and expressivity results for the classes of -ambiguous VASSs. Next, in Section 5 we show our main result, namely Theorem 1. Theorem 22 is proved in Section 6. Finally, in Section 7 we discuss interesting future research directions.
2 Preliminaries
Basic notions.
For such that we write for the set of integers . For we write for the set . For a vector we write for the -th entry of . For a vector we write for the set . For two vectors we write if for all we have . We also extend this order to where is bigger than any natural number. We write for the set . Whenever we speak about the norm of vector we mean . For a word we denote by the number of letters in the word .
Downward-closed sets.
A set is downward-closed if for each it holds that and implies . For we write for the set . If a downward-closed set is of the form we call it a down-atom. Observe, that a one-dimensional set is downward-closed if either or for some . Thus we have either in the first case or in the second case. So equivalently a downward-closed set is a down-atom if it is of a form , where for all we have that is a downward-closed one dimensional set. For simplicity we write if . Therefore each down-atom is of the form where . The following proposition will be helpful in our considerations.
Vector Addition Systems with States.
A -dimensional Vector Addition System with States (-VASS) is a nondeterministic finite automaton with non-negative integer counters. Transitions of the VASS manipulate these counters. Formally, we define VASS as where is a finite alphabet, is a finite set of automaton states, is a transition relation, is a finite set of initial configurations and is a finite set of final configurations. For a transition we say that the transition is over or the transition reads letter . We also write for the effect of transition, which is . We define the norm of transition as the norm of .
A -VASS can be seen as an infinite-state labelled transition system in which each configuration is a pair . We denote such configuration as . We define the norm of the configuration as the norm of . A transition can be fired in a configuration if and only if and where . After firing the transition configuration is changed to . We also define run as a sequence of transitions, which can be fired one after another from some configuration. For a run we write for . If we want to say something only about th (for ) entry of the we write . We also define as . We say that a run is from configuration to if the sequence of transitions can be fired from and the final configuration is . We say that a run is a loop if the state of its initial configuration is the same as the state of the final configuration. For two runs and if the sequence is a run then we can write . We say, that a run is over (or reads ) if and only if for each transition is over . We denote by the word read by . We say that the length of a run is equal to if it consists of transitions. For the length of a run, we write .
We say, that VASS is -free if there is no transition over . In this work, unless stated otherwise, we work with -free VASSs.
Languages of VASSs.
A run of a VASS is accepting if it starts in an initial configuration and ends in an accepting configuration. A configuration is accepting if it covers some configuration from the set of final configurations . In other words configuration is accepting if there exists a configuration such that . For a VASS we define its language as the set of all words read by accepting runs and we denote it by . Languages defined in this way are called coverability languages. Sometimes we consider languages with other acceptance condition (reachability languages), in that case we indicate it clearly.
We sometimes consider reachability languages in which run ending in configuration is accepting if and only if . Sometimes, we consider VASSs, where the set of accepting configurations is infinite, but has a specific form. For instance we consider downward-VASSs, where the set of accepting configurations is possibly infinite, but it is downward-closed. In this type of VASSs a run ending in configuration if and only if where is a downward-closed set of accepting configurations. We say, that VASS is deterministic if it has only one initial configuration, it is -free and for each state and each letter there is at most one transition over leaving the state . We say, that VASS is -ambiguous if and only if for every we have at most accepting runs over . We also say then, that is a -ambiguous language. For a -VASS consider a function that, given a history of the run (configurations and taken transitions), current configuration and a next letter , returns a sequence of possibly many transitions. One of these transitions is over , all the other are over , and the sequence can be fired from the current configuration . Let us call a resolver. We say, that -VASS is history-deterministic if and only if it has one initial configuration and there exists a resolver such that for each run over from the initial configuration given by the resolver is accepting.
We denote by Det, Hist, k-Amb, BAmb and NonDet the class of languages of respectively deterministic, history-deterministic, -ambiguous , all boundedly-ambiguous and fully nondeterministic VASSs languages. We sometimes denote by 1-Amb the class of unambiguous VASSs languages. By d-NonDet we denote the class of languages of -VASSs.
3 Tools for separating BAmb and NonDet
In this section we develop two techniques for showing that a language is not recognised by a -ambiguous VASS: Lemma 5 and Lemma 8.
3.1 Dominating block
The first tool is based on the following observation about a language not recognised by a -ambiguous VASS.
Lemma 4.
For every the language
is not recognised by a -ambiguous VASS.
For showing various properties of boundedly-ambiguous VASS Lemma 4 is sufficient. In one case, for proving Theorem 1, we need a strengthening of Lemma 4, which is presented in the following lemma:
Lemma 5.
Let be an alphabet such that and let be a language over . For each function such that (recall that ) language is not recognised by a -ambiguous VASS.
Proof of Lemma 4.
Let us fix and let . Let be defined as . Hence by Lemma 5 we get that is not recognised by a -ambiguous VASS.
Below we sketch the idea behind the proof of Lemma 5. We assume, for the sake of contradiction, that is recognised by a -ambiguous VASS and aim at a contradiction by showing different runs over the same word. We first consider words , where is a particularly chosen word and are particularly chosen constants:
Then we dive into combinatorics of VASS runs over words and conclude that there are specific pumping cycles in . We show two main lemmas, which analyse the structure of the runs. The first one gives conditions for finding a specific loop in a run. Observe, that this lemma is general and is not restricted to -ambiguous VASSs.
Lemma 6.
For each -dimensional VASS , each subset of counters and each there exists a constant such that in every run in , starting from a configuration in which values of counters from are at most , which is of length at least there exists a loop, which has non-negative effect on the counters from .
The proof of Lemma 6 uses rather standard techniques similar to the ones in the Karp-Miller construction solving the coverability problem for VASS [22]. Lemma 6 is used to find loops in words . For example one can show that if is big enough then one can find a loop as in Lemma 6 in the first block of letters . Similarly, if is big enough wrt. to , one can find an appropriate loop in the second block of letters . Using this approach one can find loops in blocks of letters , if the block is much longer than the whole prefix before it. This is however not true for the block of length . Therefore we need a more sophisticated tool in order to be able to modify runs over all the words to runs over the same word.
This requires the more challenging part of the proof, which provides a detailed characterisation of runs of -ambiguous VASS. We formulate below one of the used lemmas in order to illustrate the kind of arguments we consider and, as it is also used in Section 3.2.
Lemma 7.
Let be a language over recognised by some -ambiguous -VASS . For each there exists a constant such that each run in such that:
-
Run is a prefix of an accepting run.
-
Run is reading .
can be decomposed as:
-
1.
for some and for each we have .
-
2.
For each we have and
-
3.
For each we have that
-
4.
For each we have that is either a loop or . Moreover if then .
-
5.
For each let then is nonnegative on counters from
-
6.
For each there is no , and such that is a nonnegative loop on counters from , and
The proof of Lemma 7 uses the Lemma 6 and a lot of combinatorial observations. It is moved to the Appendix.
By appropriate use of Lemma 7 and other auxiliary lemmas we show that can be modified a bit into runs , which are all different, all accepting and all over the same word , where
and (where is the maximal norm of a transition). More concretely, is obtained by pumping the loops in more times. A challenge it to show that the resulting are indeed different, which we achieve by more careful, but technical investigation of the runs. Existence of different runs over the same word is a contradiction with the assumption that is recognised by a -ambiguous VASS and finishes the proof.
3.2 Semilinear image
Now, we develop the second tool for showing that language is not recognised by a -ambiguous VASS. Before formulating the tool we have to provide a few definitions. For any language such that for each we have for some we define
Given a base vector and a finite set of period vectors , the linear set is defined as
A semi-linear set is a finite union of linear sets. Now we are ready to formulate the second tool.
Lemma 8.
Let be a language satisfying:
-
is recognised by -ambiguous VASS .
-
There exists such that for each we have .
Then is a semilinear set.
Proof.
The proof is based on Lemma 7 and the fact that set of solution of a system of linear Diophantine inequalities is semilinear.
Notice first, that satisfies conditions of Lemma 7.
Therefore we can apply Lemma 7 to and and decompose each accepting run in in the way presented in Lemma 7.
Let us fix some , and , initial configuration and accepting configuration .
We call a run accepting with respect to and if is an accepting run of the VASS starting in and ending in configuration such that .
Let be the following language:
Observe, that depends on chosen and . Moreover, observe, that because of the constant given by Lemma 7 we have only a finite number of possibilities of , , , initial configuration and accepting configuration .
Moreover, semilinear sets are closed under a finite union. Therefore to conclude, that is a semilinear set it is enough to show that is a semilinear set.
Notice, that from conditions of Lemma 7, we know, that only (for ) contain letter , each exactly one letter at the last position. Hence:
Therefore it is enough to show, that:
is a semilinear set. We have two cases. Either , hence semilinear. This case occurs if for any we do not have an accepting run with respect to and . Otherwise, we will show semilinearity, by providing a system of linear inequalities for . It is enough because in [20] it was shown, that the set of solutions of a system of linear inequalities is a semilinear set. The goal of this system of linear inequalities is to express, that after each prefix of a run, we are non-negative on all of the counters. Moreover, we want also to express the acceptance condition. Therefore for each counter we write the following inequalities:
-
For each transition and each such that there exist and such that :
-
For each transition and each such that there exist and such that :
-
For each transition and each such that there exist and such that :
-
–
If :
-
–
Otherwise:
-
–
-
Acceptance condition:
-
Condition, that each is positive (this is needed because of conditions of Lemma 7):
In other words, this system of inequalities ensures, that each transition in the sequence can be fired, check the acceptance condition and ensures that each is positive. We have shown, that the set is semilinear and hence is a semilinear set. Therefore, because semilinar sets are closed under a finite union we have that is a semilinear set.
Then, as shown in Lemma 10, -ambiguous VASS languages are closed under intersection with regular languages. As mentioned below languages are regular for each , the following corollary holds:
Corollary 9.
Let , be a language recognised by a -ambiguous VASS and for let be the language of words containing exactly letters . Then for any we have that is a semilinear set.
4 Properties
In this section we present several properties of languages of boundedly-ambiguous Vector Addition Systems with States.
4.1 Closure properties
First, we investigate the closure properties of boundedly-ambiguous languages.
Lemma 10.
If and are recognised by a -ambiguous and -ambiguous VASS respectively then:
-
is recognised by a -ambiguous VASS;
-
is recognised by a -ambiguous VASS.
Moreover, class of languages of boundedly-ambiguous VASSs is not closed under complementation and commutative closure.
Proof.
We split the proof into several parts, each corresponding to the closure properties under one operation.
Intersection.
Let and be languages recognised respectively by -dimensional -ambiguous VASS and -dimensional -ambiguous VASS . Language can be recognised by the standard synchronised product of and . It is easy to observe that the product is a -ambiguous -VASS.
Union.
Let and be languages recognised by -dimensional -ambiguous VASS and -dimensional -ambiguous VASS . The idea is to recognise by taking union VASS , which is clearly -ambiguous and -dimensional.
Complementation.
This comes from a general fact, that coverability languages are not closed under complementation. Language is recognised even by a deterministic VASS (hence also by one with bounded-ambiguity). On the other hand, in [13] it was shown, that every two disjoint coverability VASS111In fact this result was shown for a wider class of Well-structured transition system (WSTS) languages and are regular separable, which means there exists a regular language such that and . Because is a coverability VASS language its complement can be a coverability VASS language if and only if is a regular language. Clearly is not and this can be shown using the Pumping Lemma for regular languages.
Commutative closure.
Boundedly-ambiguous languages are not closed under commutative closure. Let us consider language , which is recognised by a deterministic VASS. Its commutative closure is equal to . Assume, towards contradiction, that is recognised by a -ambiguous VASS for . Because boundedly-ambiguous languages are closed under intersection with regular languages also language is recognised by a -ambiguous VASS. Let be -ambiguous VASS recognising . By Lemma 6 we can take such, that while accepting VASS will fire a non-negative loop on all of the counters. This loop reads for some . Because VASS is -ambiguous . Hence we can fire this loop one more time and accept , which is not in the language . Therefore we reached a contradiction and boundedly-ambiguous languages are not closed under commutative closure. Using the fact that regular languages are unambiguous (i.e. -ambiguous) VASS languages and Lemma 10 we can formulate the following remark about closure of boundedly-ambiguous languages under intersection with unambiguous (hence also regular) languages.
Remark 11.
For each the class of -ambiguous VASS languages is closed under intersection with unambiguous VASS languages. Hence, the same holds for the intersection with regular languages.
Lemma 12.
For each there exist languages , which are respectively recognised by a and ambiguous VASS such that language is not recognised by an -ambiguous VASS for .
Proof.
Let . For let us define language . Observe, that is a language of an unambiguous VASS. Let and . By Lemma 10 languages and are respectively recognised by a and ambiguous VASS. By applying Lemma 4 to we get that language is not recognised by a -ambiguous VASS for .
Conjecture 13.
For each there exists languages , which are respectively recognised by a and ambiguous VASS such that language is not recognised by a -ambiguous VASS for .
4.2 Expressiveness
Firstly, we show that the hierarchy of -ambiguous VASS is strict.
Lemma 14.
For every there exists language .
Proof.
Let . Because of Lemma 4 language is not recognised by a -ambiguous VASS. On the other hand it is a union of unambiguous VASS languages. For let us define . Observe, that . Hence, by Lemma 10, is recognised by a -ambiguous VASS. In terms of the classes of languages they define, boundedly-ambiguous VASS can express strictly more than deterministic ones. Moreover, they are strictly less expressive than non-deterministic ones. We prove this in Lemmas 15 and 17.
Lemma 15.
There exists language .
We show an even stronger Lemma 16. It is stronger because we have .
Lemma 16.
There exists language .
Proof.
Let . Observe, that is recognized by an unambiguous VASS depicted in Figure 1. The only point of nondeterminism is in state and there is only one way to guess when the last block, ending the word in the form comes.
On the other hand, assume, towards contradiction, that is recognised by a history-deterministic VASS. It is easy to see, that is a language of a deterministic VASS. Hence it is also history-deterministic. In [7] it was shown, that history-deterministic VASS languages are closed under union. Hence is also history-deterministic VASS language. However, in [7] it was also shown, that is not a history-deterministic VASS language. Hence we get, that is not a history-deterministic VASS language.
Lemma 17.
There exists language .
Proof.
Let . Let us fix . We show, that is not recognised by a -ambiguous VASS. Assume, towards contradiction, that it is. Hence language is also recognised by a -ambiguous VASS. Let be a function such that and . Therefore, by Lemma 5, we get, that is not recognised by a -ambiguous VASS, contradiction. Hence is not recognised by a -ambiguous VASS. On the other hand, it can be recognised by a 1-dimensional VASS, which is presented in Figure 2.
Observe, that because each word is read by only finite number of accepting runs, one can see bounded-ambiguity as an extension of the notion of determinism. A second extension of the determinism is history-determinism. In [7] it was shown, that history-deterministic VASSs can express more than deterministic ones and less than nondeterministic ones. Up to now, there has been no comparison of the expressive power of history-deterministic and bounded-ambiguous VASSs. Now, we show, that these language classes are incomparable, which means that there exists a language recognised by an unambiguous VASS, which is not a language of history-deterministic VASS and language which is recognised by a history-deterministic VASS and it is not recognised by a -ambiguous VASS for any . Recall, that in Lemma 16 we have shown that there exists . Hence it is enough to show the following Lemma:
Lemma 18.
There exists language .
Proof.
Let . Observe, that is not a semilinear set. Hence, due to Lemma 8, for every we have that is not recognised by a -ambiguous VASS. Hence . On the other hand it is recognised by a history-deterministic VASS presented in the Figure 3. It is history-deterministic, because the best option is to fire loops in states and as long as possible. In this way one can read words for each such that
5 Proof of Theorem 1
In this section we prove Theorem 1. We start by introducing Lossy counter machines (LCMs) [24, 31]. Formally, an LCM is where is a finite set of states, are counters, and , where . A configuration of is where and . There is a transition if there exists such that and for each :
-
If then
-
If then
-
If then
-
If then
Observe, that counters can nondeterministically decrease at each step. A run of M is a finite sequence . Given a configuration , the reachability set of is the set of all configurations reachable from via runs of M. We denote this set as . For simplicity we denote by the set of configurations reachable from . It was shown in [31] that the problem of deciding whether for a configuration and LCM set configuration is finite, is undecidable. Due to [1] even if is always equal to the problem is still undecidable. We call this problem -finite reach. We prove Theorem 1 by reducing from -finite reach. The proof is similar to the proofs of undecidability of regularity [34] and determinization [1]. The rest of the section is devoted to the proof of Theorem 1.
Firstly, we present an overview of the proof. For each LCM with an initial state we create another LCM and initial state with the same answer to the -finite reach problem. Then, we define a language , which intuitively encodes the correct runs of . For technical reasons, namely because coverability VASSs are well-suited for recognising languages similar to we encode the correct runs in reverse, that means from the final configuration to the initial one. Moreover, because we work with LCMs, it is better for us to work with the complement of , that is . In such a way we get at the end a language for which Lemma 5 is useful. Then, the proof of Theorem 1 is split into three claims. Claim 19 states, that is recognised by an effectively constructible -dimensional VASS . Claim 20 provides, that if Reach() is finite then is a regular language. Finally, Claim 21 states, that if Reach() is not finite then is not recognised by a VASS from the class of all boundedly-ambiguous VASS. All these claims give a direct reduction from -finite reach to deciding whether a language of a -VASS belongs to class of languages, which contains all regular languages and is contained in the class of all boundedly-ambiguous VASS languages. Thus they conclude the proof of Theorem 1.
Let us fix LCM with and . Let be the initial state of . We add to two states: and and for transitions from to with no effect on the counters. In addition, for each we add a transition from to decrementing the th counter and incrementing the first counter. We also add two transitions decrementing the first counter. The first one goes from to . The second one goes from to . In such a way we obtain LCM . The sketch of the construction of is presented in the Figure 4.
Observe, that because each of the added transitions does not increase the sum of the counters, from we can go only to and later we can only stay in the answer for -finite reach is the same for both: and . Hence, we proceed later with . We encode each configuration as a word over as . We use encodings of configurations to obtain an encoding of a run by concatenating encodings of its configurations. Finally, we define language .
Claim 19.
One can construct -dimensional VASS recognising .
Proof.
W.l.o.g. we assume, that there is at most one transition between each pair of states (otherwise we may split a state into several states, one for each incoming letter). We construct such that it accepts if and only if does not represent a valid run of from . The idea is, that guesses the violation in the run represented by the word . We have three types of violations. The first type is a control state violation, that is the run uses nonexisting transition or does not start in . The second type is a counter violation, that we have invalid counter values between two consecutive configurations. The third violation is that we have invalid encoding of a configuration, that is we have two consecutive letters such that . To spot control violation for nonexisting transitions we will have gadget for each pair of states and such that there is no transition from to spotting infix of the form . Such gadget is just an NFA. Observe, that if a run start in then either the whole encoding of the run is equal to or suffix is of the form for some . Therefore to spot control violation, that the run does not start in we will have an NFA recognising words such that suffix is not of the form for some and the encoding is not equal to . To spot counter violation we will have a 1-dimensional VASS for each transition and each counter spotting violation when firing this transition on this counter. Let us fix transition and counter . Let transition be from state to state . We have four possibilities for the operation performed by on the counter . Therefore we need to spot infix of the form:
-
1.
where (equivalently ) if transition decrements counter .
-
2.
where if transition increments counter .
-
3.
where if transition has no effect on the counter .
-
4.
where or if transition zero-tests counter .
All of the above can be done with -dimensional VASS. To spot invalid encoding of a configuration for each we will have an NFA recognising words with infix . As all the gadgets have one initial state in which we “ignore” some prefix of the word, we can join them and obtain one dimensional VASS with single initial configuration.
Claim 20.
If is finite then is a regular language.
Proof.
Observe, that in the proof of Claim 19 only gadgets spotting counter violations were not an NFA. Therefore it is enough to replace them by some NFAs. As is finite there exists a bound on the possible values of the counters. Hence we can implement each gadget spotting counter violation using the fact, that . For instance for transition from state to having no effect on the counter we can have an NFA being a union of NFAs for each spotting infix of the form . In this way we will not detect counter violation increasing the counter to the value above . Therefore we add another gadget spotting, that one counter is above hence then the word does not encode a correct run. This can be done by spotting for each infix , which can be done by an NFA. Because every gadget is now an NFA we showed that is a regular language when is finite.
Claim 21.
If is infinite then is not recognised by a boundedly-ambiguous VASS.
Proof.
Assume, towards contradiction, that is recognized by a -ambiguous VASS for some . Recall, that there exist such that from each such that and there exists a transition from to with no effect on the counters. Moreover, for each there exists a transition from to decrementing the th counter and increasing the first counter. Additionally, there is a single transition leaving decrementing the first counter to and there is exactly one transition leaving , which goes to and decrements the first counter.
As -ambiguous VASS languages are closed under intersection with a regular language also is recognised by a -ambiguous VASS. The idea of this intersection is to get a language similar to the language presented in Lemma 5. Observe, that each can be uniquely decomposed into . We denote by . We define . We define function on words from by setting if encodes an incorrect run of from and otherwise where is the maximal number such that for some word . Observe, that . This is because both transition from to and loop from to decrements the first counter and therefore for each such that we have that encodes invalid run if and only if either encodes an incorrect run (that is ) or encodes a correct run but (recall the definition of in this case) or there exists such that . Moreover, notice that because is infinite and we have transitions moving values to the first counter from all the other counters in the state for each each there exist such that and a correct run of from to . Let be the encoding of this run. Observe, that . Hence and . Hence and hence, by Lemma 5, is not recognised by a -ambiguous VASS. Contradiction.
6 Deciding regularity
In this section we present a proof of the following theorem, that deciding regularity of a language of a -ambigous VASS is decidable. This is in contrast to the general case where regularity is undecidable [34].
Theorem 22.
For every it is decidable whether for a given -ambigous VASS language is regular.
The proof uses two, already present in the literature, results. The first result is the following Theorem from [10].
Theorem 23 (Theorem 28 [10]).
For any and a k-ambiguous VASS one can build in elementary time a downward-VASS which recognises the complement of its language.
The second result is the decidability of regular separability of coverability VASS language and reachability VASS language. Regular separability problem asks whether for two VASSs and there exists a regular language such that and .
Theorem 24 (Theorem 7 [15]).
Regular separability is decidable if one VASS is a coverability VASS and the second VASS is a reachability VASS. 222Recently even stronger result about decidability of regular separability for reachability VASSs was proven in [23].
We devote the rest of this section to the proof of Theorem 22. Let us fix a -ambiguous VASS . We show how to decide regularity of a language of a -ambiguous VASS. Using Theorem 23 we get a downward-VASS recognising the complement of . Observe, that is regular if and only if and are regular separable. Now we will use the following claim about downward-VASSs.
Claim 25.
For every downward-VASS one can construct reachability VASS recognising the same language.
Proof.
Let us fix -dimensional downward-VASS and let be the states of . We know, that the set of accepting configurations is downward-closed. Hence, due to Proposition 3, we have a finite set such that:
We obtain reachability VASS recognising the same language as by taking VASS and for each adding state , transition from with no effect from to . Moreover, for each if we add transition from to incrementing by one the th counter and otherwise if we add an -transition from to decrementing by one th counter. Let the set of added states be equal to . We set the initial configurations of to be the initial conditions of . For vector let us denote by vector such that for all we have if and otherwise. We set the accepting configurations of to the following set of configurations . Now we have to prove, that . For observe, that for each there exists configuration such that is read by an accepting run ending in . As is a downward-closed set there is such that such that . Moreover, observe that is reachable from in using -transitions. Hence .
For observe that for each we have an accepting run ending in configuration . Due to construction of we know, that there exists prefix of , such that it also reads and reaches configuration such that and hence and . Now we invoke Claim 25 on to get reachability VASS recognising the same language. Finally, we use algorithm from Theorem 24 for and knowing that they are regular separable if and only if is regular. This concludes the proof of Theorem 22.
7 Future research
Other problems for boundedly-ambiguous VASSs.
We have shown in Section 6 that the regularity problem is decidable for baVASSs (boundedly-ambiguous VASSs), in contrast to general VASSs. It is also known that the language equivalence problem is decidable for baVASSs [11], while being undecidable for general VASSs [2, 21]. It is natural to ask whether other classical problems are decidable for baVASSs, for example deciding whether there exists an equivalent deterministic or unambiguous VASS. These problems are undecidable for general VASS due to Theorem 1, but can possibly be decidable for baVASSs. One can also ask whether given -ambiguous VASS has an equivalent -ambiguous VASS, our techniques from Section 5 used for showing undecidability does not seem to work in that case. Other further research for baVASSs would be to ask about complexity of the mentioned problems, for example to understand complexity of the regularity problem for baVASSs, since we already know it is decidable.
Languages of VASSs accepting by configuration.
In this paper we have considered VASSs accepting by set of accepting states, it is natural to ask what happens if we modify the acceptance set to be a finite set of accepting configurations or even a single configuration. For VASSs accepting by configuration already the language universality problem is undecidable. We are not aware of any citation, but the proof is rather straightforward and uses the classical technique. For a given two-counter automaton one can construct -VASS accepting by configuration, which recognises all the words beside correct encodings of the runs of the two-counter automaton. Therefore the reachability problem for two-counter automaton, which is undecidable, can be reduced to the universality problem for -VASSs accepting by a configuration. Since the universality problem is undecidable for VASSs accepting by configuration, there is not much hope that the other nontrivial problems (beside emptiness) are decidable.
However, one can ask what about VASSs accepting by configuration with some restriction on nondeterminism, for example unambiguous or boundedly-ambiguous VASSs accepting by configuration. It is natural to ask whether universality, language equivalence, regularity or determinisability problems are decidable for that models and what is its complexity.
References
- [1] Shaull Almagor and Asaf Yeshurun. Determinization of One-Counter Nets. In Proceedings of CONCUR 2022, volume 243 of LIPIcs, pages 18:1–18:23. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.CONCUR.2022.18.
- [2] Toshiro Araki and Tadao Kasami. Some Decision Problems Related to the Reachability Problem for Petri Nets. Theor. Comput. Sci., 3(1):85–104, 1976. doi:10.1016/0304-3975(76)90067-0.
- [3] Corentin Barloy and Lorenzo Clemente. Bidimensional linear recursive sequences and universality of unambiguous register automata. In Proceedings of STACS 2021), volume 187 of LIPIcs, pages 8:1–8:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.STACS.2021.8.
- [4] Jason P. Bell and Daniel Smertnig. Computing the linear hull: Deciding Deterministic? and Unambiguous? for weighted automata over fields. In Proceedings of LICS 2023, pages 1–13. IEEE, 2023. doi:10.1109/LICS56636.2023.10175691.
- [5] Mikolaj Bojanczyk, Joanna Fijalkow, Bartek Klin, and Joshua Moerman. Orbit-Finite-Dimensional Vector Spaces and Weighted Register Automata. TheoretiCS, 3, 2024. doi:10.46298/THEORETICS.24.13.
- [6] Mikolaj Bojanczyk, Bartek Klin, and Joshua Moerman. Orbit-finite-dimensional vector spaces and weighted register automata. In Proceedings of LICS 2021, pages 1–13. IEEE, 2021. doi:10.1109/LICS52264.2021.9470634.
- [7] Sougata Bose, David Purser, and Patrick Totzke. History-Deterministic Vector Addition Systems. In Proceedings of CONCUR 2023, volume 279 of LIPIcs, pages 18:1–18:17, 2023. doi:10.4230/LIPICS.CONCUR.2023.18.
- [8] Thomas Colcombet. Unambiguity in automata theory. In Proceedings of DCFS 2015, pages 3–18, 2015. doi:10.1007/978-3-319-19225-3_1.
- [9] Wojciech Czerwinski, Diego Figueira, and Piotr Hofman. Universality Problem for Unambiguous VASS. In Proceedings of CONCUR 2020, volume 171 of LIPIcs, pages 36:1–36:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.CONCUR.2020.36.
- [10] Wojciech Czerwinski and Piotr Hofman. Language Inclusion for Boundedly-Ambiguous Vector Addition Systems Is Decidable. In Proceedings of CONCUR 2022, volume 243 of LIPIcs, pages 16:1–16:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.CONCUR.2022.16.
- [11] Wojciech Czerwinski and Piotr Hofman. Language Inclusion for Boundedly-Ambiguous Vector Addition Systems is Decidable. Log. Methods Comput. Sci., 21(1), 2025. doi:10.46298/LMCS-21(1:27)2025.
- [12] Wojciech Czerwinski and Slawomir Lasota. Regular Separability of One Counter Automata. Log. Methods Comput. Sci., 15(2), 2019. doi:10.23638/LMCS-15(2:20)2019.
- [13] Wojciech Czerwiński, Sławomir Lasota, Roland Meyer, Sebastian Muskalla, K. Narayan Kumar, and Prakash Saivasan. Regular separability of well-structured transition systems. In 29th International Conference on Concurrency Theory, CONCUR 2018, volume 118 of LIPIcs, pages 35:1–35:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.CONCUR.2018.35.
- [14] Wojciech Czerwinski, Antoine Mottet, and Karin Quaas. New techniques for universality in unambiguous register automata. In Proceedings of ICALP 2021, volume 198 of LIPIcs, pages 129:1–129:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.ICALP.2021.129.
- [15] Wojciech Czerwinski and Georg Zetzsche. An Approach to Regular Separability in Vector Addition Systems. In LICS ’20: 35th Annual ACM/IEEE Symposium on Logic in Computer Science, Saarbrücken, Germany, July 8-11, 2020, pages 341–354. ACM, 2020. doi:10.1145/3373718.3394776.
- [16] L.E. Dickson. Finiteness of the odd perfect and primitive abundant numbers with n distinct prime factors. American Journal of Mathematics, 35((4)):413–422, 1913.
- [17] Seymour Ginsburg and Joseph Ullian. Ambiguity in Context Free Languages. J. ACM, 13(1):62–89, 1966. doi:10.1145/321312.321318.
- [18] Mika Göös, Stefan Kiefer, and Weiqiang Yuan. Lower Bounds for Unambiguous Automata via Communication Complexity. In Proceedings of ICALP 2022, volume 229 of LIPIcs, pages 126:1–126:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.ICALP.2022.126.
- [19] Sheila A. Greibach. A Note on Undecidable Properties of Formal Languages. Math. Syst. Theory, 2(1):1–6, 1968. doi:10.1007/BF01691341.
- [20] Christoph Haase. A survival Guide to Presburger Arithmetic. ACM SIGLOG News, 5(3):67–82, 2018. doi:10.1145/3242953.3242964.
- [21] Piotr Hofman, Richard Mayr, and Patrick Totzke. Decidability of weak simulation on one-counter nets. In Proceedings of LICS 2013, pages 203–212. IEEE Computer Society, 2013. doi:10.1109/LICS.2013.26.
- [22] Richard M. Karp and Raymond E. Miller. Parallel program schemata. J. Comput. Syst. Sci., 3(2):147–195, 1969. doi:10.1016/S0022-0000(69)80011-5.
- [23] Eren Keskin and Roland Meyer. On the separability problem of VASS reachability languages. In Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2024, Tallinn, Estonia, July 8-11, 2024, pages 49:1–49:14. ACM, 2024. doi:10.1145/3661814.3662116.
- [24] Richard Mayr. Undecidable problems in unreliable computations. Theor. Comput. Sci., 297(1-3):337–354, 2003. doi:10.1016/S0304-3975(02)00646-1.
- [25] Antoine Mottet and Karin Quaas. The containment problem for unambiguous register automata. In Proceedings of STACS 2019, pages 53:1–53:15, 2019. doi:10.4230/LIPICS.STACS.2019.53.
- [26] Frank Neven, Thomas Schwentick, and Victor Vianu. Finite state machines for strings over infinite alphabets. ACM Trans. Comput. Log., 5(3):403–435, 2004. doi:10.1145/1013560.1013562.
- [27] Aditya Prakash and K. S. Thejaswini. On History-Deterministic One-Counter Nets. In Proceedings of FoSSaCS 2023, volume 13992 of Lecture Notes in Computer Science, pages 218–239. Springer, 2023. doi:10.1007/978-3-031-30829-1_11.
- [28] Antoni Puch and Daniel Smertnig. Factoring through monomial representations: arithmetic characterizations and ambiguity of weighted automata. CoRR, abs/2410.03444, 2024. doi:10.48550/arXiv.2410.03444.
- [29] Mikhail Raskin. A superpolynomial lower bound for the size of non-deterministic complement of an unambiguous automaton. In Proceedings of ICALP 2018, pages 138:1–138:11, 2018. doi:10.4230/LIPICS.ICALP.2018.138.
- [30] Sylvain Schmitz. The complexity of reachability in vector addition systems. ACM SIGLOG News, 3(1):4–21, 2016. doi:10.1145/2893582.2893585.
- [31] Philippe Schnoebelen. Lossy Counter Machines Decidability Cheat Sheet. In Reachability Problems, 4th International Workshop, RP 2010, Brno, Czech Republic, August 28-29, 2010. Proceedings, volume 6227 of Lecture Notes in Computer Science, pages 51–75. Springer, 2010. doi:10.1007/978-3-642-15349-5_4.
- [32] Richard Edwin Stearns and Harry B. Hunt III. On the equivalence and containment problems for unambiguous regular expressions, regular grammars and finite automata. SIAM J. Comput., 14(3):598–611, 1985. doi:10.1137/0214044.
- [33] Wen-Guey Tzeng. On path equivalence of nondeterministic finite automata. Inf. Process. Lett., 58(1):43–46, 1996. doi:10.1016/0020-0190(96)00039-7.
- [34] Rüdiger Valk and Guy Vidal-Naquet. Petri nets and regular languages. J. Comput. Syst. Sci., 23(3):299–325, 1981. doi:10.1016/0022-0000(81)90067-2.
- [35] Łukasz Orlikowski. Languages of Unambiguous Vector Addition Systems with States. Master’s thesis, University of Warsaw, 2024. URL: https://apd.uw.edu.pl/diplomas/225085/.
Proof of Lemma 7.
We prove this lemma by induction on . For we have and hence all decomposition conditions are satisfied. Now we assume, that this Lemma is true for and we show that this implies Lemma 7 for .
Let be the prefix of reading and let be the next transition of after . Hence for some . By induction assumption we can apply Lemma 7 to and get constant and decomposition:
Observe, that we changed to as we will redefine . Now let us set . Hence
Recall the definition of set from condition 5, let be the maximal norm of a transition, be the maximal norm of an initial configuration and let us define constants and given by Lemma 6. Let us also define constant . Let also . This will be a constant for Lemma 7 and . We have two cases. The first case is that for some loop , which is nonnegative on counters from and and is not a prefix of . The second case is that such a decomposition of does not exist. We start the proof with the second case.
Case 2.
Observe, that for each and :
Hence:
Hence, because of the definition of and the fact that in this case, the decomposition of does not exist, we have that . Then we set and . Then clearly from the induction assumption and the definition of conditions 1-3 and 5 are satisfied. Condition 4 is satisfied for by induction assumption and for we have hence it is also satisfied. Condition 6 is satisfied for by induction assumption. It is satisfied for because otherwise could have been decomposed and we are in case 1.
Case 1.
We know, that can be decomposed as described above. If there are multiple decompositions we choose any of the ones minimizing . Now, we show that decomposition of :
satisfies all the conditions. We start with conditions 2-6 as Condition 1 is the most challenging to prove.
Condition 2.
For this condition follows from the induction assumption. For we have that . Recall that was a transition reading letter and from the induction assumption does not read letter . Moreover, is a suffix of , which does not read the letter . Hence the condition follows.
Condition 3.
For the condition follows from the induction assumption and for we have that is a prefix of , which does not read the letter .
Condition 4.
For we have this condition from induction assumption and for we have that is a loop.
Condition 5.
This condition for follows from inductions assumption and for follows from the fact that is a nonnegative loop on counters from as required.
Condition 6.
For we have it from induction assumption. For we have it from minimality of .
Condition 1.
Observe, that for from induction assumption we have and moreover . Moreover, from induction assumption, and . Additionally . Therefore it is enough to prove that . Let
Observe, that for each we have:
Recall that and , so if then contains a nonnegative loop on counters from . Hence it is enough to prove, that does not contain such loop. Assume, for the sake of contradiction, that such that is a nonnegative loop on counters from . We define accepting runs , which will read the same word, but will be different and hence this will create a contradiction with the fact that is -ambiguous VASS. Intuitively, due to loops and we have more degrees of freedom in the last block and we can create different runs over the same word. As is a prefix of an accepting run we know, that there exists such that is an accepting run. Firstly, we define runs , and , which will be parts of :
where for we define . The intuition is, that is chosen in such a way to compensate the possible decrease of counters because of additional executions of loops and . Finally we define
where for we define . Now it is enough to prove Claims 26, 27 and 28.
Claim 26.
For each we have that is an accepting run.
Proof.
Let us fix . Because is an accepting run it is enough to prove that:
-
1.
For each and we have
-
2.
For each we have
-
3.
For each we have
Point 1.
We prove this by induction on . For the inequality follows from the fact that for each we have . Now we show the induction step. If we get the inequality from the induction assumption. Hence now we assume . Therefore there has to be such that . Let be the maximal such. Observe, that from induction assumption:
And moreover:
and for we have:
Hence:
Point 2.
If than because of point 1 we have:
Hence, we can assume . Therefore there has to be such that . Let be the maximal such. Observe, that:
And for each
Hence:
Point 3.
If than the inequality follows from Point 2. Hence now we assume . Therefore there has to be such that . Let be the maximal such. Hence: Observe, that:
And for we have:
Claim 27.
For each run reads the same word.
Proof.
Let us fix such that . Observe, that if and only if and . We have, that . Hence also , as they are parts of . Therefore these two runs read the same word because
Claim 28.
For each such that we have that .
Proof.
W.l.o.g. assume . Observe, that it is enough to show, that
Assume, for the sake of contradiction that:
Observe, that is not a prefix of , because then would be a prefix of , which is not possible because of properties of (recall, that and is not a prefix of ). Hence is a prefix of .
Hence for all we have:
Hence . Because is a prefix of and this contradicts the minimality of .
Since we have proven Claims 26, 27 and 28 we know that runs are all accepting, different and read the same word. This concludes the proof of Lemma 7.
