1 Introduction
Nondeterministic Büchi automata on words (NBWs), which were originally proposed to prove the decidability of a restricted monadic secondorder logic [7], are finite automata accepting infinite words. NBWs now have been widely applied in model checking [3], as they can represent the properties of nondeterministic systems with infinitelength behaviors. For instance, in automatabased model checking [27] framework, when both the system and the specification are given as NBWs, the modelchecking problem of verifying whether the behavior of the system satisfies the specification then reduces to a languagecontainment problem between the corresponding automata [27].
For general NBWs and , a general approach to checking the containment between and is to first construct a complementary automaton such that and then to check language emptiness of . Various implementations of this approach with optimizations [1, 2, 12, 10] have been proposed to improve its practical performance. All the practical implementations above, however, directly or indirectly, resort to constructing , which can be exponentially larger than [23, 28].
In this work, we focus on the bottleneck of containment checking between NBWs — the complementation of NBWs, whose complexity has been proved to be [23, 28]. A classic line of research on complementation aims at developing optimal (or close to optimal) complementation algorithms. Currently there are mainly four types of practical complementation algorithms for NBWs, namely Ramseybased [24], determinizationbased [22], rankbased [16] and slicebased [14] algorithms. These algorithms, however, all unavoidablely lead to a superexponential growth in the size of in the worst case [28].
With the growing understanding of the worstcase complexity of those algorithms, searching for specialized complementation algorithms for certain subclasses of NBWs with better complexity has become an important line of research. For instance, complementing deterministic and semideterministic Büchi automata can be done in [17] and [5]
, respectively. Here we follow this line of research and aim at a subclass of NBWs with restricted nondeterminism. This type of NBWs is important, as in some contexts, especially in probabilistic model checking, unrestricted nondeterminism in the automata representing the properties is problematic for the verification procedure. For instance, general NBWs cannot be used directly to verify properties over Markov chains, as they will cause imprecise probabilities in the product of the system and the property
[8]. In turn, it is often necessary to construct their more deterministic counterparts in terms of other types of automata for the properties, for instance semideterministic Büchi automata, deterministic Rabin or Parity automata, which, however, adds exponential blowups of states [11].To avoid statespace exponential blowup, earlier work sought to use of a type of automata called unambiguous nondeterministic Büchi automata (UNBWs) in probabilistic verification [4, 18], as UNBWs can be exponentially smaller than their equivalent deterministic automata [4]. UNBWs [9] are a subclass of NBWs that accept with at most one run for each word, while their equivalent NBWs may have more than one accepting run, or even infinitely many accepting runs. For example, by taking advantage of their unambiguity, the languagecontainment problem of certain proper subclasses of UNBWs has been proved to be solvable in polynomial time [6], while this problem is PSPACEcomplete for NBWs [15].
The complementation problem of a more general class than UNBWs, called finitely ambiguous nondeterministic Büchi automata (FANBWs), which accept with finitely many runs for each word, was shown to be doable in [21], in contrast to for general NBWs [23]. Further, checking whether an NBW is an FANBW can be done in polynomial time [19]. Therefore, once an FANBW has been identified, the specialized complementation construction for FANBWs can be applied. Thus, we focus here on an indepth study of the complementation problem for FANBWs.
Our main tool is the construction and study of reduced directed acyclic graphs (DAGs) of runs of FANBWs over infinite words called codeterministic run DAGs, in which each vertex has at most one predecessor, as a way to characterize finite unambiguity in automata in this work. We show that such codeterministic run DAGs can be used to simplify and improve classical complementation constructions. Our contributions are the following.

First, we introduce the concept of codeterministic DAGs of FANBWs over infinite words as a way to show how unambiguity works in Büchi complementation.

Second, we show that the construction of codeterministic DAGs in different complementation algorithms [25] helps to achieve simpler and theoretically better complementation algorithms for FANBWs. Given an FANBW with states, we show that the number of states of the complementary NBW constructed by the classical rankbased and slicebased complementation constructions can be improved, respectively, to from and to from , which is exponentially better than the result of in [21].

Finally, we reveal that the slicebased algorithm is basically an algorithm based on the construction of codeterministic DAGs and a specialized complementation algorithm for FANBWs. We also provide a simulation relation between states in the complementary NBWs of FANBWs, which can be used to improve the containment checking between an NBW and an (FA)NBW.
Organization of the paper.
In the remainder of this paper, we first recap some definitions about Büchi automata in Section 2 and then introduce the concept of codeterministic run DAGs in Section 3. We present our improved algorithms for the rankbased and slicebased algorithms in Section 4 and Section 5, respectively. Finally we conclude the paper with some future works in Section 6.
2 Preliminaries
We fix an alphabet . A word is an infinite sequence of letters in . We denote by the set of all (infinite) words. A language is a subset of . Let be a language and the complement language of is denoted by , i.e., . Let be a sequence of elements: we denote by the th element of . Let be a natural number; we denote by the set of numbers ,
the set of odd numbers in
and the set of numbers .A Büchi automaton on words (BW) is a tuple , where is a finite set of states, is a set of initial states, is a transition function and is a set of accepting states. We extend to sets of states, by letting . We assume that each BW is complete in the sense that for each state and , . A run of on a word is an infinite sequence of states such that and for every , . We denote by the set of states that occur infinitely often in the run . A word is accepted by if there exists a run of over such that . We denote by the language recognized by , i.e., the set of words accepted by .
Let be a BW, A complementary BW of , denoted by , accepts the complementary language of , i.e., ; we denote by the automaton obtained from by setting its initial state set to the singleton set . We say a state of simulates a state of if
. We classify
into following types of BWs according to their transition structures: (1) nondeterministic if or for a state and , (2) deterministic if and for each and , , and (3) reverse deterministic if for each state , has at most one state for each such that .From the perspective of the number of accepting runs of , we have following types of NBWs.
Definition 1
Let be an NBW and a positive integer. We say is (1) finitely ambiguous (an FANBW) if for each , the number of accepting runs of over is finite; and (2) ambiguous if for a , the number of accepting runs of over is no greater than , and unambiguous if .
3 CoDeterministic Run DAGs for FANBWs
In this section, we describe the concept of run DAGs of an NBW over a word , introduced in [16]. We then describe a construction of codeterministic run DAGs for FANBWs by making use of the finite ambiguity in FANBWs, which is the foundation of the results developed in this paper. In the remainder of the paper, we use DAGs as the shorthand for run DAGs.
Let be an NBW and be an infinite word. The DAG of over is defined as follows:

Vertices: is the set of vertices where and for every .

Edges: There is an edge from to iff and .
A vertex is said to be on level and there are at most states on each level. A vertex is an vertex if . A sequence of vertices is called a branch of if and for each , there is an edge from to . An branch of is a branch of infinite length. A finite fragment of is said to be a branch from the vertex ; a fragment of is said to be a path from to , where . A vertex is reachable from if there is a path from to . We call a vertex is finite in if there are no branches in starting from ; and we call a vertex free if it is not finite and no vertices are reachable from in .
There is a bijection between the set of runs of on and the set of branches in . To a run of over corresponds an branch . Therefore, is accepted by if and only if there exists an branch in that visits vertices infinitely often; we say that such an branch is accepting; is accepting if and only if there exists an accepting branch in .
Assume that is an FANBW. Then an accepting branch in , if exists, only merges with other (accepting) branches for finitely many times. We formalize this property of in Lemma 1.
Lemma 1 (Separate Levels of Accepting DAGs of FANBWs)
Let be an FANBW and the accepting DAG of over . Then there must exist a separate level such that all vertices after level on an accepting branch has exactly one predecessor.
Proof
Since is an FANBW, there are only finitely many accepting branches in . Therefore, an accepting branch in only merges with other (accepting) branches for finitely many times. It follows that given an accepting branch in , there must exist a separate level such that each vertex with has exactly one predecessor. Otherwise, there will be infinitely many accepting branches, contradicting with the assumption that is an FANBW. Assume that there are accepting branches in . Then we can set the separate level of to where is the separate level index of th accepting branch.
For instance, the separate level is in the accepting DAG of over in Figure 1, as each vertex with only has the predecessor .
It follows immediately from Lemma 1 that for each vertex in with more than one incoming edges, keeping only one of incoming edges of will not change whether is accepting. Thus we can modify to get an edgereduced DAG called codeterministic DAG, in which each vertex only has at most one predecessor, by removing redundant edges. Assume that . For instance, if there is a vertex with multiple incoming edges in , we can only keep the incoming edge from the predecessor with the minimal index as follows.

Edges. There is an edge from to iff and .
Lemma 2 ensures that is accepting if is accepting.
Lemma 2 (Acceptance of Codeterministic DAGs)
Assume that is an FANBW. Let be the codeterministic DAG of over a word . Then is accepted by if and only if is accepting.
Proof
The proof is trivial when is nonaccepting. Assume that is accepting. Let be an accepting branch and the separate level defined in Lemma 1. According to Lemma 1, the branch from must be accepting. Moreover, is reachable from an initial vertex with . Then there must exist an accepting branch in if is accepting. Thus we conclude that is accepted by if and only if is accepting.
For instance, the codeterministic DAG of in Figure 1 is still accepting after deleting the edge from to , as denoted by the dashed arrow.
By removing redundant edges, we can now define a reduced transition function over the levels in .
Definition 2 (Transition Function for Codeterministic DAGs)
Given a set of states at level of , Let . Define as the minimal set of predecessors of . Then, for a set of states , we define . We call the reduced transition function at level .
Example 1
Consider again in Figure 1 and let at level : we have and . Let be the reduced transition function at level defined from with respect to . It follows that and .
We may write instead of for an input singleton set . The transition function will be used in the complementation of FANBWs since the complementation is basically to construct DAGs and then identify accepting DAGs.
One can verify that each vertex in the codeterministic DAG of over has at most one predecessor. It follows that the number of branches in a nonaccepting/accepting is at most , as stated in Lemma 3.
Lemma 3 (Finite Number of Branches in Codeterministic DAGs)
Assume that is an FANBW and let be the codeterministic DAG of over . Then the number of branches in is at most .
Proof
Assume that with is the number of vertices which are in the branches (not in all branches) on level . For instance, for each in Fig. 1 while the number of vertices on level is . Since each vertex in has only one predecessor, we have that , i.e., the number of vertices in branches on each level does not decrease over the levels. In addition, there are at most states on each level. Thus there are at most branches since we have for each .
Consider the DAG in Figure 2: one can verify that there are infinitely many branches in the nonreduced DAG over ; while for the codeterministic DAG of where removed edges are marked with dashed arrows, there is only one branch .
After redundant edges have been cut off, only finite number of branches remain in . That is, we obtain a DAG with a finite degree of ambiguity in terms of the number of branches. The construction of codeterministic DAGs with finite ambiguity is the fundamental idea in this work for exploiting the power of unambiguity for Büchi complementation. By taking advantage of this finite ambiguity, we show in Lemma 4 that there exists a level in a nonaccepting codeterministic DAG such that each vertex with is finite, which can be used for identifying whether is accepting in the complementation of FANBWs. We call such level a stable level.
Lemma 4 (Stable Level in Nonaccepting Codeterministic DAGs)
Assume that is an FANBW and . Let be the codeterministic DAG of over . Then there must exist a stable level in such that each vertex on a level of is a finite vertex.
Proof
By Lemma 3, let be the number of branches in . Since , all the branches in is nonaccepting. Therefore, for the th branch , there is a vertex such that every vertex of reachable from is not an vertex. It follows that we can set and thus all the vertices on a level after are finite and not on branches.
Consider again the DAG in Figure 2: there does not exist a stable level in the nonreduced DAG since each vertex with is not finite; while in the codeterministic DAG of over , one can verify that the stable level is .
4 RankBased Complementation
In this section, we first introduce in Section 4.1 the rankbased complementation (RKC) proposed in [16], which constructs a complementary NBW for with at most states. Then in Section 4.2, we show that if is an FANBW, RKC based on the construction of codeterministic DAGs can produce a complementary NBW with at most states.
4.1 RankBased Algorithm for NBWs
RKC was introduced by Kupferman and Vardi in [16] to construct a complementary NBW of by identifying the DAGs of over nonaccepting words . Intuitively, given a word , all branches of the DAG of over will eventually stop visiting vertices. Based on this observation, in order to identify the nonaccepting DAG of over , they introduced the notion of level rankings of . By assigning only even ranks to vertices, they showed that there exists a unique ranking function that assign ranks in to the vertices of such that iff all branches of eventually get trapped in odd ranks. Intuitively, if , then there must exist some branch of that has infinitely many even ranks; if , all branches in eventually get trapped in odd ranks.
We now define level rankings of a nonaccepting DAG. The level ranking of defines a ranking function that satisfies the following conditions:

for each vertex if , then ,

for each edge ,
The ranks along a branch decrease monotonically and vertices get only even ranks.
We now define a specific ranking function of for a given word . We define a sequence of DAGs , where , as follows. For each ,

is the DAG constructed from by removing all finite vertices in and the edges associated with them, and

if has at least one free vertex, then is the DAG constructed from by removing all the free vertices in and the edges associated with them.
Recall that free vertices cannot reach vertices. It was shown in [16] that is empty and each vertex is either finite in or free in . Thus the sequence of DAGs generated from the definition above defines a ranking function over the set of vertices in inductively as follows. For every ,

for each vertex that is finite in , if exists.

for each free vertex in , if exists.
Consequently, we have Lemma 5 for identifying nonaccepting DAGs.
Lemma 5 (Nonaccepting DAGs [16])
rejects a word iff the ranking function defined in (1) and (2) above has as maximum rank, and all branches of eventually get trapped in odd ranks.
We have constructed a unique ranking function above for identifying nonaccepting DAGs. To construct the complementary NBW with such a ranking function, we have to guess the ranking level by level. Since the maximum rank is , along an input word , we can encode a ranking function for by utilizing a levelranking function for the states at a level in the DAG such that if , then is even, and if .
Definition 3 (Coverage Relation for Level Rankings)
Let be a letter in and be two level ranking functions. We say covers under letter , denoted by , when for all and , if , then and .
Note here that is defined based on the transition . The coverage relation indicates that the level rankings and of two consecutive levels of do not increase in ranks. We denote by the set of all possible level ranking functions.
In order to verify that the guess about the ranking of is correct, RKC uses the breakpoint construction proposed in [20]. This construction employs a set of states to check that the vertices assigned with even ranks are finite. Similarly to Lemma 4, the nonaccepting DAG with the ranking function defined in (1) and (2) eventually reaches a stable level, after which all vertices are finite. Hence, a breakpoint construction suffices to verify such guesses.
The formal definition of the complementary NBW of the input NBW is given in the following definition.
Definition 4 ([16])
Let be an NBW. We then define an NBW of as follows.

,

where if and otherwise.

is defined as follows:

if , then (intuition: breakpoint only tracks vertices assigned with even ranks),

if , then (intuition: means all previous vertices with even ranks are finite, then verify new vertices with even ranks).


.
where and .
Let be a word. Intuitively, every state in corresponds to a level of the DAG over . If is accepted by , i.e., becomes empty for infinitely many times, then we conclude that all the branches of eventually get trapped in odd ranks. It follows that no branches are accepting in , i.e., . The other direction is also easy to prove and omitted here. Thus we conclude that . Since is a function from to , the number of possible functions is . Therefore, the number of states in is in .
Lemma 6 (The Size and Language of [16])
Let be an NBW with states and the NBW defined in Definition 4. Then and has at most states.
Relation to Construction of Codeterministic DAGs.
Assume that we have two levelrankings . A state in the second level can have multiple predecessors defined in the domain of . Then . Thus we can define a codeterministic DAG out of where each vertex only keeps one predecessor with the minimal rank in the reduced DAG, in contrast to the predecessor with minimal index in Section 3. There may, however, be multiple predecessors with the minimal rank. Consequently, the nonreduced DAG can be mapped to multiple codeterministic DAGs depending on which ranking function is defined on and how predecessors are chosen. Note here that not every resulting codeterministic DAG of described above will be accepting if is accepting, since each time the edges in accepting branches may be deleted. Thus these codeterministic DAGs cannot be directly applied in RKC for general NBWs.
4.2 RankBased Algorithm for FANBWs
In the following, we show in Lemma 7 that if is an FANBW, the maximum rank of the vertices in a codeterministic DAG of is at most . It follows that the range of is . We thus only need the maximum rank to be rather than for the codeterministic DAG of . Therefore, the number of states in is in when the maximum rank is .
Lemma 7 (Maximum Rank of Codeterministic DAGs for FANBWs)
Assume that is an FANBW and let be a word. Let be the codeterministic DAG of over . Then iff is empty.
Proof
Assume that . Our goal is to prove that starting from , is empty. By Lemma 4, there exists a stable level, say , such that on each level , the vertices are finite. Therefore, contains only nonvertices after level . It follows that removes all the vertices after level . Thus if is not empty, contains only finite vertices. We then conclude that is empty. The other direction is trivial.
In order to set the maximum rank to in Definition 4, the underlying DAG constructed for complementing FANBWs has to be codeterministic. Since RKC generates rankings level by level, we have to utilize in Definition 2 for computing successors at next level. For FANBWs, the complementation construction in Definition 4 can be improved accordingly:
Definition 4’
Let be an FANBW. We then define an NBW where and are as in Definition 4, and and are defined by:

where if and otherwise.

is then defined as follows:

if , then ,

if , then ).
where is the reduced transition function at the level corresponding to current state .

Recall that the coverage relation between two level ranking functions and , parameterized with , is defined in Definition 3. Similarly to Definition 2, to compute , one has to first compute the minimal set of predecessors of where is the domain of , i.e., the set of states at current level. Thus we have . Intuitively, for , is used to construct a codeterministic DAG over level by level. By Lemma 7, the maximum rank of is at most , which is sufficient in Definition 4’ for constructing a ranking function to identify whether is accepting. Therefore, with Definition 4’, we can construct a complementary NBW with states, as stated in Theorem 4.1.
Theorem 4.1 (The Size and Language of for FANBWs)
Let be an FANBW with states and the NBW defined in Definition 4’. Then (1) ; and (2) has at most states.
Proof
The proof for claim (2) is trivial and thus omitted here. By Lemma 2 and definition of ranking functions, codeterministic DAGs of over will be rejected in , thus . According to the proof of Lemma 7, there exists a unique ranking function for each rejecting codeterministic DAG of over . Since RKC nondeterministically guesses rankings of , there must be a guess of such unique ranking function. It follows that must be accepting in , i.e., . Thus it holds that .
In [13], Fogarty and Vardi proved that complementing reverse deterministic BWs with RKC is doable in as the nonreduced DAGs are already codeterministic. This is because that if is reverse deterministic, then each vertex in has at most one predecessor, as has only one predecessor. It follows that is codeterministic. Similarly to Lemma 3, the number of (accepting) branches in is at most . According to Definition 1, reverse deterministic BWs are a special class of FANBWs, as stated in Corollary 1.
Corollary 1
Let be a reverse deterministic BW. Then is also an FANBW.
In contrast, note that an FANBW is not necessarily a reverse deterministic BW. For instance, the FANBW of Figure 1 is not reverse deterministic since has three predecessors, namely and . We remark that the construction in [13] just sets the maximum rank to in Definition 4 without modifying the transition function , which turns out to be a special case of our construction according to Corollary 1.
5 SliceBased Algorithm
In Section 5.1, we first recall the slicebased complementation construction (SLC) described in [26, 14], adapted using our notations, which produces a complementary NBW of with at most states. Then, in Section 5.2, we show that for FANBWs, this construction can be simplified while yielding a complementary NBW with at most states.
5.1 SliceBased Algorithm for NBWs
Let be an NBW, and let be a word. SLC uses a data structure called slice instead of level rankings to encode the set of vertices at the same level in . A slice in [26] is defined as an ordered sequence of disjoint sets of vertices at the same level.
We now describe SLC from the perspective of building codeterministic DAGs. SLC does the following to construct a codeterministic DAG as it proceeds along the word . Here the superscript for SLC is used to distinguish the construction of codeterministic DAGs in Section 3. At level , we may obtain at most two vertices of : a vertex and an vertex . Recall that and are the set of initial states and the set of accepting states of , respectively. Here and are disjoint. A vertex is an vertex if , where and . The vertices on level in are ordered from left to right by their indices where and . During the construction, empty sets are removed and the indices of remaining sets are reset according to the increasing order of their original indices.
Assume that on level , the sequence of vertices in is where and . We now describe how SLC constructs the vertices on level . First, for a set where , on reading the letter , the set of successors of is partitioned into (1) a non set , and (2) an set , as a possible new vertex.
This gives us a sequence of sets . Note that there can be some states in present in multiple sets where . Here we only keep the rightmost occurrence of a state. Intuitively, different runs of may merge with each other at some level and we only need to keep the right most one and cut off others, as they share the same infinite suffix. This operation does not change whether the codeterministic DAG is accepting, since at least one accepting run of remains and will not be cut off. Formally, for each set where , we define a set . This yields a sequence of disjoint sets . After removing the empty sets in this sequence and reassigning the index of each set according to their positions, we finally obtain the sequence of sets of vertices on level , denoted by . Obviously, the resulting sets at the same level are again pairwise disjoint.
Therefore, we define a codeterministic DAG of over for an NBW as follows:

Vertices. .

Edges. There is an edge from to iff is either or as defined above where and .
By the definition of , each vertex in which is either or computed from has at most one predecessor . Thus is codeterministic. It follows that number of branches in is at most and if and only if there is an accepting branch in . Formally:
Lemma 8 (Finite Ambiguity and Stable Levels [26])
Let and be the codeterministic DAG as defined above. Then (1) the number of (accepting) branches in is at most the number of states in . (2) is accepted by iff is accepting. (3) There exists a stable level in such that all vertices after level are finite if .
SLC for general NBWs can be viewed as consisting of two components: (1) based on the construction of codeterministic DAGs over above, NBWs can be translated to FANBWs [19] and (2) a specialized complementation algorithm for FANBWs. In [26], SLC utilizes these two components at the same time for computing the complementary NBW .
A state of is an ordered sequence of tuples where ordered sequence is a slice, and each vertex is decorated with a label . The level index is omitted during the construction of . Intuitively,

dielabelled vertex means that those states in are currently being inspected. For to be accepted (i.e., ), dielabelled vertices should eventually reach empty set after a finitely many steps, thus become finite. Recall that empty sets will be removed in the construction of .

inflabelled vertex indicates all states never reach accepting states.

newlabelled vertex records new encountered states, that should be inspected later once dielabelled vertex becomes empty.
Obviously, here is at most the number of states in . While for FANBWs, thanks to their finite ambiguity, the construction for codeterministic DAGs can be simplified (see Section 3): we can even use three components to compactly encode the slice and their labels. We postpone the details of the construction to the next subsection. Now we recall the complexity of the above slice based construction:
5.2 SliceBased Algorithm for FANBWs
In this section, we introduce the specialized complementation construction for FANBWs. Recall that, as discussed in Section 5.1, this construction is also the second component of SLC, used for complementing general NBWs.
We first provide some intuitions. According to Lemma 4, given a word , there exists a stable level in the codeterministic DAG such that each vertex on a level after is finite. Therefore, in the construction of , we can nondeterministically guess level and then use breakpoint construction to verify that our guess is correct, in analogy with RKC. More precisely, when constructing the complementary NBW , there are the initial phase and the accepting phase. The initial phase is purely a subset construction to trace the reachable states of each level of the codeterministic DAG over . On reading a letter at a state of (called macrostate) in the initial phase, the run of over (called macrorun) either continues to stay in the initial phase or jumps to the accepting phase. Once entering the accepting phase, we guess that the macrorun of , which consists of multiple runs of , has reached the stable level . Thus in the accepting phase, we need a breakpoint construction to verify that the guess is correct, i.e., that all vertices after level are finite.
In the accepting phase, we use a macrostate, represented as a triple , to encode the set of vertices and their labels on a level after in the codeterministic DAG (or for general NBWs accordingly), where

the set keeps all the reachable vertices on the level, corresponding to the set of all vertices labelled with die, inf and new;

the set keeps all the finite vertices on the level. That means, it contains both newlabelled vertices recording new encountered states, and dielabelled vertices being inspected now.

the set as a breakpoint construction is used to verify that the guess on the set of finite vertices is correct, corresponding to the set of vertices labelled with die.
Recall that die, inf and new are three labels of vertices used in SLC for complementing general NBWs, as described in Section 5.1. The specialized complementation algorithm for FANBWs is formalized in Definition 5.
Definition 5
Let be an FANBW. We then define an NBW as follows.

;

;

Comments
There are no comments yet.