• Aucun résultat trouvé

Separating without any ambiguity

N/A
N/A
Protected

Academic year: 2021

Partager "Separating without any ambiguity"

Copied!
36
0
0

Texte intégral

(1)

HAL Id: hal-01798847

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

Submitted on 24 May 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.

Thomas Place, Marc Zeitoun

To cite this version:

Thomas Place, Marc Zeitoun. Separating without any ambiguity. 45th International Colloquium on Automata, Languages and Programming, ICALP 2018, Jul 2018, Prague, Czech Republic.

�10.4230/LIPIcs.ICALP.2018�. �hal-01798847�

(2)

Thomas Place

1

and Marc Zeitoun

2

1 LaBRI Bordeaux University, France tplace@labri.fr

2 LaBRI Bordeaux University, France mz@labri.fr

Abstract

We investigate a standard operator on classes of languages: unambiguous polynomial closure.

We show that if C is a class of regular languages having some mild properties, the membership problem for its unambiguous polynomial closureUPol(C) reduces to the same problem forC. We give a new, self-contained and elementary proof of this result. We also show that unambiguous polynomial closure coincides with alternating left and right deterministic closure. Finally, if addi- tionallyC is finite, we show that the separation and covering problems are decidable forUPol(C).

1998 ACM Subject Classification F.4.3 Formal Languages

Keywords and phrases Regular languages, separation problem, decidable characterizations Digital Object Identifier 10.4230/LIPIcs.ICALP.2018.

1 Introduction

Most of the interesting classes of regular languages are built using a restricted set of operators.

From a classC, one may consider its Boolean closure Bool(C), its polynomial closurePol(C), and deterministic variants thereof, which yield usually a more elaborate class thanC. It is therefore desirable to investigate the operators themselves rather than individual classes.

The polynomial closure Pol(C) of a classCis its closure under union and marked concat- enation (amarked concatenationof KandL is a language of the formKaLfor a lettera).

Together with the Boolean closure, it is used to define concatenation hierarchies: starting from a given class (level 0 in the hierarchy), leveln+12 is the polynomial closure of leveln, and leveln+ 1 is the Boolean closure of leveln+12. The importance of these hierarchies stems from the fact that they are the combinatorial counterpart of quantifier alternation hierarchies in logic, which count the number of ∀/∃ alternations needed to define a language.

The main question when investigating a class of languages is whether it is recursive: can we decide whether a given input language belongs to the class? This is themembership problem. Despite decades of research on concatenation hierarchies, one knows little about this question. The state of the art is that when level 0 is finite and has some mild properties, membership is decidable for levels 12, 1, 32, and 52 [18, 15, 12, 19]. These results imply those that were obtained previously [3, 2, 22, 10, 11] and even go beyond by investigating the separation problem, a generalization of membership. Unlike membership, which takes a single language as input, the separation problem for a classCtakestwo. It asks whether there exists a third language fromC, containing the first and disjoint from the second. Membership is the special case of separation when the input consists of a language and its complement. Although more difficult than membership, separation is also more rewarding. This is witnessed by a transfer theorem [15, 19]: membership forPol(C) reduces to separation forC. The results on membership quoted above actually come from this theorem and the fact that separation is decidable forPol(C),BPol(C) andPol(BPol(C)) when Cis finite with some mild properties.

EAT

© Thomas Place and Marc Zeitoun;

licensed under Creative Commons License CC-BY

(3)

Unambiguous closure. Deterministic variants of the polynomial closure are also important.

The most classical example is the unambiguous closure, where marked concatenations are required to be unambiguous. A marked concatenationKaLisunambiguous if every wordw ofKaLhas a unique factorizationw=w0aw00 withw0Kand w00L. Theunambiguous closure UPol(C) ofCis the closure ofCunderdisjointunion andunambiguousconcatenation.

Note that it is not clear on the definition whetherUPol(C) is a Boolean algebra, even whenCis.

The class ofunambiguous languages [21] is the unambiguous polynomial closure of the Boolean algebra generated by languages of the formAaA(whereAis the working alphabet).

It is one of the most investigated class. It is robust, with several definitions [23, 4, 6, 5, 24].

Unambiguous polynomial closure also appears in concatenation hierarchies asintermediate levels. Pin and Weil [10, 11] have shown thatUPol(C) =Pol(C)co-Pol(C), whereco-Pol(C) is the class consisting of all complements of languages inPol(C).

Contributions. By considering separation, we obtained a better understanding of the results that were already known for this kind of problem and we were able to prove new ones.

Aside from the case of unambiguous languages [14], unambiguous polynomial closure was not yet investigated with respect to separation. This is the starting point of this paper: we look for a generic separation result applying toUPol(C), similar to the ones obtained for Pol(C) andBPol(C) in [18]. In this paper, we present such a result: our main theorem states that whenCis finite and satisfies some mild hypotheses (the same as for getting decidability ofPol(C)-separation), separation forUPol(C) is decidable. However, as it is usually the case with separation, we also obtain several additional results as a byproduct of our work which improve our understanding of theUPol operator:

We had to rethink the way membership is classically handled forUPol(C) in order to lift the techniques to separation. This yields a completely new, self-contained and elementary proof that under some natural hypothesis on C, membership for UPol(C) reduces to membership forC. This proof also precisely pinpoints why this result holds forUPol(C) but notPol(C). More precisely, we show that the languages fromC needed to construct anUPol(C) expression for a language Lare all recognized by any recognizer ofL.

We obtain a new proof thatUPol(C) is a quotienting Boolean algebra whenC is one.

We obtain a new proof thatUPol(C) =Pol(C)∩co-Pol(C) using our results onPol(C) [19].

We obtain a previously unknown characterization of UPol(C) in terms of alternating left and right deterministic concatenations, which are restricted forms of unambiguous concatenation. A marked concatenation KaL is left (resp. right) deterministic when KaAK=∅ (resp.AaLL=∅). We prove thatUPol(C) coincides with ADet(C), the closure ofC under left and right deterministic concatenation. This was observed in the above particular case, but not known in general.

Related work. UPol(C) was characterized in [8, 9]. However [8] starts from an alternate definition that assumes closure under Boolean operations already. Both papers use elaborate mathematical tools (categories, bilateral kernel, relational morphisms) and both use black boxes (results by Schützenberger [21] in [8] and a very general result of Rhodes [20] in [9]). The reduction fromPol(C)-membership toC-membership was also investigated in [1].

While our reduction is direct, the proof if [1] is not, as it uses the nontrivial equality UPol(C) =Pol(C)co-Pol(C).

2 Preliminaries

Words and languages. For the whole paper, we fix an arbitrary finite alphabetA. We denote byA the set of all finite words overA, and byεA the empty word. Given two

(4)

wordsu, vA, we writeu·v (or simplyuv) their concatenation. Alanguage (over A)is a subset ofA. Abusing terminology, we denote byuthe singleton language{u}. It is standard to extend the concatenation operation to languages: givenK, LA, we writeKLfor the languageKL={uv|uK andvL}. Moreover, we also consider marked concatenation, which is less standard. GivenK, LA,a marked concatenation ofK withLis a language of the formKaLfor someaA.

A class of languagesCis simply a set of languages. We say thatCis alattice when∅ ∈ C, A∈ C andC is closed under union and intersection: for anyK, L∈ C, we haveKL∈ C andKL∈ C. Moreover, aBoolean algebrais a latticeC which is additionally closed under complement: for anyL∈ C, we haveA\L∈ C. Finally, a classCisquotientingif it is closed under quotients. That is, for anyL∈ C and any worduA, the following properties hold:

u−1Ldef= {w∈A|uwL} and Lu−1 def= {w∈A|wuL} both belong toC.

All classes that we consider are quotienting Boolean algebras of regular languages.

Regular languages. These are the languages that can be equivalently defined by non- deterministic finite automata, finite monoids or monadic second-order logic. In the paper, we work with the definition by monoids, which we recall now.

A monoid is a setM endowed with an associative multiplication (s, t)7→s·t(we often writest fors·t) having a neutral element 1M,i.e., such that 1M ·s=s·1M =sfor every sM. Anidempotent of a monoidM is an elementeM such thatee=e. It is folklore that for anyfinitemonoid M, there exists a natural numberω(M) (denoted byω whenM is understood) such that for anysM, the elementsωis an idempotent.

Our proofs make use of the Green relations [7], which are defined on monoids (we use them as induction parameters). We briefly recall them. Given a monoidM ands, tM,

s6Jt when there existx, yM such thats=xty s6Lt when there existxM such thats=xt s6Rt when there existyM such thats=ty

Clearly,6J,6L and6R are preorders (i.e., they are reflexive and transitive). We write<J,

<Land<Rfor their strict variants (for example,s <Jtwhens6Jtbutt66Js). Finally, we writeJ,LandRfor the corresponding equivalence relations (for example,sJtwhen s6Jt andt6Js). There are many technical results about Green relations. We shall only need the following simple lemma which applies tofinite monoids (we recall its proof in appendix).

I Lemma 1. Consider a finite monoid M and s, tM such that s J t. Then, s 6R t impliess Rt. Symmetrically,s6Lt impliessLt.

Observe that A is a monoid whose multiplication is concatenation (the neutral element is ε). Thus, we may consider monoid morphisms α : AM where M is an arbitrary monoid. Given such a morphism and some language LA, we say thatL isrecognized byαwhen there exists a set FM such that L=α−1(F).

Given any language L, there exists a canonical morphism which recognizes it. Let us briefly recall its definition. One may associate toLan equivalence≡L overA: thesyntactic congruence of L. Given u, vA, uL v if and only if xuyLxvyL for any x, yA. It is known and simple to verify that “≡L” is a congruence on A. Thus, the set of equivalence classes ML =A/≡L is a monoid and the map αL : AML which maps any word to its equivalence class is a morphism recognizing L called thesyntactic morphism of L. Finally, it is known thatLis regular if and only ifMLis finite (i.e.,≡L has

(5)

finite index): this is Myhill-Nerode theorem. In that case, one may compute the syntactic morphismαL:AML from any representation ofL (such as a finite automaton).

Decision problems. The two problems that we consider in the paper are both parametrized by an arbitrary class of languagesC: they serve as mathematical tools for analyzingC. The C-membership problem is the simplest one. It takes as input a single regular languageLand asks whetherL∈ C. The second one,C-separation, is more general: it takestworegular languagesL1, L2as input and asks whetherL1isC-separable fromL2, that is, whether there existsK∈ C such that L1KandL2K=∅. The language K is called aseparator of L1 andL2. Note thatC-membership is easily reduced toC-separation: given any regular languageL, we haveL∈ C if and only ifLisC-separable fromA\L(which is also regular).

IRemark. WhenC is closed under complement (which is always the case in the paper),L1

isC-separable fromL2if and only ifL2isC-separable fromL1.

3 Unambiguous polynomial closure

In this section, we define the unambiguous polynomial closure operation, which is the main focus of the paper. Furthermore, we investigate the associated membership problem.

3.1 Definition

Given two languagesH, LA, we say that their concatenationHLisunambiguous when any word wHL admits a unique decomposition witnessing this membership: for any u, u0H and v, v0L, if w = uv = u0v0, then u =u0 and v = v0. More generally, we say that a product ofnlanguages L1· · ·Ln is unambiguous when any wordwL1· · ·Ln

admits aunique decomposition witnessing this membership. Note that unambiguousmarked concatenations are well-defined: HaLis a product of three languages, namelyH,{a}andL.

IRemark. Clearly, not all products are unambiguous. For example,AaA is ambiguous:

aaAaA admits two decompositions witnessing this membership (εaaandaaε).

IRemark. Being unambiguous is a semanticproperty: whetherHLis unambiguous may not be apparent on the definitions ofH andL. Moreover, this depends on theproduct HL and not only on the resulting languageK=HL. It may happen that two products represent the same language but one is unambiguous while the other is not. For example,AaA is ambiguous while (A\ {a})aA (which represents the same language) is unambiguous.

In the paper, we shall only need to use two special kinds of unambiguous products, which we now present. LetK, LAand aA. We say that the marked concatenationKaL,

isleft deterministicwhenKKaA=∅.

isright deterministicwhenLAaL=∅.

IFact 2. Any left or right deterministic marked concatenation is unambiguous.

We use these definitions to introduce three standard operations on classes of languages.

Consider an arbitrary classC.

Thepolynomial closure ofC, denoted byPol(C), is the smallest class containing Cand closed under marked concatenation and union: for any H, LPol(C) andaA, we haveHaLPol(C) andHLPol(C). Furthermore, we denote byco-Pol(C) the class containing all complements of languages inPol(C): Lco-Pol(C) whenA\LPol(C).

(6)

The unambiguous polynomial closure of C, denoted by UPol(C), is the smallest class containing Cand closed underunambiguous marked concatenation anddisjoint union.

That is, for anyH, LUPol(C) andaA, ifHaLis unambiguous, thenHaLUPol(C) and ifHL=∅, thenH]LUPol(C). Here, we denote union by “]” to underline the fact thatH andLare disjoint (we use this convention in the whole paper).

The alternating deterministic closure of C, denoted by ADet(C), is the smallest class containing Cand closed underdeterministicmarked concatenation anddisjoint union.

That is, for anyH, LADet(C) andaA, ifHaLis either left or right deterministic, then HaLADet(C) and ifHL=∅, thenH]LADet(C).

It is immediate by definition and Fact 2 that we haveC ⊆ADet(C)UPol(C)Pol(C). In general the inclusion UPol(C)Pol(C) is strict. On the other hand, we shall prove that whenCis a quotienting Boolean algebra, ADet(C) =UPol(C).

It is not immediate that Pol(C),UPol(C) andADet(C) have robust closure properties beyond those that are explicitly stated in the definitions. However, it turns out that whenC satisfies robust properties itself, this is the case for these three classes as well. It was shown by Arfi [3] that whenC is a quotienting lattice of regular languages, thenPol(C) is one as well. Here, we are mostly interested inUPol(C). We prove the following theorem which combines and extends several results by Pin, Straubing, Thérien and Weil [9, 11].

ITheorem 3. LetCbe a quotienting Boolean algebra of regular languages. Then, UPol(C)is a quotienting Boolean algebra as well. Moreover, UPol(C) =ADet(C) =Pol(C)co-Pol(C).

That UPol(C) is a quotienting Boolean algebra of regular languages is due to Pin, Straubing and Thérien [9]. The correspondence betweenUPol(C) andPol(C)co-Pol(C) is due to Pin and Weil [11]. The correspondence betweenUPol(C) andADet(C) is a new result, up to our knowledge. Let us point out that the original proofs of these results require a stronger hypothesis onC, which needs additionally to be closed under inverse morphic image.

Moreover, these proofs require to introduce and manipulate a lot of algebraic machinery.

This is because they are based on a generic algebraic characterization ofUPol(C).

While we use a similar approach (i.e., we prove a generic algebraic characterization of UPol(C)), our argument is much more elementary. The only algebraic notion that we need is

the syntactic morphism of a regular language.

3.2 Algebraic characterization

We now present a generic algebraic characterization ofUPol(C). It holds provided that C is a quotienting Boolean algebra of regular languages. It implies Theorem 3, but also that UPol(C)-membership reduces toC-membership.

The characterization is parameterized by two relations that we define now. Let C be some class of languages. Consider a finite monoidM and asurjective morphismα:AM (such as the syntactic morphism of some language). Given a pair (s, t)∈M×M,

(s, t) is a C-pair (forα) whennolanguage ofC can separateα−1(s) fromα−1(t).

(s, t) is asaturated C-pair (forα) whennolanguage ofCrecognized by αcan separate α−1(s) fromα−1(t).

Note that any C-pair is also a saturated C-pair (the converse is not true in general). By definition, we are able to compute allC-pairs as soon as we have an algorithm forC-separation.

On the other hand, computing all saturatedC-pairs boils down to decidingC-membership, as it suffices to check which languages recognized byα(the potential separators) belong toC.

(7)

IRemark. An equivalent definition of the saturated C-pairs is to introduce them as the transitive closure of theC-pairs. We prove this in appendix. In fact, whenCis a quotienting Boolean algebra, the saturatedC-pair relation is a congruence whose equivalence classes correspond exactly to the languages recognized byαwhich belong toC.

We may now state the following characterization ofUPol(C).

ITheorem 4. LetCbe a quotienting Boolean algebra of regular languages. Consider a regular languageL and letα:AM be its syntactic morphism. The following are equivalent:

1. LUPol(C).

2. LADet(C).

3. LPol(C)co-Pol(C).

4. For all C-pairs (s, t)∈M2, we have sω+1=sωtsω.

5. For all saturated C-pairs (s, t)∈M2, we have sω+1=sωtsω.

Theorem 3 is a simple corollary of Theorem 4 (it is straightforward to verify that any class satisfying Item (4) in the theorem has to be a quotienting Boolean algebra).

Another consequence is that if C is a quotienting Boolean algebra of regular languages, UPol(C)-membership reduces to the same problem forC. Indeed, given as input a regular languageL, one may compute its syntactic morphismα. By Theorem 4, deciding whetherLUPol(C) amounts to checking whether αsatisfies Item (5). This is possible provided that we have all saturatedC-pairs forαin hand. In turn, an algorithm forC-membership immediately yields an algorithm for computing them all. Altogether, we obtain the following corollary.

ICorollary 5. Let C be a quotienting Boolean algebra of regular languages and assume that C-membership is decidable. Then UPol(C)-membership is decidable as well.

We now focus on proving Theorem 4. A first point is that we do not show the equivalence (3) ⇔ (4): it follows from the generic characterization of Pol(C) which is not our main focus in the paper (a full proof is available in [15]). Here, we concentrate on proving the implications (1)⇒(4)⇒(5)⇒(2)⇒(1). The implication (2)⇒(1) (ADet(C)⊆UPol(C)) is immediate. Even though the presentation is different, the equivalence (4)⇔(5) is a result of [1] (which investigatesPol(C)co-Pol(C)). We prove this equivalence in appendix. We postpone the implication (1)⇒(4) to the appendix as well, to focus on (5)⇒(2), which is the most interesting implication: when a language satisfies (5), we show that it belongs toADet(C).

We fix a quotienting Boolean algebra of regular languagesC for the proof. Consider an arbitrary surjective morphismα:AM satisfying Item (5) in Theorem 4. We show that any language recognized byαbelongs toADet(C). We start with a preliminary lemma.

ILemma 6. There exists a finite monoidN and a surjective morphismβ :MN which satisfies the following properties:

For any s, tM,(s, t)is a saturatedC-pair if and only ifβ(s) =β(t).

Any language recognized by the compositionγ=βα:AN belongs toC.

Lemma 6 is obtained by proving that the saturatedC-pair relation is a congruence on M and that for any equivalence classFM,α−1(F)∈ C. It then suffices to defineN as the quotient ofM by this congruence. The proof is presented in appendix.

Let us come back to the main proof. Letβ:MN and the compositionγ=βαbe defined as in Lemma 6. Given anyr1, r2, sM and any xN, we define:

Lxs[r1, r2] ={w∈γ−1(x)|r1·α(w)·r2=s}.

(8)

The purpose of introducingLxs[r1, r2] is that it provides induction parameterss, r1, r2and it coincides withα−1(s) whenx=β(s),r1=r2= 1M. Our goal is to show that it is inADet(C).

IProposition 7. Let r1, r2, sM andxN. Then,Lxs[r1, r2]∈ADet(C).

Before proving this proposition, let us use it to finish the main proof. By definition, a language recognized byαis a disjoint union of setsα−1(s) forsM. Therefore, it suffices to prove thatα−1(s)∈ADet(C) for anysM. Letx=β(s). Clearly,Lβ(s)s [1M,1M] =α−1(s).

Thus, Proposition 7 yields thatα−1(s)∈ADet(C), finishing the proof.

It remains to prove Proposition 7. We let r1, r2, sM andxN. Our objective is to show that Lxs[r1, r2] ∈ADet(C). Observe that we may assume without loss of generality thatβ(s) =β(r1)xβ(r2). Otherwise,Lxs[r1, r2] =∅ ∈ADet(C) by definition and the result is immediate. The proof is an induction on the three following parameters listed by order of importance (the three of them depend on Green’s relations in bothM andN):

1. Therank of β(s) which is the number of elementsyN such thatβ(s)6Jy.

2. Theright index ofr1 which is the number of elementstM such thatt6Rr1. 3. Theleft index ofr2 which is the number of elementstM such thatt6Lr2. We consider three cases depending on the following properties of s, r1, r2 andx.

We say thatxissmooth whenxJβ(s).

We say thatr1 isright stablewhen there existstM such thatβ(t)Rxandr1tRr1. We say thatr2 isleft stablewhen there existstM such thatβ(t)Lxandtr2 Lr2. In the base case, we assume that all three properties hold. Otherwise, we consider two inductive cases. First, we assume thatxis not smooth. Then, we assume that either r1 is not right stable orr2 is not left stable.

Base case. Assume thatxis smooth and thatr1, r2 are respectively right and left stable.

We use this hypothesis to prove the following lemma.

ILemma 8. For any u, vγ−1(x), we haver1α(u)r2=r1α(v)r2.

Observe that Lemma 8 concludes the proof. Indeed, by definition of Lxs[r1, r2], it implies that either Lxs[r1, r2] = γ−1(x) (when r1α(w)r2 =s for all wγ−1(x)) orLxs[r1, r2] = ∅ (whenr1α(w)r26=sfor allwγ−1(x)). Since both of these languages belong toC ⊆ADet(C) by Lemma 6, Proposition 7 follows. It remains to prove Lemma 8 to conclude the base case.

The argument relies on the following fact (this is where we use our hypothesis onr1andr2).

IFact 9. When Item (5) in Theorem 4 holds, the two following properties hold as well:

For all tM such that β(t)R x, we have r1t Rr1. For all tM such that β(t)Lx, we havetr2 Lr2.

Let us first use the fact to prove Lemma 8 and finish the base case. Consideru, vγ−1(x), i.e.,β(α(u)) =β(α(v)) =x. We show thatr1α(u)r2=r1α(v)r2.

By hypothesis, we have β(s) =β(r1)xβ(r2). Moreover,β(s) Jxsince xis smooth by hypothesis. Thus,xβ(r2)Jxandβ(r1)xJx. Hence, sincexβ(r2)6Rxandβ(r1)x6Lx, Lemma 1 impliesxβ(r2)Rxandβ(r1)xLx. Sinceβ(α(u)) =x, this yieldsβ(α(u)r2)Rx andβ(r1α(u))L x. By Fact 9, it follows that r1α(u)r2 Rr1 andr1α(u)r2 Lr2. We get p, qM such thatr1 =r1α(u)r2pandr2 =qr1α(u)r2. Lett =qr1α(u)r2p=r2p=qr1. We combine our two equalities forr1 andr2to obtain,

r1=r1α(u)t=r1(α(u)t)ω and r2=tα(u)r2= (tα(u))ω+1r2.

(9)

Sinceβ(α(u)) =β(α(v)), we know that β(α(u)t) =β(α(v)t). Therefore, (α(u)t, α(v)t) is a saturatedC-pair by Lemma 6, and Item (5) yields (α(u)t)ω+1= (α(u)t)ωα(v)t(α(u)t)ω. We may now multiply byr1 on the left and by α(u)r2 on the right to get,

r1(α(u)t)ωα(u)(tα(u))ω+1r2=r1(α(u)t)ωα(v)(tα(u))ω+1r2.

Since we already established thatr1=r1(α(u)t)ω andr2= (tα(u))ω+1r2, we get as desired thatr1α(u)r2=r1α(v)r2, finishing the proof of Lemma 8. It remains to prove Fact 9.

Proof of Fact 9. By symmetry, we focus on the first property and leave the second to the reader. LettM such thatβ(t)Rx. We show thatr1tRr1. By hypothesis,r1 is right stable which yieldst0M such thatβ(t0)RxRβ(t) andr1t0 Rr1. Sinceβ(t0)Rβ(t), we haveyN such that β(t0) =β(t)y. LetpM such thatβ(p) =y: we have β(t0) =β(tp).

Sincer1t0 Rr1, we haveqM such thatr1=r1t0qwhich yieldsr1=r1(t0q)ω=r1(t0q)ω+1. We have β(t0q) = β(tpq) which means that (t0q, tpq) is a saturated C-pair by Lemma 6.

Therefore, Equation (5) yields that (t0q)ω+1= (t0q)ωtpq(t0q)ω. Finally, we obtain, r1=r1(t0q)ω+1=r1(t0q)ωtpq(t0q)ω=r1tpq(t0q)ω.

This implies thatr16R r1t. Since it is immediate that r1t6Rr1, we getr1t Rr1. J First inductive case. We now assume thatxis not smooth: xandβ(s) are notJ-equivalent.

We use induction on our first parameter (the rank of β(s)). Recall that we assumed β(s) =β(r1)xβ(r2), which yieldsβ(s)6Jx. Thus, we haveβ(s)<Jxby hypothesis.

By definition,Lxs[r1, r2] is the disjoint union of all languagesα−1(t) wheretM satisfies β(t) =xandr1tr2=s. Therefore, it suffices to show that for any tM such thatβ(t) =x, we haveα−1(t)∈ADet(C). This is immediate by induction. Indeed, sinceβ(t) =x, we have α−1(t) =Lxt[1M,1M]. Moreover, sinceβ(s)<Jx, we haveβ(s)<Jβ(t). It follows that the rank ofβ(t) is strictly smaller than the one ofβ(s). Hence, we may apply induction on our first and most important parameter to getLxt[1M,1M]∈ADet(C).

Second inductive case. We assume that eitherr1 is notright stable orr2 is notleft stable.

By symmetry, we treat the case whenr1 is not right stable and leave the other to the reader.

IRemark. We only apply induction on our two first parameters. Moreover, we show that Lxs[r1, r2] is built from languages inADet(C) (obtained from induction) using only disjoint union and left deterministic marked concatenations. Induction on our third parameter and right deterministic marked concatenations are used in the case whenr2is not left stable.

Observe that we havex <J1N (xis not maximal for6J). Indeed, otherwise, we would havexR1N by Lemma 1 andr1would be left stable: 1MM would satisfyβ(1M) = 1N Rx andr1·1M =r1 Rr1. Therefore, there are elementsyN such thatx <Jy.

We use this observation to defineT as the set of all triples (y, a, z)∈N×A×N such thatx=y·γ(a)·z, x <Jy andxJy·γ(a). Using the definition ofT and the fact that x <J1N, one may decomposeLxs[r1, r2] as follows (this lemma is proved in appendix).

ILemma 10. The languageLxs[r1, r2]is equal to the following disjoint union,

Lxs[r1, r2] = ]

(y,a,z)∈T

 ]

t∈β−1(y)

α−1(t)·a·Lzs[r1tα(a), r2]

.

(10)

We now use Lemma 10 to show as desired that Lxs[r1, r2]∈ADet(C). SinceADet(C) is closed under disjoint union by definition, it suffices to show that for any (y, a, z)∈T and anytβ−1(y), we have,

α−1(t)·a·Lsz[r1tα(a), r2]∈ADet(C).

We prove that this is a left deterministic marked concatenation of two languages in ADet(C) which concludes the proof.

We start with α−1(t) ∈ ADet(C). Since y = β(t), we have α−1(t) = Lyt[1M,1M].

Moreover, sinceβ(s) =β(r1)xβ(r2), we haveβ(s)6Jx. Finally, by definition ofT we have x <Jy=β(t). Altogether, we getβ(s)<Jβ(t): the rank ofβ(t) is strictly smaller than the one ofβ(s) and induction on our first parameter yieldsα−1(t) =Lty[1M,1M]∈ADet(C).

We turn to Lzs[r1tα(a), r2] ∈ ADet(C). By definition of T, we have x J y·γ(a) and x=y·γ(a)·zwhich yields thatxRy·γ(a) by Lemma 1. Moreover, sincey=β(t), it follows thatxRβ(tα(a)). Therefore, since we know thatr1isnotright stable (this is our hypothesis), it follows thatr1andr1tα(a) are notR-equivalent. Since it is clear thatr1tα(a)6Rr1, it follows thatr1tα(a)<Rr1: the right index ofr1tα(a) is strictly smaller than the one ofr1. By induction on our second parameter, we then get thatLzs[r1tα(a), r2]∈ADet(C).

It remains to show thatα−1(t)·a·Lzs[r1tα(a), r2] is a left deterministic marked concat- enation, i.e., thatα−1(t)∩α−1(t)aA =∅. Sinceβ(t) =y, we haveα−1(t)⊆γ−1(y) and it suffices to show thatγ−1(y)∩γ−1(y)aA =∅. Letwγ−1(y) andw0γ−1(y)aA, we show thatw 6= w0. Since (x, a, z) ∈ T, we have x <J y andxJ y·γ(a). It follows that y·γ(a)<Jy. Finally, we haveγ(w) =y andγ(w0) =yγ(a)y0 for somey0N. This implies thatγ(w0)6Jyγ(a)<Jy=γ(w). Thereforeγ(w)6=γ(w0) which implies thatw6=w0.

4 Separation

We now turn to separation forUPol(C) and show that the problem is decidable for any finite quotienting Boolean algebraC. For the sake of avoiding clutter, we fixC for the section.

IRemark. This result may seem weak: our solution forUPol(C)-separation requiresC to be finite whileUPol(C)-membership reduces toC-membership. This intuition is wrong: the result on separation is the strongest. The proof of Theorem 4 shows that whenLUPol(C), the basic languages inCneeded to buildLare all recognized by the syntactic morphism ofL.

Hence,LUPol(C) if and only ifLUPol(D) whereD ⊆ Cis a finite class obtained from the syntactic morphism ofL. We lose this when moving to separation: the languages in C needed to build a potential separator inUPol(C) may not be encoded in our two inputs.

Our algorithm is based on a general framework designed to handle separation problems and to present solutions in an elegant way. It was introduced in [16, 17]. We first summarize what we need in this framework to present our solution forUPol(C)-separation.

IRemark. The framework of [16, 17] is actually designed to handle a more general decision problem: covering, which generalizes separation to arbitrarily many input languages. Thus, our solution actually yields an algorithm for UPol(C)-covering as well. While we do not detail this point due to lack of space, this follows from the definitions of [16, 17].

4.1 Methodology

We briefly recall the framework of [16, 17]. We refer the reader to [17] for details. The approach is based on “rating maps”, a notion designed to measure how well a language separate others.

(11)

The definition of rating maps relies on semirings. Asemiringis a setRequipped with two binary operations + and·, called addition and multiplication, satisfying the following axioms:

(R,+) is a commutative monoid whose neutral element is denoted by 0R. (R,·) is a monoid whose neutral element is denoted by 1R.

The multiplication distributes over addition: r·(s+t) =rs+rtand (s+t)·r=sr+tr.

The element 0R is a zero for multiplication: for anyrR, 0R·r=r·0R= 0R.

Moreover, we say that a semiringR isidempotent when any elementrR is idempotent for addition: r+r=r. Any idempotent semiringR can be equipped with a canonical order

“≤”: givens, rR, we havesr whens+r=r. It can be verified that this is indeed an order which is compatible with addition and multiplication (Rbeing idempotent is required).

IExample 11. The set 2A of all languages overAis an idempotent semiring: the addition is union and the multiplication is language concatenation. In this case, the canonical order is inclusion (H ⊆Lif and only ifH∪L=L). Another important example is the powerset 2M of any monoidM. Again the addition is union (thus, the order is inclusion). The multiplication is obtained from the one ofM: givenS, T ∈2M,S·T ={st|sS andtT}.

Rating maps. A rating map1 is asemiring morphism, ρ: 2AR where R is afinite idempotent semiring. It can be verified that any rating map is compatible with the canonical order (K⊆Lρ(K)ρ(L)). For the sake of improved readability, when applying a rating mapρto a singleton language {w}, we shall simply writeρ(w) forρ({w}). The connection with separation only requires to consider special rating maps called “nice”. A rating map ρ: 2AR isnice when for any languageKA,ρ(K) =P

w∈Kρ(w) (while infinite, this sum boils down to a finite one asRis a finite idempotent commutative monoid for addition).

IRemark. Any nice rating mapρ: 2ARis finitely representable: it is determined by the imagesρ(a) of lettersaA. We may speak of algorithms whose inputs are nice rating maps.

SolvingUPol(C)-separation requires to consider a special class of rating maps: the C-compatible ones (our algorithm is restricted to them). The definition is based on a canonical equivalence∼C on A associated to C. Given u, vA, we write uC v if and only if uLvL for all L ∈ C. Clearly, ∼C is an equivalence relation. For any wordwA, we shall write [w]CAfor the ∼C-class ofw. Moreover, sinceC is a finite quotienting Boolean algebra, we have the following classical properties (we present a proof in appendix).

ILemma 12. The equivalenceC is a congruence of finite index for word concatenation.

Moreover, for any languageLA, we haveL∈ C if and only ifLis a union ofC-classes.

Lemma 12 implies that the set A/∼C of ∼C-classes is a finite monoid and the map w7→[w]C is a morphism. For the sake of avoiding confusion with language concatenation, we shall write “” for the monoid multiplication of A/∼C. In general, ifC, DA are

C-classes, thenCD6=CD (usually,CDis not even a∼C-class).

We may now defineC-compatibility. We say that a rating mapρ: 2ARisC-compatible when for any two ∼C-classesC andD, if there exists an element rR\ {0R} such that rρ(C) andrρ(D), thenC=D.

1 What we call rating map here is calledmultiplicativerating map in [17] (the “true” rating maps are weaker and do not require a multiplication). We abuse terminology for the sake of improved readability.

(12)

Optimal covers. We use rating maps to define objects called “optimal universalD-covers”, which encode separation-related information. Here,Dis an arbitrary fixed Boolean algebra for which one wants aD-separation algorithm (we are interested in the caseD=UPol(C)).

We fixDfor the definition.

Acover of some language Lis afiniteset of languagesKsuch thatL⊆S

K∈KK. When L=A, we speak ofuniversal cover. Moreover, we say thatK is aD-cover when allKK belong to D. A fixed rating map ρ : 2AR is used to define a “quality measure” for D-covers which yields a notion of “best” universalD-cover. Given a finite set of languages K (such as a universalD-cover), theρ-imprint I[ρ](K) ofK is the following subset ofR:

I[ρ](K) ={r∈R|rρ(K) for someKK}.

We now define the optimal universal D-covers as those with the smallest possibleρ-imprint (with respect to inclusion). A universalD-cover Kis optimal forρwhenI[ρ](K)⊆ I[ρ](K0) for any universalD-cover K0. In general, there can be infinitely many optimal universal D-covers for a given rating mapρ. The crucial point is that there always exists a least one.

This is simple and proved in [17]. The key idea is that there are finitely many possible ρ-imprints (sinceRis finite) and given two universalD-covers, one may always build a third one which has a smallerρ-imprint than the first two, by simple use of language intersections.

Finally, a key observation is that by definition, all optimal universal D-covers forρshare the same ρ-imprint. This unique ρ-imprint is a canonical object for D andρ called the D-optimal universalρ-imprint and we denote it byID[ρ]. That is,ID[ρ] =I[ρ](K) for any optimal universalD-coverKforρ.

The connection with separation. We may now explain how these notions are used to handle separation. This is summarized by the following lemma.

ILemma 13. LetDbe a Boolean algebra and assume that there exists an algorithm that takes as input a niceC-compatible rating mapρ: 2AR and outputsID[ρ]. Then,D-separation is decidable.

Let us sketch how to go from computing D-optimalρ-imprints toD-separation (see [16]

or the appendix for a full proof of Lemma 13). Consider two regular languagesL1 andL2: we wish to know whetherL1isD-separable fromL2. SinceCis finite, one can build a monoid morphismα:AM, withM finite, recognizing bothL1 andL2 as well as all languages inC. Furthermore, one may liftαas a mapρ: 2A→2M by definingρ(K) ={α(w)|wK}

for any languageKA. It is simple to verify that this map ρis a niceC-compatible rating map. Moreover, the two following properties (which we prove in appendix) hold:

L1isD-separable fromL2iff for anys1α(L1) ands2α(L2), we have{s1, s2} 6∈ ID[ρ].

When the first item holds, one may build a separator inDfrom any optimal universal D-coverK forρ: this separator is the union of all languages intersectingL1 in K.

By the first item, having an algorithm that computesID[ρ]⊆2M suffices to decide whether L1isD-separable fromL2. Moreover, by the second item, having an algorithm that computes an optimal universalD-coverK forρis enough to build a separator (when it exists).

IRemark. Here, we only use the sets of size two inID[ρ]⊆2M. However,ID[ρ] contains more information corresponding to the more generalD-covering problem considered in [16, 17].

4.2 Computing UPol (C)-optimal universal imprints

We use the framework defined above to present an algorithm for UPol(C)-separation. We give a characterizationUPol(C)-optimal imprints. It yields a procedure for computing them.

(13)

Consider a rating map ρ : 2AR. For any subset SR, we say that S is UPol(C)-saturated(forρ) if it contains the setItriv[ρ] ={r∈R|rρ(w) for somewA}

and is closed under the following operations:

1. Downset: for anysS, ifrRsatisfiesrs, then we haverS.

2. Multiplication: For anys, tS, we havestS.

3. UPol(C)-closure: Given twoC-classesC, D ands, tS such thatsρ(CD) and tρ(DC), we havesω·ρ(C)·tωS

We are ready to state the main theorem of this section: whenρisC-compatible,UPol(C)- saturation characterizes theUPol(C)-optimal universalρ-imprint.

ITheorem 14. Let ρ: 2AR be a C-compatible rating map. Then, IUPol(C)[ρ] is the smallest UPol(C)-saturated subset ofR (with respect to inclusion).

Clearly, given a niceC-compatible rating mapρ: 2ARas input, one may compute the smallestUPol(C)-saturated subset ofR with a least fixpoint algorithm. One starts from Itriv[ρ] (which is clearly computable) and saturates this set with the three above operations.

Thus, we get a procedure for computingIUPol(C)[ρ] from any input niceC-compatible rating map. By Lemma 13, this yields the desired corollary: UPol(C)-separation is decidable.

ICorollary 15. For any finite quotienting Boolean algebraC, UPol(C)-separation is decidable.

The proof of Theorem 14 is a difficult generalization of the argument we used to show the algebraic characterization ofUPol(C) (i.e., Theorem 4). It is presented in appendix.

An interesting byproduct of this proof is an algorithm which computes optimal universal UPol(C)-covers (and thereforeUPol(C)-separators when they exist, as we explained above).

5 Conclusion

We presented a new, self-contained proof that for any quotienting Boolean algebra regular languagesC, membership forUPol(C) reduces to membership forC. An interesting byproduct of this proof is thatUPol(C) corresponds exactly to the class ADet(C), which is obtained by restricting the unambiguous marked concatenations to left or right deterministic ones.

Moreover, we showed that whenCis a finite quotienting Boolean algebra,UPol(C)-separation is decidable. This completes similar results of [18] forPol(C) andBool(Pol(C)) and of [13]

forPol(Bool(Pol(C))). These results raise several natural questions.

Historically, UPol(C) was investigated together with two weaker operations: left and right deterministic closures. The left (resp. right) deterministic closure ofC, is the smallest class containingC closed under disjoint union and left (resp. right) deterministic marked concatenation. Our results can be adapted to these two weaker operations. In both cases, membership reduces toC-membership whenC is a quotienting Boolean algebra of regular languages and separation is decidable whenC is a finite quotienting Boolean algebra. In fact, these operations are simpler to handle thanUPol(C). We leave this for further work.

Another question is whether our results can be pushed to classes built by combining unambiguous polynomial closure with other operations. A natural example is as follows. It is known [13] thatPol(Bool(Pol(C)))-separation is decidable whenCis a finite quotienting Boolean algebra. Is this true as well forUPol(Bool(Pol(C)))? This seems difficult: the proof of [13] crucially exploits the fact thatPol(Bool(Pol(C))) is closed under concatenation (which is not the case forUPol(Bool(Pol(C)))) to handle the first polynomial closure.

(14)

References

1 Jorge Almeida, Jana Bartonová, Ondrej Klíma, and Michal Kunc. On decidability of intermediate levels of concatenation hierarchies. InProceedings of the 19th International Conference on Developments in Language Theory, DLT’15, pages 58–70, 2015.

2 Mustapha Arfi. Polynomial operations on rational languages. In Proceedings of the 4th Annual Symposium on Theoretical Aspects of Computer Science, STACS’87, pages 198–

206, Berlin, Heidelberg, 1987. Springer-Verlag.

3 Mustapha Arfi. Opérations polynomiales et hiérarchies de concaténation.Theoretical Com- puter Science, 91(1):71 – 84, 1991.

4 Volker Diekert, Paul Gastin, and Manfred Kufleitner. A survey on small fragments of first- order logic over finite words. International Journal of Foundations of Computer Science (IJFCS), 19(3):513–548, June 2008.

5 Kousha Etessami, Moshe Y. Vardi, and Thomas Wilke. First-order logic with two variables and unary temporal logic. InProceedings of the 12th Annual IEEE Symposium on Logic in Computer Science, LICS’97, pages 228–235, 1997.

6 Kousha Etessami, Moshe Y. Vardi, and Thomas Wilke. First-order logic with two variables and unary temporal logic. Information and Computation, 179(2):279–295, 2002.

7 James Alexander Green. On the structure of semigroups.Annals of Mathematics, 54(1):163–

172, 1951.

8 Jean-Éric Pin. Propriétés syntactiques du produit non ambigu. In Proceedings of the 7th International Colloquium on Automata, Languages and Programming, ICALP’80, pages 483–499, 1980.

9 Jean-Éric Pin, Howard Straubing, and Denis Thérien. Locally trivial categories and unam- biguous concatenation. Journal of Pure and Applied Algebra, 52(3):297 – 311, 1988.

10 Jean-Éric Pin and Pascal Weil. Polynomial closure and unambiguous product. In Pro- ceedings of the 22nd International Colloquium on Automata, Languages and Programming, ICALP’95, pages 348–359, Berlin, Heidelberg, 1995. Springer-Verlag.

11 Jean-Éric Pin and Pascal Weil. Polynomial closure and unambiguous product. Theory of Computing Systems, 30(4):383–422, 1997.

12 Thomas Place. Separating regular languages with two quantifiers alternations. InProceed- ings of the 30th Annual ACM/IEEE Symposium on Logic in Computer Science, (LICS’15), pages 202–213. IEEE Computer Society, 2015.

13 Thomas Place. Separating regular languages with two quantifiers alternations. Unpublished, a preliminary version can be found athttps://arxiv.org/abs/1707.03295, 2018.

14 Thomas Place, Lorijn van Rooijen, and Marc Zeitoun. Separating regular languages by piecewise testable and unambiguous languages. In Proceedings of the 38th International Symposium on Mathematical Foundations of Computer Science, MFCS’13, pages 729–740, Berlin, Heidelberg, 2013. Springer-Verlag.

15 Thomas Place and Marc Zeitoun. Going higher in the first-order quantifier alternation hierarchy on words. InProceedings of the 41st International Colloquium on Automata, Lan- guages, and Programming, ICALP’14, pages 342–353, Berlin, Heidelberg, 2014. Springer- Verlag.

16 Thomas Place and Marc Zeitoun. The covering problem: A unified approach for investig- ating the expressive power of logics. In Proceedings of the 41st International Symposium on Mathematical Foundations of Computer Science, MFCS’16, pages 77:1–77:15, 2016.

17 Thomas Place and Marc Zeitoun. The covering problem. Unpublished, a preliminary version can be found at https://arxiv.org/abs/1707.03370, 2017.

18 Thomas Place and Marc Zeitoun. Separation for dot-depth two. InProceedings of the 32th Annual ACM/IEEE Symposium on Logic in Computer Science, (LICS’17), pages 202–213.

IEEE Computer Society, 2017.

(15)

19 Thomas Place and Marc Zeitoun. A generic characterization of Pol(C). Manuscript,http:

//www.labri.fr/perso/zeitoun/research/pdf/polc.pdf, 2018.

20 John L. Rhodes. A homomorphism theorem for finite semigroups. Mathematical systems theory, 1:289–304, 1967.

21 M.P. Schützenberger. Sur le produit de concaténation non ambigu. Semigroup Forum, 13:47–75, 1976.

22 Imre Simon. Piecewise testable events. InProceedings of the 2nd GI Conference on Auto- mata Theory and Formal Languages, pages 214–222, Berlin, Heidelberg, 1975. Springer- Verlag.

23 Pascal Tesson and Denis Therien. Diamonds are forever: The variety DA. InSemigroups, Algorithms, Automata and Languages, pages 475–500. World Scientific, 2002.

24 Denis Thérien and Thomas Wilke. Over words, two variables are as powerful as one quantifier alternation. In Proceedings of the 30th Annual ACM Symposium on Theory of Computing, STOC’98, pages 234–240, New York, NY, USA, 1998. ACM.

Références

Documents relatifs

The following proposition corrects the part of the proof of Proposition 5.7 of the

I call indirectly infected persons, the persons that have contracted an infectious disease as AIDS or hepatitis C from another person that have itself directly contracted it by

We have seen that rational equivalence of two effective cycles can be realized by P 1 connections of corresponding points in the moduli of effective cycles, namely Chow variety.. It

When a number is to be multiplied by itself repeatedly,  the result is a power    of this number.

Formally prove that this equation is mass conser- vative and satisfies the (weak) maximum principle.. 4) Dynamic estimate on the entropy and the first

Apart from discrete groups and duals of compact groups, the first test examples for a quantum Property RD should be the free quantum groups introduced by Wang [6], which are

How long Combien de temps Quelle longueur How often Combien de fois. How far A

In summary, the absence of lipomatous, sclerosing or ®brous features in this lesion is inconsistent with a diagnosis of lipo- sclerosing myxo®brous tumour as described by Ragsdale