SOOCHOW JOURNAL OF MATHEMATICS Volume 20, No. 3, pp. 279-296, July 1994 LANGUAGES DEFINED BY TWO FUNCTIONS BY H. J. SHYR AND S. S. YU Abstract. Let + be the free semigroup generated by an alphabet X consists of at least two letters. A word f 2 X + is primitive if f can not X be expressed as a power of any other word. We let be the set of all primitive words over It is known that every word can be expressed uniquely as = n where is primitive and 1 Thus we dene two functions and from + into + and from + into N as follows. For = n 2 1 ( ) = and ( ) = For a given language and 2 + if then we say that is completely ;reductable and will be call an annihilator of This work is a study of completely ;reductable languages. Properties of codes and disjunctive languages related to the two functions were also investigated. Q X: u u f u u f X f Q n L f n X u u X : X f u Q n: L L L: 1. Introduction and Preliminaries Throughout this work we let X be an alphabet consists of at least two letters. Let X be the free monoid generated by X: Let 1 be the empty word and let X + = X nf1g: Any element of X is called a word over X and any subset of X is called a language over X: The length of the word u is denoted by lg(u): For A B X let AB = fxyj x 2 A y 2 B g and A+ = A A2 : A code is a language L X + satisfying the following condition: If u1u2 un = v1 v2 vm where ui vj 2 L n m 1 i = 1 2 n j = 1 2 m implies n = m and ui = vi i = 1 2 n: Received December 15, 1992 revised July 28, 1993. Part of this research was supported by the National Science Council R.O.C. under Grant NSC81-0208-M005-08. 279 280 H. J. SHYR AND S. S. YU A particular kind of code called pre x code (sux code) is a set L X + such that L \ LX + = (L \ X + L = ): Every prex code (sux code) is a code but a code may not be a prex code and also not a sux code. By a 2;code L X + we mean that every two elements of L is a code. A code, by denition, is certainly a 2;code but a 2;code may not be a code. We call a word u 2 X + a primitive word if u = f n f 2 X + , n 1 implies n = 1: It is known that every word is a power of a primitive word and the expression is unique ( 1]). The set of all primitive words over X will be denoted by Q and for n 2 we let Q(n) = ff n j f 2 Qg: Since every word u can be writtten uniquely as u = f n where f is a primitive word and n 1 we are able to dene two functions as follows: For u = f n f 2 Q n 1 (u) = f and (u) = n: It has been shown that for a given word u 2 X + , u 6= an a 2 X one of ua and u must be primitive (see 2]). It is also known that for any u 2 X + and for any a b 2 X a 6= b either ua or ub is primitive. It has been proved that for any u 2 X + , a b 2 X a 6= b, either uab or uba is primitive ( 3]). If u 2 X + and x 6= y 2 X + are such that lg(x) = lg(y) (1=2)lg(u), then either ux or uy is primitive. In fact, for any n < lg(u), the language uX n contains at most two non-primitive words. For the case n < (1=2)lg(u), the language uX n contains at most one non-primitive word. By a word u to be non-overlapping we shall mean that the condition u = vx = yv x y v 2 X always imply that v = 1: If u is non-overlapping of length m, then for any n < m uX n Q and X n u Q: The converse is also true 3]. Thus if u is a non-overlapping word of length m, then (X X 2 X m;1 )u Q: This result leads to the idea that for a given language L X + it is interesting to LANGUAGES DEFINED BY TWO FUNCTIONS 281 know whether there is a word u 2 X + such that L u Q: Thus we dene the following: The language L is completely ;reductable if there is a word u such that L u Q: If the language L is completely ;reductable then the set (L) = fu 2 X + jL u Qg is not empty and the set (L) will be called the annihilator of the language L: In section 1 we list some useful known results which we need in the sequel. In section 2 we study some properties of the ;function and in section 3 we investigate some related languages. Section 4 and 5 are connection of disjunctive languages and codes related to our subject. The last section is devoted to study properties of some particular families of languages. In the following we present some known results which we need in the sequel. Lemma 1.1 ( 1]) (1) If uv = vu, u 6= 1, v 6= 1, then u and v are powers of a common primitive word. (2) For given f 6= g 2 Q f mgn 2 Q for all m 2, n 2. (3) If uv = vz , u, v, z 2 X and u 6= 1, then u = xy, v = (xy)k x, z = yx for some x, y 2 X and k 0. Lemma 1.2 ( 1]) If u and v have powers um and vn with a common initial segment of lenth lg(u) + lg(v) then u and v are power of a common word. Lemma 1.3 (see 2]) (1) If uv = f i, u, v 2 X + , f 2 Q, i 1, then vu = gi for some g 2 Q. (2) If f = 6 g f g 2 Q then gi f mgk 2 Q for all m 2 i 1 k 1: Lemma 1.4 (see 2]) Let u 2 X + u =6 an a 2 X: Then one of ua u must be primitive. 2. ;Function and ;Function For a set A X , we let (A) = f(x)j x 2 Ag and (A) = f(x)j x 2 Ag: 282 H. J. SHYR AND S. S. YU The ;function obeys the laws such as (xn) = n (x) for every x 2 X + and (A B ) = (A) (B ) for all A B X : A language A is ; (;)bounded if j(A)j < 1 (maxf(A)g n for some xed n): For a ;bounded language A we will use (A) to represent the number (A) = maxf(A)g. For any n 2 we have (Q(n) ) = Q: We call a language A X + global (coglobal) if (A) = Q ((A) = QnF for some nite set F Q:) The family of all global languages (coglobal languages ) will be denoted by Lg (Lcg ): A non-empty language A X + is a 2-code if and only if for any primitive word f 2 Q jf + \ Aj 1 ( 2], Proposition 10.1). From the denition of the map , it is easy to see that : L ! (L) is one to one if and only if L is a 2;code. Let L1 = faba ababag and let L2 = fa2 a3 g: Then j(L1 )j > j(L1 b)j j(L2 )j < j(L2 b)j: This indicates that by catenating a word u to a language L, the cardinality of (L) and the cardinality of (L u) does not have particular relations. But the following is true. Proposition 2.1 For any L X + and for any u 2 X + if L u Q then j(L)j j(L u)j: Proof. Suppose w1 =6 w2 2 L: If lg(w1 ) = lg(w2 ) and w1u w2 u 2 Q then w1 u = 6 w2 u: For if w1u = w2u then w1 = w2 a contradiction. On the other hand if lg(w1 ) = 6 lg(w2 ) then clearly w1 u =6 w2u: LANGUAGES DEFINED BY TWO FUNCTIONS 283 Corollary 2.2 For a completely ;reductable language L X + we have j(L)j j(L u)j for all u 2 (L): For a given word u 2 X + we dene a mapping u from X + into Q as follows: u (x) = (xu) x 2 X + : We have the following, Lemma 2.3 For any language L X + and for any u 2 X + the function u : L ! Q is one to one if L u Q: Proof. Suppose x y 2 L and u (x) = u (y): Then (xu) = (yu): By our assumption xu and yu are in Q we have xu = yu and x = y: Therefore u is one to one. Let us consider the case L = fabag and u = b: Then b : L ! Q is one to one but L b 6 Q: Thus the converse of the above lemma is not true in general. 3. Completely ;Reductable Languages In the begining of this section we give some denition which we need and then investgate some properties of -function and related languages. For any two languages A B X , (A) < 1 and (B ) < 1 may not imply that (AB ) < 1: The following is an example Let X = fa bg: Let A = fag and B = b(ab)+ . Then both (A) < 1 and (B ) < 1 but AB = (ab)+ and hence (AB ) = 1: A language A is said to be ;bounded reductable if there exists a language B such that AB is ;bounded, i.e., (AB ) n for some n 1: The free semigroup X + is not ;bounded reductable. This is true, since for any nonempty language B and for any w 2 B w+ w 2 X + B and hence X + B is not a ;bounded language. On the other hand, a+ a 2 X is ;bounded reductable. For if we take the language fbg = B then a+ B Q: We can even 284 H. J. SHYR AND S. S. YU consider the situation that for given A, the existence of language B such that AB Q: We rather like to do this for the more general setting. For a language A and n 1 we dene the language n (A) to be n (A) = fu 2 X + j A u Q(n) g: We will call n (A) the n-annihilator of A: For n = 1 we shall denoted 1 (A) by (A) and call it the annihilator of A: We will call a language A A X + completely ;reductable if (A) is not empty and (A) 6= f1g: Dyck language D and balanced languages H are examples of completely ;redcuctable languages. Since for any word x in the Dyck language or in any balanced language, the length of x is even. If we let B = fbg where b 2 X then the length of the word xb is odd and by the property of words in the Dyck language and balanced languages, we see that the word xb is in Q: Thus x B Q: The following related to global language is immediate. Proposition 3.1 A global language is not completely ;reductable. We note that if f 2 Q n 2 and L = Q(n) nff n g then the language L is coglobal and completely ;reductable. Example 1. Let a 2 X and we consider the following regular language L = fauaj u 2 X + u 2= a+g: The language L has the following properties. (1) For any u 2 X + L u 6 Q i.e., L is not a completely ;reductable language. This is true, for if u 2 X + u 2= a+ then, since aua 2 L and hence auau 2= Q: On the other hand if u = an for some n 1 then, since aban+1 aba 2 L we have L u 6 Q: (2) j(L)j = 1: To see this fact we need the known fact that for any two words x and y (x) = (y) () xy = yx: LANGUAGES DEFINED BY TWO FUNCTIONS 285 Now let aw1 a aw2 a 2 L and consider aw1 aaw2 a = aw2 aaw1 a: If lg(w1 ) = lg(w2 ) then by the above equivalence, we must have w1 = w2 : Thus if lg(w1 ) = lg(w2 ) and w1 6= w2 then (aw1 a) 6= (aw2 a): This shows that j(L)j = 1: (3) jQn(L)j = 1: This is true, as for b 2 X b 6= a we see that ba+ Qn(L) and jQn(L)j = 1: From the above example we are able to state the following: Proposition 3.2 There exists a regular language L which is not completely ;reductable with the condition that both (L) and Qn(L) are in nite sets. The above proposition indicate that a language L is completely ;reductable or not can not be determined just by the property of (L): Let L = fLj L X + L 6= g: and let Lg = fL X + j (L) = Qg L = fL X +j (L) = g From the above proposition we see that Lg L: Lemma 3.3 For any language L X + and for any u 2 X + the language L u is not coglobal. Proof. Since jQn(X + u)j = 1 we have jQnL uj = 1: Thus the language L u is not coglobal. Remark First we see that for a given n 2, the language Q(n) is global and hence not comlptetely ;reductable. On the other hand, for any primitive word f the language L = Q(n) nff n g is completely ;reductable. Let u = gm g 2 Q m 1: For any positive integer n 2 we consider the ;completely reductable language L = Q(n)nfgn g: We have that L f m 6 Q for any f 2 Q f 6= g and for any m 1: Thus (L) \ f + = for any f 2 Q f 6= g: It is easy to see that L f 6 Q: Thus the annihilator of the type of completely ;reductable language L = Q(n) nfgn g is (L) = gg+ or g+ : We 286 H. J. SHYR AND S. S. YU remark here that the annihilator of the language L = Q(n) nfgn g n 1 is a regular language. By using Lemma 1.1,(2) we see that for a language A, if n (A) 6= n 2 then (A) 6= : Thus we have the following: Proposition 3.4 Let L Q(n) n 2: Then L is completely ;reductable if and only if there exist a primitive word f 2 Q such that L \ f + = : Proof. If L \ f + = then follows from Lemma 1.2, L f 2 Q and L is completely ;reductable. Conversely if for every f 2 Q L \ f + 6= then L is global. By Proposition 3.1, L is not completely ;reductable. This completes the proof. We call a non completely ;redctable language L minimal non completely ;reductable if for every non completely ;redctable language L0 L0 L implies that L0 = L: Such a minimal non completely ;reductable language exists, in fact from the above proposition we see that for any n 2 the languages Q(n) are minimal non completely ;reductable languages. Proposition 3.5 ( 3]) Let u 2 X +: Let x y 2 X + x 6= y be such that lg(x) = lg(y) (1=2) lg(u): Then either ux or uy is primitive. Lemma 3.6 Let u 2 X +: Then (1) there exists a word w 2 Q such that wu 2 Q(2) (2) there exists a word w 2 Q such that wu 2 Q: Proof. (1) Let u 2 X +: Let a =6 b 2 X: Then by Proposition 3.5 either aua or bub is primitive. It follows that for w = aua or w = bub we have wu 2 Q(2): (2) Let u = f m f 2 Q m 1: Then for any g 2 Q g 6= f u(ug2 ) 2 Q: This shows that for any u 2 X + there exists a word w = (u2 g2 ) 2 Q such that wu = u2 g2 u = f 2m g2 f m 2 Q: We remark here that there exists a language L such that L Q but n(L) = for all n 2: In fact the language Q itself is such a language. This follows from the fact that for a given word u 2 X + there exists another word w 2 Q such that wu 2 Q: LANGUAGES DEFINED BY TWO FUNCTIONS 287 Proposition 3.7 For a given primitive word g 2 Q and for given i 2 n 1 there exists a primitive word f 2 Q such that (gn )f 2 Q(i) : Proof. Given i 2 n 1 if we take h 2 Q h =6 g then the word f = h2(gn+1 h2 )i;1 is primitive. This is true, for g = 6 h and n 1 by Lemma n +1 2 n +1 4 1.1, both g h and g h are primitves. Of couse h = 6 gn+1 h2: We then have h2 (gn+1 h2 )i;1 2 Q for all i 3: For the case i = 2 since gn+1 h4 2 Q by Lemma 1.3, h2 (gn+1 h2 ) 2 Q: Thus h2 (gn+1 h2 )i;1 2 Q for all i 2: It is clear that g = 6 h2(gn+1 h2)i;1 for all i 2: By 4], jg+ h2(gn+1 h2 )i;1 nQj 1: In here we also know that gn+1 h2 (gn+1 h2 )i;1 2 Q(i) for all i 2: Hence gh2 (gn+1 h2)i;1 2 Q: Therefore with the primitve word f = gh2 (gn+1 h2 )i;1 we have gn f 2 Q(i) : Proposition 3.8 Let L X + be such that j(L)j < 1: Then L is completely ;reductable. Proof. Let (L) = ff1 f2 fr g Q where r 1: Let m = maxflg(f1 ) lg(f2 ) lg(fr )g: Then for every fi 2 (L) and for every n 1 it is easy to see that fin (ab2k a) 2 Q for every k m: Thus L is completely ;reductable. Corollary 3.9 Every nite language is completely ;reductable. Proof. This is a direct consequence of the above proposition, since for every nite language L, (L) is nite. There are many innite regular languages which are completely ;reductable. To see this rst we call the language of the form uv+ w a regular component, where u w 2 X v 2 X + : Every innite regular language contains a regular component. Proposition 3.10 Let L = uv+ w u w 2 X v 2 X +: Then L is completely ;reductable. Proof. Let v = gn g 2 Q n 1: If uw = 1 then L = v+ = (gn )+: By 288 H. J. SHYR AND S. S. YU Lemma 1.1,(2), for any f 2 Q f 6= g L (gf 2 ) = (gn )+ (gf 2 ) Q and we are done. Now we consider the case wu 6= 1 and let wu = f m f 2 Q for some m 1: If g = f then for any word vi wu 2 v+ wu g+ gm vi (wu) 2 Q(k) for some k 2: By Lemma 1.3, uvi w 2 Q(k) for some k 2: That is, there exist g 2 Q which is a conjugate of g such that uvi w 2 g + g m : If we take h 2 Q h 6= g then by Lemma 1.1,(2), (uvi w)h2 2 Q and (uv+ w)h2 Q: Suppose g 6= f: Let x = vk (wu) 2 v+ (wu) k 1: Then x = gnk f m nk m 1: Let an integer j lg(g): If nk = 1 then by Proposition 2.12 ( 4]) gf m+jm 2 Q i.e., v(wu)(wv)j 2 Q: If nk 2 then by Lemma 1.1, (2), gnk f m+jm 2 Q i.e., vk (wu)(wu)j 2 Q: We then have (uvk w)(uw)j 2 Q for all k 1: This shows that there exists an integer j such that (uv+ w)(uw)j Q and we are done. In fact a nite union of regular components is completely ;reductable. To see this rst we prove the following lemma. Lemma 3.11 Let u w 2 X v 2 X +: Let u = qr : Let n = lg(uvw) and let f 2 Q be such that f s 2= uv+ w for all s 1 f not a conjugate of q: Then (uv+ w)f m Q for all m 4n + 2: Proof. For i 1 m 4n + 2 suppose uvi wf m = pj for some p 2 Q and j 1: By Lemma 2.1,( 4]), lg(p) > lg(f m;1 ) lg(f 4n+1 ) and lg(p) > lg(vi;1 ): If lg(uvi w) lg(f m;2 ) then j = 1: Now assume that lg(uvi w) > lg(f m;2 ): If j = 1 then we are done. Suppose on the contrary that j 2: Since lg(uvi w) > lg(f m;2 ) lg(f 4n), p = uvk x = ypm;1 for some x y 2 X with lg(x) < lg(uvwf ) = n + lg(f ): But since m ; 1 4n +1 we have uvk = yf m f 0 for some prex f 0 of f and m1 > 3 m = 3 lg(uvw): Thus qrk = vk and f m f 0 have a common initial segment of length greater than lg(f 2n ) lg(f ) + lg(v): 1 1 By the dual case of Lemma 1.2 , f is a conjugate of q, a contradiction. Thus the case j 2 can not hold true. Corollary 3.12 If a regular language L which is a union of a nitely many regular components, then there exist a word f 2 Q and an integer LANGUAGES DEFINED BY TWO FUNCTIONS 289 M such that L f m Q for all m M: In other word, L is completely ;reductable. If a language L X + is completely ;reductable, then the annihilator (L) is not an empty set. For the properties of annihilators of languages see 5]. Let L1 = fL X +j L 6= (L B ) = 1 for all 6= B X +g: For any language L X , we let 0 (L) = ff 2 Q j jf + \ Lj = 1g: Q: Proposition 3.13 Let L Si 2 Q(i): Then L 2 L 1 if and only if 0 (L) = Proof. ()) Let L 2 L1 and assume on the contrary that 0 (L) 6= Q: Let f 2 Qn0(L) and let n = (L \ f +): By the condition that L Si2 Q(i) for every x 2 L x = gi for some g 2 Q i 2: Clearly, gi ff 2 g 2 Q if g 6= f: And for the case g = f since f 2= 0 (L), 2 i n we have (L ff 2 g) n + 2: Which contradict that L 2 L1 : (() Suppose 0 (L) = Q: For every B = 6 let x 2 B and let x = f i for some f 2 Q i 1: Then since f 2 0 (L) we have jf + \ L f i j = 1: Thus (L B ) = 1: Proposition 3.14 Let L Q: Then L 2 L1 if and only if for any x 2 X + and for every n 2 N there exists an integer i n such that for some y 2 X y(xy)i 2 L: Proof. (() Consider any non-empty language B X + and let x 2 B: Then for some y 2 X + j(yx)+ \ L B j = 1: Hence (L B ) = 1: Thus L 2 L1: ()) If there exists some x 2 X + and an n 2 N such that whenever y 2 X with y(xy)i 2 L always implies that i < n then (L fxg) k n where x = f k for some f 2 Q: Thus L 2= L1 a contradiction. For any language L X + , if we consider L1 = LnQ and L2 = L \ Q then L = L1 L2 and L1 \ L2 = : 290 H. J. SHYR AND S. S. YU Corollary 3.15 For any L X + L 2 L1 if and only if L1 = LnQ satis es the condition in Proposition 3.13 or L2 = L\Q satis es the condition in Proposition 3.14. 4. Disjunctive Languages Related to the Two Functions and In this section we investigate disjunctive property related to the functions and : First we dene the principal congruence determined by a language and then dene the disjunctive languages on the free monoid. We recall that the alphabet consists of at least two letters. Let L X : We dene the so call principal congruence PL on X as follows: For every u v 2 X u v(PL ) () (xuy 2 L () xvy 2 L for all x y 2 X ): Then PL is a congruence. It is known that the language L is regular (i.e., L is accepted by an automaton ) if and only if PL is of nite index. The language L is a disjunctive language if PL is the equality. For the properties of disjunctive languages see 2]. If jX j 2 then for every n 1 Q(n) is a disjunctive language. In here Q is the set of all primitive words over X and Q(1) = Q f1g: A language L X is dense (right dense) if for every u 2 X there exist two words x y 2 X (a word y 2 X ) such that xuy 2 L (uy 2 L): By the denitions it is easy to see that every right dense language is a dense language. The language L dense is equivalent to that L contains a disjunctive subset. By a semi-discrete language L we shall mean that there exists a positive integer k such that jL \ X n j k for every n 1: When k = 1 the language L is called a discrete language. It is known that a semi-discrete dense language is disjunctive (see 2]). Following 2] we dene a partial order c on X by for every u v 2 X + u c v () v = xu = ux for some x 2 X : LANGUAGES DEFINED BY TWO FUNCTIONS 291 We call L an c;independent set if for every u v 2 L u 6c v and v 6c u: The language L is a 2-code if and only if L is a c;independent set (see 2]). It is easy to see that for a language L X + , : L ! Q is one to one if and only if the language L is c;independent. Proposition 4.1 ( 2] p219) Let A X . Then A is a dense if and only if (A) is dense. Proposition 4.2 A language A is a maximal c;independent set if and only if (A) = Q and j(f + \ A)j = 1 for all f 2 Q: Proof. Immediate. Since every disjunctive language is dense, we have the following: Corollary 4.3 For every disjunctive language L over X with more than one letter, j(L)j = 1: Lemma 4.4 Every coglobal language L is right dense. Proof. Let L be a coglobal language. Then by denition (L) = QnF for some nite language F Q: It is clear that for u 2 X + , there exists a word y 2 X + ( we can take a word y in which the length of y is longer than the maximum length of words in F ) such that uy 2 QnF: Since (L) = QnF by assumption, for some i 1 (uy)i 2 L: This shows that the language L is right dense. Proposition 4.5 Let L be an c;independent set (a 2-code). Then L is maximal if and only if L is global. Proof. Immediate. Proposition 4.6 Every global (coglobal) semi-discrete language is dis- junctive. Proof. Let L be a global (coglobal), semi-discrete language. Since L is global (coglobal) by Lemma 4.4 L is right dense and hence dense. L is then disjunctive, since every dense semi-discrete language is disjnuctive (see 2]). 292 H. J. SHYR AND S. S. YU Disjunctive languages such as Q(i) i 1 have the property that j(Q(i) )j = i: Hence function has little interconnection with the property of disjunctivity. Even a language L with j(L)j = 1, may not implies that the language L is dense. An example is, L = a+ (L) = N but L is not dense. Let D be the family of all disjunctive languages over X: It is possible to classify disjunctive languages by the concept of : For any two languages A B 2 D we dene A B () (A) (B ): It is easy to see that (Q(n)) = (Q) = Q for every n 2: Thus for any n 2 Q(n) is maximal in the order : For a given disjunctive langauge A and a primitive word f in A, Af = Anff g is disjunctive (see 2]). Hence the relation dened on D is innite on the left. We say that two disjunctive languages A and B are of the same degree if (A) = (B ): Proposition 4.7 Let L be a coglobal language, that is, (L) = QnF where F Q a nite language. If (L) = maxf(x)jx 2 Lg = maxf(L)g n for some n 1 then L is disjunctive. Proof. Let F X be a nite language such that r = maxflg(x)jx 2 F g: Suppose L is not a disjunctive language. Then, since Q is a disjunctive domain, see 2], there exist two words f 6= g in Q such that f g(PL ): Since PL is a congruence, we have f 2gr+n+1 f 3gr+n gr+n+3 (PL ): By the given condition (L) n gr+n+3 2= L, and hence f 2gr+n+1 2= L: Again, since PL is a congruence, for any i, (f 2 gr+n+1 )i (gr+n+3 )i (PL ): LANGUAGES DEFINED BY TWO FUNCTIONS 293 By (L) n we have (gr+n+3 )i 2= L for every i and (f 2 gr+n+1 )i 2= L for every i. The word f 2gr+n+1 is a primitive word, and lg(f 2gr+n+1 ) > r we see that f 2 gr+n+1 2 QnF: This contradict to that (L) = QnF: Corollary 4.8 Let L X be such that (L) < 1: Then the following are true: (1) If (L) = Q then L is disjunctive. (2) If L contains a maximal 2;code, then L is disjunctive. 5. Codes Related to the Two Functions and We have seen that every maximal 2;code ( c;independent set) is a global language. A prex code can never be global. This is true: for if L is global, then for every f 2 Q, there exists an n 1 such that f n 2 L: Since f nx 2 Q for some x 2 X + , we have (f n x)r 2 L for some r 1: L not a prex code is now clear. In fact we have the following: Proposition 5.1 There is no code which is a coglobal language. Proof. Let L be a code which is a coglobal language. Then by denition (L) = QnF where F Q is nite. Let k = maxflg(x)jx 2 F g and let f= 6 g 2 Q be such that lg(f ) lg(g) > k: Then f g 2= F and so f i gj 2 L for some i 1 j 1: Since f 2i g2j 2 Q and lg(f 2i g2j ) > k we must have (f 2i g2j )r 2 L: Now f i gj and (f 2i g2j )r are in L and L is not a code. Corollary 5.2 Every maximal c;independent set is not a code. It is known that for a code L, Ln is a code for any n 2: The following is not a direct consequence of the above notion. Proposition 5.3 Let L X + be such that (L) is a code. Then L is a code if and only if L is a 2-code. Proof. ()) Trivial. (() Suppose ju+ \ Lj = 1 for all u 2 (L): We want to show that L is a 294 H. J. SHYR AND S. S. YU code. Indeed, suppose u1u2 um = v1v2 vn for some ui vj 2 L. Let ui = fiki i = 1 2 m vj = gjhj j = 1 2 n where fi gj 2 Q, ki hj 1: Then f1k1 f2k2 fmkm = g1h1 g2h2 gnhn : Since fi gj 2 Q and (L) is a code by assumption, we have f1 = g1 : From u1 = f1k1 v1 = g1h1 = f1h1 2 L and L is a 2-code by assumption we must have k1 = h1 and u1 = v1: We then have u2 un = v2 vm : By similar argument we see that u2 = v2 un = vn and m = n: This shows that L is a code and our proof is completed. Remark: As a direct consequence of the above proposition we can make the following statements For a non-empty language L X + 1. If L is a 2-code and (L) is a code, then L is a code. 2. If L is not a code, then either L is not a 2-code or (L) is not a code. We call a code L X + a ;code if (L) is a code. The known codes like strong codes, solid codes and intercodes are examples of ;codes. For the denitions and properties of strong codes, solid codes and intercodes see 2]. We let L be the family of all ;codes. There are many prex codes which are not ;codes. For example, if X = fa bg then the prex code L = fa2 (ab)2 b2 g is not a ;code. It is known that two element set fx yg is a code if and only if the condition xy 6= yx holds true. But in general, to check a given nite set is a code or not is not easy. And sometime it is not decidable even the set is not very big. The above result is applicable in the sense that we can construct many dierent nite or innite codes. In fact we can construct ;codes in the following way: For a given n 2 let a code B be B = fu1 u2 u3 un g Q: LANGUAGES DEFINED BY TWO FUNCTIONS 295 Then the sets A = fv1 v2 v3 vn j vi 2 u+i i = 1 2 ng is a ;code and hence a code. We can construct dierent innite codes in the same manner. 6. Some Algebraic Properties of the Families of Languages In the following we discuss some algebraic properties of the families Lg , L , Lcg and L: If we consider L as L = fL j L 6= L X +g then L is a semigroup under catenation. The family L is known as the semigroup of languages. We have seen that Lg L : These two families of languages are not identical as we can see from the following example. Let X = fa bg: Then for any primitive word f 2 Q the language L = Qnff g is, by denition, not a global language. L is not completely ;reductable and hence L 2 L : For any languages L and L1 if L 2 Lg (L ) and L L1 then L1 2 Lg (L ): The three operations on languages and + are known as regular operations, where + is the catenation closure. Proposition 6.1 The family of all global languages Lg is closed under the regular operations. Proof. From the above remark we see that Lg is closed under union and catenation closure. That Lg closed under catenation is immediate. Proposition 6.2 The family of non completely ;reductable languages L is an ideal of L and is closed under the regular operations. Proof. Let A X + be such that A 2 L : Then by denition (A) = : We observe that for any word x 2 X + (A x) = and A x is not completely 296 H. J. SHYR AND S. S. YU ;reductable. Now for any nonempty language B X + and x 2 B Ax x2B A x = A B: Since (A x) = we have A B = : This show that L is a right ideal of L: That L is a left ideal follows from Lemma 1.1. Let A 2 L : As A A B for any nonempty set B X + and A A+ we have (A B ) = (A+ ) = : This shows that L is closed under union and catenation closure. L closed under catenation is immediate. References 1] R. C. Lyndon and P. Schutzenberger, Theequation M = N P inaFreeGroup, Michigan Math. J. 9 (1962) 289-298. 2] H. J. Shyr, FreeMonoidsandLanguages, Lecture Notes, Institute of Applied Mathematics, National Chung-Hsing University, Taichung, Taiwan, 1991. 3] H. J. Shyr and F. K. Tu, LocalDistributionofNon-PrimitiveWords, Proceedings of the SEAMS Conference on Ordered Structures and Algebra of Computer Languages (June 1991), (1993), 202-217. 4] H. J. Shyr and S. S. Yu, Non-PrimitiveWordsintheLanguage + + , (To appear). 5] H. J. Shyr and S. S. Yu, AnnihilatorsofLanguages, (To appear). a b p c q Department of Applied Mathematics, National Chung-Hsing University, Taichung, Taiwan.
© Copyright 2025 Paperzz