• Aucun résultat trouvé

Cyclic languages and strongly cyclic languages

N/A
N/A
Protected

Academic year: 2021

Partager "Cyclic languages and strongly cyclic languages"

Copied!
12
0
0

Texte intégral

(1)

HAL Id: hal-00619852

https://hal-upec-upem.archives-ouvertes.fr/hal-00619852 Submitted on 6 Oct 2011

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.

Cyclic languages and strongly cyclic languages

Marie-Pierre Béal, Olivier Carton, Christophe Reutenauer

To cite this version:

Marie-Pierre Béal, Olivier Carton, Christophe Reutenauer. Cyclic languages and strongly cyclic lan-guages. International Symposium on Theoretical Aspects of Computer Science (STACS 96), 1996, Grenoble, France. pp.49-59. �hal-00619852�

(2)

Strongly cyclic languages

Marie-Pierre Beal1, Olivier Carton2 and Christophe Reutenauer3 1 LITP - Institut Blaise Pascal, Universite Denis Diderot 2 Place Jussieu 75251 Paris cedex 05.beal@litp.ibp.fr

2 Institut Gaspard Monge, Universite de Marne-la-Vallee 93166 Noisy le Grand cedex.carton@univ-mlv.fr

3 Mathematiques, Universite du Quebec a Montreal C.P. 8888, succ. Centre-Ville, Montreal Canada H3C 3P8.

christo@catalan.math.uqam.ca

Abstract. We prove that cyclic languages are the boolean closure of languages called strongly cyclic languages. The result is used to give another proof of the rationality of the zeta function of rational cyclic languages.

1 Introduction

Cyclic languages and strongly cyclic languages are two classes of languages of nite words over a nite alphabet. A cyclic language is conjugation-closed and for any two words having a power in common, if one of them is in the language, then so is the other. A strongly cyclic language is the set of words stabilizing a subset of the set of states of a nite deterministic automaton, the subset stabilized depending on the word stabilizing it. One says that the language stabilizes the automaton. A strongly cyclic language is rational.

We prove that a rational cyclic language is a boolean combination of strongly cyclic languages. More precisely, each rational cyclic language can be written as a chain of strongly cyclic languages. This result allows us to extend the com-putation of the zeta function (and generalized zeta function) of strongly cyclic languages done in [Bea95] to the class of rational cyclic languages. The zeta function of a formal languageLis(L) = exp(P

an zn

n), wherean is the number

of words of lengthninL. The motivations of this de nition and the connections with algebraic geometry and symbolic dynamics are discussed in [BR90]. The zeta function of a strongly cyclic languageL is equal to the zeta function of the so c system de ned by the nite automaton stabilized byL. The rationality and computability of the zeta function of a so c system have been established in [Bow78] and [Man71]. The formula of computation given in [Bow78] are proved in [Bea95] by the use of a construction on nite automata called external power. The rationality of the zeta function of a rational cyclic language has been es-tablished in [BR90]. The result we give here leads to another proof and to a di erent computation.

(3)

We assume that the reader knows the basics of formal languages (see [Eil72]). We also assume that the reader is familiar with the elementary notions of semi-group theory. For example, notions like syntactic monoid, Green relations, regu-larD-classes, minimal ideal and 0-minimal ideal are supposed to be known. We

refer to [Lal79] and [Pin86] for a presentation of this subject.

The paper is organized as follows. Section 2 and 3 give the basic properties of cyclic languages and strongly cyclic languages. The chain-decomposition of a rational cyclic language in strongly cyclic languages is established in section 4. The computation of the zeta function and the generalized zeta function is done in the last section.

2 Cyclic languages

In this section, we introduce cyclic languages and give some basic properties. In the following, we denote byAa nite alphabet. In the sequel,Mwill always de-note a nite monoid. Every elementsofMhas a power which is an idempotent. We denote bys!this idempotent.

De nition1.

A languageLofA is said to be cyclic if it satis es 8u2A ; 8n >0 u2L ,un2L 8u;v2A  uv 2L,vu2L

A language is cyclic if it is closed under conjugation, power and root. IfLis a submonoid ofA which is cyclic, it is then pure [BP84].

Example 1. IfA =fa;bg, the languageL =A

aA=A b of words having

at least oneais cyclic. Example 2. The language

L=fapbn 1an2bn2:::ankbnkaq jni0 andp+q=n 1 g[ fbpan 1bn1an2bn2:::ankbq jni0 andp+q=nkg

is cyclic but not rational.

We will now only consider rational cyclic languages. Rational cyclic languages have the following straightforward characterization in terms of nite monoids.

Proposition2.

Let LA

 be a rational language. Let ':A

!!M be a

mor-phism from A onto a monoidM such that L = ' 1(P). The languageL is

cyclic if and only if

8s2M; 8n >0 s2P ,sn 2P 8s;t2M st2P , ts2P

From the previous characterization, we deduce some useful facts about the structure of the image of a rational cyclic language onto a nite monoid recog-nizing this language. We also deduce a property of the syntactic monoid of a cyclic language.

(4)

Corollary3.

Let ': A

!!M be a morphism from A

 onto a monoidM such

thatL=' 1(P). LetH a regular

H-class ofM. One hasH P orH\P =;.

Proof. Let us suppose h1

2 H belongs to P. For anyh 2

2 H, we have h! 1 =

h!

2 =ewhereeis the idempotent ofH. We then haveh

! 1 =h ! 2 2P andh 2 2P.

Corollary4.

Let ': A !!M be a morphism from A

 onto a monoidM such

thatL=' 1(P). LetH

1 andH2 be two regular

H-classes of a regularD-class.

If one hasH1

P, one also has H 2

P.

Proof. Lete1ande2be the respective idempotents ofH1andH2. As two

idem-potents of a sameD-class are conjugated (see [Pin86]), there are two elements

x1 andx2 ofM such that x1x2 = e1 and x2x1 = e2. If H1

 P, we have

e1=x1x2

2P and thene

2=x2x1

2P and theH-classH

2 satis esH2

P by

the previous corollary.

Corollary5.

The syntactic monoid of a cyclic language has a zero.

Proof. LetMbe the syntactic monoid of a rational cyclic language and letDthe minimal ideal ofM. Then D is a completely regularD-class. By the previous

corollary, we have D  P or D\P = ;. Let s be an element ofD. For any

x;y 2 M, we havexsy 2D because D is the minimal ideal ofM. If we have

D P, the contexts ofsareMM. If we haveD\P =;, the contexts ofs

are ;;. In both cases, all the elements ofD are equivalent for the Nerode

congruence, andDhas only one element. The syntactic monoid ofLhas then a zero.

3 Strongly cyclic languages

We now de ne the notion of a strongly cyclic language.

De nition6.

LetA= (Q;A;E) be a deterministic nite automaton whereQ

is the set of states andE the set of transitions. We say that a wordwstabilizes a subsetP Qof states if we haveP:w=P. This means

8p2P p:w2P

8p 0

2P 9p2P p:w=p 0

We denote by Stab(A) the set of the wordsw such thatw stabilizes a

sub-setP of states in the automatonA. It should be noticed that in this de nition

the subsetP of states stabilized byw may depend onw. We point out that the empty word"stabilizes the setQand therefore belongs to Stab(A) for any

automatonA. We say that a languageLis strongly cyclic if there is an

automa-tonAsuch thatL= Stab(A). In this case, we say that the languageLstabilizes

the automatonA. The terminology is justi ed since strongly cyclic languages are

cyclic. It could be proved directly but we shall obtain this fact as a consequence of the characterization of strongly cyclic languages.

(5)

1 1 2 a b A 1 A 2 b

Fig.1.AutomataA1 andA2

Example 3. The languages (b+aa)+ (aba)+a andb are respectively the

strongly cyclic languages associated with the automataA 1and

A

2 of Figure 1.

The following result gives a characterization of the wordsw stabilizing a subset of states in an automaton.

Proposition7.

LetA= (Q;A;E) be a deterministic nite automaton. A wordw

stabilizes a subsetP of states inAif and only if there is some stateqofAsuch

that for any integern, the transitionq:wn exists.

Proof. Suppose rst that the wordw stabilizes the subsetP of states. By de -nition, for any statep2P, the transitionp:wn exists.

Conversely, suppose all the transitionsq:wnexist for some stateqofA. Since

the automaton is nite, there are two integersl < msuch thatq:wl=q:wm. Let

P be the setfq:wi jlimg. It is straightforward that the wordwstabilizes

the subsetP.

The following theorem gives a characterization of the strongly cyclic lan-guages.

Theorem8.

LetLbe a rational language di erent fromA. The following

con-ditions are equivalent.

1. The languageL is strongly cyclic.

2. There is a morphism ' from A onto a monoidM having a zero such that

L=' 1(

fs2M js!6= 0g).

3. The syntactic monoidM(L) ofL has a zero and the image ofLin M(L) is

fs2Mjs!6= 0g.

Proof. Suppose rst that the language stabilizes the automatonA. Let M the

transition monoid ofA and ' the canonical morphism from A

 ontoM. We

show then that this monoid has a zero and that the image ofL is equal to

fs2 M j s! 6= 0g. Letw be a word not belonging toL. By Proposition 7, for

eachq2Q, there is an integernq such that the transitionq:wn

q does not exist.

For n greater than everynq, the transitions q:wn do not exist for anyq. The

(6)

is a zero of the monoidM. This means that '(w)! = 0. On the contrary, for

any wordw2L, the transition induced bywn is not the empty transition since

there is a state q 2 Q such that the transition q:wn exists. This proves that

'(w)!6= 0. We have then proved thatLis equal to' 1(

fs2Mjs!6= 0g)

Suppose now there is a morphism'fromAonto a monoidN having a zero

such thatL=' 1(

ft2N jt!6= 0g). Since the morphism is onto, the syntactic

monoidMofLis a quotient ofN: there is morphism :N!!MfromNontoM.

The image (0) of the zero ofNis then a zero ofM. Since the zero ofNdoes not belong to the image ofL, the zero ofMdoes not belong to the image ofL. Lett

a element ofN such thatt!= 0. We have (t)!= (t!) = 0. On the contrary,

if t! 6= 0, the element t! belongs to the image ofL, and so does (t!). This

implies (t!)6= 0. Finally, we haveft2N jt!6= 0g= 1(

fs2Mjs!6= 0g).

Suppose that the syntactic monoid M ofL has a zero and that the image ofL in M isfs2M j s!6= 0g. We denote by'the canonical morphism from

AontoM. We build the following deterministic automaton

A= (Q;A;E). The

set of states ofA is the setQ=M f0gof the non-zero elements ofM. The

transitionq:aisq:a=q'(a) ifq'(a)6= 0 and does not exist otherwise. It can be

easily checked that a transitionq:w is q:w=q'(w) if q'(w)6= 0 and does not

exist otherwise. We show now that the languageLstabilizes the automatonA.

Letw a word inL. For q ='(w), the transitionq:wn is q:wn ='(w)n+1 and

exists since'(w)n+1

6

= 0. On the contrary, for a wordw not inL, there is an integerm such that '(w)n = 0. The transition q:wn does not exist for anyq.

By the previous Proposition, the languageL stabilizes the automatonL. This nishes the proof.

Corollary9.

The previous characterization shows that strongly cyclic languages are cyclic. 1 P * * b

Fig.2.Structure of the syntactic monoid ofL.

The previous theorem can be used to prove that a given language is not strongly cyclic. Without this characterisation, such results are sometimes hard to obtain.

Example 4. The syntactic monoid of the languageL=AaAis the two elements

(7)

The image ofLinM is the singletonf0gand the previous theorem states that

the languageLis not strongly cyclic.

4 Decomposition of cyclic languages

In this section, we prove the main result.

By the de nition of cyclic languages, a boolean combination of cyclic lan-guages is still a cyclic language. In particular, a boolean combination of strongly cyclic languages is a rational cyclic language. The following result gives some converse.

Theorem10.

Any rational cyclic language is a boolean combination of strongly cyclic languages.

The proof of the theorem is based on the following lemma. By a strict quotient ofM, we mean a quotient which is strictly smaller thanM.

Lemma11.

Let L be a rational cyclic language and ' : A

!!M a morphism

fromAonto a nite monoidMsuch thatL=' 1(P). Let suppose furthermore

that the monoidM has a zero and that this zero does not belong toP.

Then, eitherLis recognized by a strict quotient ofMor there exists a strongly cyclic languageL0 such thatL

L

0 and such that the languageL0 Lis

recog-nized by a strict quotient ofM.

In both cases, the zero of the quotient does not belong to the image of the language (L in the rst case andL0 Lin the second case).

Proof. Let P the image ofL inM. SupposeD1;:::;Dn are the 0-minimal D

-classes ofM. For anys2Diand x;y2M, we havexsy= 0 orxsy2Di.

SupposeD1satis esD1

\P =;. For anyx;y2M, we havexsy62P. All the

elements ofD1are equivalent to 0 by the Nerode congruence. The languageLis

then recognized by the Rees quotientM=I whereI is the idealI =D1 [f0g.

We can suppose that everyDi satis es Di\P 6=;. There exists then si 2

Di\P. Since si 2 P, the idempotent s!i is not zero and belongs then toDi

because thisD-class is 0-minimal. The elementsi belongs then to a regularH

-classHi ofDi. Let s be an element ofDi. If s! = 0, the elements does not

belong toP because 0 does not belong toP. On the contrary, If s! 6= 0, the

elements belongs to a regular H-classH 0

i ofDi. Since Hi \P 6= ;, we have

HiP andH 0

i P by Corollaries 3 and 4. Finally, we have proved that

Di\P=fs2Dijs!6= 0g

LetP0 be de ned byP0 =

fs2M j s!6= 0g. By Theorem 8, the language

L0 = ' 1(P0) is strongly cyclic. It is straightforward that P  P

0. Since we

haveDi\(P

0 P) =

;, the languageL

0 Lis recognized by the Rees quotient

M=I where the ideal is equal tof0g[ Sn

i=1Di. This quotient is strictly smaller

(8)

The following lemma states that the class of strongly cyclic languages is closed under union and intersection.

Lemma12.

Let L1 and L2 be two strongly cyclic languages. Both languages

L1 [L

2 andL1 \L

2 are then strongly cyclic.

Proof. We suppose that L1 andL2 respectively stabilizes the automata A

1 =

(Q1;A;E1) and A

2 = (Q2;A;E2). We can suppose that Q1 \Q

2 =

;. The

languageL1 [L

2stabilizes then the automaton A 1 [A 2. The languageL1 \L 2

stabilizes the automatonA 1

A 2= (Q1

Q

2;A;E3) where the transitionE3is

de ned by (p1;p2):a= (q1;q2) if the transitionsp1:a=q1 andp2:a=q2exist.

We can now complete the proof of the theorem.

Proof. We prove that every cyclic languageL can be written as a chain of strongly cyclic languages. This means that there are strongly cyclic languages

L1;:::;Ln satisfyingL1 L 2 Ln such that L=L1 L2+L3 Ln

We prove the result by induction on the size of a nite monoidM having a zero and recognizing the languageL. We suppose that there is a morphism':

A

!!MfromA

onto a nite monoidMsuch thatL=' 1(P). We also suppose

that the monoidM has a zero. By Corollary 5, the syntactic monoid ofL has this property. If the monoidM has only one element, the languageLis either;

orAwhich are both strongly cyclic. The empty language

;stabilizes the empty

automaton. The full language stabilizes the automaton having one state and a transition for each letter from this state to this state.

If the zero ofM belongs to the image ofL inM, we replace L by A L

which is also cyclic. It is then sucient to prove the result forA L. Indeed, if

the complementA LofLcan be written as a chainA L=L 1 L2+

Ln,

the languageLcan be writtenL=A L 1+L2

Lnwhich is also a chain

of strongly cyclic languages.

We can now suppose that the zero ofMdoes not belong to the imageP ofL

inM. By Lemma 11, either L is recognized by a strict quotient of M and the induction hypothesis immediately applies or there is a strongly cyclic languageL0

such that L0 L is recognized by a strict quotient ofM. By the induction

hypothesis, the language L0 L can be written as a chain of strongly cyclic

languages, i.e.,L0 L=L

2 L3+

Ln. The languageLcan be then written

as the chainL=L1 L2+

Ln where the languageL

1is equal toL 0

[L 2

which is strongly cyclic by Lemma 12.

We point out that the zero of the smaller monoid recognizing L0 L does

not belong to the image ofL0 L. It is not necessary to replace this language

by its complement any more. We give here an example.

(9)

* * * a * * 1 * ab bab = 0 P P’ aab b aa aba ba

Fig.3.Structure of the syntactic monoid ofL.

Example 5. LetLbe the language (b+aa)+ (aba)+a b. The structure

of the syntactic monoid ofLis given on gure 3. The imageP ofLin M(L) is equal toP =fa;aa;aba;aabg.

The subsetP0 de ned in the proof is equal toP0 =

f1;a;aa;b;aba;aabgand

the languageL0 is (b+aa)+ (aba)+a. The languageL0 L is then equal

tobwhich is strongly cyclic. The languagesL0andL0 Lstabilize respectively

the automataA 1 and

A

2 (see Figure 1 p. 4).

We have directly proved that every rational cyclic language can be written as a chain of strongly cyclic languages. In fact, it is just necessary to prove that rational cyclic languages are boolean combination of strongly cyclic languages. A general result states that if a classF of sets is closed under union and

in-tersection, every set belonging to the boolean closure ofF can be written as a

chain of sets ofF. For further details see [Car93] (chapter 3).

5 Zeta function of a cyclic language

We rst give the de nitions of generalized zeta function and zeta function of a language of nite words over a nite alphabetA.

If A is a nite alphabet, we note

Z

hhAii (resp.

Z

[[A]]) the algebra of non

commutative (resp. commutative) formal series with coecients in

Z

over the alphabetA. The subset of non commutative polynomials is denoted by

Z

hAi. We

note' the natural algebra homomorphism from

Z

hhAii to

Z

[[A]] which makes

the letters commute. For example,'(2ab 3ba) = ab. We notethe morphism from

Z

[[A]] to

Z

[[z]] de ned by(a) =z for each letteraofA.

(10)

LetLbe a language of nite words overA, we noteLthe characteristic series ofL. This series belongs to

Z

hhAiiand admits the decomposition:

L= X

w2L

w=X

n0

Ln;

whereLn is the homogeneous part of degreenofL.

De nition13.

The generalized zeta function of a languageLover the alphabet

Ais now the following commutative series:

Z(L) = exp(X

n1

'(Ln)

n ):

De nition14.

The zeta function of a languageL over the alphabet A is the following series :

(L) =(Z(L)) = exp(X

n1

anzn

n );

wherean is the number of words ofLof lengthn.

It is shown for example in [Bea95] that the generalized zeta function of a strongly cyclic languageLof an automatonAis the generalized zeta function of

the so c system de ned byA, that is the set of bi-in nite words that are labels

of bi-in nite paths of A. The zeta function of a so c system counts periodic

orbits of the symbolic dynamic system. The zeta function of a strongly cyclic language is a rational series. The computation of the generalized zeta function and the zeta function of a strongly cyclic language was done in [Bea95] by using a construction on nite automata called external power.

If A= (Q=f1;2;:::;ng;E;T) is a deterministic automaton, the external

power of order k, where 1  k  jQj, of the automaton A is the automaton

(Q0;E0) labelled in f 1;1gA, where Q 0 = f(i 1;i2;:::;ik)1i 1<i2< <i k n g.

There exists an edge labelled()afrom (i1;i2;:::;ik) to (j1;j2;:::;jk) if for each

lwith 1 l k, there exists one edge in E labelled a going out from il and

(j1;j2;:::;jk) is the image of (i1

a;:::;ika) by a permutation  of signature

(). The automatonAis equal to its external power of order 1 by identi cation

of +atoa. The matrix associated to an automaton labelled onf 1;1gAis the

square matrix (xij)1i;jn wherexpqis the sum (in

Z

hAi) of the labels of edges

fromptoq. The commutative matrix associated is the matrix ('(xij))1i;jn.

We denote byQi the commutative matrix associated to the external power

of orderiof the automatonA. We then have (see [Bea95])

Z(L) =Yn

i=1

(det(I Qi))( 1) i

(11)

Computation of the zeta function of a cyclic language

The result of section 4 can be used to extend the previous computation of zeta functions of strongly cyclic languages to all cyclic languages. This gives an other proof of the rationality of the zeta function of a cyclic language established in [BR90]. The computation is the following:

LetL be a cyclic language. By section 4 it can be written as a chain L1

L2+

+ ( 1)r 1L

r, where Lj+1

Lj for 1 j (r 1) and where all Lj

are strongly cyclic languages. By de nition of the generalized zeta function we have: Z(L) = exp(X n1 '(Ln) n ) = exp(X n1 r X j=1 ( 1)j 1 '(Ljn) n ) = exp(Xr j=1 ( 1)j 1 X n1 '(Ljn) n ) =Yr j=1 exp(X n1 '(Ljn) n )( 1) j 1 =Yr j=1 (Z(Lj))( 1) j 1 :

Example 6. We compute the generalized zeta functionZ(L) and the zeta function

(L) of the cyclic language L = (b+aa)+ (aba)+a b introduced in

example 5. The languageLadmits the chain-decompositionL=L1 L2where

L1= Stab( A

1) (see gure 1) andL2= Stab( A

2) (see gure 1). We get:

Z(L1) = j1 +aj 1 b a a 1 Z(L2) = 1 j1 bj Z(L) = Z(L1) Z(L2) = (1 +a)(1 b) 1 b aa (L) = 1 z2 1 z z2:

References

[Bea93] Marie-Pierre Beal. Codage symbolique. Masson, 1993.

[Bea95] Marie-Pierre Beal. Puissance exterieure d'un automate deterministe, ap-plication au calcul de la fonction z^eta d'un systeme so que. R.A.I.R.O.-Informatique Theorique et Applications, 29(2):85{103, 1995.

(12)

[Bow78] Rufus Bowen. Symbolic dynamics. In On axiom A di eomorphism, num-ber 35 in CBMS Reg. Conf. American Mathematical Society, 1978.

[BP84] Jean Berstel and Dominique Perrin. Theory of codes. Academic Press, 1984. [BR90] Jean Berstel and Christophe Reutenauer. Zeta functions of formal languages.

Trans. Amer. Math. Soc., 321:533{546, 1990.

[Car93] Olivier Carton. Mots in nis, !-semigroupes et topologie. These, Universite Paris 7, 1993. Rapport LITP-TH 93-08.

[Eil72] S. Eilenberg. Automata, languages and machines, volume A. Academic Press, New York, 1972.

[Lal79] Gerard Lallement. Semigroups and combinatorial applications. Wiley, 1979. [Man71] A. Manning. Axiom A di eomorphisms have rationnal zeta fonctions. Bull.

London Math. Soc., 3:215{220, 1971.

[Pin86] Jean-Eric Pin. Varieties of formal languages. North Oxford, London and Plenum, New-York, 1986. (Traduction deVarietes de langages formels).

Figure

Fig. 1. Automata A1 and A2

Références

Documents relatifs

In [10], quasi-cyclic codes are regarded as concatenation of cyclic codes, while in [13], the authors regard them as linear codes over an auxiliary ring.. In [5], the approach is

The method consists in employing the cyclic complex nonlinear normal mode, solution of Equations (17) and (18) (for the nodal diameter h ex and the mode p).. The Equation (20b) does

Given a sample of trees independently drawn according to an un- known stochastic language P , we aim at finding an estimate of P in a given class of models such as probabilistic

We study the intermediary MA output by DEES and show that they compute ra- tional series which converge absolutely to one and which can be used to provide stochastic languages

In this section, we study the representation of these classes by means of multiplicity automata: given a subclass C of rational stochastic languages over K, is there a subset

Once the code is given, its minimum distance can be calculated using the existing MAGMA procedures. This latter operation is very time consuming for larger codes, hence we

Reducible cyclic codes of rank 2 over Z p m are shown to have exactly two Hamming weights in some cases.. Their weight distribution is

In particular, we focus on the function Γ Q (n, `, k, q), that is defined to be the largest number of nonzero weights a quasi-cyclic code of index gcd(`, n), length n and dimension