DeepAI

# Efficient reduction of nondeterministic automata with application to language inclusion testing

We present efficient algorithms to reduce the size of nondeterministic Büchi word automata (NBA) and nondeterministic finite word automata (NFA), while retaining their languages. Additionally, we describe methods to solve PSPACE-complete automata problems like language universality, equivalence, and inclusion for much larger instances than was previously possible (> 1000 states instead of 10-100). This can be used to scale up applications of automata in formal verification tools and decision procedures for logical theories. The algorithms are based on new techniques for removing transitions (pruning) and adding transitions (saturation), as well as extensions of classic quotienting of the state space. These techniques use criteria based on combinations of backward and forward trace inclusions and simulation relations. Since trace inclusion relations are themselves PSPACE-complete, we introduce lookahead simulations as good polynomial time computable approximations thereof. Extensive experiments show that the average-case time complexity of our algorithms scales slightly above quadratically. (The space complexity is worst-case quadratic.) The size reduction of the automata depends very much on the class of instances, but our algorithm consistently reduces the size far more than all previous techniques. We tested our algorithms on NBA derived from LTL-formulae, NBA derived from mutual exclusion protocols and many classes of random NBA and NFA, and compared their performance to the well-known automata tool GOAL.

• 5 publications
• 8 publications
06/12/2021

### Minimization and Canonization of GFG Transition-Based Automata

While many applications of automata in formal methods can use nondetermi...
07/05/2020

### Proving Non-Inclusion of Büchi Automata based on Monte Carlo Sampling

The search for a proof of correctness and the search for counterexamples...
05/17/2019

### Simulations in Rank-Based Büchi Automata Complementation

The long search for an optimal complementation construction for Büchi au...
09/20/2022

### A Hierarchy of Nondeterminism

We study three levels in a hierarchy of nondeterminism: A nondeterminist...
05/12/2020

### Constraint Synchronization with Two or Three State Partial Constraint Automata

Here, we study the question if synchronizing words exist that belong to ...
10/22/2018

### Quantitative Matrix Simulation

We introduce notions of simulation between semiring-weighted automata as...
10/13/2022

### Algorithms for Weighted Pushdown Automata

Weighted pushdown automata (WPDAs) are at the core of many natural langu...

## 1. Introduction

Nondeterministic Büchi automata (NBA) are a fundamental data structure to represent and manipulate -regular languages [67]. They appear in many automata-based formal software verification methods, as well as in decision procedures for logical theories. For example, in LTL software model checking [40, 25], temporal logic specifications are converted into NBA. In other cases, different versions of a program (obtained by abstraction or refinement of the original) are translated into automata whose languages are then compared. Testing the conformance of an implementation with its requirements specification thus reduces to a language inclusion problem. Another application of NBA in software engineering is program termination analysis by the size-change termination method [51, 28]. Via an abstraction of the effect of program operations on data, the termination problem can often be reduced to a language inclusion problem between two derived NBA.

Our goal is to improve the efficiency and scalability of automata-based formal software verification methods. Our contribution is threefold: We describe a very effective automata reduction algorithm, which is based on novel, efficiently computable lookahead simulations, and we conduct an extensive experimental evaluation of our reduction algorithm.

This paper is partly based on results presented at POPL’13 [19], but contains several large parts that have not appeared previously. While [19] only considered nondeterministic Büchi automata (NBA), we additionally present corresponding results on nondeterministic finite automata (NFA). We also present more extensive empirical results for both NBA and NFA (cf.  Sec. 9). Moreover, we added a section on the new saturation technique (cf.  Sec. 10). Finally, we added some notes on the implementation (cf.  Sec. 11).

### 1.1. Automata reduction.

We propose a novel, efficient, practical, and very effective algorithm to reduce the size of automata, in terms of both states and transitions. It is well-known that, in general, there are several non-isomorphic nondeterministic automata of minimal size recognizing a given language, and even testing the minimality of the number of states of a given automaton is PSPACE-complete [45]. Instead, our algorithm produces a smaller automaton recognizing the same language, though not necessarily one with the absolute minimal possible number of states, thus avoiding the complexity bottleneck. The reason to perform reduction is that smaller automata are in general more efficient to handle in a subsequent computation. Thus, there is an algorithmic tradeoff between the effort for the reduction and the complexity of the problem later considered for this automaton. If only computationally easy algorithmic problems are considered, like reachability or emptiness (which are solvable in LOGSPACE), then extensive reduction does not pay off since in these cases it is faster to solve the initial problem directly. Instead, the main applications are the following.

1. PSPACE-complete automata problems like language universality, equivalence, and inclusion [49]. Since exact algorithms are exponential for these problems, one should first reduce the automata as much as possible before applying them.

2. LTL model checking [40], where one searches for loops in a graph that is the product of a large system specification with an NBA derived from an LTL-formula. Smaller automata often make this easier, though in practice it also depends on the degree of nondeterminism [63]. Our reduction algorithm, based on transition pruning techniques, yields automata that are not only smaller, but also sparser (fewer transitions per state, on average), and thus contain less nondeterministic branching.

3. Procedures that combine and modify automata repeatedly. Model checking algorithms and automata-based decision procedures for logical theories (cf. the TaPAS tool [53]) compute automata products, unions, complements, projections, etc., and thus the sizes of automata grow rapidly. Another example is in the use of automata for the reachability analysis of safe Petri nets [61]. Thus, it is important to intermittently reduce the automata to keep their size manageable.

Our reduction algorithm combines the following techniques:

• The removal of dead states. These are states that trivially do not contribute to the language of the automaton, either because they cannot be reached from any initial state or because no accepting loop in the NBA (resp. no accepting state in the NFA) is reachable from them.

• Quotienting. Here one finds a suitable equivalence relation on the set of states and quotients w.r.t. it, i.e., one merges each equivalence class into a single state.

• Transition pruning (i.e., removing transitions) and transition saturation (i.e., adding transitions), using suitable criteria such that the language of the automaton is preserved.

The first technique is trivial and the second one is well-understood [26, 16]. Here, we investigate thoroughly transition pruning and transition saturation.

For pruning, the idea is that certain transitions can be removed, because other ‘better’ transitions remain. The ‘better’ criterion compares the source and target states of transitions w.r.t. certain semantic preorders, e.g., forward and backward simulations and trace inclusions. We provide a complete picture of which combinations of relations are correct to use for pruning. Pruning transitions reduces not only the number of transitions, but also, indirectly, the number of states. By removing transitions, some states may become dead, and can thus be removed from the automaton without changing its language. The reduced automata are generally much sparser than the originals (i.e., use fewer transitions per state and less nondeterministic branching), which yields additional performance advantages in subsequent computations.

Dually, for saturation, the idea is that certain transitions can be added, because other ‘better’ transitions are already present. Again, the ‘better’ criterion relies on comparing the source/target states of the transitions w.r.t. semantic preorders like forward and backward simulations and trace inclusions. We provide a complete picture of which combinations of relations are correct to use for saturation. Adding transitions does not change the number of states, but it may pave the way for further quotienting that does. Moreover, adding some transitions might allow the subsequent pruning of other transitions, and the final result might even have fewer transitions than before. It often happens, however, that there is a tradeoff between the numbers of states and transitions.

Finally, it is worth mentioning that the minimisation problem can sometimes be solved efficiently if one considers minimisation within a restricted class of languages. For instance, for the class of weak deterministic Büchi languages (a strict subclass of the -regular languages) it is well-known that given a weak deterministic Büchi automaton (WDBA) one can find in time a minimal equivalent automaton in the same class [54] (essentially by applying Hopcroft’s DFA minimisation algorithm [41]). However, it is possible that a weak deterministic language admits only large WDBA, but succinct NBA; cf.  Fig. 1 (this is similar to what happens for DFA vs. NFA over finite words). Thus, minimising a WDBA in the class of WDBA and minimising a WDBA in the larger class of NBA are two distinct problems. Since in this paper we consider size reduction of NBA (and thus WDBA) in the larger class of all NBA, our method and the one of [54] are incomparable.

Simulation preorders play a central role in automata reduction via pruning, saturation and quotienting, because they provide PTIME-computable under-approximations of the PSPACE-hard trace inclusions. However, the quality of the approximation is insufficient in many practical examples. Multipebble simulations [24] yield better under-approximations of trace inclusions, but these are not easily computed in practice.

### 1.3. Experimental results

We performed an extensive experimental evaluation of our techniques based on lookahead simulations on tasks of automata reduction and language universality/inclusion testing. (The raw data of the experiments is stored together with the arXiv version of this paper [20].)

#### Automata reduction.

We applied our reduction algorithm on automata of up-to states. These included 1) random automata according to the Tabakov-Vardi model [66], 2) automata obtained from LTL formulae, and 3) real-world mutual exclusion protocols. The empirically determined average-case time complexity on random automata is slightly above quadratic, while the (never observed) worst-case complexity is . The worst-case space complexity is quadratic. Our algorithm reduces the size of automata much more strongly, on average, than previously available practical methods as implemented in the popular GOAL automata tool [68]. However, the exact advantage varies, depending on the type of instances; cf. Sec. 9. For example, consider random automata with 100–1000 states, binary alphabet and varying transition density . Random automata with cannot be reduced much by any method. The only substantial effect is achieved by the trivial removal of dead states which, on average, yields automata of of the original size. On the other hand, for , the best previous reduction methods yielded automata of of the original size on average, while our algorithm yielded automata of of the original size on average.

#### Language universality/inclusion.

Language universality and inclusion of NBA/NFA are PSPACE-complete problems [49], but many practically efficient methods have been developed [22, 23, 60, 5, 28, 29, 3, 4]. Still, these all have exponential worst-case time complexity and do not scale well. Typically they are applied to automata with 15–100 states (unless the automaton has a particularly simple structure), and therefore one should first reduce the automata before applying these exact exponential-time methods.

Even better, already the polynomial time reduction algorithm alone can solve many instances of the PSPACE-complete universality, equivalence, and inclusion problems. E.g., an automaton might be reduced to the trivial universal automaton, thus witnessing language universality, or when one checks inclusion of two automata, it may compute a small (polynomial size) certificate for language inclusion in the form of a (lookahead-)simulation. Thus, the complete exponential time methods above need only be invoked in a minority of the cases, and on much smaller instances. This allows to scale language inclusion testing to much larger instances (e.g., automata with states) which are beyond previous methods.

### 1.4. Nondeterministic finite automata.

We present our methods mostly in the framework of nondeterministic Büchi automata (NBA), but they directly carry over to the simpler case of nondeterministic finite-word automata (NFA). The main differences are the following:

• Since NFA accept finite words, it matters in exactly which step an accepting state is reached (unlike for NBA where the acceptance criterion is to visit accepting states infinitely often). Therefore, lookahead-simulations for NFA need to treat accepting states in a way which is more restrictive than for NBA. Thus, in NFA, one is limited to a smaller range of semantic preorders/equivalences, namely direct and backward simulations (and the corresponding multipebble simulations, lookahead simulations and trace inclusions), while more relaxed notions (like delayed and fair simulations) can be used for NBA.

• On the other hand, unlike NBA, an NFA can always be transformed into an equivalent NFA with just one accepting state without any outgoing transitions (unless the language contains the empty word). This special form makes it much easier to compute good approximations of direct and backward trace inclusion, which greatly helps in the NFA reduction algorithm.

### Outline of the paper.

A summary of old and new results about simulation-like preorders as used in inclusion checking, quotienting, and pruning transitions can be found in Fig. 1.

The rest of the paper is organized as follows. In Sec. 2, we define basic notation for automata and languages. Sec. 3 introduces basic semantic preorders and equivalences between states of automata and considers quotienting methods, while Sec. 4 shows which preorders witness language inclusion. In Sec. 5, we present the main results on transition pruning. Lookahead simulations are introduced in Sec. 6 and used in the algorithms for automata reduction and language inclusion testing in Sections 7 and 8, respectively. These algorithms are empirically evaluated in Sec. 9. In Sec. 10 we describe and evaluate an extended reduction algorithm that additionally uses transition saturation methods. Sec. 11 describes some algorithmic optimizations in the implementation, and Sec. 12 contains a summary and directions for future work.

## 2. Preliminaries

A preorder is a reflexive and transitive relation, a partial order is a preorder which is antisymmetric (), and a strict partial order is an irreflexive (), asymmetric (), and transitive relation. We often denote preorders by , and when we do so, with we denote its strict version, i.e., if and ; we follow a similar convention for .

A nondeterministic Büchi automaton (NBA) is a tuple where is a finite alphabet, is a finite set of states, is the set of initial states, is the set of accepting states, and is the transition relation. We write for . A state of a Büchi automaton is dead if either it is not reachable from any initial state, or it cannot reach any accepting loop (i.e., a loop that contains at least one accepting state). In our simplification techniques, we always remove dead states, since this does not affect the language of the automaton. To simplify the presentation, we assume that automata are forward and backward complete, i.e., for any state and symbol , there exist states s.t. . Every automaton can be converted into an equivalent complete one by adding at most two states and at most transitions.111 For efficiency reasons, our implementation works directly on incomplete automata. Completeness is only assumed to simplify the technical development. A Büchi automaton describes a set of infinite words (its language), i.e., a subset of . An infinite trace of on an infinite word (or -trace) starting in a state is an infinite sequence of transitions . Similarly, a finite trace on a finite word (or -trace) starting in a state and ending in a state is a finite sequence of transitions . By convention, a finite trace over the empty word is just a single state (where the trace both starts and ends). For an infinite trace and index , we denote by the finite prefix trace , and by the infinite suffix trace . A finite or infinite trace is initial if it starts in an initial state , and a finite trace is final if it ends in an accepting state . A trace is fair if it is infinite and for infinitely many ’s. A transition is transient if it appears at most once in any trace of the automaton. The language of an NBA is .

A nondeterministic finite automaton (NFA) has the same syntax as an NBA, and all definitions from the previous paragraph carry over to NFA. (Sometimes, accepting states in NBA are called final in the context of NFA.) However, since NFA recognize languages of finite words, their semantics is different. The language of an NFA is thus defined as .

When the distinction between NBA and NFA is not important, we just call an automaton. Given two automata and we write if and if .

## 3. Quotienting reduction techniques

An interesting problem is how to simplify an automaton while preserving its semantics, i.e., its language. Generally, one tries to reduce the number of states/transitions. This is useful because the complexity of decision procedures usually depends on the size of the input automata. A classical operation for reducing the number of states of an automaton is that of quotienting, where states of the automaton are identified according to a given equivalence, and transitions are projected accordingly. Since in practice we obtain quotienting equivalences from suitable preorders, we directly define quotienting w.r.t. a preorder. In the rest of the section, fix an automaton , and let be a preorder on , with induced equivalence . Given a state , we denote by its equivalence class w.r.t.  (which is left implicit for simplicity), and, for a set of states , is the set of equivalence classes .

###### Definition 3.1.

The quotient of by is , where , i.e., transitions are induced element-wise.

Clearly, every trace in immediately induces a corresponding trace in , which is fair/initial/final if the former is fair/initial/final, respectively. Consequently, for any preorder . If, additionally, , then we say that the preorder is good for quotienting (GFQ).

###### Definition 3.2.

A preorder is good for quotienting (GFQ) if .

GFQ preorders are downward closed (since a smaller preorder induces a smaller equivalence, which quotients ‘less’). We are interested in finding coarse and efficiently computable GFQ preorders for NBA and NFA. Classical examples are given by forward simulation relations (Sec. 3.1) and forward trace inclusions (Sec. 3.3), which are well known GFQ preorders for NBA. A less known GFQ preorder for NBA is given by their respective backward variants (Sec. 3.5). For completeness, we also consider suitable simulations and trace inclusions for NFA (Sec. 3.6). In Sec. 4, the previous preorders are applied to language inclusion for both NBA and NFA. In Sec. 5, we present novel language-preserving transition pruning techniques based on simulations and trace inclusions. While simulations are efficiently computable, e.g., in PTIME, trace inclusions are PSPACE-complete. In Sec. 6, we present lookahead simulations, which are novel efficiently computable GFQ relations coarser than simulations.

### 3.1. Forward simulation relations

Forward simulation [59, 57] is a binary relation on the states of ; it relates states whose behaviors are step-wise related, which allows one to reason about the internal structure of automaton —i.e., how a word is accepted, and not just whether it is accepted. Formally, simulation between two states and can be described in terms of a game between two players, Spoiler and Duplicator, where the latter wants to prove that can step-wise mimic any behavior of , and the former wants to disprove it. The game starts in the initial configuration . Inductively, given a game configuration at the -th round of the game, Spoiler chooses a symbol and a transition . Then, Duplicator responds by choosing a matching transition , and the next configuration is . Since the automaton is assumed to be complete, the game goes on forever, and the two players build two infinite traces and . The winning condition for Duplicator is a predicate on the two traces , and it depends on the type of simulation. For our purposes, we consider direct [22], delayed [26] and fair simulation [37]. Let . Duplicator wins the play if holds, where

 Cdi(π0,π1) ⟺∀(i≥0)⋅pi∈F⟹qi∈F Cde(π0,π1) ⟺∀(i≥0)⋅pi∈F⟹∃(j≥i)⋅qj∈F Cf(π0,π1) ⟺ if π0 is fair, then π1 is % fair

Intuitively, direct simulation requires that accepting states are matched immediately (the strongest condition), while in delayed simulation Duplicator is allowed to accept only after a finite delay. In fair simulation (the weakest condition), Duplicator must visit accepting states infinitely often only if Spoiler does so. Thus, the three conditions are presented in increasing degree of coarseness. We define -simulation relation , for , by stipulating that holds if Duplicator has a winning strategy in the -simulation game, starting from configuration . Thus, . Simulation between states in different automata and can be computed as a simulation on their disjoint union.

###### Lemma 3.1 ([22, 36, 37, 26]).

For , -simulation is a PTIME computable preorder. For , is GFQ on NBA.

Notice that fair simulation is not GFQ. A simple counterexample can be found in [26] (even for fair bisimulation); cf.  also the automaton from Fig. 2, where all states are fair bisimulation equivalent, and thus the quotient automaton would recognise . However, the interest in fair simulation stems from the fact that it is a PTIME computable under-approximation of fair trace inclusion (introduced in the next Sec. 3.3). Trace inclusions between certain states can be used to establish language inclusion between automata, as discussed in Sec. 4; this is part of our inclusion testing presented in Sec. 8.

### 3.2. Multipebble simulations

While simulations are efficiently computable, their use is often limited by their size, which can be much smaller than other GFQ preorders. Multipebble simulations [24] offer a generalization of simulations where Duplicator is given several pebbles that he can use to hedge his bets and delay the resolution of nondeterminism. This increased power of Duplicator yields coarser GFQ preorders.

###### Lemma 3.2 ([24]).

Multipebble direct and delayed simulations are a GFQ preorders on NBA coarser than direct and delayed simulations, respectively. They are PTIME computable for a fixed number of pebbles.

However, computing multipebble simulations is PSPACE-hard in general [17], and in practice it is exponential in the number of pebbles. For this reason, we study (cf. Sec. 6) lookahead simulations, which are efficiently computable under-approximations of multipebble simulations, and, more generally, of trace inclusions, which we introduce next.

### 3.3. Forward trace inclusions

There are other generalizations of simulations (and their multipebble extensions) that are GFQ. One such example of coarser GFQ preorders is given by trace inclusions, which are obtained through the following modification of the simulation game. In a simulation game, the players build two paths by choosing single transitions in an alternating fashion. That is, Duplicator moves by a single transition by knowing only the next single transition chosen by Spoiler. We can obtain coarser relations by allowing Duplicator a certain amount of lookahead on Spoiler’s chosen transitions. In the extremal case of infinite lookahead, i.e., where Spoiler has to reveal her entire path in advance, we obtain trace inclusions. Analogously to simulations, we define direct, delayed, and fair trace inclusion, as binary relations on . Formally, for , -trace inclusion holds between and , written if, for every word , and for every infinite -trace starting at , there exists an infinite -trace starting at , s.t.  holds. (Recall the definition of from Sec. 3.1).

Like simulations, trace inclusions are preorders. Clearly, direct trace inclusion is a subset of delayed trace inclusion , which, in turn, is a subset of fair trace inclusion . Moreover, since Duplicator has more power in the trace inclusion game than in the corresponding simulation game, trace inclusions subsume the corresponding simulation (and even the corresponding multipebble simulation222It turns out that multipebble direct simulation with the maximal number of pebbles in fact coincides with direct trace inclusion, while the other inclusions are strict for the delayed and fair variants [17].). In particular, fair trace inclusion is not GFQ, since it subsumes fair simulation which we have already observed not to be GFQ in Sec. 3.1.

We further observe that even the finer delayed trace inclusion is not GFQ. Consider the automaton on the left in Fig. 2 (taken from [16]). The states and are equivalent w.r.t. delayed trace inclusion (and are the only two equivalent states), and thus , but merging them induces the quotient automaton on the right in the figure, which accepts the new word that was not previously accepted.

It thus remains to decide whether direct trace inclusion is GFQ. This is the case, since in fact coincides with multipebble direct simulation, which is GFQ by Lemma 3.2.

###### Lemma 3.3 ([24, 16]).

Forward trace inclusions are PSPACE computable preorders. Moreover, direct trace inclusion is GFQ for NBA, while delayed and fair trace inclusions are not.

The fact that direct trace inclusion is GFQ also follows from a more general result presented in the next section, where we consider a different way to give lookahead to Duplicator.

### 3.4. Fixed-word simulations

Fixed-word simulation [16] is a variant of simulation where Duplicator has infinite lookahead only on the input word , but not on Spoiler’s actual -trace . Formally, for , one considers the family of preorders indexed by infinite words , where for a fixed infinite word is like -simulation, but Spoiler is forced to play the word . Then, -fixed-word simulation is defined by requiring that Duplicator wins for every infinite word , that is, . Thus, -fixed-word simulation, by definition, falls between -simulation and -trace inclusion. What is surprising is that delayed fixed-word simulation is coarser than multipebble delayed simulation (and thus direct trace inclusion , since this one turns out to coincide with direct multipebble simulation , which is included in by definition), and not incomparable as one could have assumed; this fact is non-trivial [16]. Since delayed fixed-word simulation is GFQ for NBA, this completes the classification of GFQ preorders for NBA and makes the coarsest simulation-like GFQ preorder known to date. The reader is referred to [16] for a more exhaustive discussion of the results depicted in Fig. 3.

###### Lemma 3.4 ([16]).

Delayed fixed-word simulation is a PSPACE-complete GFQ preorder.

The simulations and trace inclusions considered so far explore the state space of the automaton in a forward manner. Their relationship and GFQ status are summarized in Fig. 3, where an arrow means inclusion and a double arrow means equality. Notice that there is a backward arrow from fixed-word direct simulation to multipebble direct simulation, and not the other way around as one might expect [16]. In a dual fashion, one can exploit the backward behavior of the automaton to recognize structural relationships allowing for quotienting states, which is the topic of the next section.

### 3.5. Backward direct simulation and backward direct trace inclusion

Another way of obtaining GFQ preorders is to consider variants of simulation/trace inclusion which go backwards w.r.t. transitions. Backward direct simulation (called reverse simulation in [65]) is defined like ordinary simulation, except that transitions are taken backwards: From configuration , Spoiler selects a transition , Duplicator replies with a transition , and the next configuration is . Let and be the two infinite backward traces built in this way. The corresponding winning condition requires Duplicator to match both accepting and initial states:

 CbwI,F(π0,π1)⟺∀(i≥0)⋅pi∈F⟹qi∈F and pi∈I⟹qi∈I

Then, holds if Duplicator wins the backward simulation game starting from with winning condition . Backward simulation is an efficiently computable GFQ preorder [65] on NBA incomparable with forward simulations.

###### Lemma 3.5 ([65]).

Backward simulation is a PTIME computable GFQ preorder on NBA.

The corresponding notion of backward direct trace inclusion is defined as follows: if, for every finite word , and for every initial, finite -trace ending in , there exists an initial, finite -trace ending in , s.t.  holds, where

 CbwF(π0,π1)⟺∀(0≤i≤m)⋅pi∈F⟹qi∈F

Note that backward direct trace inclusion deals with finite traces (unlike forward trace inclusions), which is due to the asymmetry between past and future in -automata.

As for their forward counterparts, backward direct simulation is included in backward direct trace inclusion . Notice that there is a slight mismatch between the two notions, since the winning condition of the former is defined over infinite traces, while the latter is on finite ones. In any case, inclusion holds thanks to the automaton being backward complete. Indeed, assume , and let be an initial, finite -trace starting in some and ending in . We play the backward direct simulation game from by letting Spoiler take transitions according to until configuration is reached for some state , and from there we let Spoiler play for ever according to any strategy (which is possible since the automaton is backward complete). We obtain a backward infinite path with suffix for Spoiler, and a corresponding with suffix for Duplicator s.t. . Since , we obtain . Similarly, accepting states are matched all along, as required in the winning condition for backward direct trace inclusion. Thus, .

In Lemma 3.5 we recalled that backward direct simulation is GFQ on NBA. We now prove that even backward direct trace inclusion is GFQ on NBA, thus generalizing the previous result.

###### Theorem 3.6.

Backward direct trace inclusion is a PSPACE-complete GFQ preorder on NBA.

###### Proof.

We first show that is GFQ. Let , and we show . There exists an initial and fair -trace . For , let (with ), and, for , let be the -trace prefix of ending in .

For any , we build by induction an initial and finite -trace of ending in and visiting at least as many accepting states as (and at the same time as does). For , just take the empty -trace . For , assume that an initial -trace of ending in has already been built. We have the transition in . There exist and s.t. we have a transition in . W.l.o.g. we can assume that , since . By , there exists an initial and finite -trace of ending in . By the definition of backward direct trace inclusion, visits at least as many accepting states as , which, by inductive hypothesis, visits at least as many accepting states as . Therefore, is an initial and finite -trace of ending in . Moreover, if , then, since backward direct trace inclusion respects accepting states, , hence , and, consequently, visits at least as many accepting states as .

Since is fair, we have thus built a sequence of finite and initial traces visiting unboundedly many accepting states. Since is finitely branching, by König’s Lemma there exists an initial and fair (infinite) -trace . Therefore, .

Regarding complexity, PSPACE-hardness follows from an immediate reduction from language inclusion of NFA, and membership in PSPACE can be shown by reducing to a reachability problem in a finite graph of exponential size. Since reachability in graphs is in LOGSPACE, we get the desired complexity. The finite graph is obtained by a product construction combined with a backward determinization construction: Vertices are those in

 V={(p,^p)∈Q×2Q|p∈F⟹^p⊆F}

and there is an edge if there exists a symbol s.t.  and for every there exists s.t. . Consider the target set of vertices

 T=I×{^p⊆Q|^p∩I=∅}.

We clearly have iff from vertex we can reach . ∎

The results on backward-like simulations established in this section are summarized in Fig. 4, where the arrow indicates inclusion. Notice that backward relations are in general incomparable with the corresponding forward notions from Fig. 3. In the next section we explore suitable GFQ relations for NFA.

### 3.6. Simulations and trace inclusions for NFA

The preorders presented so far were designed for NBA (i.e., infinite words). For NFA (i.e., finite words), the picture is much simpler. Both forward and backward direct simulations are GFQ also on NFA. However, over finite words one can consider a backward simulation coarser than where only initial states have to be matched (but not necessarily final ones). In backward finite-word simulation the two players play as in backward direct simulation, except that Duplicator wins the game when the following coarser condition is satisfied

 CbwI(π0,π1) ⟺∀(i≥0)⋅pi∈I⟹qi∈I

The corresponding trace inclusions are as follows. In forward finite trace inclusion Spoiler plays a finite, final trace, and Duplicator has to match it with a final trace. Dually, in backward finite trace inclusion , moves are backward and initial traces must be matched. Clearly, direct simulation is included in , and similarly for and . While are not GFQ for NBA (they are not designed to consider the infinitary acceptance condition of NBA, which can be shown with trivial examples) they are for NFA. The following theorem can be considered as folklore and its proof is just an adaptation of similar proofs for NBA in the simpler setting of NFA. The PSPACE-completeness is an immediate consequence of the fact that language inclusion for NFA is also PSPACE-complete [56].

###### Theorem 3.7.

Forward direct simulation and backward finite-word simulation are PTIME GFQ preorders on NFA. Forward and backward finite trace inclusions are PSPACE-complete GFQ preorders on NFA.

## 4. Language inclusion

When automata are viewed as finite representations of languages, it is natural to ask whether two different automata represent the same language, or, more generally, to compare these languages for inclusion. Recall that, for two automata and over the same alphabet , we write iff , and iff . The language inclusion/equivalence problem consists in determining whether or holds, respectively. For nondeterministic finite and Büchi automata, language inclusion and equivalence are PSPACE-complete [56, 49]. This entails that, under standard theoretic-complexity assumptions, there exists no efficient deterministic algorithm for inclusion/equivalence testing. Therefore, we consider suitable under-approximations thereof.

###### Remark 4.1.

A partial approach to NBA language inclusion testing has been described by Kurshan in [50]. Given an NBA with states, Kurshan’s construction builds an NBA with states such that , i.e., over-approximates the complement of . Moreover, if is deterministic then .

This yields a sufficient test for inclusion, since implies (though generally not vice-versa). This condition can be checked in polynomial time.

Of course, for general NBA, this sufficient inclusion test cannot replace a complete test. Depending on the input automaton , the over-approximation could be rather coarse.

The following definition captures in which sense a preorder on states can be used as a sufficient inclusion test.

###### Definition 4.1.

Let and be two automata. A preorder on is good for inclusion (GFI) if either one of the following two conditions holds:

 1. whenever ∀p∈IA⋅∃q∈IB⋅p⊑q, then A⊆B, or 2. whenever ∀p∈FA⋅∃q∈FB⋅p⊑q, then A⊆B.

In other words, GFI preorders give a sufficient condition for inclusion, by either matching initial states of with initial states of (case 1), or by matching accepting states of with accepting states of (case 2). However, a GFI preorder is not necessary for inclusion in general333In the presence of multiple initial states it might be the case that inclusion holds but the language of is not included in the language of any of the initial states of , only in their “union”.. Usually, forward-like simulations are GFI for case 1, and backward-like simulations are GFI for case 2. Moreover, if computing a GFI preorder is efficient, then this leads to a sufficient test for inclusion. Finally, if a preorder is GFI, then all smaller preorders are GFI too, i.e., GFI is -downward closed.

It is obvious that fair trace inclusion is GFI for NBAs (by matching initial states of with initial states of ). Therefore, all variants of direct, delayed, and fair simulation from Sec. 3.1, and the corresponding trace inclusions from Sec. 3.3, are GFI. We notice here that backward direct trace inclusion is GFI for NBA (by matching accepting states of with accepting states of ), which entails that the finer backward direct simulation is GFI as well.

###### Theorem 4.1.

Backward direct simulation and backward direct trace inclusion are GFI preorders for NBA.

###### Proof.

Every accepting state in is in relation with an accepting state in . Let , and let be an initial and fair -path in . Since visits infinitely many accepting states, and since each such state is -related to an accepting state in , by using the definition of it is possible to build in longer and longer finite, initial traces in visiting unboundedly many accepting states. Since is finitely branching, by König’s Lemma there exists an initial and fair (infinite) -trace in . Thus, . ∎

For NFA, we observe that forward finite trace inclusion is GFI by matching initial states, and backward finite trace inclusion is GFI by matching accepting states. The proof of the following theorem is immediate.

###### Theorem 4.2.

Forward and backward finite trace inclusions are GFI preorders on NFA.

## 5. Transition pruning reduction techniques

While quotienting-based reduction techniques reduce the number of states by merging them, we explore an alternative method which prunes (i.e., removes) transitions. The intuition is that certain transitions can be removed from an automaton without changing its language when other ‘better’ transitions remain.

###### Definition 5.1.

Let be an automaton, let be a relation on , and let be the set of maximal elements of , i.e.,

 maxP={(p,σ,r)∈δ|∄(p′,σ′,r′)∈δ⋅((p,σ,r),(p′,σ′,r′))∈P}

The pruned automaton is defined as , where .

In most practical cases, will be a strict partial order, but this condition is not absolutely required.

While the computation of depends on in general, all subsumed transitions are removed ‘in parallel’, and thus is not re-computed even if the removal of a single transition changes , and thus itself. This is important for computational reasons. Computing may be expensive, and thus it is beneficial to remove at once all transitions that can be witnessed with the at hand. E.g., one might remove thousands of transitions in a single step without re-computing . On the other hand, removing transitions in parallel makes arguing about correctness much more difficult due to potential mutual dependencies between the involved transitions.

Regarding correctness, note that removing transitions cannot introduce new words in the language, thus . When also the converse inclusion holds (so the language is preserved), we say that is good for pruning (GFP).

###### Definition 5.2.

A relation is good for pruning (GFP) if .

Like GFQ, also GFP is -downward closed in the space of relations. We study specific GFP relations obtained by comparing the endpoints of transitions over the same input symbol. Formally, given two binary state relations for the backward and forward endpoints, respectively, we define

 P(Rb,Rf)={((p,σ,r),(p′,σ,r′))∈δ×δ|pRbp′ and rRfr′}. (1)

is monotone in both arguments.

In the following section, we explore which state relations induce GFP relations for NBA. In Sec. 5.2, we present similar GFP relations for NFA.

### 5.1. Pruning NBA

Our results are summarized in Table 2. It has long been known that and are GFP (see [15], where the removed transitions are called ‘little brothers’). However, already slightly relaxing direct simulation to delayed simulation is incorrect, i.e., is not GFP. This is shown in the counterexample in Fig. 5(a), where , but removing the dashed transition (due to ) makes the language empty. The essential problem is that holds precisely thanks to the presence of transition , without which we would have , thus creating a cyclical dependency. Consequently, and are not GFP either.

Moreover, while and are GFP, their union (or the transitive closure thereof) is not. A counterexample is shown in Fig. 5(b), where pruning would remove both the transitions (subsumed by with ) and (subsumed by with ), and would no longer be accepted. Again, the essential issue is a cyclical dependency: holds only if is not pruned, and symmetrically holds only if is not pruned. Therefore, removing any single one of these two transitions is sound, but not removing both.

However, it is possible to relax simulation in and to direct trace inclusion , resp., backward trace inclusion