NON-PRIMITIVE WORDS IN THE LANGUAGE p 1. Introduction

SOOCHOW JOURNAL OF MATHEMATICS
Volume 20, No. 4, pp. 535-546, October 1994
NON-PRIMITIVE WORDS IN THE LANGUAGE p+q+
BY
H. J. SHYR AND S. S. YU
Dedicated to the memory of Professor Tsing-Houa Teng
Abstract. Primitive words on a free monoid X play an important role
in algebraic theory of codes and language theory. It has been shown that
if p and q are primitive words such that p 6= q then for some m 1 pqm
non-primitive always implies that pqm+k a primitive word for all k 2:
In this note we show that for two primitive words p 6= q, the language
p+q+ contains at most one non-primitive word. Moreover, if p and q are
two distinct non-overlapping primitive words, then p+q+ contain only
primitive words.
1. Introduction
Let X be an alphabet contains more than one letter. Let X be the free
monoid generated by X and X + = X nf1g where 1 is the empty word. For
a word u 2 X , let lg(u) denote the length of u. A word u 2 X + is called
a primitive word if u = f n, f 2 X + implies n = 1: It is known that every
word in X + is a power of a unique primitive word. The set of all primitive
words over X will be denoted by Q: For n 2 we let Q(n) = ff n j f 2 Qg: If
u = xy x y 2 X , then x is called a prex of u, y is called a sux of u and
the word v = yx is called a conjugate word of u: For a word u 2 X + by u+
we shall mean the set u+ = fu u2 u3 g: We also denote the set u+ f1g
Received February 2, 1994.
AMS Subject Classication. 68R15.
This research has been supported by the National Science Council R.O.C. under Grant
NSC 82{0208{M{005{024.
535
536
H. J. SHYR AND S. S. YU
by u . A word u 2 X + is said to be square-free if u 6= xv2 y for any x y 2 X ,
v 2 X +. And u is non-overlapping if u = vx = yv always implies that v = 1,
where x y 2 X + .
In this paper we investigate that for any two given distinct primitive words
p and q, whether or not p+q+ contains non-primitive words. We show that
p+ q+ contains at most one non-primitive word for any two distinct primitive
words p and q. We also study some properties of primitive words p and q such
that pq+q contains no non-primitive words. In addition, the conditions such
that p+ q+ Q, p qj (pr qj )m Q f(pr qj )m+1 g, or f +pj q+ pj Q for some
f p q 2 Q are investigated.
First we present some known results which we need in the sequel.
Lemma 1.1. (see 2]) Let uv = pi , u, v 2 X + , p 2 Q, i 1. Then
vu = qi for some q 2 Q.
Remark that in Lemma 1.1, q is a conjugate word of p.
Lemma 1.2. (1]) Let p q 2 Q with p 6= q. Then pmqn 2 Q for all
m 2, n 2.
Lemma 1.3. (1]) If uv = vu, u v 2 X + , then u and v are powers of a
common word.
Lemma 1.4. (1]) Let u v 2 X + . If u and v have powers um and vn with
a common initial segment of length lg(u) + lg(v), then u and v are powers of
a common word.
Lemma 1.5. (see 2]) Let p q 2 Q: If p2 = qk x for some k 2 and x a
prex of q, then p = q:
For the prex-sux dual of Lemma 1.5, we shall mean that if p2 = xqk ,
k 2 and x is a sux of q, then p = q.
Corollary 1.6. Let p q 2 Q. If pi = xqk y for some i k 2 and
x y 2 X such that lg(qk ) lg(p2 ), then p = q for some conjugate word q of
NON-PRIMITIVE WORDS IN THE LANGUAGE p+ q +
537
q. Moreover, if x = 1 or y = 1, then p = q. Here, lg(p) = lg(q) = lg(q).
Proof. By Lemma 1.1, qk yx = pi for some conjugate word p of p. Since
lg(qk ) lg(p2) = lg(p2 ), qk = pj p0 for some j 2 and a prex p0 of p. By
Lemma 1.5, q = p. Thus p = q for some conjugate word q of q. If x = 1, then
certainly p = q. If y = 1, then by the prex-sux dual of the previous proof,
p = q. Moreover, in either case, we have lg(p) = lg(q) = lg(q).
Lemma 1.7. (1]) 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.8. (2]) Let p q 2 Q, p 6= q and m 1: If pqm 2= Q then
pqm+k 2 Q for all k 2:
2. Main Results
In the following we show that for two distinct primitive words p q 2 Q
the set p+ q+ contains at most one non-primitive word. The proof is tedious
and hence we divide it into many steps.
Lemma 2.1. Let uqm = gk for some m k 1 u 2 X + q 2 Q and g 2 Q
with u 2= q+ : Then q 6= g and lg(g) > lg(qm;1 ):
Proof. It is clear that g 6= qj for any integer j 1. For if g = qj for some
j , then u 2 q+ a contradiction. The case m = 1 is trivial. Hence we need
only to consider the case that m 2: If k = 1, then clearly lg(q) > lg(qm;1 ).
Now, let k 2. If lg(g) < lg(qbm=2c ) then lg(qm ) > lg(g2 ). By Corollary 1.6,
q = g, a contradiction! If lg(qbm=2c ) < lg(g) < lg(qm;1 ), then g = q2qi for
some i bm=2c and q2 2 X + with q = q1 q2 for some q1 2 X + : Since uqm = gk ,
g = xqq1 = q2qi for some x 2 X : Thus q = q1 q2 = q2q1 and by Lemma 1.3,
q 2= Q a contradiction. Therefore, lg(g) > lg(qm;1 ):
Proposition 2.2. Let p q 2 Q, p 6= q: Then pqm 2 Q or pqm+1 2 Q for
m 1.
538
H. J. SHYR AND S. S. YU
Proof. Suppose pqm 2= Q. Then qmp = f k for some f 2 Q and k 2
by Lemma 1.1. Since p 6= q, f 6= q. Consider (qm p)q = f k q and we claim
that f k q 2 Q. Consider again qm p = f k . If m 2, from Lemma 2.1, we have
lg(f ) > lg(qm;1 ) which implies q p f . Hence f k q 2 Q by Lemma 1.5. If
m = 1, then q = f i x for some x p f . Hence f k q = f k+i x 2 Q by Lemma 1.5.
By Lemma 1.1, qm pq 2 Q implies that pqm+1 2 Q.
By Lemma 1.8 and Proposition 2.2, the following is now clear.
Corollary 2.3. For any p 6= q 2 Q, jpq+ \ Si2 Q(i)j 1.
Following Lemma 1.2, it is also clear that for q 2 Q, if u 2 X + and u 2= q+ ,
S
then juq+ \ i2 Q(i) j 1.
Proposition 2.4. For a given q 2 Q and for given k 2 m 1 there
exists a primitive word p 2 Q such that pqm 2 Q(k) .
Proof. For a given primitive word q and two integers k 2 and m 1,
if we take h 2 Q h 6= q and p = (h2 qm+2 )k;1 h2 q2 then clearly pqm 2 Q(k) and
p 2 Q:
Let p 6= q 2 Q. The case pq 2= Q clearly implies that p = gi x and q = ygj
for some g 2 Q, i j 0 with i + j 6= 0, and x y 2 X + with xy = g. For two
dierent primitive words p and q such that pqm 2 Q(k) for some m k 2, the
following proposition will give the relation between p and q.
Proposition 2.5. Let p 6= q 2 Q: If pqm = gk for some m k 2 and
g 2 Q then one of the following two statements hold:
(1) p = (xqm )k;1 x for some x 2 X + (2) p = (yx(x(yx)j+1 )m;1 )k;2 yx(x(yx)j+1 )m;2 xy and q = x(yx)j+1 for
some x 6= y 2 X + j 0:
Proof. If lg(g) > lg(qm ) then p = gk;1 x and g = xqmfor some x 2 X +:
That is, p = (xqm )k;1 x: Statement (1) then holds true.
If lg(g) < lg(qm ) then, by Lemma 2.1, lg(qm;1 ) < lg(g) < lg(qm ): Thus
NON-PRIMITIVE WORDS IN THE LANGUAGE p+ q +
539
there exist q1 q2 2 X + such that q = q1 q2 g = q2 qm;1 and pq1 = gk;1 :
Since m k 2, q = q1 q2 = q3q1 for some q3 2 X + : Lemma 1.7 implies that
q3 = xy q1 = (xy)j x q2 = yx for some x y 2 X and j 0: Since q 2 Q,
we have x y 2 X + and x 6= y. Thus q = x(yx)j+1 and p = gk;2 q2 qm;2 q3
= (q2 qm;1 )k;2 q2 qm;2 q3 = (yx(x(yx)j+1 )m;1 )k;2 yx(x(yx)j+1 )m;2 xy for some
x 6= y 2 X + and j 0: Statement (2) then holds true.
Corollary 2.6. Let q 2 Q and let u 2 X + with u 2= q+ and lg(u) lg(q).
If uqm = gk for some m k 2 and g 2 Q, then k = 2, m = 2, u 2 Q,
u = yxxy and q = x(yx)j+1 for some x 6= y 2 X + , j > 0. Moreover, x and y
are not powers of a common word.
Proof. If u 2= Q, then u = f i for some f 2 Q and i 2. By Lemma 1.2,
uqm = f iqm 2 Q. Thus if q 2 Q, u 2= q+ and uqm 2= Q, then u 2 Q. Now
our conditions satisfy Proposition 2.5. If m > 2 or k > 2, then lg(u) > lg(q)
and which is not the case. Hence, m = k = 2. Since lg(q) lg(u), the case
(2) of Proposition 2.5 must holds. Thus u = yxxy and q = x(yx)j+1 for some
x 6= y 2 X + and j > 0. Since q 2 Q, x and y are not powers of a common
word.
Corollary 2.7. For u 2 X + and q 2 Q, if lg(q) > lg(u), then uqm 2 Q
for all m 3.
Proof. Can be derived from Corollary 2.6 directly.
Corollary 2.8. If p 6= q 2 Q and p is non-overlapping or square-free,
then pqm 2 Q for all m 2:
Proof. From Proposition 2.5 that if pqm 2= Q for some m 2 then (i) p
is overlapping and (ii) qm is an inx factor of p, or xx is an inx factor of p
for some x 2 X + . Thus if p is non-overlapping or square-free, then pqm 2 Q
for all m 2:
Corollary 2.9. If p 6= q 2 Q and p and q are both non-overlapping, then
540
H. J. SHYR AND S. S. YU
p+q+ Q.
Proof. The above Corollary and Lemma 1.2 imply that (p+q+ n fpqg) Q. Now if pq = gm for some g 2 Q and m 1, then p = gi x, q = ygj
for some i j 0 and x y 2 X + such that xy = g. If i 6= 0, then p is not
non-overlapping. If j 6= 0, then q is not non-overlapping. If i = 0 and j = 0,
then pq = xy = g 2 Q. Thus if both p and q are non-overlapping words, then
p+q+ Q.
Remark that if p 6= q 2 Q and p and q are both square-free, then (p+ q+ n
fpqg) Q. Let X = fa bg. If p = aba, and q = bab, then both p and q are
square-free and pq 2 Q(3) .
From Proposition 2.4, for a given q 2 Q and integers k 2, m 1, we
can always nd a primitive word p such that pqm 2 Q(k) . But the previous
corollary implies that for a given p 2 Q and m 2, there exist no q 6= p 2 Q
such that pqm 2= Q. Moreover, there exist p 6= q such that q is not overlapping
and pqm 2= Q for some m 1. For example if we take p = ba3 b and q = a
where a b 2 X then pq3 = (ba3 b)(a3 ) 2 Q(2) :
Proposition 2.10. Let p 6= q 2 Q: Then pqm 2 Q for all m lg(p) + 1:
Proof. The given condition m lg(p) + 1 implies that m 2: Since
m lg(p) + 1 we have lg(qm ) > lg(p): Suppose pqm 2= Q: Let pqm = gk for
some g 2 Q. Then we see that k = 2: From Proposition 2.5, it must be of the
case (2). Therefore,
p = yx(x(yx)j+1 )m;2 xy
for some x y 2 X + and j 0. We then have
lg(p) = lg(yx(x(yx)j+1 )m;2 xy)
4 + (m ; 2) + 2(j + 1)(m ; 2)
4 + 3(m ; 2)
= 3m ; 2
2m > 2 lg(p)
NON-PRIMITIVE WORDS IN THE LANGUAGE p+ q +
541
a contradiction. Therefore, pqm 2 Q for all m lg(p) + 1:
Corollary 2.11. Let u 2 X + , q 2 Q with u 2= q+. Then uqm 2 Q for all
m lg(u) + 1.
Proof. If u 2 Q, then by Proposition 2.10, uqm 2 Q. Let u = pi for some
p 2 Q and i 2. Then by Lemma 1.2, uqm = pi qm 2 Q.
Corollary 2.12. Let p 6= q 2 Q: Then pqm 2 Q for all m 2 lg(p):
Proof. Since m 2 lg(p) lg(p) + 1, by Proposition 2.10, we have
pqm 2 Q:
Example. Let X = fa bg. If p = a and q = bab, then m = lg(p) = 1
implies that pq = abab 2= Q. Thus, if we want to make sure that m k lg(p)
and pqm 2 Q for all p 6= q 2 Q, then we must take k 2. Moreover,
m = lg(p) + 1 is the lower bound of pqm 2 Q with p 6= q 2 Q.
Proposition 2.13. For any p 6= q 2 Q with lg(p) = lg(q), we have
(p+ q+ n fpqg) Q.
Proof. By Lemma 1.2, pp+q+q Q. Assume that pqm = gk for some
g 2 Q and m k 2. By Corollary 2.6 and the condition lg(p) = lg(q), we
must have k = 2 and m = 2. Thus g = pq1 = q2 q for some q1 q2 2 X + with
lg(q1 ) = lg(q2) and q = q1q2. Hence, q1 = q2 and q = q12 2= Q, a contradiction!
Similarly, the case that pm q = gk for some g 2 Q and m k 2 is also
impossible.
Proposition 2.13 also means that for any p 6= q 2 Q with lg(p) = lg(q),
we have jp+ q+ n Qj 1. We have the following proposition as a conclusion of
the properties obtained in the previous part of this paper.
Proposition 2.14. For any p 6= q 2 Q, jp+ q+ \ Si2 Q(i) j 1.
Proof. We observe that for any p 6= q 2 Q, p+q+ = pq+q pp+q pp+q+ q fpqg. By Lemma 1.2, pp+q+ q Q. Now, if pq 2= Q, then by
S
Corollary 2.3, pq+q Q and pp+ q Q. Thus jp+ q+ \ i2 Q(i) j = 1. If pq 2 Q,
542
H. J. SHYR AND S. S. YU
S
then Corollary 2.3 implies that jp+ q+ \ i2 Q(i) j 2. We want to show that
S
S
jp+ q+ \ i2 Q(i) j = 2 can never be true. Assume that jp+ q+ \ i2 Q(i) j = 2.
Then we must have pqm1 = g1k1 and pm2 q = g2k2 for some g1 g2 2 Q and
m1 m2 k1 k2 2.
By Proposition 2.13, lg(p) 6= lg(q). We may assume that lg(p) > lg(q).
Since pm2 q = g2k2 and lg(p) > lg(q), by Corollary 2.6, p = x2 (y2 x2 )j+1 and
q = y2x2 x2y2 for some j > 0 and x2 6= y2 2 X + where x2 and y2 are not
powers of a common word.
For pqm1 = g1k1 , according to Proposition 2.5, we have the following two
cases: (I): By Proposition 2.5 (1), p = (x1 qm1 )k1 ;1 x1 for some x1 2 X + . Since
k1 m1 2, p = (x1qm1 )k1 ;1 x1 = x1qqm1;1 (x1 qm1 )k1 ;2x1 . Replacing the rst
q by y2 x2x2 y2, we have p = x1 (y2x2x2y2 )qm1 ;1 (x1qm1 )k1 ;2 x1 . If we consider
where the segment y2 x2 x2 y2 appears on the expression p = x2 (y2 x2 )j+1 , then
x1 = (x2 y2 )i x and x2y2 = xy for some x y 2 X and i 0. Since lg(xy) =
lg(x2 y2 ) = lg(y2x2) and
(x2 y2 )i
x1
x
x2
y2
y
y2
x2
x
x2
y
x2
y2
x
y2
::::::
x2
::::::
m
;
1
1
q (x1 qm1 )k1 ;2 x1
x1 y2 x2x2 y2 = (x2y2)i xyxyx, we have y2 x2 = yx = x2 y2 . By Lemma 1.3, x2
and y2 are powers of a common word. We then have p q 2= Q, a contradiction!
(II): By Proposition 2.5(2), p =(y3x3 qm1 ;1 )k1 ;2 y3 x3 qm1 ;2 x3 y3, q = x3 (y3 x3 )j1 +1
for some x3 6= y3 2 X + and j1 0 where m1 k1 2. If m1 > 2 or k1 > 2,
then p = y3x3 qz for some z 2 X + . Replacing q by y2 x2 x2 y2 , we have p =
y3x3 (y2x2x2 y2)z . If we consider y3x3 as x1 in the above case, then, similarly,
we have y2 x2 = x2 y2 and p q 2= Q, a contradiction! For the case m1 = 2 and
k1 = 2, we have p = y3x3x3y3. Since lg(p) > lg(q), j1 = 0. Thus q = x3 y3x3
and lg(q) > 12 lg(p). Hence, j = 1 or j = 2.
(i) : j = 1. That is, p = x2 y2 x2 y2 x2 and q = y2 x2 x2 y2 . In this case,
lg(x2 ) = lg(p) ; lg(q) = lg(y3 ). Since p = y3 x3 x3y3 = x2 y2x2 y2 x2 , x2 = y3
and x23 = y2 x2 y2 . That is, x3 = y2 x = x0 y2 for some x x0 2 X + with
NON-PRIMITIVE WORDS IN THE LANGUAGE p+ q +
543
lg(x) = lg(x0 ) = 21 lg(x2 ). But q = y2 x2 x2 y2 = x3 y3 x3 = y2xx2 x0 y2. Thus
x2 x2 = xx2x0 and then x2 = xx0 = x0 x. By the condition lg(x0 ) = lg(x),
x = x0. That is, x3 = y2x = xy2 . This implies that y2 and x are powers
of a common word. Thus x2 and y2 are powers of a common word, and
p q 2= Q, a contradiction!
(ii) : j = 2. In this case p = x2 y2x2 y2x2 y2x2 and q = y2 x2 x2 y2 . It is clear that
lg(y3 ) = lg(p) ; lg(q) = lg(x2 y2x2 ). Since p = x2 y2 x2 y2 x2y2 x2 = y3 x3 x3 y3,
y3 = x2y2x2 and y2 = x3x3. But q = x3 y3x3 = y2 x2 x2y2 = x3 x3 x2 x2 x3 x3 .
We have y3 = x3 x2 x2 x3 = x2 y2 x2 = x2 x3 x3 x2 . Thus x2 and x3 are powers
of a common word. That is, y2 and x2 are powers of a common word, and
then p q 2= Q, a contradiction!
S
Similarly, if lg(p) < lg(q), then jp+ q+ \ i2 Q(i) j = 2 can not hold true.
S
Therefore, jp+ q+ \ i2 Q(i) j 1.
3. Primitive Properties on the Languages p qj (pr qj )m and f +pj q+pj
Proposition 3.1. Let p 6= q 2 Q. Then piqj (pr qj )m 2 Q for j m 1,
i 0 and r 2 with i 6= r.
Proof. First, assume that i = 0.
Case 1: m = 1. By Lemmas 1.1 and 1.2, qj pr qj 2 Q.
Case 2: m 2. Let qj (pr qj )m = gn for some g 2 Q and n 1. Then since
pr qj (pr qj )m = (pr qj )m+1 = pr gn 2 Q(k) for some k m + 1 3 and r 2, by
Lemma 1.2, we must have n = 1. That is, qj (pr qj )m 2 Q.
Now, assume i > 0. Since qj (pr qj )m 2 Q and p 6= qj (pr qj )m for all
j m 1 and r 2, by Corollary 2.3, jp+ qj (pr qj )m n Qj 1. It is clear that
pr qj (pr qj )m 2= Q. Thus pi qj (pr qj )m 2 Q for all i > 0 with i 6= r.
Therefore, pi qj (pr qj )m 2 Q for all j m 1, i 0 and r 2 with i 6= r.
Proposition 3.1 shows that for r 2, j m 1 and for any two distinct
primitive words p and q, the language p qj (pr qj )m contains only one nonprimitive word (pr qj )m+1 .
544
H. J. SHYR AND S. S. YU
Proposition 3.2. Let p q f 2 Q with lg(p) > lg(q) and lg(p) > lg(f ).
Then f i pj qk pj 2 Q for all i k 1 and j 5 with f i 6= qk .
Proof. Clearly, f + \ p+ = and p+ \ q+ = . Let f ipj qk pj = gn for some
g 2 Q and n 1. By Lemma 2.1, lg(g) > maxflg(f i;1 ) lg(pj;1 ) lg(qk;1 )g.
Since lg(p) > lg(q) and lg(p) > lg(f ), j 5, we must have n 4. If
lg(f i ) > lg(qk ), then by Lemma 1.1, qk pj f i pj = gn for some conjugate word g
of g. Thus without loss of generality, we consider only the case lg(f i ) lg(qk ).
Case 1: n is even. If lg(f i ) = lg(qk ), then g n2 = f i pj = qk pj . This
implies that f i = qk , a contradiction! Now the case lg(f i ) < lg(qk ). In this
case g n2 = f i pj u = vpj for some u v 2 X + such that uv = qk . Consider
the following subcases: (i) lg(u) lg(p2 ). Since lg(p) > lg(q), u = qm q1
for some prex q1 of q, and m 2, there exists a conjugate word q of q
such that u = q2 qm for some sux q2 of q. By Lemma 1.5, p = q, that is,
lg(p) = lg(q ) = lg(q), a contradiction! (ii) lg(u) = lg(p). We then have
that qk = uv = pv = pf i p. That is, p2 f i = qk for some conjugate word q
of q. It is clear that lg(qk ) > lg(p2 ). Since lg(p) > lg(q) = lg(q ), k 2.
By Corollary 1.6, p = q, that is, lg(p) = lg(q ) = lg(q), a contradiction! (iii)
lg(u) < lg(p2 ) and lg(u) 6= lg(p). There exist p1 p2 2 X + such that p = p1 p2
and pj;2 u = p2 pj;1 or pj;3 u = p2pj;1 . Since j 5, j ; 3 2. Both cases
imply that p = p1 p2 = p2 p1 and p 2= Q, a contradiction!
Case 2: n = 3. That is, f i pj qk pj = g3 . Assume that lg(f i ) lg(g). Then
lg(g) > lg(pj ). We have that g = f mf1 = upj for some prex f1 of f and
u 2 X + . Then g = f 0fm = upj for some conjugate word f of f and a sux f 0
of f. Since lg(p) > lg(f ) = lg(f), m j 5, and by Lemma 1.4, f = p, that
is, lg(p) = lg(f) = lg(f ), a contradiction! Similarly, when lg(qk ) lg(g), we
consider the case qk pj f i pj and this also lead to a contradiction. Now suppose
that lg(f i ) < lg(g) and lg(qk ) < lg(g). (i) It is immediate that lg(g) 6= lg(pj ).
For if lg(g) = lg(pj ), then g3 = f i pj qk pj and g = pj 2= Q. (ii) If lg(pj ) > lg(g),
then lg(pj ) > lg(g) > lg(pj;1 ). That is, g = f i u = vqk p1 = p2 pj;1 for some
u v p1 p2 2 X + such that pj = uv and p = p1 p2 . If lg(f i ) lg(p2 ), then
NON-PRIMITIVE WORDS IN THE LANGUAGE p+ q +
545
f i = pmp0 for a conjugate word p of p, a prex p0 of p and m 2. Since
lg(p) > lg(f ), i > 2. By Corollary 1.6, f = p. Thus, lg(f ) = lg(p) = lg(p),
a contradiction! Now, let lg(f i ) < lg(p2 ). If f i = p2 or f i = p2 p, then the
condition f i u = p2 pj;1 implies that u = pj;1 or u = pi;2 . Thus v = p or
v = p2 . That is, vqk p1 = p2pj;1 = pqk p1 or p2 pj;1 = p2 qk p1 . Both cases
imply that p = p1 p2 = p2 p1 , and then p 2= Q, a contradiction! For the
case lg(f i ) < lg(p2 ) with lg(u) 6= lg(pm ) for any m 1, u = pr p3 for some
r (j ; 1) ; 2 2 and a prex p3 of p. We get g = f i u = f i pr p3 = p2 pj;1
and p = p3 p4 = p4 p3 for some p4 2 X + . Thus p 2= Q, a contradiction!
(iii) If lg(g) > lg(pj ), then lg(g) > maxflg(f i ) lg(pj ) lg(qk )g. It is clear that
lg(f i pj ) > lg(g). That is, g = f ipm p1 = p2 pj;m;1 y = xpj for some m < j , p1 2
X , p2 2 X + such that p1 p2 = p, and x y 2 X + with yx = qk . If m = 0, then
g = f i p1 = p2pj;1y = xpj . Thus lg(f i ) > lg(pj ) ; lg(p1 ) > lg(pj;1 ), and then
pj;1 = f r f 0 where p = p2p1 for some r and a prex f 0 of f . Since lg(p) > lg(f ),
r j ; 2 3. By Lemma 1.5, f = p. Thus lg(f ) = lg(p) = lg(p2 p1 ) = lg(p),
a contradiction! Now, assume m 1. If p1 6= 1, that is, g = f i pm p1 = xpi ,
then p = p1 p2 = p2 p1 . This implies that p 2= Q, a contradiction! Thus,
p1 = 1 is true. We then have g = f i pm = pj;my = xpj . If j ; m 2,
then, since f i = xpj;m and by Corollary 1.6, f = p, a contradiction! Now, if
j ; m < 2, then, since lg(g) > maxflg(f i ) lg(pj ) lg(qk )g, j ; m = 1 holds.
Thus g = py = xpj and lg(y) > lg(pj ) ; lg(p) = lg(pj;1 ). Since lg(p) > lg(q),
pj;1 = q0 qr for some r j ; 2 3, a conjugate word q of q and a sux q0 of
q. By Corollary 1.6, p = q and lg(p) = lg(q ) = lg(q), a contradiction!
Therefore, n = 1 must be true and if lg(p) > lg(q) and lg(p) > lg(f ), then
f ipj qk pj 2 Q for all i k 1 and j 5 with f i 6= qk .
Corollary 3.3. If p q and f are three dierent primitive words with
lg(p) > lg(q) and lg(p) > lg(f ), then f +pj q+pj Q for all j 5.
One open problem is that to characterize two primitive words p and q
such that pq+ and p+ q+ contain no non-primitive word. The results in this
paper have been applied to the papers 3] and 4].
546
H. J. SHYR AND S. S. YU
References
1] R. C. Lyndon and M. P. Schutzenberger, TheEquationaM = bN cP inaFreeGroup, Michgan
Math. J., 9(1962), 289-298.
2] H. J. Shyr, Free monoids and languages. Lecture Notes, Institute of Applied Mathematics, National Chung-Hsing University, Taichung, Taiwan, 1991.
3] H. J. Shyr and S. S. Yu, Annihilatorsoflanguages, (To appear).
4] H. J. Shyr and S. S. Yu, Languagesdefinedbytwofunctions, Soochow Journal of Mathematics, 20(1993), 279-296.
Department of Applied Mathematics, National Chung-Hsing University, Taichung, Taiwan.