Manuscript Offprint
arXiv:2611.03313Regular Separability for Bidirected VASS
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
The regular separability problem asks, given two languages, whether there exists a regular language that contains one of them and is disjoint from the other. We study regular separability for bidirected VASS. We first show that the problem remains Ackermann-complete when the input consists of two languages recognised by bidirected VASS. To find a subclass of VASS in which the problem has lower complexity we define alphabetically bidirected VASS as ones where bidirectedness is also visible in the input letters. Our main result establishes that regular separability for alphabetically bidirected VASS is EXPSPACE-complete. The key to this result is that, in this setting, regular separability coincides with disjointness.
As a first ingredient in this equivalence, we also show that for alphabetically bidirected Z-VASS, regular separability and disjointness are equivalent. Consequently, regular separability for these systems is in polynomial-time. In fact, it is log-space inter-reducible with non-solvability of integer linear Diophantine equation systems.
Finally, we observe that the picture changes dramatically in the presence of a zero test, namely, we show that regular separability for alphabetically bidirected one-counter automata is undecidable.
2012 ACM Subject Classification Theory of computation → Parallel computing models
Keywords and phrases vector addition systems, Petri nets, bidirected systems, languages, regular separability
Digital Object Identifier 10.4230/LIPIcs...
Funding Funded by the European Union (ERC, FINABIS, 101077902). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them. In addition, the first author was supported by the European Research Council (ERC) grant POLARIS, agreement no. 101231447.
Acknowledgements We are grateful to Wojciech Czerwinski for the idea to study regular separability for bidirected systems.
AI Disclosure No AI tools were used in this work.

CC
© Łukasz Orlikowski and Georg Zetzsche;
licensed under Creative Commons License CC-BY 4.0
Leibniz International Proceedings in Informatics
LIPICS Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany
XX:2 Regular Separability for Bidirected VASS
1 Introduction
Regular separability is a decision problem for two given languages , and it asks whether they are regularly separable, i.e. whether there is a regular language such that and . Regular separability has received a significant amount of attention. After some discouraging undecidability results on context-free languages in the 1970s [29, 17], regular separability has been studied intensively over the last decade for vector addition systems with states (VASS), which have finite many control states with access to counters that can be incremented and decremented, but not zero-tested. Moreover, the counters have to stay negative during the run. Regular separability has been studied for integer VASS [4, 7], combination of VASS and subclasses [10], Büchi VASS [1], and VASS coverability languages (more generally, well-structured transition systems) [9, 11], VASS reachability sets [5], and one-dimensional VASS [8]. This culminated in the celebrated decidability result for regular separability of general VASS [19].
Remaining challenges Currently, three challenges remain in connection with regular separability. First, decidability is not known in the “CFL vs. VASS” setting, i.e. when one input language is context-free and the other is a VASS (reachability) language. Note that this significantly generalizes the “VASS vs. VASS” setting, because any two VASS languages are regularly separable if and only if the (linear) context-free language is regularly separable from the VASS language (in each case, .rev denotes string reversal).
The second challenge concerns the mysterious relationship between regular separability and the intersection problem, which asks whether two given languages intersect. As of now, almost all existing results on decidability and complexity of regular separability are in agreement with the corresponding intersection problem: In other words, in almost all settings, deciding regular separability of has the same complexity as deciding whether . The only exceptions to this are artificially constructed language classes that show that each problem can be decidable without the other [30, Thms. 4.1&5.2]. However, for all natural classes of infinite-state systems, the two problems agree in their decidability and complexity. In fact, under mild assumptions, if are accepted by well-structured transition systems (WSTS), then regular separability is even equivalent to disjointness [9]. This close agreement across infinite-state systems raises the question of whether there is a deeper connection, perhaps even a reduction technique, between regular separability and intersection. Note that the aforementioned setting “CFL vs. VASS” is a special case of this: It is known the intersection between CFL and VASS languages is decidable (it is equivalent to reachability in pushdown VASS [15]), but regular separability remains unknown.
The third challenge is to identify subclasses of VASS where the complexity of regular separability is lower than the general Ackermann-complete setting [19, Thm. 3.1].
Bidirected VASS In this work, we make progress on the second and third challenge above, by studying regular separability for the subclass of bidirected VASS. These are VASS where for every transition, there is another transition with opposite effect. Bidirectedness is a restriction that has been studied across recent decades for various types of infinite-state systems. This is because some types of static analysis directly correspond to reachability in bidirected (counter or pushdown) systems [27], but also because bidirectedness enables efficient algorithms for pushdown systems [2], VASS [23, 21, 20, 22], pushdown VASS [12] and other kinds of systems [13] (see [25] for an overview).
XX:3
Contributions We study regular separability for bidirected VASS. We first note that it is not obvious to find the right definition: If we only assume that we are given bidirected VASS for input languages and , then we show that it is still Ackermann-complete to decide whether and are regularly separable. However, a slightly different perspective will indeed yield lower complexity. We define alphabetically bidirected VASS as ones where bidirectedness is also visible in the input letters: The input alphabet consists of two parts and , where are considered opposite to . And crucially, the opposite of a transition also carries the opposite label.
For alphabetically bidirected VASS, we show that the complexity of regular separability indeed drops significantly. Our main result is that for alphabetically bidirected VASS, regular separability is EXPSPACE-complete. As mentioned above, this contrasts with Ackermann-completeness for general VASS. To this end, we show that for alphabetically bidirected VASS, regular separability coincides with disjointness.
As a first ingredient in this equivalence, we also show that for alphabetically bidirected -VASS (i.e. VASS where counters can drop below zero), regular separability and disjointness coincide. This yields a result of independent interest: Regular separability for alphabetically bidirected -VASS is in polynomial time (in fact, inter-reducible with non-solvability of integer linear Diophantine equation systems). Again, this is in contrast to coNP-completeness for general -VASS [7, Thm. 3.6].
However, in our second main result, we show that for one-counter automata (i.e. VASS with one zero-testable counter), regular separability in the alphabetically bidirected setting is undecidable, just like for unrestricted one-counter automata [8, Thm. 2].
Lower complexity and connection to disjointness This means, with the alphabetically bidirected setting, we identify two subclasses of VASS with lower complexity of regular separability, and thus contribute to the third challenge above. In addition, we make progress on the second challenge: This is because our algorithms for VASS and -VASS rely on the equivalence between regular separability and disjointness. In other words, they enjoy the same property as most languages of WSTS [9].
Key insights Our proofs rely on several new insights. As mentioned above, the first ingredient is that in alphabetically bidirected -VASS, regular separability and disjointness are equivalent. To this end, we work with a characterization [7, Thm. 4.6] of regular inseparability of -VASS in terms of solvability of a linear equation system associated with the -VASS. These solutions correspond to integer linear combinations of cycles, i.e. where some cycles can occur with negative multiplicity. Roughly speaking, we observe that in bidirected systems, such solutions can be converted into proper runs, by replacing negative-multiplicity cycles with positive multiples of their opposite cycle .
Then for (non-integer) VASS, our proof consists of several steps. First, we consider the case that all counters of the input VASS are simultaneously unbounded (i.e. in a product of the input VASS, there are runs that make all counters arbitrarily large at the same time). In this case, we consider three overapproximations: (i) the forward coverability language, (ii) the backward coverability language, and (iii) the words accepted in -semantics (i.e. where counter can drop below zero). By relying on the equivalence of regular separability and disjointness for coverability VASS [11] (in the case of (i)&(ii)) and alphabetically bidirected -VASS (for (iii)), we then know that if any of those overapproximations yield empty intersection, we have regular separability. However, if each pair of overapproximations intersects, simultaneous unboundedness allows us to construct a word in the intersection.
arxiv
XX:4 Regular Separability for Bidirected VASS
If the counters are not all simultaneously unbounded, we rely on a result about bidirected VASS [13, Lemma 6.2], which says that all unbounded counters in a bidirected VASS are even simultaneously unbounded. This means, there must be one counter that is bounded in the product construction. Roughly speaking, this allows us to eliminate that counter and argue by induction on the total number of counters.
In our undecidability proof for alphabetically bidirected OCA, we follow the same strategy as in the undecidability for general OCA [8]. However, the latter crucially relies on the fact that in a two-counter machine that terminates after steps, if denotes the set of runs ignoring counter , then and can agree on a prefix of length at most . However, if we attempt to translate this into a bidirected setting by adding backward edges, then we introduce arbitrary-length common prefixes. Therefore, we rely on a result of Morita [24] that shows Turing-completeness of reversible (i.e. backward deterministic) two-counter machines. We observe that here, even with added backward edges, a regular language can differentiate prefixes of from , even though they may agree on arbitrary-length prefixes.
Structure of the paper After introducing basic notions in Section 2, we discuss the aforementioned naive notion of regular separability in bidirected VASS in Section 3. In Section 4, we prove the equivalence between regular separability and disjointness in alphabetically bidirected -VASS. Section 5 then shows out main result: equivalence of regular separability and disjointness in alphabetically bidirected VASS. Finally, Section 6 proves undecidability of regular separability of alphabetically bidirected OCA.
Vector Addition Systems with States A -dimensional Vector Addition System with States (-VASS) is a nondeterministic finite automaton with non-negative integer counters. Formally, we define VASS as where is a finite alphabet, is a finite set of automaton states, is a transition relation, is an initial state and is the final state. For a transition , we say that the transition is over the letter or that the transition reads the letter . We also write for the effect of the transition , which is . For a VASS we denote by the VASS
A -VASS can be seen as an infinite-state labelled transition system in which each configuration is a pair . We denote such a configuration as . A transition can be fired in a configuration if, and only if and where . After firing the transition, the configuration is changed to . Whenever
XX:5
a VASS is part of the input we assume that numbers on transitions are encoded in binary. We also define a 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 the -th (for ) entry of the , we write , and for the effect on the subset of counters we write . 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 cycle if the state of its initial configuration is the same as the state of the final configuration. For two runs we denote by the run obtained by concatenation of and . We say that a run is over (or reads) a word if and only if the sequence of all non- labels of transitions of is exactly (preserving the order of transitions). We say that the length of a run is equal to if it consists of transitions. For the length of a run, we write . For a VASS , configuration , and state , we denote by the set of vectors such that if then there is a run from the configuration to configuration in .
We consider a variant of VASS, called integer VASS (Z-VASS), where the nonnegativeness constraint is dropped. Syntactically, Z-VASS is the same as VASS, namely it consists of a finite alphabet, a finite set of states, a finite set of transitions, an initial state , and a final state . Semantically, configurations of a Z-VASS are (instead of ), while all definitions (run, reachability set, etc.) are the same as in case of VASS, except the fact that a transition can be fired in a configuration if, and only if, (we do not restrict that the counters cannot drop below zero). Equivalently, we may also speak of Z-configurations and Z-runs of a VASS, i.e., configurations and runs where the nonnegativeness constraint is dropped.
We also consider one counter automaton (OCA), which is a 1-VASS, where the counter can be additionally zero-tested. Syntactically and semantically, OCA is almost the same as 1-VASS, namely, it consists of a finite alphabet, a finite set of states, a finite set of transitions, an initial state , and a final state . The only difference is that it can have special transitions, which can be fired only if the counter is equal to zero.
Bidirected VASS We say that a VASS is bidirected if the existence of a transition implies that there also exists a transition for some . We call a reverse transition of and denote it as . Moreover, we say that is alphabetically bidirected if (i) its alphabet where (ii) the existence of a transition implies that there also exists a transition where we set . We call the reverse transition of and denote it as . Notice that in the case of alphabetically bidirected VASS, the reverse transition is uniquely determined. For a word we define its reverse as . Similarly for a run we define its reverse as . We extend the notion of bidirected and alphabetically bidirected to Z-VASS and OCA, noting that for OCA, if a transition zero-tests the counter then the reverse transition also needs to zero-test the counter.
Languages of VASSs A run of a VASS is accepting if it starts in the initial configuration and ends in the accepting configuration . 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 reachability languages. Sometimes we consider languages with other acceptance conditions (coverability languages); in that case, we indicate it clearly. The coverability language of a VASS is defined as the set of all words read by runs from to
XX:6 Regular Separability for Bidirected VASS
for some . Therefore, it is a superset of the reachability language. We denote it by . Sometimes we consider the language of a VASS when it is interpreted as a -VASS, namely, we allow the counters to have negative values along the run. We denote the language of a -VASS by , or simply by when it is clear from the context that is a -VASS. It consists of all words read along -runs from to . Similarly, we define if is an OCA instead of a standard VASS.
Regular separability We call two languages regularly separable if there exists a regular language such that and . In that case, we write and call a regular separator of and . We are mainly interested in the regular separability problem, namely, given two languages, decide whether there exists a regular separator that separates them. Sometimes we analyse similar problems for different classes of separators than regular languages. Concretely, let be a class of languages. Then the -Sep problem asks whether for languages and there exists a language such that and .
Recognizable separability A subset of a monoid is recognizable if there is a morphism into some finite monoid such that . We say that sets are recognizably separable if and only if there exists a recognizable such that and . Similarly, as in the case of regular separability, if sets and are recognizably separable, then we write .
3 A naive attempt: non-alphabetic bidirectedness
In this section, we explain why bidirectedness alone is not sufficient for obtaining better complexity bounds and why we need to consider alphabetically bidirected VASSs.
► Lemma 3.1. For any class of languages closed under intersection and union with piecewise testable languages -Sep of two VASSs languages can be reduced to -Sep of two bidirected VASSs languages.
Proof. Let us fix two VASSs and . We will construct two bidirected VASSs and such that and are -separable if and only and are -separable.
Let be the set of all the letters used by and . Let us take two letters . For , define as a copy of with additional transitions, namely, for each transition of , we construct transition in . Observe that clearly from the construction, both and are bidirected.
Firstly, we show that if and are -separable then and are -separable. Let such that and . As and are over we can assume is over (otherwise take as a separator). Let where . Clearly . Hence it enough to show that . Assume, towards contradiction, that there exists . Observe, that is a language over and is a language over . Hence . Observe, that and . Thus, we can observe that and , which contradicts the fact that . Hence and and are -separable.
¹ Recall that a regular language is piecewise testable if it is a finite boolean combination of languages of the form , where for .
XX:7
Now, we show that if and are -separable then and are -separable. Let such that and . Let . Clearly . Moreover, observe, that .
Class of regular languages is closed under intersection and union with piecewise testable languages. Therefore, because regular separability is ACKERMANN-complete for VASSs [19], we get the following corollary.
► Corollary 3.2. Regular separability for bidirected VASS is ACKERMANN-complete.
We remark that one can obtain a similar statement to Lemma 3.1 for other bidirected models, including bidirected -VASS. Moreover, the product VASS of two labeled bidirected VASSs is not necessarily a bidirected VASS. In fact, it is easy to show that the class of languages they represent is not closed under intersection. Observe that crucially in the proof of Lemma 3.1 we used two different letters in each of the VASSs. Therefore, in the remaining part of the paper, we consider alphabetically bidirected systems. For alphabetically bidirected VASSs, their product is still such a VASS. This is formalised in Claim 3.3, which is proven in Appendix A. Here for two VASSs and , and dimensional respectively, we define their product , which is a dimensional VASS, where , , , and
▷ Claim 3.3. Let and be alphabetically bidirected VASSs over , then is also an alphabetically bidirected VASS over .
4 Integer VASS
We now study regular separability in alphabetically bidirected -VASS. We will characterise its complexity via solvability of integer linear Diophantine equation systems (ILD), where given a matrix and a vector , we are asked whether there is an with . ILD is solvable in polynomial time [3, Thms. 1&13]. By coILD, we denote the complement of ILD, thus non-solvability of integer linear Diophantine equation systems.
► Theorem 4.1. Regular separability for alphabetically bidirected -VASS is log-space interreducible with coILD. In particular, the problem is in P.
To show this, we will prove that regular separability for alphabetically bidirected -VASS is log-space interreducible with emptiness in bidirected -VASS, which is itself log-space interreducible with coILD [14, Thm. 3.2(2)]. The reduction from emptiness is the usual one: Given a bidirected -VASS over , we take the trivial bidirected -VASS with . Then if and only if .
It thus remains to reduce regular separability to emptiness of bidirected -VASS. To this end, we rely on the following lemma, which states that regular separability is equivalent to intersection emptiness for -VASS.
► Lemma 4.2. Alphabetically bidirected -VASS and are regularly separable if and only if .
XX:8 Regular Separability for Bidirected VASS
Note that this equivalence between disjointness and separability does not hold for general -VASS: The languages , are disjoint -VASS languages, but they are not separable by a regular language.
Before proving Lemma 4.2, we show how it implies Theorem 4.1.
Proof of Theorem 4.1. As argued, it remains to reduce regular separability to emptiness of bidirected -VASS. Let us fix -VASS and . Consider the product -VASS , which is alphabetically bidirected by Claim 3.3. Clearly . Thus, we have reduced the problem to emptiness of , which in turn log-space reduces to coILD [14, Thm. 3.2(2)].
Overview of the proof of Lemma 4.2 The rest of this section is devoted to the proof of Lemma 4.2. Firstly, we follow ideas from [4] (Lemmas 4.3-4.5), namely, we reduce regular separability to recognisable separability of semilinear sets in (for some ). Moreover, in some sense, reductions preserve nonemptiness of languages and sets. Concretely speaking, instead of asking for the regular separability in two given -VASS, we are counting the cycles within runs of these -VASS. Finally, in order to finish the proof of Lemma 4.2. We use Lemma 4.6 from [7], which characterises when two hyperlinear sets can be separated by a recognisable set.
Reduction to deterministic systems We first follow the reduction from [4]. Firstly, we reduce in polynomial time the regular separability problem for nondeterministic alphabetically bidirected -VASS to the same problem in deterministic alphabetically bidirected -VASS. The fact that the reduction is performed in polynomial time, while determination typically requires at least an exponential blowup, follows from the fact that in our "determination" we use a homomorphism. Concretely speaking, from two given alphabetically bidirected -VASS and over we construct two deterministic alphabetically bidirected VASS and such that for some homomorphism and if, and only if, holds. Moreover, if, and only if, . This idea is analogous to [4, Lemma 7], but we need to make sure that bidirectedness is preserved. A proof can be found in Appendix B.1.
► Lemma 4.3. Given alphabetically bidirected -VASS , one can construct deterministic alphabetically bidirected -VASS such that
-
if and only if and
-
if and only if .
This means, it suffices to prove Lemma 4.2 for deterministic alphabetically bidirected -VASS.
Reduction to a single integer VASS As in [4], we now simplify the situation further. Concretely speaking, we reduce it to regular separability of two languages accepted by the same deterministic alphabetically bidirected -VASS, but with different sets of counters, that is given --VASS and --VASS we construct (using product construction) one --VASS and two index sets such that where is the language of the VASS restricted only to the counters from the subset . Thus, clearly . Note that, as we use product construction, the fact that we work with alphabetically bidirected -VASS is crucial as we can use Claim 3.3 and say that is also a bidirected -VASS over a bidirected alphabet. The following lemma
XX:9
is analogous to [4, Proposition 1], but in the bidirected setting and is proven in Appendix B.2.
► Lemma 4.4. Given deterministic alphabetically bidirected -VASS and , one can construct a single deterministic, alphabetically bidirected --VASS with subsets such that
-
if and only if and
-
if and only if .
This means, it suffices to prove Lemma 4.2 for a language pair of the form as in Lemma 4.4.
Skeletons Further, we simplify the regular separability problem by considering only runs in that are in some sense similar. Concretely speaking, we consider some base paths in , which we call skeletons. We say that two runs in are similar if they follow the same base path and only differ in the order and repetition of some cycles. Concretely, we define a function skel : satisfying that for a path we have skel() = such that (i) is a sub-path of (ii) the set of states visited by is the same as the set of states visited by and (iii) the last state of is the same as the last state of . We call the skeleton of . The definition of the function skel : is standard and closely follows the one, which can be found in [4, 7]. For completeness, we provide it in Appendix B.3. By [4, Lemma 10] we get, that for any path it holds that . For a skeleton , we say that a -cycle is a simple cycle that only visits states occurring in ; a -run is a run such that . Observe that therefore every -run can be obtained from by inserting -cycles. Finally, we define as the set of all words from accepted by -runs.
► Lemma 4.5 ([4, Lemma 11]). We have if, and only if, holds for every skeleton .
Since clearly if and only if for every skeleton, this means it suffices to prove Lemma 4.2 for language pairs of the form .
Counting cycles Now, we recall a characterisation of regular separability from [4]. It says that regular separability of the languages and is equivalent to recognisable separability of vectors that count -simple cycles. This is possible since each -cycle can be decomposed into simple -cycles. In the following, we fix the set of all simple -cycles in , which is a finite set. For a multiset of simple cycles and we define an effect of on the components in as . Similarly for a multiset of transitions and we define an effect of on the components in as . Finally, we define
Hence, is the set of multisets of simple -cycles such that inserting them into would lead to an accepting run with acceptance condition . The following equivalence between regular separability of the languages and recognisable separability of the sets was shown in [4].
► Lemma 4.6 ([4, Lemma 12]). if and only if .
This means, for Lemma 4.2, it suffices to show:
XX:10 Regular Separability for Bidirected VASS
Indeed, by the above, we need to show that implies . But if , then certainly , which by (1) and Lemma 4.6 would yield . Thus, we shall prove (1).
Hyperlinear sets Now we deviate from the ideas from [4] and use ideas from [7]. Firstly, the set is hyperlinear:
▷ Claim 4.7. Let . Then is hyperlinear, i.e., for two finite sets
This is because, we can take as the minimal solutions to , of which there are finitely many. Moreover, the set
satisfies , and is generated as a monoid by its minimal elements, meaning for some finite (see [7, Observation 6.4] and [16]).
Separating hyperlinear sets Furthermore, we will rely on a characterisation of recognisable separability of hyperlinear sets from [7]. To state it, we need some terminology. For a vector , we write . A coordinate is twin-unbounded for and if there exist and such that . Moreover, for , we write and .
► Lemma 4.8 ([7, Theorem 4.6]). Let and be hyperlinear sets. Then and are not separable by a recognisable set if and only if the intersection
is non-empty, where is the set of coordinates that are twin-unbounded for
Exploiting bidirectedness Until now, our reductions worked essentially like the reductions in either [4] or [7], respectively. This means, they preserve bidirectedness, but we have not exploited bidirectness yet. Our next lemma finally exploits bidirectedness.
► Proposition 4.9. If is bidirected, then there is a with .
Proof sketch. (A full proof is in Appendix B.4.) Since every cycle has a backward cycle , the vector , which contains and (but no other cycle) will have . With , we get a vector as desired.
With Lemma 4.8 and Proposition 4.9 in hand, we can now prove (1).
Proof of (1). We write and for finite sets , and let be the set of twin-unbounded coordinates. Then we have and . We prove the contraposition of (1), so suppose does not hold. By Lemma 4.8 we have
ℋ. Orlikowski and G. Zetzsche
XX:11
for some , , , , , and . With the vector from Proposition 4.9 and some sufficiently high , we have and , since is positive in every coordinate. We claim that the vector
belongs to : Indeed, since and also , we know that . Therefore, (2) belongs to . A symmetric argument yields membership in .
A detailed proof with all steps in order can be found in Appendix B.4.
5 VASS
In this section, we prove the following:
► Theorem 5.1. Regular separability for alphabetically bidirected VASS is EXPSPACE-complete.
We proceed similarly as in Section 4, that means we show Lemma 5.2, which states that regular separability is equivalent to intersection emptiness for VASS.
► Lemma 5.2. Alphabetically bidirected VASS and are regularly separable if and only if .
Before proving Lemma 5.2 we show how it implies Theorem 5.1,
Proof of Theorem 5.1. For EXPSPACE-hardness, we can use the usual reduction from reachability, since reachability in bidirected VASS is EXPSPACE-complete [23, Main Theorem]. Suppose we are given a bidirected VASS and want to decide whether can reach . We construct an alphabetically bidirected VASS whose input words are transition sequences of that lead from to . With an alphabetically bidirected that accepts all words, we then have if and only if is not reachable from . A detailed proof is in Appendix C.1.
For the EXPSPACE upper bound, fix alphabetically bidirected VASSs and . Because of Lemma 5.2 we need only to check whether . In polynomial time, we construct product VASS , which, because of Claim 3.3, is an alphabetically bidirected VASS. Clearly . Hence, we need to check the non-emptiness of , which reduces to a reachability query, which is decidable in EXPSPACE.
We now prove Lemma 5.2. The non-obvious direction is the implication that disjointness implies regular separability. Therefore, fix -VASS and -VASS such that
Separability of reversal languages In the following, we will sometimes argue about the reversal VASS rev of . Here, for a language , we denote by the (bidirected) reversal language of , meaning , where is the reversal of the word , where also all letters are turned into their opposite (i.e. is replaced with and vice-versa). Then we have . We will rely on the following simple observation (see Appendix C.2 for a proof):
▷ Claim 5.3. For any languages , we have if and only if .
XX:12 Regular Separability for Bidirected VASS
Case I: Simultaneous unboundedness We first consider a special case when the pairs and are simultaneously unbounded. Formally, a pair of VASSs is simultaneously unbounded if for the initial state of , all states of and every there exists such that, for every , we have . In other words, for every , all counters in can go above at the same time.
Coverability overapproximation Our arguments crucially depend on considering overapproximations of and . For a VASS , let be its coverability language, meaning the set of all words read by runs that end up in a final state, with any counter values. Observe, that and . Thus, regular separability of and would imply regular separability of and . Similarly, because of Claim 5.3, regular separability of and would imply regular separability of and . If one of this happen, we are done showing regular separability of and . Therefore, assume that neither of these two situations happens. Then we use the following lemma from [11, Theorem 3.1].
► Lemma 5.4 ([11, Theorem 3.1]). For two VASSs and we have if and only if .²
Therefore due to Lemma 5.4 we have and .
Constructing runs We now use the non-emptiness of these intersections, and simultaneous unboundedness, to construct certain runs of and . Intuitively speaking, the property of the words, which we look for, is that they can be accepted by a run having a strictly positive effect on all the counters. Let and be the initial and final state of respectively. Then we can observe the following.
▷ Claim 5.5. There exist and such that for each there exist runs:
-
in over , which when fired from configuration covers configuration and with
-
in over , which when fired from configuration covers configuration and with .
Let us give some intuition for the first statement. Because of simultaneous unboundedness, there must be a state and two reachable configurations and such that is larger than on all coordinates. By first going to and then (exploiting bidirectedness) taking the path to backwards, we can come back to the initial state, but with all counters positive. After this, we apply the run given by . A detailed proof of Claim 5.5 can be found in Appendix C.3.
Proving regular separability Now, we show that and are regularly separable. To this end, we will show that and are disjoint. This suffices, because and by Lemma 4.2, this means and are regularly separable.
Assume, towards contradiction that . Therefore, there exist -run and in and , respectively, which are accepting runs (in the -semantics) and read the same word . Our goal is to come up with a contradiction that . Let
² In fact, this result was shown for a wider class of Well-structured transition systems (WSTS).
XX:13
be the maximal change of a counter value by a single transition in and and let . For , let us define run
Observe that is a -run in . Moreover we have, that and read the same word and . Now we show that they are runs starting from . Clearly starting from is a run and observe, that and hence is a run starting from . As is a run starting from to , for we get that is a run from to . Observe that and hence is an accepting run in and therefore we get contradiction with , which results in , which, because of Lemma 4.2, implies that and are regularly separable. The above considerations can be summarised in the following claim.
▷ Claim 5.6. If and and are simultaneously unbounded then .
The general case We now show the general case of Lemma 5.2, i.e. where we do not assume simultaneous unboundedness. The full proof can be found in Appendix C.4. We proceed by induction on . If then the property of Lemma 5.2 is clearly true because and are regular languages. Now assume that . If and are simultaneously unbounded then, by Claim 5.6, we get , as required. Otherwise, because of Claim 5.3, we can w.l.o.g. assume that is not simultaneously unbounded. In this case we leverage the following lemma from [13].
► Lemma 5.7 ([13, Lemma 6.2]). For every bidirected VASS with source configuration there exists a number and we can partition the set of counters into two disjoint subsets of counters such that for all states we have:
for every and every we have ;
for every there is a with for every .
Let us consider VASS , which is an alphabetically bidirected VASS due to Claim 3.3 and partition its counters into two sets and as in Lemma 5.7. Since is not simultaneously unbounded we get that . W.l.o.g assume that there exists counter coming from such that , meaning counter is bounded in .
Splitting along counter bound However, note that while counter is bounded in , it may not be bounded in . Therefore, from , we now construct two VASS: , which simulates all runs of where counter remains at most ; and , which simulates all runs of where counter exceeds at some point. This means, goes into a special accepting state from which it can read any letter. Crucially, tracking the value of counter can be done in a control state, meaning and have one fewer counter (and we will be able to apply induction).
Moreover, we observe that is alphabetically bidirected, whereas may not be. However, we can make alphabetically bidirected by explicitly adding the reverse transitions, without changing its language.
We can now observe that both and are disjoint from , for different reasons: is disjoint from , because any intersection would also exist in and . Moreover, is disjoint from because of counter being
XX:14 Regular Separability for Bidirected VASS

Figure 1 Example of OCA (on the left) and OCA (on the right) satisfying the conditions of Lemma 6.1. For , we set its initial state to and its final state to . For , we set its initial state to and its accepting state to . Annotations on transitions represent the letter of a transition and its effect. mean, respectively, incrementing, decrementing, and zero-testing the counter.
bounded by in . For both languages, induction yields that they are regularly separable from . Since , this means and are also regularly separable, and Lemma 5.2 is established.
6 OCA
In this section, we consider alphabetically bidirected OCA. In light of the results for bidirected -VASS and VASS, one might suspect that, for bidirected systems, intersection non-emptiness is always equivalent to regular separability. However, this is not the case:
► Lemma 6.1. There exist alphabetically bidirected OCA and such that and are not regularly separable and .
The OCA are shown in Figure 1. Intuitively, their languages are not regularly separable, because the first occurrence of requires the counter, which is visible in the balance between positive (unbarred) and negative (barred) letters, to be zero in , but non-zero in . This cannot be distinguished by a regular language. A detailed proof can be found in Appendix D.
In fact, we will show the following:
► Theorem 6.2. Regular separability is undecidable for alphabetically bidirected OCA.
This strengthens undecidability of regular separability of general OCA, as shown by Czerwiński and Lasota in [8]. We adapt their proof to the bidirected setting. We show, roughly speaking, that every decidable problem can be reduced in exponential time to regular separability of languages of alphabetically bidirected OCA, which implies undecidability. This technique is inspired by the undecidability proof presented by Hunt [18]. The rest of this section is devoted to the proof of Theorem 6.2.
Overall strategy Similar to the proof of Czerwiński and Lasota in [8], our goal is to show a time-bounded reduction from any decidable problem to regular separability for alphabetically bidirected OCA. However, instead of reducing in polynomial time, we reduce in exponential time. This implies undecidability of the latter problem, since otherwise, decidability of regular separability for alphabetically bidirected OCA in time , where is the size of the input, would imply decidability of any decidable problem in time , for some polynomial , which would violate the time hierarchy theorem [28, Theorem 9.10]. Hence, in order to prove Theorem 6.2, it is enough to prove the following claim.
▷ Claim 6.3. Every decidable problem reduces in exponential time to regular separability of languages for alphabetically bidirected OCA.
XX:15
Two-counter machines A deterministic 2-counter machine consists of a finite set of states with three distinguished states: initial state , accepting state and rejecting state ; two counters and ; and a set of transitions, which can increment, decrement, or zero-test a counter. Crucially, counter values cannot drop below zero. Furthermore, the accepting and rejecting states and have no outgoing transitions. Finally, for every state and every pair of counter values , at most one transition is enabled. A configuration of consists of a state and values of counters . For a vector we write for configuration . For two configurations and , we write if there exists a sequence of transitions leading from to , and if there exists a single transition leading from to .
We say that a number is accepted by 2-counter machine if and rejected if . We call total if every is either accepted or rejected by . The language of , denoted by , is the set of numbers accepted by .
Accepting languages Let us encode every word using binary representation as a natural number . It is well-known that then for every decidable language , there exists a total deterministic 2-counter machine such that if, and only if . Here, the exponentiation arises from the fact that firstly a Turing Machine is simulated by a 3-counter machine, which is later simulated by 2-counter machine, which stores the value of three counters as the value .
Reversible Two-counter machines In our proof, it will be crucial to work with reversible two-counter machines, meaning ones where for every configuration there is at most one configuration such that . By a result of Morita [24, Theorem 4.1], every total deterministic 2-counter machine can be simulated by a total deterministic reversible 2-counter machine. This means, we may assume that our machine is total deterministic and reversible. Moreover, by adding auxiliary states and transitions, we can assume that has only a single outgoing transition from the initial state.
Adding backward edges Let us now prove Claim 6.3. We take a decidable set and construct as above. Let be the set of transitions in . Recall that in , there is only one outgoing transition from the initial state of . We construct a 2-counter machine from by adding reverse edges, namely, for each transition incrementing, decrementing, or zero-testing a counter, we add a reverse transition decrementing, incrementing, or zero-testing the counter respectively.
We observe, that . For that, we use an argument similar to the one presented already in Post's undecidability proof of the word problem for Thue systems [26, Lemma II]. Clearly, any original run of is present in . Conversely, consider an accepting run in , which may use the new backward edges. Because there is no outgoing forward edge from the accepting state, the run cannot end on a reverse edge. Therefore, as long as it contains reverse edges, there exists a reverse edge , which is followed by a forward edge . Observe that can either increment, decrement, or zero-test the counter , for some . Since is deterministic, we know that can either decrement, increment, or zero-test the counter , respectively. Hence, the effects of and cancel out and we can omit both from the run. We iterate this argument and finally obtain a run without any reverse edges, which is also a run of .
XX:16 Regular Separability for Bidirected VASS
The reduction to regular separability Given a word , we consider . We shall construct two alphabetically bidirected OCA and such that
-
if then (and thus they are not regularly separable);
-
if then and are regularly separable.
As the alphabet of and , we take , i.e., the transitions of where each transition coming from is represented by the letter and its added reverse transition by the letter . Intuitively, will ignore the second counter of , and will ignore the first counter of . Formally, for , consists of states of (and one additional state in the case of ), and the transition set is constructed as follows. Let be a transition from to in . If increments, decrements, zero-tests, or performs no operation on the counter , then we add the corresponding transition , , , or , respectively, to . Furthermore, to have essentially as the initial configuration in , we add transitions and to . Observe that is an alphabetically bidirected OCA, because we construct it from , and hence existence of transition implies existence of the transition . Finally, we set and to be the initial states of and , respectively, and to be the final state in both and .
Observe that if we allow binary representations of updates in the OCA (which of course, does not affect decidability), then this reduction above can indeed be performed in time exponential in , since the -labeled transitions carry a binary representation with bits.
Intersection Let us show that and satisfy condition 1. Let be the shortest run of which accepts . Hence does not use reverse transitions of . Observe, that after reading word we know that and are both in configuration . Hence, .
Regular separability We now show that and satisfy condition 2. We present a proof sketch here, with full details in Appendix D.1. Suppose , or equivalently . This means, the unique run of (when starting with counter value ) ends up in a rejecting state after some number of steps. Since is reversible, this means all the paths in must move along this path of : They can walk back and forth, but they must stay on this path. We turn this path (including backward edges) into a DFA . Observe that for any state of and any label not leaving , there is at most one of the languages and that can use this label to continue a run: Otherwise we would have a run of that leaves the path . Therefore, for each pair , we can classify the input into either (potentially) belonging to or (potentially) belonging to , but not both. This allows us to construct a regular separator for and .
7 Conclusion
Our results draw a relatively complete picture of decidability and complexity of regular separability in alphabetically bidirected systems, even beyond VASS: Undecidability for OCA also implies undecidability for alphabetically bidirected pushdown systems. For alphabetically bidirected VASS in fixed dimension, Lemma 5.2 also implies that the complexity coincides with that of reachability. The latter is L-complete under unary updates [14, Thm. 3.2(1)].
Towards resolving the question of decidability of regular separability in the “CFL vs. VASS” setting mentioned in the introduction, it would be interesting to study regular separability of a pushdown automaton and a VASS, where both systems are alphabetically bidirected. Here, the techniques for decidability of bidirected pushdown VASS, shown in [12], might be useful.
Ł. Orlikowski and G. Zetzsche
XX:17
References
1 Pascal Baumann, Eren Keskin, Roland Meyer, and Georg Zetzsche. Separability in büchi VASS and singly non-linear systems of inequalities. In Karl Bringmann, Martin Grohe, Gabriele Puppis, and Ola Svensson, editors, 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, Tallinn, Estonia, July 8-12, 2024, volume 297 of LIPIcs, pages 126:1–126:19. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ICALP.2024.126.
2 Krishnendu Chatterjee, Bhavya Choudhary, and Andreas Pavlogiannis. Optimal dyck reachability for data-dependence and alias analysis. Proc. ACM Program. Lang., 2(POPL):30:1–30:30, 2018. doi:10.1145/3158118.
3 Tsu-Wu J Chou and George E Collins. Algorithms for the solution of systems of linear diophantine equations. SIAM Journal on computing, 11(4):687–708, 1982.
4 Lorenzo Clemente, Wojciech Czerwinski, Slawomir Lasota, and Charles Paperman. Regular Separability of Parikh Automata. In 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland, volume 80 of LIPIcs, pages 117:1–117:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2017. URL: https://doi.org/10.4230/LIPIcs.ICALP.2017.117, doi:10.4230/LIPICS.ICALP.2017.117.
5 Lorenzo Clemente, Wojciech Czerwinski, Slawomir Lasota, and Charles Paperman. Separability of reachability sets of vector addition systems. In Heribert Vollmer and Brigitte Vallée, editors, 34th Symposium on Theoretical Aspects of Computer Science, STACS 2017, Hannover, Germany, March 8-11, 2017, volume 66 of LIPIcs, pages 24:1–24:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPICS.STACS.2017.24.
6 Elias Rojas Collins, Chris Köcher, and Georg Zetzsche. The Complexity of Separability for Semilinear Sets and Parikh Automata. CoRR, abs/2410.00548, 2024. URL: https://doi.org/10.48550/arXiv.2410.00548, arXiv:2410.00548, doi:10.48550/ARXIV.2410.00548.
7 Elias Rojas Collins, Chris Köcher, and Georg Zetzsche. The Complexity of Separability for Semilinear Sets and Parikh Automata. In 50th International Symposium on Mathematical Foundations of Computer Science, MFCS 2025, August 25-29, 2025, Warsaw, Poland, volume 345 of LIPIcs, pages 38:1–38:21. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025. URL: https://doi.org/10.4230/LIPIcs.MFCS.2025.38.
8 Wojciech Czerwinski and Slawomir Lasota. Regular Separability of One Counter Automata. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017, pages 1–12. IEEE Computer Society, 2017. doi:10.1109/LICS.2017.8005079.
9 Wojciech Czerwiński, Slawomir 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.
10 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.
11 Wojciech Czerwiński, Eren Keskin, Slawomir Lasota, Roland Meyer, Sebastian Muskalla, K Narayan Kumar, and Prakash Saivasan. Separability and Non-Determinizability of WSTS, 2024. URL: https://arxiv.org/abs/2305.02736, arXiv:2305.02736.
12 Moses Ganardi, Rupak Majumdar, Andreas Pavlogiannis, Lia Schütze, and Georg Zetzsche. Reachability in bidirected pushdown VASS. In Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, Paris, France, July 4-8, 2022, volume 229 of LIPIcs, pages 124:1–124:20. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.ICALP.2022.124.
arXiv
XX:18 Regular Separability for Bidirected VASS
13 Moses Ganardi, Rupak Majumdar, and Georg Zetzsche. The complexity of bidirected reachability in valence systems. In Christel Baier and Dana Fisman, editors, LICS '22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2 - 5, 2022, pages 26:1–26:15. ACM, 2022. doi:10.1145/3531130.3533345. 14 Moses Ganardi, Rupak Majumdar, and Georg Zetzsche. The Complexity of Bidirected Reachability in Valence Systems. In LICS '22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2 - 5, 2022, pages 26:1–26:15. ACM, 2022. doi:10.1145/3531130.3533345. 15 Roland Guttenberg, Eren Keskin, and Roland Meyer. PVASS reachability is decidable. In Claudia Faggian and Joost-Pieter Katoen, editors, 41st Annual Symposium on Logic in Computer Science, LICS 2026, Lisbon, Portugal, July 20-23, 2026, volume 380 of LIPIcs, pages 53:1–53:25. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026. doi:10.4230/LIPICS.LICS.2026.53. 16 Christoph Haase. A survival Guide to Presburger Arithmetic. ACM SIGLOG News, 5(3):67–82, 2018. 17 Harry B. Hunt III. On the Decidability of Grammar Problems. Journal of the ACM, 29(2):429–447, 1982. doi:10.1145/322307.322317. 18 Harry B. Hunt III. On the Decidability of Grammar Problems. J. ACM, 29(2):429–447, 1982. doi:10.1145/322307.322317. 19 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. 20 Adam Husted Kjelström and Andreas Pavlogiannis. The decidability and complexity of interleaved bidirected dyck reachability. Proc. ACM Program. Lang., 6(POPL):1–26, 2022. doi:10.1145/3498673. 21 Ulla Koppenhagen and Ernst W. Mayr. Optimal algorithms for the coverability, the subword, the containment, and the equivalence problems for commutative semigroups. Inf. Comput., 158(2):98–124, 2000. doi:10.1006/INCO.1999.2812. 22 Shankaranarayanan Krishna, Aniket Lal, Andreas Pavlogiannis, and Omkar Tuppe. On-the-fly static analysis via dynamic bidirected dyck reachability. Proc. ACM Program. Lang., 8(POPL):1239–1268, 2024. doi:10.1145/3632884. 23 Ernst W Mayr and Albert R Meyer. The complexity of the word problems for commutative semigroups and polynomial ideals. Advances in mathematics, 46(3):305–329, 1982. 24 Kenichi Morita. Universality of a Reversible Two-Counter Machine. Theor. Comput. Sci., 168(2):303–320, 1996. doi:10.1016/S0304-3975(96)00081-3. 25 Andreas Pavlogiannis. Cℓ/dyck reachability: An algorithmic perspective. ACM SIGLOG News, 9(4):5–25, 2022. doi:10.1145/3583660.3583664. 26 Emil L. Post. Recursive Unsolvability of a problem of Thue. Journal of Symbolic Logic, 12(1):1–11, 1947. doi:10.2307/2267170. 27 Thomas W. Reps. Program analysis via graph reachability. In Jan Maluszynski, editor, Logic Programming, Proceedings of the 1997 International Symposium, Port Jefferson, Long Island, NY, USA, October 13-16, 1997, pages 5–19. MIT Press, 1997. 28 Michael Sipser. Introduction to the Theory of Computation. Cengage Learning, 2013. 29 Thomas G. Szymanski and John H. Williams. Noncanonical extensions of bottom-up parsing techniques. SIAM Journal on Computing, 5(2), 1976. doi:10.1137/0205019. 30 Ramanathan S. Thinniyam and Georg Zetzsche. Regular separability and intersection emptiness are independent problems. In Arkadev Chattopadhyay and Paul Gastin, editors, 39th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2019, Bombay, India, December 11-13, 2019, volume 150 of LIPIcs, pages 51:1–51:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPICS.FSTTCS.2019.51.
XX:19
A Missing proofs of Section 3
Proof of Claim 3.3. Let and be alphabetically bidirected VASSs over . We show that is an alphabetically bidirected VASS over . Let us take any transition from , which goes from state to state over letter and has effect . Because of the definition of a product VASS, we know that for each there exists a transition in . Because both and are alphabetically bidirected VASSs over we know that for each there exists a transition in . Hence, there exists a transition in , which is the reverse transition for the transition . Therefore, is an alphabetically bidirected VASS over .
B Missing proofs of Section 4
B.1 Proof of Lemma 4.3
Here, we show:
Lemma 4.3. Given alphabetically bidirected Z-VASS , one can construct deterministic alphabetically bidirected Z-VASS such that
-
if and only if and
-
if and only if .
To prove Lemma 4.3, we need the following auxiliary lemma.
▶ Lemma B.1. Let be two languages and be an alphabetic morphism . If and , then we have:
The proof that in Lemma B.1 can be found in the full version of [7], i.e., [6, Lemma C.1]. We present a proof here for completeness, together with the proof of the second equivalence.
Proof of Lemma B.1. Firstly, we prove the following:
We begin with showing, that implies . Let be a regular language satisfying and . Set and observe that it is a regular language, as regular languages are closed under inverse alphabetic morphisms. Observe that:
And
Hence .
Now, we show that implies . Let be a regular language satisfying and . Set , which is clearly regular and observe:
A morphism is alphabetic if for each letter it holds that
XX:20 Regular Separability for Bidirected VASS
Now observe, that . Assume, towards contradiction, that there exists . Hence, there exists a word such that . Moreover, , but this contradicts with . Hence and .
Now we prove the second part of the lemma:
Let then, as there exists such that . Therefore as we have also .
On the other hand let then (as and ). Therefore
This concludes the proof of Lemma B.1.
Now we are ready to prove Lemma 4.3.
Proof of Lemma 4.3. The proof of this lemma is similar to [4, Lemma 7], but we work in the bidirected setting. For let be an alphabetically bidirected -VASS over . From and we construct two alphabetically bidirected -VASS and over such that:
And:
Moreover, we want to be deterministic. We obtain by making each label of a transition in unique. Concretely, let be the set of transitions over letters from in . Then for each we replace its label by . For all other transitions, namely for each transition , there exists a transition , which is the reverse transition of , as is an alphabetically bidirected VASS. We replace the label of by . Hence, clearly is an alphabetically bidirected deterministic -VASS over . From the above construction we also get a morphism , which is induced by replacing of labels of transitions. Concretely, if a transition with label was replaced by a transition with label , then . The morphism is naturally extended to words. We observe that the following claim holds, which will allow us to apply Lemma B.1 later. The proof of Claim B.2 is provided after this proof.
▷ Claim B.2. Languages and and morphism satisfy the following properties:
Now we obtain from using the morphism as follows. We replace each transition with many transitions, all with the same effect and between the same states as , one for each label such that , where is the label of . Additionally, we add loops labelled with such that to any state of .
It is easy to observe, that and if was deterministic -free than is also deterministic. Additionally, and can be constructed in polynomial time, and they are alphabetically bidirected -VASS over .
XX:21
Now, because of Claim B.2, equality and the fact that is an alphabetic morphism, using Lemma B.1 we obtain:
And:
Finally, we can apply the same polynomial-time procedure to and to determinize . The result is two alphabetically bidirected -VASS (obtained from ) and (obtained from ). It is clear by construction that is deterministic. Moreover, also is deterministic as is deterministic -free. Hence, we get:
And:
This concludes the reduction and proof of Lemma 4.3.
Proof of Claim B.2. Firstly, we show that . Let . We aim at showing . Observe that there is an accepting run in with . Notice, that . Hence, they are transitions of . Observe that for each it holds that for some . Therefore . Moreover, , which implies .
Now we prove that . A word is in if, and only if, there is a word such that . Let be an accepting run in , that is labelled with . Hence, for each , we have and . By construction this is equivalent to an accepting run in over . Hence, equivalent to .
B.2 Proof of Lemma 4.4
Proof of Lemma 4.4. Let and be alphabetically deterministic bidirected -VASS with and counters, respectively. We use product construction and obtain the deterministic -VASS , which is an alphabetically bidirected -VASS because of Claim 3.3. We set and and show, that holds if, and only if, holds. Let be the underlying DFA of , namely with removed counter updates. Observe, that and .
Firstly, we show that implies . Observe, that then there exists a regular language such that and . Therefore we have
and
Hence holds.
XX:22 Regular Separability for Bidirected VASS
Now, we show the opposite direction. Because there exists a regular language such that and . Let us set , which is clearly a regular language. Observe that:
On the other hand:
Hence and holds.
Finally, we need to show, that Observe, that:
On the other hand:
Hence . This concludes the proof of Lemma 4.4.
B.3 Definition of skeletons
We define skel inductively on the length of the path . Namely, we set and for a path we consider two cases. Assume, that and let be the state in which transition ends.
The first case is that there is no such that the transition ends in the state . Then we set . Observe that because by inductive definition, ends in the same state as and is a path, we have that is a path ending in the same state as .
The second case is that there exists such that ends in . Let us choose a maximal such . Now observe, that as is a path we have that is a cycle in .
If all states occurring in the cycle also occur in the path , then we set , i.e., we omit the cycle in the skeleton as it does not increase the set of visited states. Note that is a path ending in , that is the same state as path .
Otherwise, at least one state in the cycle does not occur in the path . In this case, we set and therefore is also a path ending in the state , namely the same state as the end state of .
B.4 Proof of Lemma 4.2
Here, we prove the following:
► Lemma 4.2. Alphabetically bidirected -VASS and are regularly separable if and only if .
XX:23
Proof. We know, that and want to prove, that . Firstly, we use Lemma 4.3 and obtain deterministic alphabetically bidirected -VASS and such that . Moreover, because of Lemma 4.3 it is enough to prove . Now, we use Lemma 4.4 and obtain deterministic alphabetically bidirected VASS and two sets such that it is enough to prove and moreover . Let be a skeleton. Because of Lemma 4.5 it is enough to prove . Moreover, by definition and hence we have . Finally, by Lemma 4.6, it is enough to prove . Observe, that because we have . By Claim 4.7 we know, that and for some finite sets . By Lemma 4.8 it is enough to show, that where is the set of coordinates that are twin-unbounded for . Assume, towards contradiction, that . That means there exists and such that . Hence . Observe that (i.e., not every component needs to be nonnegative). We want to find a vector such that , which will give us contradiction with . For that, we need the following claim where means a vector in where all entries are equal to zero except the one corresponding to cycle , which is equal to 1; the claim is proved in the appendix.
▷ Claim B.3. Let be -cycle. Then .
Let be such that for each we have . We define vector (by Claim B.3). Now observe, that . Now observe, that
and hence . On the other hand,
and hence . Therefore, , which gives us a contradiction with . Hence , which finishes the proof, that and concludes the proof of Lemma 4.2.
Proof of Claim B.3. Let . Observe, that is also a -cycle. Moreover, we have . Hence, if then also . Therefore . Note, that it is not always true, that as it can for instance happen, that , but .
C Missing proofs of Section 5
C.1 Hardness proof
We reduce from reachability in bidirected VASS, which is EXPSPACE-complete [23, Main Theorem].
Given bidirected VASS , source configuration and target configuration . We construct an alphabetically bidirected VASS . has the same structure of underlying graph as , initial state and accepting state . We split all transitions of into
XX:24 Regular Separability for Bidirected VASS
pairs in such a way that each transition is paired only with its reverse transition. For each pair we label the transition with letter and the transition with letter . Observe that the constructed VASS is an alphabetically bidirected VASS over , where . This is because, for each , if a transition is over then there exists a reverse transition over and vice versa. Moreover, we set to be a single state with transitions over each letter , which is clearly an alphabetically bidirected VASS over . Notice that non-reachability of from in is equivalent to , which, because of Lemma 5.2, is equivalent to regular separability of and . Hence, regular separability of languages of bidirected VASSs over bidirected alphabet is EXPSPACE-hard.
C.2 Proof of Claim 5.3
Proof of Claim 5.3. As it is enough to prove implication that if then .
Let be a regular separator of and over alphabet . We claim that the following language is a regular separator of and . Observe, that is a regular language as regular language are closed under reversing words and if is a regular language than is also a regular language as it is enough to change label of each transition in automata recognising from to . Hence, we only need to prove, that separates and .
Firstly, observe that . Indeed, for each word we have that . Hence , for , and therefore .
Moreover, observe, that . Assume, towards contradiction, that there exists . Then there exists such that . Moreover, , but this contradicts with the fact that .
C.3 Proof of Claim 5.5
Proof of Claim 5.5. We only show the existence of , relying on the fact that for the proof is symmetric. Recall that was simultaneously unbounded and since we get a run in from to such that , where and are, respectively, the initial and the final state of . For , let be projected to the counters from the VASS . Let us set the word read by as . For , the run yields a run from to in where and are, respectively, the initial and the final state of . Since we get that it covers . Moreover, . Hence satisfies conditions of Claim 5.5.
C.4 Proof of Lemma 5.2
Proof of Lemma 5.2. The only non-obvious direction is the implication that intersection non-emptiness implies regular separability. We proceed by induction on . If then the property of Lemma 5.2 is clearly true because and are regular languages. Now assume that . If and are simultaneously unbounded then, by Claim 5.6, we get , as required. Otherwise, because of Claim 5.3, we can w.l.o.g. assume that is not simultaneously unbounded. Let us consider VASS , which is an alphabetically bidirected VASS due to Claim 3.3 and partition its counters into two sets and as in Lemma 5.7. Since is not simultaneously unbounded we get that . W.l.o.g assume that there exists counter coming from such that .
XX:25
Let be the VASS constructed from by tracking counter up to (not allowing it to exceed ). Concretely, let then where
and
Observe that is an alphabetically bidirected VASS. Indeed, the existence of a transition in implies the existence of the transition , for some such that , in . Since is alphabetically bidirected, the transition also exists in , which, in turn, implies the existence of the transition in .
Let also be a VASS tracking counter in the states up to the point when it exceeds , then it goes to a special state . To make VASS bidirected for each transition incoming to , we add a reverse transition. Moreover, for technical reasons, for each counter and each letter , we add a transition and reverse transitions, i.e., , incrementing the counter (to preserve bidirectedness). We also set the initial state of to the initial state of (with counter put into states) and final state to . Concretely, V_{1,>B} = (\Sigma, Q'_1 \cup \{q\}, T'_1 \cup T''_1, q'_i^0, q) where
We observe that the following claim holds, which allows us to apply the induction assumption. The proof of Claim C.1 is provided after this proof.
▷ Claim C.1. The following properties hold:
Because of Claim C.1, we can apply the induction assumption for and and get a regular separator . Similarly, we can apply the induction assumption for and and get a regular separator . Hence is a regular separator of and . This finishes the proof of Lemma 5.2.
Proof of Claim C.1. Let and let be a run accepting . One case is that in every configuration in , we have that . Observe that since is a VASS constructed from by tracking counter in the states up to value , we can conclude that . The second case is that there exists a configuration of such that . Observe that is a VASS constructed from by tracking counter in a state up to the point when it exceeds and then going to special state where for each counter and each letter we have two self-loops from to over , one decrementing the counter and the second incrementing the counter. Observe that after reading the word read by a prefix of ending in configuration , we can reach state in . Then we can read the remaining suffix by transitions, incrementing counters, and reach some configuration . Finally, we can reach , which is an accepting configuration in , using -transitions and accept . Hence .
Assume, towards contradiction, that there exists . Observe, that if , since is a VASS constructed from by tracking counter in the states up to value , we get , which contradicts . Hence . Since is a VASS constructed from by tracking counter
XX:26 Regular Separability for Bidirected VASS
in a state up to the point when it exceeds and then going to special state , and the accepting configuration of is , we get that there is a prefix of such that it is read by a run in which ends in a configuration where the counter is bigger than . Since , its prefix is also read by some run in and therefore there exists a run in reading from the initial configuration and reaching configuration with , but this contradicts . Therefore and this concludes the proof of the Claim C.1.
D Missing proofs of Section 6
Proof of Lemma 6.1. Let us take and presented in the Figure 1. Observe that and are alphabetically bidirected OCA. Firstly, we show that and are not regularly separable. Assume, towards contradiction, that they are regularly separable by a language such that and . Let be a number bigger than the number of states of the minimal DFA recognising . Observe, that
Because of the definition of there exists such that for every we have:
Hence , but observe that also , which contradicts . Therefore and are not regularly separable.
Now we show, that . Let us take any . Observe that contains the letter ; let be the longest prefix of such that it does not contain . Observe that because of the zero-test done by transition over , it holds:
Assume, towards contradiction, that . Now observe that because of the decrement done by the transition over , it holds:
But this contradicts Equation 3. Hence and .
D.1 Proof of regular separability
Here, we prove that for the OCA and in Section 6, we have indeed that if , then and are regularly separable.
Observe, that and are disjoint languages as any word is an accepting run of . Let be the length of the rejecting run of . We claim that in order to classify a word between and , it suffices to inspect prefixes of the word up to the point at which either the number of reverse letters exceeds the number of forward letters or the number of forward letters exceeds the number of the reverse letters by at least . For a word we set . Now, let us define the language , which consists of words such that for every prefix we have .
XX:27
Observe that is a regular language, because an automaton recognising needs only to store in its states, after reading prefix , the current value of between 0 and and reject as soon as . For let contain all words which can be read by from the initial configuration (not necessarily ending in the accepting configuration). Let also
We claim that the following language is a regular separator for and :
Firstly, we show that . Let us take . Let be the longest prefix of such that and let be the next letter of after the prefix or if . If we get that and hence . Otherwise, as was the longest prefix of belonging to , we get that or (i.e, ). Thus, , and hence .
Secondly, we show that . Assume, towards contradiction, that there exists . Since and are disjoint . Therefore, there exists a prefix of such that and . Hence . Let be a run in that reads . If we can find an infix of such that . Since is read by both and , it is also read by . Therefore, similarly to the proof that , as is deterministic and reversible, we can argue that . Hence, the effects of transitions reading and in and cancel out, and therefore we can remove them from both of the runs and obtain two runs reading the same word such that and . By repeating this procedure we obtain a word and . As the only transition leaving in is over a letter from we get . However, we cannot have , as then after reading prefix OCA and will be in configuration , and there is no transition over a letter from leaving the state . Hence, .
Hence, what is left is the proof that is a regular language. For a word , let us define as the word obtained after repetitive deletion (as long as it is possible) of infixes or where . Observe that any word is a run of (necessarily starting with transition from ). Since is deterministic and reversible, similarly as in the proof that , we can argue that , is still a run of (hence ). Moreover, removing the infix does not cause a word to not belong to . Hence, . Additionally, for and , interpreted as runs of , we obtain . Observe that as is the length of the rejecting run of and has no outgoing transition from . Therefore, for each , . Therefore, the automaton recognising needs only to simulate together and , by keeping the counter values (which are between 0 and ) in the state and verifying that we do not leave at any point using the automaton for (recall that is a regular language). Similarly, the automaton recognising the language simulates and together until it encounters the first prefix . It accepts if at least one of the following conditions holds: (i) or (ii) and . Otherwise, it rejects. These conditions can be checked by inspecting the last transition. Since regular languages are closed under finite union, this finishes the proof.