Automata and semigroups recognizing infinite words

Similar documents
Coalgebra, Lecture 15: Equations for Deterministic Automata

A tutorial on sequential functions

A negative answer to a question of Wilke on varieties of!-languages

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Theory of Computation Regular Languages

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Lecture 9: LTL and Büchi Automata

Relating logic to formal languages

1.3 Regular Expressions

p-adic Egyptian Fractions

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

How to simulate Turing machines by invertible one-dimensional cellular automata

Minimal DFA. minimal DFA for L starting from any other

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CS375: Logic and Theory of Computing

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

CS 275 Automata and Formal Language Theory

1.4 Nonregular Languages

Chapter 2 Finite Automata

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

7.2 The Definite Integral

1 Nondeterministic Finite Automata

Lecture 09: Myhill-Nerode Theorem

Convert the NFA into DFA

THE QUADRATIC RECIPROCITY LAW OF DUKE-HOPKINS. Circa 1870, G. Zolotarev observed that the Legendre symbol ( a p

Here we study square linear systems and properties of their coefficient matrices as they relate to the solution set of the linear system.

Lecture 08: Feb. 08, 2019

CS 275 Automata and Formal Language Theory

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

N 0 completions on partial matrices

Formal languages, automata, and theory of computation

Lecture 3: Equivalence Relations

Formal Languages and Automata

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

The Regulated and Riemann Integrals

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Natural examples of rings are the ring of integers, a ring of polynomials in one variable, the ring

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Frobenius numbers of generalized Fibonacci semigroups

Zero-Sum Magic Graphs and Their Null Sets

MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

State Minimization for DFAs

Convex Sets and Functions

1 From NFA to regular expression

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Closure Properties of Regular Languages

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

CHAPTER 1 Regular Languages. Contents

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Fundamentals of Computer Science

More on automata. Michael George. March 24 April 7, 2014

Physics 116C Solution of inhomogeneous ordinary differential equations using Green s functions

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Lecture 1. Functional series. Pointwise and uniform convergence.

CS 275 Automata and Formal Language Theory

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CMSC 330: Organization of Programming Languages

Math 4310 Solutions to homework 1 Due 9/1/16

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Finite Automata-cont d

Theoretical foundations of Gaussian quadrature

1 Structural induction

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

Harvard University Computer Science 121 Midterm October 23, 2012

Nondeterminism and Nodeterministic Automata

Automata and Languages

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Bases for Vector Spaces

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

Riemann is the Mann! (But Lebesgue may besgue to differ.)

Introduction to Group Theory

Riemann Sums and Riemann Integrals

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Linear Algebra 1A - solutions of ex.4

First Midterm Examination

Regular expressions, Finite Automata, transition graphs are all the same!!

Designing finite automata II

13.3 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Is there an easy way to find examples of such triples? Why yes! Just look at an ordinary multiplication table to find them!

MAA 4212 Improper Integrals

Math 1B, lecture 4: Error bounds for numerical methods

Riemann Sums and Riemann Integrals

Infinite Geometric Series

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

arxiv:math/ v2 [math.ho] 16 Dec 2003

Intuitionistic Fuzzy Lattices and Intuitionistic Fuzzy Boolean Algebras

Semigroup of generalized inverses of matrices

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Math Advanced Calculus II

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

This lecture covers Chapter 8 of HMU: Properties of CFLs

Transcription:

Automt nd semigroups recognizing infinite words Olivier Crton 1 Dominique Perrin 2 Jen-Éric Pin1 1 LIAFA, CNRS nd Université Denis Diderot Pris 7, Cse 7014, 75205 Pris Cedex 13, Frnce 2 Institut Gsprd Monge, Université de Mrne-l-Vllée, 5, boulevrd Descrtes, Chmps-sur-Mrne, F-77454 Mrne-l-Vllée Cedex 2 Olivier.Crton@lif.jussieu.fr, perrin@univ-mlv.fr, Jen-Eric.Pin@lif.jussieu.fr Abstrct This pper is survey on the lgebric pproch to the theory of utomt ccepting infinite words. We discuss the vrious cceptnce modes (Büchi utomt, Muller utomt, trnsition utomt, wek recognition by finite semigroup, ω-semigroups) nd prove their equivlence. We lso give two lgebric proofs of Mc- Nughton s theorem on the equivlence between Büchi nd Muller utomt. Finlly, we present some recent work on prophetic utomt nd discuss its extension to trnsfinite words. 1 Introduction Among the mny reserch contributions of Wolfgng Thoms, those regrding utomt on infinite words nd more generlly, on infinite objects, hve been highly inspiring to the uthors. In prticulr, we would like to emphsize the historicl importnce of his erly ppers [33, 34, 35], his illuminting surveys [36, 37] nd the Lecture Notes volume on gmes nd utomt [15]. Besides being source of inspirtion, Wolfgng lwys hd nice words for our own reserch on the lgebric pproch to utomt theory. This survey, which presents this theory for infinite words, owes much to his encourgement. Büchi hs extended the clssicl theory of lnguges to infinite words insted of finite ones. Most notions nd results known for finite words extend to infinite words, often t the price of more difficult proofs. For exmple, proving tht rtionl lnguges re closed under Boolen opertions becomes, in the infinite cse, delicte result, the proof of which mkes use of Rmsey theorem. In the sme wy, the determiniztion of utomt, n

2 O. Crton, D. Perrin, J.-E. Pin esy lgorithm on finite words, turns to difficult theorem in the infinite cse. Not surprisingly, the sme kind of obstcle occurred in the lgebric pproch to utomt theory. It ws soon recognized tht finite utomt re closely linked with finite semigroups, thus giving n lgebric counterprt of the definition of recognizbility by finite utomt. In this setting, every rtionl lnguge X of A + is recognized by morphism from A + onto finite semigroup. There is lso miniml semigroup recognizing X, clled the syntctic semigroup of X. The success of the lgebric pproch for studying regulr lnguges ws lredy firmly estblished by the end of the seventies, but it took nother ten yers to find the pproprite frmework for infinite words. Semigroups re replced by ω-semigroups, which re, roughly speking, semigroups equipped with n infinite product. In this new setting, the definitions of recognizble sets of infinite words nd of syntctic congruence become nturl nd most results vlid for finite words cn be dpted to infinite words. Crrying on the work of Arnold [1], Pécuchet [21, 20] nd the second uthor [22, 23, 24], Wilke [38, 39] hs pushed the nlogy with the theory for finite words sufficiently fr to obtin counterprt of Eilenberg s vriety theorem for finite or infinite words. This theory ws further extended by using ordered ω-semigroups [27, 25]. Notwithstnding the importnce of the vriety theory, we do not cover it in this rticle but rther choose to present some pplictions of the lgebric pproch to utomt theory. The first nontrivil ppliction is the construction of Muller utomton, given finite semigroup wekly recognizing lnguge. The second one is purely lgebric proof of the theorem of McNughton stting tht ny recognizble subset of infinite words is Boolen combintion of deterministic recognizble sets. The third one dels with prophetic utomt, subclss of Büchi utomt in which ny infinite word is the lbel of exctly one finl pth. The min result sttes tht these utomt re equivlent to Büchi utomt. We show, however, tht this result does not extend to words indexed by ordinls. Our pper hs the chrcter of survey. For the reder s convenience it reproduces some of the mteril published in the book Semigroups nd utomt on infinite words [26], which owes debt of grtitude to Wolfgng Thoms. Proofs re often only sketched in the present pper, but complete proofs cn be found in [26]. Other surveys on utomt nd infinite words include [24, 25, 36, 37, 32]. Our rticle is divided into seven sections. Automt on infinite words re introduced in Section 2. Algebric recognition modes re discussed in Section 3. The syntctic congruence is defined in Section 4. In Section 5, we show tht ll recognition modes defined so fr re equivlent. Sections 6 nd 7 illustrte the power of the lgebric pproch. In Section 6, we

Automt nd semigroups recognizing infinite words 3 give n lgebric proof of McNughton s theorem. Section 7 is devoted to prophetic utomt. 2 Automt Let A be n lphbet. We denote by A +, A nd A ω, respectively, the sets of nonempty finite words, finite words nd infinite words on the lphbet A. We lso denote by A the set A A ω of finite or infinite words on A. By definition, n ω-rtionl subset of A ω is finite union of sets of the form XY ω where X nd Y re rtionl subsets of A. An utomton is given by finite lphbet A, finite set of sttes Q nd subset E of Q A Q, clled the set of edges or trnsitions. Two trnsitions (p,, q) nd (p,, q ) re clled consecutive if q = p. An infinite pth in the utomton A is n infinite sequence p of consecutive trnsitions p : q 0 0 1 q1 q2 The stte q 0 is the origin of the infinite pth nd the infinite word 0 1 is its lbel. We sy tht the pth p psses infinitely often through stte q (or tht p visits q infinitely often, or yet tht q is infinitely repeted in p) if there re infinitely mny integers n such tht q n = q. The set of infinitely repeted sttes in p is denoted by Inf(p). An utomton A = (Q, A, E) is sid to hve deterministic trnsitions, if, for every stte q Q nd every letter A, there is t most one stte q such tht (q,, q ) is trnsition. It is deterministic if it hs deterministic trnsitions nd if I is singleton. Dully, A hs complete trnsitions if, for every stte q Q nd every letter A, there is t lest one stte q such tht (q,, q ) is trnsition. Acceptnce modes re usully defined by specifying set of successful finite or infinite pths. This gives rise to different types of utomt. We shll only recll here the definition of two clsses: the Büchi utomt nd the Muller utomt. 2.1 Büchi utomt In the model introduced by Büchi, one is given set of initil sttes I nd set of finl sttes F. Here re the precise definitions. Let A = (Q, A, E, I, F) be Büchi utomton. We sy tht n infinite pth in A is initil if its origin is in I nd finl if it visits F infinitely often. It is successful if it is initil nd finl. The set of infinite words recognized by A is the set, denoted by L ω (A), of lbels of infinite successful pths in A. It is lso the set of lbels of infinite initil pths p in A nd such tht Inf(p) F. By definition, set of infinite words is recognizble if it is recognized by some finite Büchi utomton. Büchi hs shown tht Kleene s theorem on regulr lnguges extends to infinite words.

4 O. Crton, D. Perrin, J.-E. Pin Theorem 2.1. A set of infinite words is recognizble if nd only if it is ω-rtionl. The notion of trim utomton cn lso be dpted to the cse of infinite words. A stte q is clled ccessible if there is (possibly empty) finite initil pth in A ending in q. A stte q is clled coccessible if there exists n infinite finl pth strting t q. Finlly, A is trim if ll its sttes re both ccessible nd coccessible. It is esy to see tht every Büchi utomton is equivlent to trim Büchi utomton. For this reson, we shll ssume tht ll the utomt considered in this pper re trim. So fr, extending utomt theory to infinite words did not rise ny insuperble problems. However, it strts getting hrder when it comes to determinism. The description of the subsets of A ω recognized by deterministic Büchi utomt involves new opertor. For subset L of A, let L = {u A ω u hs infinitely mny prefixes in L}. Exmple 2.2. () If L = b, then L =. (b) If L = (b) +, then L = (b) ω. (c) If L = ( b) + = ( + b) b, tht is if L is the set of words ending with b, then L = ( b) ω, which is the set of infinite words contining infinitely mny occurrences of b. The following exmple shows tht not every set of words cn be written in the form L. Exmple 2.3. The set X = ( + b) ω of words with finite number of occurrences of b is not of the form L. Otherwise, the word b ω would hve prefix u 1 = b n1 in L, the word b n1 b ω would hve prefix u 2 = b n1 b n2 in L, etc. nd the infinite word u = b n1 b n2 b n3 would hve n infinity of prefixes in L nd hence would be in L. This is impossible, since u contins infinitely mny b s. A set of infinite words which cn be recognized by deterministic Büchi utomton is clled deterministic. Theorem 2.4. A subset X of A ω is deterministic if nd only if there exists recognizble set L of A + such tht X = L.

Automt nd semigroups recognizing infinite words 5 2.2 Muller utomt Contrry to the cse of finite words, deterministic Büchi utomt fil to recognize ll recognizble sets of infinite words. This is the motivtion for introducing Muller utomt which re lso deterministic, but hve more powerful cceptnce mode. In this model, n infinite pth p is finl if the set Inf(p) belongs to prescribed set T of sets of sttes. The definition of initil nd successful pths re unchnged. A Muller utomton is 5-tuple A = (Q, A, E, i, T ) where (Q, A, E) is deterministic utomton, i is the initil stte nd T is set of subsets of Q, clled the tble of sttes of the utomton. The set of infinite words recognized by A is the set, denoted by L ω (A), of lbels of infinite successful pths in A. A fundmentl result, due to R. McNughton [18], sttes tht ny Büchi utomton is equivlent to Muller utomton. Theorem 2.5. Any recognizble set of infinite words cn be recognized by Muller utomton. This implies in prticulr tht recognizble sets of infinite words re closed under complementtion, result proved for the first time by Büchi in direct wy. 2.3 Trnsition utomt It is sometimes convenient to use vrint of utomt in which set of finl trnsitions is specified, insted of the usul set of finl sttes. This ide cn be pplied to ll vrints of utomt. Formlly, Büchi trnsition utomton is 5-tuple A = (Q, A, E, I, F) where (Q, A, E) is n utomton, I Q is the set of initil sttes nd F E is the set of finl trnsitions. If p is n infinite pth, we denote by Inf T (p) the set of trnsitions through which p goes infinitely often. A pth p is finl if it goes through F infinitely often, tht is, if Inf T (p) F. Similrly, trnsition Muller utomton is 5-tuple A = (Q, A, E, I, T ) where (Q, A, E) is finite deterministic utomton, i is the initil stte nd T is set of subsets of E, clled the tble of trnsitions of the utomton. A pth is finl if Inf T (p) T, tht is, if the set of trnsitions occurring infinitely often in p is n element of the tble. Proposition 2.6. (1) Büchi utomt nd trnsition Büchi utomt re equivlent. (2) Muller utomt nd trnsition Muller utomt re equivlent. 3 Algebric recognition modes In this section, we give n historicl survey on the vrious lgebric notions of recognizbility tht hve been considered. The two erlier ones, wek nd

6 O. Crton, D. Perrin, J.-E. Pin strong recognition, re now superseded by the notions of ω-semigroupsnd Wilke lgebrs. Recll tht semigroup is set equipped with n ssocitive opertion which does not necessrily dmit n identity. If S is semigroup, S 1 denotes the monoid equl to S if S is monoid, nd to S {1} if S is not monoid. In the ltter cse, the opertion of S is completed by the rules 1s = s1 = s for ech s S 1. An element e of S is idempotent if e 2 = e. The preorder R is defined on S by setting s R s if there exists t S 1 such tht s = s t. We lso write s R s if s R s nd s R s nd s < R s if s R s nd s R s. The equivlence clsses of the reltion R re clled the R-clsses of S. 3.1 Wek recognition The erly ttempts imed t understnding the behviour of semigroup morphism from A + onto finite semigroup. The key result is consequence of Rmsey s theorem in combintorics, which involves the notion of linked pir: linked pir of finite semigroup S is pir (s, e) of elements of S stisfying se = s nd e 2 = e. Theorem 3.1. Let ϕ : A + S be morphism from A + into finite semigroup S. For ech infinite word u A ω, there exist linked pir (s, e) of S nd fctoriztion u = u 0 u 1 of u s product of words of A + such tht ϕ(u 0 ) = s nd ϕ(u n ) = e for ll n > 0. Theorem 3.1 is frequently used in slightly different form: Proposition 3.2. Let ϕ : A + S be morphism from A + into finite semigroup S. Let u be n infinite word of A ω, nd let u = u 0 u 1... be fctoristion of u in words of A +. Then there exist linked pir (s, e) of S nd strictly incresing sequence of integers (k n ) n 0 such tht ϕ(u 0 u 1 u k0 1) = s nd ϕ(u kn u kn+1 u kn+1 1) = e for every n 0. Theorem 3.1 led to the first ttempt to extend the notion of recognizble sets. Let us cll ϕ-simple set of infinite words of the form ϕ 1 (s) ( ϕ 1 (e) ) ω, where (s, e) is linked pir of S. Then we sy tht subset of A ω is wekly recognized by ϕ if it is finite union of ϕ-simple subsets. The following result justifies the term recognized. Proposition 3.3. A set of infinite words is recognizble if nd only if it is wekly recognized by some morphism onto finite semigroup. However, the notion of wek recognition hs severl drwbcks: there is no nturl notion of syntctic semigroup, deling with complementtion is unesy nd more generlly, the lgebric tools tht were present in the cse of finite words re missing.

Automt nd semigroups recognizing infinite words 7 3.2 Strong recognition This notion emerged s n ttempt to obtin n lgebric proof of the closure of recognizble sets of infinite words under complement. Let ϕ : A + S be morphism from A + into finite semigroup S. Then ϕ strongly recognizes (or sturtes) subset X of A ω if ll the ϕ-simple sets hve trivil intersection with X, tht is, for ech linked pir (s, e) of S, ϕ 1 (s) ( ϕ 1 (e) ) ω X = or ϕ 1 (s) ( ϕ 1 (e) ) ω X Theorem 3.1 shows tht A ω is finite union of ϕ-simple sets. It follows tht if morphism strongly recognizes set of infinite words, then it lso wekly recognizes it. Furthermore, Proposition 3.3 cn be improved. Proposition 3.4. A set of infinite words is recognizble if nd only if it is strongly recognized by some morphism onto finite semigroup. The proof relies on construction which is interesting on its own right. Given semigroup S, we define new semigroup with multipliction defined by T = {( 0 s P s ) s S, P is subset of S S} ( s 0 P s )( ) ( t Q 0 t = st sq Pt ) 0 st where sq = {(sq 1, q 2 ) (q 1, q 2 ) Q} nd Pt = {(p 1, p 2 t) (p 1, p 2 ) P }. Let now ϕ be morphism from A + onto S. Then one cn show tht the mp ψ : A + T defined by ψ(u) = ( ) ϕ(u) τ(u) 0 ϕ(u) with τ(u) = {(ϕ(u 1 ), ϕ(u 2 )) u = u 1 u 2 } is semigroup morphism nd tht ny set of infinite words wekly recognized by ϕ is strongly recognized by ψ. Proposition 3.4 leds to simple proof of Büchi s complementtion theorem. Corollry 3.5. Recognizble sets of infinite words re closed under complement. Proof. Indeed, if morphism strongly recognizes set of infinite words, it lso recognizes its complement. q.e.d.

8 O. Crton, D. Perrin, J.-E. Pin 3.3 ω-semigroups nd Wilke lgebrs Although strong recognition constituted n improvement over wek recognition, there were still obstcles to extend to infinite words Eilenberg s vriety theorem, which gives correspondence between recognizble sets nd finite semigroups. The solution ws found by Wilke [38] nd reformulted in slightly different terms by the two lst uthors in [25]. The ide is to use n lgebric structure, clled n ω-semigroup, which is sort of semigroup in which infinite products re defined. This structure ws ctully implicit in the originl construction of Büchi to recognize the complement [7]. 3.3.1 ω-semigroups An ω-semigroup is two-sorted lgebr S = (S +, S ω ) equipped with the following opertions: () A binry opertion defined on S + nd denoted multiplictively, (b) A mpping S + S ω S ω, clled mixed product, tht ssocites with ech pir (s, t) S + S ω n element of S ω denoted st, (c) A surjective mpping π : S ω + S ω, clled infinite product These three opertions stisfy the following properties: (1) S +, equipped with the binry opertion, is semigroup, (2) for every s, t S + nd for every u S ω, s(tu) = (st)u, (3) for every incresing sequence (k n ) n>0 nd for every sequence (s n ) n 0 of elements of S +, π(s 0 s 1 s k1 1, s k1 s k1+1 s k2 1,...) = π(s 0, s 1, s 2,...) (4) for every s S + nd for every sequence (s n ) n 0 of elements of S +, sπ(s 0, s 1, s 2,...) = π(s, s 0, s 1, s 2,...) These conditions cn be thought of s n extension of ssocitivity. In prticulr, conditions (3) nd (4) show tht one cn replce π(s 0, s 1, s 2,...) by s 0 s 1 s 2 without mbiguity. We shll use this simplified nottion in the sequel. Exmple 3.6. (1) We denote by A the ω-semigroup (A +, A ω ) equipped with the usul conctention product. One cn show tht A is the free ω-semigroup generted by A. (2) The trivil ω-semigroup is the ω-semigroup 1 = ({1}, {}), obtined by equipping the trivil semigroup {1} with n infinite product: the unique wy is to declre tht every infinite product is equl to. (3) Consider the ω-semigroup S = ({0, 1}, {}) defined s follows: every infinite product is equl to nd every finite product s 0 s 1... s n is

Automt nd semigroups recognizing infinite words 9 equl to 0 except if ll the s i s re equl to 1. In prticulr, the elements 0 nd 1 re idempotents nd thus, for ll n > 0, 1 n 0 n. Nevertheless 1 ω = 0 ω =. These exmples, especilly the third one, mke pprent n lgorithmic problem. Even if the sets S + nd S re finite, the infinite product is still n opertion of infinite rity nd it is not cler how to define it s finite object. The problem ws solved by Wilke [38], who proved tht finite ω- semigroups re totlly determined by only three opertions of finite rity. This leds to the notion of Wilke lgebrs, tht we now define. 3.3.2 Wilke Algebrs A Wilke lgebr is two-sorted lgebr S = (S +, S ω ), equipped with the following opertions: (1) n ssocitive product on S +, (2) mixed product, which mps ech pir (s, t) S + S ω onto n element of S ω denoted by st, such tht, for every s, t S + nd for every u S ω, s(tu) = (st)u, (3) mp from S + in S ω, denoted by s s ω stisfying, for ech s, t S +, s(ts) ω = (st) ω (s n ) ω = s ω for ech n > 0 nd such tht every element of S ω cn be written s st ω with s, t S +. Wilke s theorem sttes the equivlence between finite Wilke lgebr nd finite ω-semigroup. A consequence is tht for finite ω-semigroup, ny infinite product is equl to n element of the form st ω, with s, t S +. Theorem 3.7. Every finite Wilke lgebr S = (S +, S ω ) cn be equipped, in unique wy, with structure of ω-semigroup tht inherits the given mixed product nd such tht, for ech s S +, the infinite product sss is equl to s ω. We still need to define morphisms for these lgebrs. We shll just give the definition for ω-semigroups, but the definition for Wilke lgebrs would be similr. 3.3.3 Morphisms of ω-semigroups As ω-semigroups re two-sorted lgebrs, morphisms re defined s pirs of morphisms. Given two ω-semigroups S = (S +, S ω ) nd T = (T +, T ω ), morphism of ω-semigroups S is pir ϕ = (ϕ +, ϕ ω ) consisting of semigroup morphism ϕ + : S + T + nd of mpping ϕ ω : S ω T ω preserving the infinite product: for every sequence (s n ) n N of elements of S +, ϕ ω (s 0 s 1 s 2 ) = ϕ + (s 0 )ϕ + (s 1 )ϕ + (s 2 )

10 O. Crton, D. Perrin, J.-E. Pin It is n esy exercise to verify tht these conditions imply tht ϕ lso preserves the mixed product, tht is, for ll s S +, nd for ech t S ω, ϕ + (s)ϕ ω (t) = ϕ ω (st) Algebric concepts like isomorphism, ω-subsemigroup, congruence, quotient, division re esily dpted from semigroups to ω-semigroups. We re now redy for our lgebric version of recognizbility. 3.3.4 Recognition by morphism of ω-semigroups. In the context of ω-semigroups, it is more nturl to define recognizble subsets of A, lthough we shll minly use this definition for subsets of A ω. This globl point of view hs been confirmed to be the right one in the study of words indexed by ordinls or by liner orders [3, 4, 5, 6, 29]. Thus subset X of A is split into two components X + = X A + nd X ω = X A ω. Let S = (S +, S ω ) be finite ω-semigroup, nd let ϕ : A S be morphism. We sy tht ϕ recognizes subset X of A if there exist pir P = (P +, P ω ) with P + S + nd P ω S ω such tht X + = ϕ 1 + (P +) nd X ω = ϕ 1 ω (P ω ). In the sequel, we shll often omit the subscripts nd simply write X = ϕ 1 (P). It is time gin to justify our terminology by theorem, whose proof will be given in Section 5. Theorem 3.8. A set of infinite words is recognizble if nd only if it is recognized by some morphism onto finite ω-semigroup. Exmple 3.9. Let A = {, b}, nd consider the ω-semigroup S = ({1, 0}, {1 ω, 0 ω }) equipped with the opertions 11 = 1, 10 = 01 = 00 = 0, 11 ω = 1 ω, 10 ω = 00 ω = 01 ω = 0 ω. Let ϕ : A S be the morphism of ω-semigroups defined by ϕ() = 1 nd ϕ(b) = 0. We hve ϕ 1 (1) = + ϕ 1 (0) = A ba ϕ 1 (1 ω ) = ω (finite words contining no occurrence of b), (finite words contining t lest one occurrence of b), (infinite words contining no occurrence of b), ϕ 1 (0 ω ) = A ω \ ω (infinite words contining t lest one occurrence of b), The morphism ϕ recognizes ech of these sets, s well s ny union of these sets. Exmple 3.10. Let us tke the sme ω-semigroup S nd consider the morphism of ω-semigroups ϕ : A S defined by ϕ() = s for ech A. We hve ϕ 1 (s) = A +, ϕ 1 (t) = nd ϕ 1 (u) = A ω. Thus the morphism ϕ recognizes the empty set nd the sets A +, A ω nd A.

Automt nd semigroups recognizing infinite words 11 Exmple 3.11. Let A = {, b}, nd consider the ω-semigroup S = ({, b}, { ω, b ω }) equipped with the following opertions: = b = ω = ω b ω = ω b = b bb = b b ω = b ω bb ω = b ω The morphism of ω-semigroups ϕ : A S defined by ϕ() = nd ϕ(b) = b recognizes A ω since we hve ϕ 1 ( ω ) = A ω. Boolen opertions cn be esily trnslted in terms of morphisms. Let us strt with result which llows us to tret seprtely, the subsets of A + nd those of A ω. Proposition 3.12. Let ϕ be morphism of ω-semigroups recognizing subset X of A. Then the subsets X +, X ω, X + A ω nd A + X ω re lso recognized by ϕ. We now consider the complement. Proposition 3.13. Let ϕ be morphism of ω-semigroups recognizing subset X of A (resp. A +, A ω ). Then ϕ lso recognizes the complement of X in A (resp. A +, A ω ). For union nd intersection, we hve the following results. Proposition 3.14. Let (ϕ i ) i F : A S i be fmily of surjective morphisms recognizing subset X i of A. Then the subsets i F X i nd i F X i re recognized by n ω-subsemigroup of the product i F S i. In the sme spirit, the following properties hold: Proposition 3.15. Let α : A B be morphism of ω-semigroups nd let ϕ be morphism of ω-semigroups recognizing subset X of B. Then the morphism ϕ α recognizes the set α 1 (X). 4 Syntctic congruence The definition of the syntctic congruence of recognizble subset of infinite words is due to Arnold [1]. It ws then dpted to the context of ω-semigroups. Therefore, this definition cn be given for recognizble subsets of A, but we restrict ourself to the cse of subsets of A ω. The syntctic congruence of recognizble subset of A ω is defined on A + by u X v if nd only if, for ech x, y A nd for ech z A +, xuyz ω X xvyz ω X x(uy) ω X x(vy) ω X (4.1)

12 O. Crton, D. Perrin, J.-E. Pin nd on A ω by u X v if nd only if, for ech x A, xu X xv X (4.2) The syntctic ω-semigroup of X is the quotient of A by the syntctic congruence of X. Exmple 4.1. Let A = {, b} nd X = { ω }. The syntctic congruence of X divides A + into two clsses: + nd A ba nd A ω into two clsses lso: A ba ω nd ω. The syntctic ω-semigroup of X is the four element ω-semigroup of Exmple 3.9. Exmple 4.2. Let A = {, b} nd let X = A ω. The syntctic ω-semigroup of X is the ω-semigroup of Exmple 3.11. Exmple 4.3. When X is not recognizble, the equivlence reltion defined on A + by (4.1) nd on A ω by (4.2) is not in generl congruence. For instnce, let A = {, b} nd X = {b 1 b 2 b 3 b }. We hve, for ech n > 0, b X b n, but nevertheless b 1 b 2 b 3 b is not equivlent to b ω since b 1 b 2 b 3 b X but b ω / X. Exmple 4.4. Let X = ({b, c} {b}) ω. We shll compute in Exmple 5.3 n ω-semigroup S recognizing this set. One cn show tht its syntctic ω-semigroup is S(X) = ({, b, c, c}, { ω, c ω, (c) ω }), presented by the reltions 2 = b = c = b = b 2 = b bc = c cb = c c 2 = c b ω = ω b ω = ω c ω = c ω c ω = (c) ω (c) ω = ω b(c) ω = (c) ω c(c) ω = (c) ω The syntctic ω-semigroup is the lest ω-semigroup recognizing recognizble set. More precisely, we hve the following sttement: Proposition 4.5. Let X be recognizble subset of A. An ω-semigroup S recognizes X if nd only if the syntctic ω-semigroup of X is quotient of S. Note in prticulr tht, if u X v for two words u, v of A +, then, for ll x A nd z A ω xuz X xvz X (4.3) Indeed, if ϕ : A S denotes the syntctic morphism of X, the condition u X v implies ϕ(u) = ϕ(v). It follows tht ϕ(xuz) = ϕ(xvz), which gives (4.3).

Automt nd semigroups recognizing infinite words 13 5 Conversions from one cceptnce mode into one nother In this section, we explin how to convert the vrious cceptnce modes one into one nother. We hve lredy seen how to pss from wek to strong recognition by finite semigroup. We shll now describe, in order, the conversions form wek recognition to Büchi utomt, from Büchi utomt to ω-semigroups, from strong recognition to ω-semigroups nd finlly from wek recognition to Muller utomt. 5.1 From wek recognition to Büchi utomt Let ϕ : A + S be morphism from A + onto finite semigroup S. First observe tht, given Büchi utomt A 1,..., A n, their disjoint union recognizes the set L ω (A 1 )... L ω (A n ). Therefore, we my suppose tht X is ϕ-simple set of infinite words, sy X = ϕ 1 (s)(ϕ 1 (e)) ω for some linked pir (s, e) of S. We construct nondeterministic Büchi utomton A tht ccepts X s follows. The set Q of sttes of A is the set S I = S {f} where f is new neutrl element dded to S even if S hs lredy one. The product of S is thus extended to S I by setting tf = ft = t for ny t S I. The initil stte of A is s nd the unique finl stte is f. The set of trnsitions is E = {ϕ()t t A nd t Q} {f t A, t Q nd ϕ()t = e}. Let t S. It is esily proved tht word w stisfies ϕ(w) = t if nd only if it lbels pth from t to f visiting f only t the end. It follows tht w lbels pth from f to f if nd only if ϕ(w) = e nd thus A ccepts X. The previous construction hs one min drwbck. The trnsition semigroup of the utomton A my not belong to the vriety of finite semigroups generted by S, s shown by the following exmple. Exmple 5.1. Let S be the semigroup {0, 1} endowed with the usul multipliction. Let A be the lphbet {, b} nd ϕ : A + S be the morphism defined by ϕ() = 0 nd ϕ(b) = 1. Let (s, e) be the pir (0, 0). The set ϕ 1 (s)(ϕ 1 (e)) ω is thus equl to (b ) ω. The utomton A obtined with the previous construction is pictured in Figure 1. The semigroup S is commuttive but the trnsition semigroup of A is not. Indeed, there is pth from 1 to 0 lbeled by b but there is no pth from 1 to 0 lbeled by b.

14 O. Crton, D. Perrin, J.-E. Pin, b 0 1 b, b b f Figure 1. The utomton A. In order to solve this problem, Pécuchet [21] proposed the following construction, which is quite similr to the previous one but hs better properties. The set of sttes of the utomton is still the set S I = S {f}. The initil stte is s nd the unique finl stte is f. The set E of trnsitions is modified s follows: E = {t t A, t, t Q nd (t = ϕ()t or t e = ϕ()t)} The utomton B obtined with this construction is pictured in Figure 2., b 0 1, b, b, b, b f Figure 2. The utomton B. It cn be proved tht for ny sttes t nd t, there is pth from t to t lbeled by w if nd only if t = ϕ(w)t or t e = ϕ(w)t. It follows tht if two words w nd w stisfy ϕ(w) = ϕ(w ), there is pth from t to t lbeled by w if nd only if there is pth from t to t lbeled by w. This mens tht

Automt nd semigroups recognizing infinite words 15 the trnsition semigroup of the utomton B divides the semigroup S nd hence belongs to the vriety of finite semigroups generted by S. 5.2 From Büchi utomt to ω-semigroups Let A = (Q, A, E, I, F) be Büchi utomton recognizing subset X of A ω. The ide is the following. Given finite word u nd two sttes p nd q, we define multiplicity expressing the following possibilities for the set P of pths from p to q lbeled by u: (1) P is empty, (2) P is nonempty, but contins no pth visiting finl stte, (3) P contins pth visiting finl stte. Our construction mkes use of the semiring K = {, 0, 1} in which ddition is the mximum for the ordering < 0 < 1 nd multipliction, which extends the Boolen ddition, is given in Tble 1. Conditions (1), (2) nd (3) will be encoded by, 0 nd 1, respectively. 0 1 0 0 1 1 1 1 Tble 1. The multipliction tble. Formlly, we ssocite with ech finite word u (Q Q)-mtrix µ(u) with entries in K defined by in cse (1), µ(u) p,q = 0 in cse (2), 1 in cse (3) It is esy to see tht µ is morphism from A + into the multiplictive semigroup of Q Q-mtrices with entries in K. Let S + = µ(a + ). The next step is to complete our structure of Wilke lgebr by defining n pproprite set S ω, n ω-power nd mixed product. The solution consists in coding infinite pths by column mtrices of K Q, in such wy tht ech coefficient µ(u) p codes the existence of n infinite pth of lbel u strting t p. The usul product of mtrices induces mixed product K Q Q K Q K Q. In order to define the opertion ω on squre mtrices, we need the following definition. Given mtrix s of S +, we cll infinite s-pth strting t p sequence p = p 0, p 1,... of sttes such tht, for ll i, s pi,p i+1.

16 O. Crton, D. Perrin, J.-E. Pin An s-pth is sid to be successful if s pi,p i+1 = 1 for n infinite number of indices i. We define the column mtrix s ω s follows. For every p Q, s ω p = { 1 if there exists successful s-pth of origin p, otherwise Note tht the coefficients of this mtrix cn be effectively computed. Indeed, computing s ω p mounts to checking the existence of circuits contining given edge in finite grph. Finlly, S ω is the set of ll column mtrices of the form st ω, with s, t S +. One cn verify tht S = (S +, S ω ), equipped with these opertions, is Wilke lgebr. Further, the morphism µ cn be extended in unique wy s morphism of ω-semigroups from A into S which recognizes the set L ω (A). Exmple 5.2. Let A be the Büchi utomton represented in Figure 3. 1 b 2 b Figure 3. A Büchi utomton. The morphism µ : A S(A) is defined by the formul µ() = ( ) 0 1 nd µ(b) = ( ) 0 1 The ω-semigroup generted by these mtrices contins five elements: = ( ) 0 1 b = ( ) 0 1 nd is presented by the reltions: ω = ( 1 ) b ω = ( ) b ω = ( ) 1 2 = b = b b = b b 2 = b ω = ω b ω = b ω bb ω = b ω Exmple 5.3. Let X = ({b, c} {b}) ω. A Büchi utomton recognizing X is represented in Figure 4:

Automt nd semigroups recognizing infinite words 17, b 1 2 b, c b, c Figure 4. An utomton. For this utomton, the previous computtion provides n ω-semigroup with nine elements S = ({, b, c, b, c}, { ω, b ω, c ω, (c) ω }), where = ( ) 1 1 b = ( ) 1 1 0 c = ( ) 1 0 b = ( 1 1 1 1 ) c = ( ) 1 1 ω = ( ) 1 b ω = ( 1 1 ) cω = ( ) (c) ω = ( ) 1 It is presented by the following reltions: 2 = b = c = b 2 = b bc = c cb = c c 2 = c (b) ω = b ω ω = ω b ω = ω c ω = c ω (c) ω = ω b ω = b ω bb ω = b ω bc ω = c ω b(c) ω = (c) ω c ω = (c) ω cb ω = (c) ω cc ω = c ω c(c) ω = (c) ω Note tht the syntctic ω-semigroup S(X) of X is not equl to S. To compute S(X), one should first compute the imge of X in S, which is P = { ω, b ω }. Next, one should compute the syntctic congruence P of P in S, which is defined on S + by u P v if nd only if, for every x, y, z S + xuyz ω P xvyz ω P x(uy) ω P x(vy) ω P (5.4) nd on S ω by u P v if nd only if, for ech x S +, xu P xv P (5.5) Here we get P b nd ω P b ω nd hence we recovered the semigroup presented in Exmple 4.4. S(X) = ({, b, c, c}, { ω, c ω, (c) ω }) 5.3 From strong recognition to ω-semigroups It is esy to ssocite Wilke lgebr S = (S, S ω ) to finite semigroup S. Let π be the exponent of S, tht is, the smllest integer n such tht s n is idempotent for every s S. Two linked pirs (s, e) nd (s, e ) of S re

18 O. Crton, D. Perrin, J.-E. Pin sid to be conjugte if there exist x, y S 1 such tht e = xy, e = yx nd s = sx. These equlities lso imply s = s y (since s y = sxy = se = s), showing the symmetry of the definition. One cn verify tht the conjugcy reltion is n equivlence reltion on the set of linked pirs of S. We shll denote by [s, e] the conjugcy clss of linked pir (s, e). We tke for S ω the set of conjugcy clsses of the linked pirs of S. One cn prove tht the set S is equipped with structure of Wilke lgebr by setting, for ech [s, e] S ω nd t S, t[s, e] = [ts, e] nd t ω = [t π, t π ] The definition is consistent since if (s, e ) is conjugte to (s, e), then (ts, e ) is conjugte to (ts, e). It is now esy to convert strong recognition to recognition by n ω-semigroup. Proposition 5.4. If set of infinite words is strongly recognized by finite semigroup S, then it is recognized by the ω-semigroup S. 5.4 From wek recognition to Muller utomt The construction given by Le Sec, Pin nd Weil [16, 17] permits to convert semigroup tht wekly recognizes set of infinite words into trnsition Muller utomton. It relies, however, on two difficult results of finite semigroup theory. Recll tht semigroup is idempotent if ll its elements re idempotent nd R-trivil if the condition s R t implies s = t. The first one is cover theorem lso proved in [16, 17]. Recll tht the right stbilizer of n element s of semigroup S is the set of ll t S such tht st = s. These stbilizers re themselves semigroups, nd reflect rther well the structure of S: if S is group, every stbilizer is trivil, but if S is hs zero, the stbilizer of the zero is equl to S. Here we consider n intermedite cse: the stbilizers re idempotent nd R-trivil, which mounts to sying tht, for ech s, t, u S, the condition s = st = su implies t 2 = t nd tut = tu. We cn now stte the cover theorem precisely. Theorem 5.5. Ech finite semigroup is the quotient of finite semigroup in which the right stbilizers stisfy the identities x = x 2 nd xyx = xy. The second result we need is property of pth congruences due to I. Simon. A proof of this property cn be found in [14]. Given n utomton A, pth congruence is n equivlence reltion on the set of finite pths of A stisfying the following conditions: (1) ny two equivlent pths re coterminl (tht is, they hve the sme origin nd the sme end), (2) if p nd q re equivlent pths, nd if r, p nd s re consecutive pths, then rps is equivlent to rqs.

Automt nd semigroups recognizing infinite words 19 Proposition 5.6 (I. Simon). Let be pth congruence such tht, for every pir of loops p, q round the sme stte, p 2 p nd pq qp. Then two coterminl pths visiting the sme sets of trnsitions re equivlent. We re now redy to present our lgorithm. Let X be recognizble subset of A ω nd let ϕ : A + S be morphism wekly recognizing X. By Theorem 5.5, we my ssume tht the stbilizers of S stisfy the identities x 2 = x nd xyx = xy. Let S 1 be the monoid equl to S if S is monoid nd to S {1} if S is not monoid. One nturlly ssocites deterministic utomton (S 1, A, ) to ϕ by setting, for every s S 1 nd every A s = sϕ(). Let s be fixed stte of S 1. Then every word u is the lbel of exctly one pth with origin s, clled the pth with origin s defined by u. Let A = (S 1, A,, 1, T ) be the trnsition Muller utomton with 1 s initil stte nd such tht T = {Inf T (u) u X}. We clim tht A recognizes X. First, if u X, then Inf T (u) T by definition, nd thus u is recognized by A. Conversely, let u be n infinite word recognized by A. Then Inf T (u) = Inf T (v) = T for some v X. Thus, both pths u nd v visit only finitely mny times trnsitions out of T. Therefore, fter certin point, every trnsition of u (resp. v) belongs to T, nd every trnsition of T is visited infinitely often. Consequently, one cn find two fctoriztions u = u 0 u 1 u 2 nd v = v 0 v 1 v 2 nd stte s S such tht (1) u 0 nd v 0 define pths from 1 to s, (2) for every n > 0, u n nd v n define loops round s tht visit t lest once every trnsition in T nd visit no other trnsition. The sitution is summrized in Figure 5 below u 1 u 2 u 0 1 s v 0 v 1 v 2 Figure 5.

20 O. Crton, D. Perrin, J.-E. Pin Furthermore, Proposition 3.2 shows tht, by grouping the u i s (resp. v i s) together, we my ssume tht ϕ(u 1 ) = ϕ(u 2 ) = ϕ(u 3 ) =... nd ϕ(v 1 ) = ϕ(v 2 ) = ϕ(v 3 ) =... It follows in prticulr u 0 v ω 1 X (5.6) since ϕ(u 0 ) = ϕ(v 0 ) = s, ϕ(v 1 ) = ϕ(v 2 ) =... nd v 0 v 1 v 2 X. Furthermore, u X if nd only if u 0 u ω 1 X (5.7) To simplify nottion, we shll denote by the sme letter pth nd its lbel. We define pth equivlence s follows. Two pths p nd q re equivlent if p nd q re coterminl, nd if, for every nonempty pth x from 1 to the origin of p, nd for every pth r from the end of p to its origin, x(pr) ω X if nd only if x(qr) ω X. q x 1 s Figure 6. p r Lemm 5.7. The equivlence is pth congruence such tht, for every pir of loops p, q round the sme stte, p 2 p nd pq qp. Proof. We first verify tht is congruence. Suppose tht p q nd let u nd v be pths such tht u, p nd v re consecutive. Since p q, p nd q re coterminl, nd thus upv nd uqv re lso coterminl. Furthermore, if x is nonempty pth from 1 to the origin of upv, nd if r is pth from the end of upv to its origin such tht x(upvr) ω X, then (xu)(p(vru)) ω X, whence (xu)(q(vru)) ω X since p q, nd thus x(uqvr) ω X. Symmetriclly, x(uqvr) ω X implies x(upvr) ω X, showing tht upv uqv. Next we show tht if p is loop round s S, then p 2 p. Let x be nonempty pth from 1 to the origin of p, nd let r be pth from the end of p to its origin. Then, since p is loop, ϕ(x)ϕ(p) = ϕ(x). Now since the stbilisers of S re idempotent semigroups, ϕ(p) = ϕ(p 2 ) nd thus x(pr) ω X if nd only if x(p 2 r) ω X since ϕ recognizes X. Finlly, we show tht if p nd q re loops round the sme stte s, then pq qp. Let, s before, x be nonempty pth from 1 to the origin of p, nd let r be pth from the end of p to its origin. Then r is loop round s. We first observe tht x(pq) ω X x(qp) ω X (5.8)

Automt nd semigroups recognizing infinite words 21 Indeed x(pq) ω = xp(qp) ω, nd since p is loop, ϕ(x)ϕ(p) = ϕ(x). Thus xp(qp) ω X if nd only if x(qp) ω X, then proving (5.8). Now, we hve the following sequence of equivlences x(pqr) ω X x(pqrq) ω X x(rqpq) ω X x(rqp) ω X x(qpr) ω X, where the second nd fourth equivlences follow from (5.8) nd the first nd third from the identity xyx = xy stisfied by the right stbilizer of ϕ(x). q.e.d. We cn now conclude the proof of Theorem 2.5. By ssumption, the two loops round s defined by u 1 nd v 1 visit exctly the sme sets of trnsitions (nmely T). Thus, by Lemm 5.7 nd by Proposition 5.6, these two pths re equivlent. In prticulr, since u 0 v ω 1 X by (5.6), we hve u 0u ω 1 X, nd thus u X by (5.7). Therefore A recognizes X. 6 An lgebric proof of McNughton s theorem McNughton s celebrted theorem sttes tht ny recognizble subset of infinite words is Boolen combintion of deterministic recognizble sets. This Boolen combintion cn be explicitly computed using ω-semigroups. This proof relies on few useful formuls of independent interest on deterministic sets. Note tht McNughton s theorem cn be formulted s the equivlence of Büchi nd Muller utomt. Thus the construction described in Section 5.4 gives n lterntive proof of McNughton s theorem. Yet nother proof is due to Sfr [30]. It provides direct construction leding to reduced computtionl complexity. Let S be finite ω-semigroup nd let ϕ : A S be surjective morphism recognizing subset X of A ω. Set, for ech s S +, X s = ϕ 1 (s). Finlly, we denote by P the imge of X in S nd by F(P) the set of linked pirs (s, e) of S + such tht se ω P. For ech s S +, the set P s = X s \ X s A + is prefix-free, since word of P s cnnot be, by definition, prefix of nother word of P s. Put E s = {f S + f 2 nd sf = s} = {f S + (s, f) is linked pir}, nd denote by the reltion on E s defined by g e if nd only if eg = g. It is the restriction to the set E s of the preorder R, since, if g = ex then eg = eex = ex = g. We shll use the nottion e < g if e g nd if g e. To simplify nottion, we shll suppose implicitly tht for every expression of the form X s X ω f or X sp f, the pir (s, f) is linked pir of S +.

22 O. Crton, D. Perrin, J.-E. Pin Proposition 6.1. For ech linked pir (s, e) of S +, the following formul holds X s Xe ω X s P e f ex s Xf ω. (6.9) Corollry 6.2. (1) For every idempotent e of S +, the following formul holds X ω e = X e P e. (6.10) (2) For every linked pir (s, e) of S +, we hve s Xf f ex ω = X s P f. (6.11) f e Proof. Formul (6.10) is obtined by pplying (6.9) with s = e. Formul (6.11) follows by tking the union of both sides of (6.9) for f e. q.e.d. The previous sttement shows tht set of the form Xe ω, with e idempotent, is lwys deterministic. This my led the reder to the conjecture tht every subset of the form X ω, where X is recognizble subset of A +, is deterministic. However, this conjecture is ruined by the next exmple. Exmple 6.3. Let X = ({b, c} {b}) ω. The syntctic ω-semigroup of Y hs been computed in Exmple 4.4. In this ω-semigroup, b is the identity, nd ll the elements re idempotent. The set X cn be split into simple elements s follows: X = ϕ 1 ()ϕ 1 (b) ω ϕ 1 () ω = b {, b, c} b ω (b {, b, c} ) ω. It is possible to deduce from the previous formuls n explicit Boolen combintion of deterministic sets. Theorem 6.4. The following formul holds X = X s Xf ω (6.12) nd, for ech (s, e) F(P), fre (s,e) F(P) fre X s X ω f = ( U s,e \ V s,e ) (6.13) where U s,e nd V s,e re the subsets of A + defined by: U s,e = f e X s P f nd V s,e = f<ex s P f In prticulr, X is Boolen combintion of deterministic sets.

Automt nd semigroups recognizing infinite words 23 For proof, see [26, p. 120]. One cn lso obtin chrcteriztion of the deterministic subsets. Theorem 6.5. The set X is deterministic if nd only if, for ech linked pirs (s, e) nd (s, f) of S + such tht f e, the condition se ω P implies sf ω P. In this cse X = X s P e (6.14) (s,e) F(P) For proof, see [26, Theorem 9.4, p. 121]. Exmple 6.6. We return to Exmple 6.3. The imge of X in its syntctic ω-semigroup is the set P = { ω }. Now, the pirs (, b) nd (, c) re linked pirs of S + since b = c = nd we hve c b since bc = c. But b ω = ω P, nd c ω = c ω / P. Therefore X is not deterministic. The proof of McNughton s theorem described bove is due to Schützenberger [31]. It is relted to the proof given by Rbin [28] nd improved by Chouek [12]. See [26, p. 72] for more detils. 7 Prophetic utomt In this section, we introduce new type of utomt, clled prophetic, becuse in some sense, ll the informtion concerning the future is encoded in the initil stte. We first need to mke precise few notions on Büchi utomt. 7.1 More on Büchi utomt There re two competing versions for the notions of determinism nd codeterminism for trim utomton. In the first version, the notions re purely locl nd re defined by property of the trnsitions set. They give rise to the notions of utomton with deterministic or co-deterministic trnsitions introduced in Section 2. The second version is globl: trim utomton is deterministic if it hs exctly one initil stte nd if every word is the lbel of t most one initil pth. Similrly, trim utomton is co-deterministic if every word is the lbel of t most one finl pth. The locl nd globl notions of determinism re equivlent. The locl nd globl notions of co-determinism re lso equivlent for finite words. However, for infinite words, the globl version is strictly stronger thn the locl one. Lemm 7.1. A trim Büchi utomt is deterministic if nd only if it hs exctly one initil stte nd if its trnsitions re deterministic. Further, if trim Büchi utomt is co-deterministic, then its trnsitions re codeterministic.

24 O. Crton, D. Perrin, J.-E. Pin The notions of complete nd co-complete Büchi utomt re lso globl notions. A trim Büchi utomt is complete if every word is the lbel of t lest one initil pth. It is co-complete if every word is the lbel of t lest one finl pth. Det. trnsitions Co-det. trnsitions Unmbiguous Forbidden configurtion: Forbidden configurtion: Forbidden configurtion: q 1 q 1 u q q p q q 2 q 2 u where is letter. where is letter. where u is word. Deterministic Co-deterministic Unmbiguous Two initil pths with the sme lbel re equl + exctly one initil stte Complete Every word is the lbel of some initil pth Two finl pths with the sme lbel re equl Co-complete Every word is the lbel of some finl pth Two successful pths with the sme lbel re equl Tble 2. Summry of the definitions. Unmbiguity is nother globl notion. A Büchi utomton A is sid to be ω-unmbiguous if every infinite word in is the lbel of t most one successful pth. It is cler tht ny deterministic or co-deterministic Büchi utomton is ω-unmbiguous, but the converse is not true. The vrious terms re summrized in Tble 2. 7.2 Prophetic utomt By definition, prophetic utomton is co-deterministic, co-complete Büchi utomton. Equivlently, Büchi utomton is prophetic if every word is the lbel of exctly one finl pth. Therefore, word is ccepted if the unique finl pth it defines is lso initil. The min result of this section shows tht prophetic nd Büchi utomt re equivlent.

Automt nd semigroups recognizing infinite words 25 Theorem 7.2. Any recognizble set of infinite words cn be recognized by prophetic utomton. It ws lredy proved independently in [19] nd [2] tht ny recognizble set of infinite words is recognized by codeterministic utomton, but the construction given in [2] does not provide unmbiguous utomt. Prophetic utomt recognize infinite words, but the construction cn be dpted to biinfinite words. Two unmbiguous utomt on infinite words cn be merged to mke n unmbiguous utomton on biinfinite words. This leds to n extension of McNughton s theorem to the cse of biinfinite words. See [26, Section 9.5] for more detils. Theorem 7.2 ws originlly formulted by Michel in the eighties but remined unpublished for long time. Another proof ws found by the first uthor nd the two proofs were finlly published in [10, 11]. Our presenttion follows the proof which is bsed on ω-semigroups. We strt with simple chrcteriztion. Proposition 7.3. Let A = (Q, A, E, I, F) be Büchi (resp. trnsition Büchi) utomton nd let, for ech q Q, L q = L ω (Q, A, E, q, F). (1) A is co-deterministic if nd only if the L q s re pirwise disjoint. (2) A is co-complete if nd only if q Q L q = A ω. Proof. (1) If A is co-deterministic, the L q s re clerly pirwise disjoint. Suppose tht the L q s re pirwise disjoint nd let p 0 0 1 p1 p2 nd q 0 0 1 q1 q2 be two infinite pths with the sme lbel u = 0 1. Then, for ech i 0, i i+1 L(p i ) L(q i ), nd thus p i = q i. Thus A is co-deterministic. (2) follows immeditely from the definition of co-complete utomt. q.e.d. Exmple 7.4. A prophetic utomton is presented in Figure 7. The corresponding prtition of A ω is the following: L 0 = A b ω (t lest one, but finitely mny b) L 1 = ω (no b) L 2 = (A b) ω (first letter, infinitely mny b) L 3 = b(a b) ω (first letter b, infinitely mny b)

26 O. Crton, D. Perrin, J.-E. Pin b, b 0 1 2 3 b Figure 7. A prophetic utomton. b Exmple 7.5. Another exmple, recognizing the set A (b) ω, is presented in Figure 8., b 1 4 b 0 b b 2 3 b b 5 b 6 Figure 8. A prophetic utomton recognizing A (b) ω. Complementtion becomes esy with prophetic utomt. Proposition 7.6. Let A = (Q, A, E, I, F) be prophetic utomton recognizing subset X of A ω. Then the Büchi utomton (Q, A, E, Q \ I, F) recognizes the complement of X. It is esier to prove Theorem 7.2 for vrint of prophetic utomt tht we now define. A prophetic trnsition utomton is co-deterministic, co-complete, trnsition utomton. Proposition 2.6 sttes tht Büchi utomt nd trnsition Büchi utomt re equivlent. It is not difficult to dpt this result to prophetic utomt [26, Proposition I.8.1]. Proposition 7.7. Prophetic nd trnsition prophetic utomt re equivlent. Thus Theorem 7.2 cn be reformulted s follows.

Automt nd semigroups recognizing infinite words 27 Theorem 7.8. Any recognizble set of infinite words cn be recognized by prophetic trnsition utomton. Proof. Let X be recognizble subset of A ω, let ϕ : A S be the syntctic morphism of X nd let P = ϕ(x). Our construction strongly relies on the properties of R -chins of the semigroup S + nd requires few preliminries. We shll denote by R the set of ll nonempty > R -chins of S + : R = { } (s 0, s 1,..., s n ) n 0, s 0,..., s n S nd s 0 > R s 1 > R > R s n In order to convert R -chin into strict > R -chin, we introduce the reduction ρ, defined inductively s follows ρ(s) = (s) { ρ(s 1,..., s n 1 ) if s n R s n 1 ρ(s 1,...,s n ) = (ρ(s 1,...,s n 1 ), s n ) if s n 1 > R s n In prticulr, for ech finite word u = 0 1 n (where the i s re letters), let ˆϕ(u) be the > R -chin ρ(s 0, s 1,..., s n ), where s i = ϕ( 0 1 i ) for 0 i n. The definition of ˆϕ cn be extended to infinite words. Indeed, if u = 0 1 is n infinite word, s 0 R s 1 R s 2... nd since S + is finite, there exists n integer n, such tht, for ll i, j n, s i R s j. Then we set ˆϕ(u) = ˆϕ( 0... n ). Define mp from A S 1 + into S 1 + by setting, for ech A nd s S 1 +, s = ϕ()s We extend this mp to mp from A R into R by setting, for ech A nd (s 1,..., s n ) R, (s 1,..., s n ) = ρ( 1, s 1,..., s n ) To extend this mp to A +, it suffices to pply the following induction rule, where u A + nd A (u) (s 1,...,s n ) = u ( (s 1,..., s n )) This defines n ction of the semigroup A + on the set R in the sense tht, for ll u, v A nd r R, (uv) r = u(v r) The connections between this ction, ϕ nd ˆϕ re summrized in the next lemm.

28 O. Crton, D. Perrin, J.-E. Pin Lemm 7.9. The following formuls hold: (1) For ech u A + nd v A ω, u ϕ(v) = ϕ(uv) (2) For ech u, v A +, u ˆϕ(v) = ˆϕ(uv) Proof. (1) follows directly from the definition of the ction nd it suffices to estblish (2) when u reduces to single letter. Let v = 0 1... n, where the i s re letters nd let, for 0 i n, s i = ϕ( 0 1... i ). Then, by definition, ˆϕ(v) = ρ(s 0,..., s n ) nd since, the reltion R is stble on the left, ˆϕ(v) = ρ( 1, s 0, s 1,..., s n ) = ˆϕ(v) which gives (2). q.e.d. We now define trnsition Büchi utomton A = (Q, A, E, I, F) by setting { ((s1 Q =,...,s n ), se ω) (s 1,..., s n ) R, } (s, e) is linked pir of S + nd s n R s { ((s1 I =,...,s n ), se ω) } Q se ω P {( E = ( (s1,...,s n ), se ω),, ( (s 1,...,s n ), se ω)) A nd ( (s 1,..., s n ), se ω) } Q A trnsition ( ( (s1,..., s n ), se ω),, ( (s 1,..., s n ), se ω)) is sid to be cutting if the lst two elements of the R -chin ( 1, s 1,..., s n ) re R-equivlent. We choose for F the set of cutting trnsitions of the form ( ( (s1,..., s n ), e ω),, ( (s 1,..., s n ), e ω)) where e is n idempotent of S + such tht s n R e. Note tht A hs co-deterministic trnsitions. A typicl trnsition is shown in Figure 9. ( (s1,...,s n ), se ω) ( (s 1,..., s n ), se ω) Figure 9. A trnsition of A. The first prt of the proof consists in proving tht every infinite word is the lbel of finl pth. Let u = 0 1 be n infinite word, nd let, for ech