• Aucun résultat trouvé

Width of Non-deterministic Automata

N/A
N/A
Protected

Academic year: 2021

Partager "Width of Non-deterministic Automata"

Copied!
15
0
0

Texte intégral

(1)

HAL Id: hal-01891180

https://hal.archives-ouvertes.fr/hal-01891180

Submitted on 9 Oct 2018

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Denis Kuperberg, Anirban Majumdar

To cite this version:

Denis Kuperberg, Anirban Majumdar. Width of Non-deterministic Automata. 35th Symposium

on Theoretical Aspects of Computer Science (STACS 2018), 2018, Caen, France.

pp.48 - 49,

�10.4230/LIPIcs.STACS.2018.48�. �hal-01891180�

(2)

Denis Kuperberg

1

and Anirban Majumdar

2

1 CNRS, ENS de Lyon, LIP 2 Chennai Mathematical Institute

Abstract

We introduce a measure called width, quantifying the amount of nondeterminism in automata. Width generalises the notion of good-for-games (GFG) automata, that correspond to NFAs of width 1, and where an accepting run can be built on-the-fly on any accepted input. We describe an incremental determinisation construction on NFAs, which can be more efficient than the full powerset determinisation, depending on the width of the input NFA. This construction can be generalised to infinite words, and is particularly well-suited to coBüchi automata in this context. For coBüchi automata, this procedure can be used to compute either a deterministic automaton or a GFG one, and it is algorithmically more efficient in this last case. We show this fact by proving that checking whether a coBüchi automaton is determinisable by pruning is NP-complete. On finite or infinite words, we show that computing the width of an automaton is PSPACE-hard.

1998 ACM Subject Classification F.1.1 Models of computations, F.4.3 Formal Languages

Keywords and phrases width, non-deterministic automata, determinisation, good-for-games, complexity

Digital Object Identifier 10.4230/LIPIcs.STACS.2018.48

1

Introduction

Determinisation of non-deterministic automata (NFAs) is one of the cornerstone problems of automata theory, with countless applications in verification. There is a very active field of research for optimizing or approximating determinisation, or circumventing it in contexts like inclusion of NFA or Church Synthesis. Indeed, determinisation is a costly operation, as the state space blow-up is in O(2n) on finite words, O(3n) for coBüchi automata [16], and 2O(n log(n)) for Büchi automata [17].

If A and B are NFAs, the classical way of checking the inclusion L(A) ⊆ L(B) is to determinise B, complement it, and test emptiness of L(A) ∩ L(B). To circumvent a full determinisation, the recent algorithm from [3] proved to be very efficient, as it is likely to explore only a part of the powerset construction. Other approaches use simulation games to approximate inclusion at a cheaper cost, see for instance [8].

Another approach consists in replacing determinism by a weaker constraint that suffices in some particular context. In this spirit, Good-for-Games automata (GFG for short) were introduced in [9], as a way to solve the Church synthesis problem. This problem asks, given a specification L, typically given by an LTL formula, over an alphabet of inputs and outputs, whether there is a reactive system (transducer) whose behaviour is included in L. The classical solution computes a deterministic automaton for L, and solves a game defined on this automaton. It turns out that replacing determinism by the weaker constraint of being GFG is sufficient in this context. Intuitively, GFG automata are non-deterministic

This work was supported by the grant PALSE Impulsion.

(3)

automata where it is possible to build an accepting run in an online way, without knowledge of the future, provided the input word is in the language of the automaton. In [9], it is shown that GFG automata allow an incremental algorithm for the Church synthesis problem: we can build increasingly large games, with the possibility that the algorithm stops before the full determinisation is needed. One of the aims of this paper is to generalise this idea to determinisation of NFA, for use in any context and not only Church synthesis. We give an incremental determinisation construction, where the emphasis is on space-saving, and that allows in some cases to avoid building the full powerset construction.

The notion of width introduced in this paper generalises the GFG model, by allowing more than one run to be built in an online way. Intuitively, width quantifies how many states we have to keep track of simultaneously in order to build an accepting run in an online way. The maximal width of an automaton is its number of states. The width of an automaton corresponds to the number of steps performed by our incremental determinisation construction before stopping. In the worst case where the width is equal to the number of states of the automaton, we end up performing the full powerset construction (or its generalisations for infinite words). We study here the complexity of directly computing the width of a nondeterministic automaton, and we show that it is PSPACE-hard and in EXPTIME.

The properties of GFG automata and links with other models (tree automata, Markov Decision Processes) are studied in [2, 10, 11]. Colcombet introduced a generalisation of the concept of GFG called history-determinism [5], replacing determinism for automata with counters. It was conjectured by Colcombet [6] that GFG automata were essentially deterministic automata with additional useless transitions. It was shown in [11] that on the contrary there is in general an exponential state space blowup to translate GFG automata to deterministic ones. GFG automata retain several good properties of determinism, in particular they can be composed with trees and games, and easily checked for inclusion.

We give here the first algorithms allowing to build GFG automata from arbitrary non-deterministic automata on infinite words, allowing to potentially save exponential space compared to deterministic automata. Our incremental constructions look for small GFG automata, and aim at avoiding the worst-case complexities of determinisation constructions. Moreover, in the case of coBüchi automata, we show that the procedure is more efficient than its analog looking for a deterministic automaton, since checking for GFGness is polynomial [11], while we show here that the corresponding step for determinisation, that is checking whether a coBüchi automaton is Determinisable By Pruning (DBP) is NP-complete.

As a measure of non-determinism, width can be compared with ambiguity, where the idea is to limit the number of possible runs of the automaton. In this context unambiguous automata play a role analogous to GFG automata for width. Unambiguous automata are studied in [12], degrees of ambiguity are investigated in [18, 13, 14]. In the online long version of the paper, we give examples of automata with various width and ambiguity, showing that these two measures are essentially orthogonal.

We start by describing the width approach on finite words, and then move to infinite words, focusing mainly on the coBüchi acceptance condition. We end by briefly describing the picture for Büchi automata.

(4)

2

Definitions

We will use Σ to denote a finite alphabet. The empty word is denoted ε. If i ≤ j, the set {i, i + 1, i + 2, . . . , j} is denoted [i, j]. If X is a set and k ∈ N, we note X≤k for Sk

i=0X i.

The complement of a set X is denoted X. If u ∈ Σis a word and L ⊆ Σ∗ is a language, the left quotient of L by u is u−1L := {v ∈ Σ| uv ∈ L}.

2.1

Automata

A non-deterministic automaton A is a tuple (Q, Σ, q0, ∆, F ) where Q is the set of states, Σ is a finite alphabet, q0 ∈ Q is the initial state, ∆ : Q × Σ → 2Q is the transition function,

and F ⊆ Q is the set of accepting states.

The transition function is naturally generalised to 2Q by setting for any (X, a) ∈ 2Q× Σ

∆(X, a) the set of a-successors of X, i.e. ∆(X, a) = {q ∈ Q | ∃p ∈ X, q ∈ ∆(p, a)}.

If for all (p, a) ∈ Q × Σ there is a unique q ∈ Q such that (p, a, q) ∈ ∆, we say that A is

deterministic.

If u = a1. . . an is a finite word of Σ∗, a run of A on u is a sequence q0q1. . . qn such that

for all i ∈ [1, n], we have qi∈ ∆(qi−1, ai). The run is said to be accepting if qn ∈ F .

If u = a1a2. . . is an infinite word of Σω, a run of A on u is a sequence q0q1q2. . . such that for all i > 0, we have qi∈ ∆(qi−1, ai). A run is said to be Büchi accepting if it contains

infinitely many accepting states, and coBüchi accepting if it contains finitely many non-accepting states. Automata on infinite words will be called Büchi and coBüchi automata, to specify their acceptance condition.

We will note NFA (resp. DFA) for a non-deterministic (resp. deterministic) automaton on finite words, NBW (resp. DBW) for a non-deterministic (resp. deterministic) Büchi automaton, and NCW (resp. DCW) for a non-deterministic (resp. deterministic) coBüchi automaton.

We also mention the parity condition on infinite words: each state q has a rank rk(q) ∈ N, and an infinite run is accepting if the highest rank appearing infinitely often is even.

The language of an automaton A, noted L(A), is the set of words on which the automaton A has an accepting run. Two automata are said equivalent if they recognise the same language.

An automaton A is determinisable by pruning (DBP) if an equivalent deterministic auto-maton can be obtained from A by removing some transitions.

An automaton A is Good-For-Games (GFG) if there exists a function σ : A→ Q (called

GFG strategy) that resolves the non-determinism of A depending only on the prefix of the

input word read so far: over every word u = a1a2a3. . . (finite or infinite depending on the type of automaton considered), the sequence of states σ(ε)σ(a1)σ(a1a2)σ(a1a2a3) . . . is a run of A on u, and it is accepting whenever u ∈ L(A). For instance every DBP automaton is GFG. See [2] for more introductory material and examples on GFG automata.

2.2

Games

A game G = (V0, V1, vI, E, W0) of infinite duration between two players 0 and 1 consists of:

a finite set of positions V being a disjoint union of V0 and V1; an initial position vI ∈ V ; a

set of edges E ⊆ V × V ; and a winning condition W0⊆ Vω.

A play is an infinite sequence of positions v0v1v2· · · ∈ Vω such that v0= vI and for all

n ∈ N, (vn, vn+1) ∈ E. A play π ∈ Vωis winning for Player 0 if it belongs to W0. Otherwise

(5)

A strategy for Player 0 (resp. 1) is a function σ0: V× V0→ V (resp. σ1: V× V1→ V ), describing which edge should be played given the history of the play u ∈ V∗and the current position v ∈ V . A strategy has to obey the edge relation, i.e. there has to be an edge in E from v to σP(u, v). A play π is consistent with a strategy σP of a player P if for every n

such that π(n) ∈ VP we have π(n + 1) = σP(v0. . . vn−1, vn).

A strategy for Player 0 (resp. Player 1) is positional if it does not use the history of the play, i.e. it is a function V0→ V (resp. V1→ V ).

We say that a strategy σP of a player P is winning if every play consistent with σP is

winning for P . In this case, we say that P wins the game G.

A game is positionally determined if exactly one of the players has a positional winning strategy in the game.

3

Finite words

3.1

Width of a NFA

Let A = (Q, Σ, q0, ∆, F ) be a NFA, and n = |Q| be the size of A.

We want to define the width of a A as the minimum number of simultaneous states that need to be tracked in order to be able to deterministically build an accepting run in an online way.

In order to define this notion formally, we introduce a family of games Gw(A, k),

para-meterized by an integer k ∈ [1, n].

The game Gw(A, k) is played on Q≤k, starts in X0= {q0}, and the round i of the game

from a position Xi∈ Q≤kis defined as follows:

Player 1 chooses a letter ai+1 ∈ Σ.

Player 0 moves to a subset Xi+1⊆ ∆(Xi, ai+1) of size at most k.

A play is winning for Player 0 if for all r ∈ N, whenever a1a2. . . ar∈ L(A), Xrcontains

an accepting state.

IDefinition 1. The width of a NFA A, denoted width(A), is the least k such that Player

0 wins Gw(A, k).

Intuitively, the width measures the “amount of non-determinism” in an automaton: it counts the number of simultaneous states we have to keep track of, in order to be sure to find an accepting run in an online way.

IFact 1. A NFA A is GFG if and only if width(A) = 1.

3.2

Partial powerset construction

We give here a generalisation of the powerset construction, following the intuition of the width measure.

We define the k-subset construction of A to be the subset construction where the size of each set is bounded by k. Formally, it is the NFA Ak = (Q≤k, Σ, {q0}, ∆0, F0) where:

∆0(X, a) := (

{∆(X, a)} if |∆(X, a)| ≤ k {X0| X0⊆ ∆(X, a), |X0| = k} otherwise

F0:= {X ∈ Q≤k| X ∩ F 6= ∅}

ILemma 2. Ak has less than

nk

(6)

Proof. The number of states of Ak is (at most) |Q≤k| = P k i=0

n

i. Using the fact that n

i ≤ ni

i!, we can bound the number of states of Akby

Pk i=0 ni i! ≤ Pk i=0 nk k! ≤ 1+ Pk i=1 nk k! = nk (k−1)!+ 1. J

The following lemma shows the link between width and the k-powerset construction.

ILemma 3. width(A) ≤ k if and only if Ak is GFG.

Proof. Winning strategies in Gw(A, k) are in bijection with GFG strategies for Ak. J

3.3

GFG automata on finite words

We recall here results on GFG automata on finite words.

We start with a Lemma characterizing GFG strategies. Let A = (Q, Σ, q0, ∆, F ) be a NFA recognising a language L, and σ : Σ→ Q be a potential GFG strategy. If q ∈ Q, we denote L(q) the language accepted from q in A, i.e. L(q) is the language of A with q as initial state.

ILemma 4. σ is a GFG strategy if and only if for all u ∈ Σ, L(σ(u)) = u−1L

We now go to the main result of this section. This result has first been proved in [1], and then a more general version allowing lookahead was proved using a game-based approach in [15].

ITheorem 5. [1, 15] A NFA A is GFG if and only if it is DBP. Moreover, it is in O(n2) to

determine whether a NFA of size n is GFG, and to compute an equivalent DFA by removing transitions.

3.4

Incremental determinisation procedure

We can now describe an incremental determinisation procedure, aiming at saving resources in the search of a deterministic automaton. In the process, we also compute the width of the input NFA.

The algorithm goes as follows:

k = 0

Repeat

k := k + 1

Construct Ak

Until Ak is GFG

Compute an equivalent DFA D from Ak by removing transitions

Return D, k

The usual determinisation procedure uses the full powerset construction, i.e. assumes that we are in the case of maximal width. In a second step, the deterministic automaton can be minimized easily.

Our method here is to approach this construction “from below”, and incrementally in-crease the width until we find the good one. In some cases, this allows to compute directly a smaller automaton, and avoiding using the full powerset construction of exponential state complexity.

For a NFA with n states and width k, the complexity of this algorithm is in O (k−1)!n2k 2,

(7)

s start p1 p2 pk q1 q2 qk t a Σ Σ Σ b a Σ Σ Σ a Σ a b Σ

Figure 1 Example: 2-subset construction is enough

IExample 6. Here the language recognised by this automaton is L(A) = ΣaΣ≥k, and it has width 2. Therefore, our determinisation procedure uses time O(n4) and directly builds a DFA of size O(n2), while a classical determinisation via powerset construction would build an exponential-size DFA.

But in some other cases, the powerset construction is actually more efficient than the

k-powerset construction, in terms of number of reachable states. It would therefore be

interesting to be able to either run the two methods in parallel, or guess which one is more efficent based on the shape of the input NFA.

3.5

Complexity results on the width problem

In this section, we study the complexity of the width problem: given a NFA A and an integer

k, is it true that width(A) ≤ k ?

Being able to solve this problem efficiently would allow us to optimize the incremental determinisation algorithm, by aiming at the optimal k matching the width right away instead of trying the different width candidates incrementally.

ITheorem 7. The width problem is PSPACE-hard.

Proof. We prove this by reduction from the universality of NFA Problem (i.e. does an input NFA accept all words?) which is known to be PSPACE-Complete.

Let A = (Q, Σ, ∆, q0, F ) be a NFA that we want to check for universality. Let n = |Q|.

Let a be a letter in Σ and # be a new letter not in Σ.

We build a NFA B over Σ0= Σ ∪ {#} as the union of two NFAs B1and B2 as shown in Figure 2.

Formally B1= (Q1, Σ0, q0, ∆1, F1), with Q1= Q ∪ {q#}, F1= {q#}, and

∆1(p, x) =    ∆(p, x) if p ∈ Q and x 6= # {q#} if (p, x) ∈ F × {#} or if (p, x) = (q#, a)otherwise. Its language is L(B1) = L(A)#a∗.

The NFA B2 = (Q2, Σ0, pI, ∆2, {p0}) has n + 2 states as described on the picture, and recognises the language L(B2) = Σ∗#a≥n.

We define B = (QB, Σ0, {q0, pI}, ∆B, FB) as the union of B1 and B2. We allow here

multiple initial states for simplicity, but it is straigthforward to adapt the construction in order to have a unique initial state.

(8)

A B1: q] F # # # a pI start B2: pn a pn−1 pn−2 p0 # a a a a Σ Figure 2 Automaton B

The intuition here is that if A is universal, then B2 is useless in B as L(B) = L(B1) = Σ∗#a, and width(B) = width(A) ≤ n. However, if A is not universal, then B is forced to use its B2 component, inducing a width at least n + 1. This is formalized in the following lemma.

ILemma 8. width(B) ≤ n ⇐⇒ L(A) = Σ.

Proof. (⇒) Suppose width(B) ≤ n but ∃u ∈ Σ\L(A). Let Cnbe the n-subset construction

of B. By Lemma 3, Cn is GFG, let σ : Σ→ (QB)≤nbe a GFG strategy of Cn.

Consider the word w = u#an. Note that w ∈ L(B2) \ L(B1). Let X ∈ (QB)≤n be the subset reached by σ on w, i.e. X = σ(w). Notice that since u /∈ L(A), we have

X ⊆ (Q2\ {pI}), i.e. X ⊆ {p0, p1, . . . , pn}. Since |X| ≤ n, there is i ∈ [0, n] such that

pi∈ X = σ(w). This means that p0/ ∈ σ(wa/ i), hence σ(wai) is not accepting. But this word

is in L(B) (as it is in L(B2)), this contradicts the fact that σ is a GFG strategy. Therefore it must be the case that L(A) = Σ∗.

(⇐) We now assume that L(A) = Σ. A GFG strategy in C

n is given by following the

powerset construction in B1, and ignoring B2. This shows that width(B) ≤ n. J This constitutes a polynomial reduction from universality to the width problem, so the width problem is PSPACE-hard. Actually, we even showed that the particular case of checking n-width of an automaton of size 2n + 3 is PSPACE-hard. J

ITheorem 9. The width problem is in EXPTIME.

Proof. To show the EXPTIME upper bound, it suffices to build the game Gw(A, k) of

exponential size. Solving such a game is polynomial in the size of the game, so this algorithm runs in exponential time. Also note that the algorithm given in section 3.4 computes the

width of a NFA in EXPTIME. J

We currently do not know if the width problem is complete for PSPACE or EXPTIME, and we leave this problem open.

IRemark. Although the present section deals with finite words, all results are immediately transferable to safety and reachability automata on infinite words. These automata have special acceptance conditions, which are particular cases of both Büchi and coBüchi con-ditions. Any infinite run is accepting in a safety automaton, and a run is accepting in a reachability automaton if it contains an accepting state. These dual acceptance conditions are of particular interest in verification, as they describe very natural properties.

(9)

4

CoBüchi Automata

We now turn to the case of coBüchi automata, and their determinisation problem. Here, since GFG and DBP are no longer equivalent [2, 11], we will also be interested in building GFG automata. As we will see, coBüchi automata are particularly well-suited for this approach for several reasons.

First of all, we recall that NCW and DCW have same expressive power, i.e. the de-terminisation of coBüchi automata does not need to introduce more complex acceptance conditions.

4.1

Width of ω-automata

We define here the width of automata on infinite words in a general way, as the definition is independent of the accepting condition.

Let A = (Q, Σ, q0, ∆, α) be an automaton on infinite words with acceptance condition α,

and n = |Q| be the size of A.

As before, we want to define the width of a A as the minimum number of states that need to be tracked in order to deterministically build an accepting run in an online way.

We will use the same family of games Gw(A, k) as in Section 3.1, they will only differ in

the winning condition.

The game Gw(A, k) is played on Q≤k, starts in X0= {q0}, and the round i of the game

from a position Xi∈ Q≤kis defined as follows:

Player 1 chooses a letter ai+1 ∈ Σ.

Player 0 moves to a subset Xi+1⊆ ∆(Xi, ai+1) of size at most k.

An infinite play is winning for Player 0 if whenever a1a2· · · ∈ L(A), the sequence

X0X1X2. . . contains an accepting run. That is to say there is a valid accepting run q0q1q2. . . of A on a1a2. . . such that for all i ∈ N, qi∈ Xi.

IDefinition 10. The width of A, denoted width(A), is the least k such that Player 0 wins

Gw(A, k).

As before, an automaton A is GFG if and only if width(A) = 1.

4.2

GFG coBüchi automata

We recall here some results from [11] on GFG coBüchi automata.

The first result is the exponential succinctness of coBüchi GFG automata compared to deterministic ones.

ITheorem 11 ([11]). There is a family of languages (Ln)n∈N such that for all n, Ln is

accepted by a coBüchi GFG automaton of size n, but any deterministic parity automaton for Ln must have size in Ω 2

n

n.

Despite this apparent complexity of GFG NCW, the next theorem shows that they can be recognised efficiently.

ITheorem 12 ([11]). Given a NCW A, it is in PTIME to decide whether A is GFG.

The conjunction of these results make the coBüchi class particularly interesting in our setting: the succinctness allows us to potentially save a lot of space compared to classical determinisation, and Theorem 12 can be used to stop the incremental construction. This is

(10)

in the context where we aim at building a GFG automaton, for instance in a context where we want to test for inclusion, or compose it with a game.

We examine later the case where GFG automata are not enough and we are aiming at building a DCW instead.

4.3

Partial breakpoint construction

We generalize here the breakpoint construction from [16], in the same spirit as Section 3.2. For a parameter k, we want the k-breakpoint construction to be able to keep track of at most k states simultaneously.

Given a NCW A = (Q, Σ, ∆, q0, F ), we define the k-breakpoint construction of A as the

NCW Ak = (Q0, Σ, ∆0, ({q0}, {q0}), F0), with Q0 = {(X, Y )|X, Y ∈ Q≤k and Y ⊆ X}, ∆0((X, Y ), a) :=           

{(∆(X, a), ∆(X, a))} if Y = ∅ and |∆(X, a)| ≤ k {(X0, X0)| X0 ⊆ ∆(X, a), |X0| = k} if Y = ∅ and |∆(X, a)| > k {(∆(X, a), ∆(Y, a) ∩ F )} if Y 6= ∅ and |∆(X, a)| ≤ k {(X0, X0∩ (∆(Y, a) ∩ F )) | X0 ⊆ ∆(X, a), |X0| = k} otherwise

F0 := {(X, Y ) ∈ Q0 | Y 6= ∅}

That is, a run is accepting in Ak if it visits the states of the form (X, ∅) finitely many

times.

ILemma 13. The number of states of Ak is at most P k i=0 n i2 i, which is in O (2n) k k! .

Proof. A state of Ak is of the form (X, Y ) with |X| ≤ k and Y ⊆ X. Therefore, there are

at most Pk

i=0 n i2

i such states. Since n i ≤

ni

i!, we can bound the number of states by

Pk i=0 nk k!2 i nk k!2 k+1= O (2n)k k!  J ILemma 14. L(A) = L(Ak), and width(A) ≤ k ⇐⇒ Ak is GFG.

Proof. This amounts to verifying that the automaton Ak faithfully simulates the winning

condition of Gw(A, k). The proof naturally follows from the correctness proof of the

break-point construction.

J

4.4

Incremental construction of GFG NCW

Supppose we are given a NCW A, and we want to build an equivalent GFG automaton. We can do the same as in Section 3.4: incrementally increase k and test for GFGness of Ak, which is in PTIME by Theorem 12. However in the coBüchi setting, the GFG automaton

is not necessarily DBP, and can actually be more succinct than any deterministic automaton for the language (Theorem 11).

If we are in a context where we are satisfied with a GFG automaton, such as synthesis or inclusion testing, this procedure can provide us one much more efficiently than determ-inisation.

Indeed, the example from [11] showing that GFG NCW are exponentially succinct com-pared to deterministic automata can be easily generalized to any width. For instance if our procedure is applied to the product of this automaton from [11] with the one from Example 6, our construction will stop at the second step and generate a GFG automaton of quadratic

(11)

size. This shows that the incremental construction for finding an equivalent GFG NCW can be very efficient compared to determinisation.

Directly computing the width of a NCW is PSPACE-hard and in EXPTIME, by the same arguments as in Section 3.1.

4.5

Aiming for determinism

In cases where a GFG automaton is not enough, and we want instead to build a DCW, we can test for DBPness instead of GFGness in the incremental algorithm. If we find the automaton is DBP, we can remove the useless transitions, and obtain an equivalent DCW.

Notice that the number of steps in this procedure corresponds to an alternative notion of width that can be called det-width. The det-width of an automaton A is the least k such that Player 0 has a positional winning strategy in Gw(A, k). Det-width always matches

width on finite words by Theorem 5, but the notions diverge on infinite words.

This section studies the complexity of checking DBPness for NCW. The next theorem shows that surprisingly, DBPness is harder to check than GFGness on NCW.

ITheorem 15. Given a NCW A, it is NP-complete to check whether it is DBP.

We first show the hardness with the following lemma.

ILemma 16. Checking whether a NCW is DBP is NP-hard.

Proof. We prove this by reduction from the Hamiltonian Cycle problem on a directed graph, which is known to be NP-complete.

Recall that a Hamiltonian cycle is a cycle using each vertex of the graph exactly once. Suppose, we have a directed graph G = ([1, n], E) and we want to check whether it contains a Hamiltonian cycle. W.l.o.g. we can assume that the graph is strongly connected, otherwise the answer is trivially no.

We construct a NCW A = (Q, Σ, ∆, q0, F ), where F is the set of accepting states, such

that A is DBP if and only if G has a Hamiltonian cycle. The components of A are defined as follows: Q :=S

i∈[1,n]{pi, qi, ri}, Σ := {a1, a2, · · · , an, #}, q0:= p1, F :=Si∈[1,n]{pi, qi},

and finally ∆ contains the following transitions, for all i ∈ [1, n]:

pi ai −→ qi, pi aj −→ ri for all j 6= i, qi # −→ pi, and ri # −→ pk if (i, k) ∈ E .

The only non-determinism in A occurs at the ri states when reading #: we then have a

choice between all the pk where (i, k) ∈ E.

We give an example for G in figure 3, where solid lines show the Hamiltonian cycle, and the construction of A from G in figure 4, where solid lines show a determinisation by pruning witnessing this Hamiltonian cycle.

1

2

3 4

Figure 3 An instance of G

For each i ∈ [1, n], we can think of the set of states {pi, qi, ri} as a cloud in A representing

(12)

r1 p1 start q1 r2 q2 p2 p3 r3 q3 r4 p4 q4 a1 a6=1 # # # a2 a6=2 # # # a3 a6=3 # # a4 a6=4 # #

Figure 4 Construction of NCW A from G of figure 3

Let Σ0 := Σ \ {#}, and L =

n

S

i=1

(Σ0#)∗(ai#)ω. First note that, provided G is strongly

connected, we have L(A) = L. Indeed, for a run to be accepting by A, it has to visit ri

finitely many times for all i, i.e. after some point it has to loop between pi and qi for some

fixed i, so the input word must be in L. This shows L(A) ⊆ L. On the other hand, consider a word w ∈ L of the form u(ai#)ω with u ∈ (Σ0#)∗. Then A will have a run on u reaching

some cloud j, and since the graph is strongly connected, the run can be extended to the cloud i reading a word of (ai#)∗. From there, the automaton will read (ai#)ωwhile looping

between pi and qi. We can build an accepting run of A on any word w ∈ L, so L ⊆ L(A).

Now we shall prove that A is DBP if and only if G has a Hamiltonian cycle.

(⇒) Suppose A is DBP, and let D be an equivalent DCW obtained from A by removing transitions. Notice that this corresponds to choosing one out-edge for each vertex of G. This means it induces a set of disjoint cycles in G. We show that it actually is a unique Hamiltonian cycle. Indeed, assume that some vertex of i is not reachable from 1 in G. Equivalently, it means that some cloud i is not reachable from p1 in D. This implies that (ai#)ω ∈ L(D), which contradicts L(D) = L(A) = L. Therefore, D is strongly connected,/

and describes a Hamiltonian cycle in G.

(⇐) Conversely, if G has an Hamiltonian cycle π , we can build the automaton D accordingly, by setting for all i ∈ [1, n], ∆D(ri, ]) = {pj} where j is the successor of i in

π. Since D is strongly connected, it still recognises L, and since it is deterministic it is a

witness that A is DBP.

This completes the proof of the fact that A is DBP if and only if G has a Hamiltonian cycle. Since this is a polynomial time reduction from Hamiltonian Cycle to DBPness of NCW, we showed that checking DBPness of a NCW is NP-hard.

(13)

using only two letters. Therefore, the problem is NP-hard even on a two-letters alphabet. It is trivially in PTIME on a one-letter alphabet, as there is a unique infinite word. J

The second part of Theorem 15 is given by the following lemma.

ILemma 17. Checking whether a NCW is DBP is in NP.

Proof. Suppose a NCW A is given. We want to check whether it is DBP. We do this via the following NP algorithm.

Nondeterministically prune transitions of A to get a deterministic automaton D. Check whether L(A) ⊆ L(D). For that, we check if L(A) ∩ L(D) = ∅

The second step of the algorithm can be done polynomially, since it amounts to finding an accepting lasso in A × D, where D is a Büchi automaton obtained by dualizing the acceptance condition of D. Finding such a lasso is actually in NL.

Therefore, the above algorithm is in NP, and its correctness follows from the fact that

L(D) ⊆ L(A) is always true, as any run of D is in particular a run of A.

J

4.6

Towards Büchi automata

NBW corresponds to the general case of non-deterministic ω-automata, as they allow to recognise any regular language, and are easily computable from non-deterministic automata with stronger accepting conditions.

We will briefly describe the generalisation of previous constructions here, and explain what is the main open problem remaining to solve in order to obtain a satisfying generalisa-tion. We take Safra’s construction [17] as the canonical determinisation for Büchi automata. Safra’s construction outputs a Rabin automaton.

The idea behind the previous partial determinisation construction can be naturally ad-apted to Safra: it suffices to restrict the image of the Safra tree labellings to sets of states of size at most k. The bottleneck of the incremental determinisation is then to test for GFGness (or DBPness) of Rabin automata. For DBPness, the same proof as Theorem 15 shows that it is NP-complete. However for GFGness, the complexity is widely open. The only known hardness result is the complexity of solving the games with same acceptance condition [11], known to be in QuasiP for parity [4] and NP-complete for Rabin [7]. In both cases, it is in P if the acceptance condition is fixed. On the other hand, the best known upper bound for GFGness is EXPTIME [11], even for fixed condition, say parity with 3 ranks. Finding an efficient algorithm for GFGness of Rabin (or Parity) automata would be of great interest for this incremental procedure, and would allow to efficiently build GFG automata from NBW.

Acknowledgements. We thank Nathalie Bertrand for helpful discussions.

References

1 Benjamin Aminof, Orna Kupferman, and Robby Lampert. Reasoning about online al-gorithms with weighted automata. In Proceedings of the Twentieth Annual ACM-SIAM

Symposium on Discrete Algorithms, SODA 2009, New York, NY, USA, January 4-6, 2009,

(14)

2 Udi Boker, Denis Kuperberg, Orna Kupferman, and Michał Skrzypczak. Nondeterminism in the presence of a diverse or unknown future. In Automata, Languages, and Programming

- 40th International Colloquium, ICALP 2013, Riga, Latvia, July 8-12, 2013, Proceedings, Part II, pages 89–100, 2013.

3 Filippo Bonchi and Damien Pous. Checking NFA equivalence with bisimulations up to congruence. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of

Programming Languages, POPL ’13, Rome, Italy - January 23 - 25, 2013, pages 457–468,

2013.

4 Cristian S. Calude, Sanjay Jain, Bakhadyr Khoussainov, Wei Li, and Frank Stephan. De-ciding parity games in quasipolynomial time. In Proceedings of the 49th Annual ACM

SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 252–263, 2017.

5 Thomas Colcombet. The theory of stabilisation monoids and regular cost functions. In

Automata, languages and programming. Part II, volume 5556 of Lecture Notes in Comput. Sci., pages 139–150, Berlin, 2009. Springer.

6 Thomas Colcombet. Forms of determinism for automata (invited talk). In 29th

Inter-national Symposium on Theoretical Aspects of Computer Science, STACS 2012, February 29th - March 3rd, 2012, Paris, France, pages 1–23, 2012.

7 E. Allen Emerson and Charanjit S. Jutla. The complexity of tree automata and logics of programs (extended abstract). In 29th Annual Symposium on Foundations of Computer

Science, White Plains, New York, USA, 24-26 October 1988, pages 328–337, 1988.

8 Kousha Etessami. A hierarchy of polynomial-time computable simulations for automata. In CONCUR 2002 - Concurrency Theory, 13th International Conference, Brno, Czech

Republic, August 20-23, 2002, Proceedings, pages 131–144, 2002.

9 Thomas A. Henzinger and Nir Piterman. Solving games without determinization. In

Computer Science Logic, 20th International Workshop, CSL 2006, 15th Annual Conference of the EACSL, Szeged, Hungary, September 25-29, 2006, Proceedings, pages 395–410, 2006.

10 Joachim Klein, David Müller, Christel Baier, and Sascha Klüppelholz. Are good-for-games automata good for probabilistic model checking? In Language and Automata Theory and

Applications - 8th International Conference, LATA 2014, Madrid, Spain, March 10-14, 2014. Proceedings, pages 453–465, 2014.

11 Denis Kuperberg and Michał Skrzypczak. On determinisation of good-for-games automata. In Automata, Languages, and Programming - 42nd International Colloquium, ICALP 2015,

Kyoto, Japan, July 6-10, 2015, Proceedings, Part II, pages 299–310, 2015.

12 H. Leung. Structurally unambiguous finite automata. Lecture Notes in Computer Science

(including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioin-formatics), 4094 LNCS:198–207, 2006. cited By 1.

13 Hing Leung. Separating exponentially ambiguous NFA from polynomially ambiguous NFA, pages 221–229. Springer Berlin Heidelberg, Berlin, Heidelberg, 1993.

14 HING LEUNG. Descriptional complexity of nfa of different ambiguity. International Journal of Foundations of Computer Science, 16(05):975–984, 2005.

15 Christof Löding and Stefan Repke. Decidability results on the existence of lookahead delegators for NFA. In IARCS Annual Conference on Foundations of Software Technology

and Theoretical Computer Science, FSTTCS 2013, December 12-14, 2013, Guwahati, India,

pages 327–338, 2013.

16 Satoru Miyano and Takeshi Hayashi. Alternating finite automata on ω-words. Theoret.

Comput. Sci., 32(3):321–330, 1984.

17 Shmuel Safra. On the complexity of omega-automata. In 29th Annual Symposium on

Foundations of Computer Science, White Plains, New York, USA, 24-26 October 1988,

(15)

18 Andreas Weber and Helmut Seidl. On the degree of ambiguity of finite automata.

Références

Documents relatifs

Even though we construct non-generalized deterministic automata before minimizing them, our SAT-based minimization can be used to produce minimal DTGBA for a given number of

Kleene’s theorem broadly characterizes regular languages by equivalent fi- nite representations as: Regular Expressions; Deterministic DFA and Non- deterministic NFA Finite

Tout d’abord, l’implémentation d’une chaîne de blocs publique présente quelques risques dans le cas d’une proposition de solution pour cette entreprise, comme le fait que ce type

The eigenfrequencies computed as a function of the flames delay using three methods: AVSP results on the complex geometry (Section 8.2), 1D analytical model using the low

The main results concern the flame stability maps, NO x , CO 2 and CO emissions, and flame dynamics for different oxygen.

In this paper, we present our ultracompact stabilized laser design and present our first measurement of thermal and vibra- tion sensitivities as well as preliminary estimation of

A simple and silent self-stabilizing protocols building k-independent dominating sets is presented. The protocol converges under the unfair distributed scheduler (the weakest

The meeting concluded that there should be more stress on the training of young ecologists, more particularly for work in developing countries, which should comprise