Professional Documents
Culture Documents
Institute of Fundamental Mathematics, University of Rome, 00100 Rome, Italy
Institute of Fundamental Mathematics, University of Rome, 00100 Rome, Italy
North-Holland
3 March 1986
Aldo DE LUCA
Department of Applied Mathematics "'R. Caccioppoli", University of Napoli, Via Mezzocannone 8, 80134 Napoli, Italy
Communicated by L. Boasson
Received March 1985
Revised May 1985
We give a characterization of the partially commutative free monoids having an infinite number of square-free elements. We
prove that it is decidable whether a given partially commutative free monoid contains infinitely many square-free words.
1. Introduction
tional subsets of partially commutative free monoids (cf., for instance, [2,4,5] and references therein).
The main result of this article is a characterization of the partially commutative free monoids
containing an infinite number of square-free elements. It shows that it is effectively decidable
whether a given partially commutative free monoid
contains infinitely many square-free words.
2. Preliminaries
125
(ai~A,i>~0).
3 March 1986
A m o r p h i s m h : A* ~ B* is said to be square-free
if h(w) is square-free for all the square-free words
w ~ A*. Berstel [1] and C r o c h e m o r e [6] have given
tests to decide whether a given morphism, defined
on a finite alphabet, is square-free.
h(a) = h ( a 0 ) h ( a l ) . . . h ( a , )
126
....
V o l u m e 22, N u m b e r
INFORMATION
PROCESSING
v ( b ) = ac,
~,(c) = ad
LETTERS
3 March 1986
1 . . .am+n_
1 = am+nam+n+
1 . .am+2n_
1.
(1)
t = abcacbabcbac . . . .
then
am+n_2am+n_
1 = am+2n_2am+2n_
d = adbcacbdadbcbdac ....
Let us now suppose that condition (iii) is verified.
Since d is inalterable, it follows that L2(M(A, 0))
is infinite. W e observe that the same result can be
obtained in a m o r e direct way by considering the
sequence of D e a n [7] which is an infinite squarefree word over four letters a, b, c, and d without
the factors of length 2: ab, ba, dc, and cd.
Let us n o w suppose that condition (iv) is verified. Let b = b0blb 2 . . . be an infinite overlap-free
word on the alphabet (b, d}, that is, an infinite
word which contains no factor of the form xuxux
with x ~ {b, d}, u E (b, d}*. Such a w o r d exists,
as proved b y T h u e [11,12] (cf. also [9]). Let a =
a 0 a l a 2 . . . be the infinite word on the alphabet A
defined by
a 2 n ----- b n ,
!
a2n+l
if a2n = a2n+2
if
a2n 4= a2n+2
b,
if a2n = a2n+2 = d
(n >~ 0).
1. . .am+2n=amUamUa
1 . . .am+n_
1 = am+n+
+ n
a m+ 2,
m
1 . . .am+2n_l).
(~E (b,d}*).
defined b y
13(a) = acbd,
[3(b) = bcad,
13(c) = abd.
%,(a)=
ifa~Ai,
ifa~Ai,
2,
Alf3A2=~,
AIA2___0.
A*
M = M, M 2"
3 March 1986
(i=1,2).
where M i = 0 ( A * ) (i = 1, 2).
(aa, a 2 . . . .
Proof. By (2), all m ~ L 2 ( M ) can be factorized as
m = m l m 2 (m i ~ M i , i = 1, 2) and, obviously, m 1
and m 2 are square-free. This proves the inclusion
L2(M) G L 2 ( M 1 ) L 2 ( M 2 ) .
Let us n o w s u p p o s e that the inverse inclusion
does not hold true. Then there exist w o r d s % ~ A~',
w2 ~ A~, r, t, s ~ A* such that 0 ( w l ) ~ L2(M1),
~(w2) ~ L2(M2), s :~ A and
wlw2 -- rs 2 t.
128
, a n } x ( A \ ( a l , a2, . . , a , } ) ~ 0
3 March 1986
(a)
(b)
Acknowledgment
We wish to thank the anonymous referee for his
(or her) useful suggestions.
Appendix A
We want to show that if A = {a, b, c, d} and
0 = {(a, b), (b, c), (c, d)}, then L2(M(A, 0)) is
finite. Let us define the following subsets of A*:
R = qb-'(L2 ( M ( A , 0))),
R, = R \ 0 - ' 0 ( A * { a b c ,
dcb}A*),
R 2 = R, \ 0 - 1 0 (A * {ab, cd}A*).
The following facts only require some patience to
be verified. They can be derived from Figs. 1, 2,
and 3, which give the initial parts of the trees
representing abcA* c3 R, abA* n R1, and bA* n
R 2.
(1) If a b c s ~ R , s ~ A * ,
t sl >/12, then s dadbdacadab~ for some g ~ A*.
(2) Symmetrically, if rbcd ~ R, r ~ A*, ]r t >/
12, then r - ~cdadbdacada for some ~ c A*.
(3) If abs ~ R1, s ~ A*, Ist >7 12, then s - s0dc
g, where s o = dacadbda for some g ~ A*.
129
a/
%,
\b
abe
/
d/ .
all
all
II
b,,
2b
dc
,, a H
,,Ull
a
b ~e
3 March 1986
. b II
a/b-,.
c __ a ~
d/
c -- b~
~d
a~d
II
bll
Fig. 1. abcA* (~ R.
a~b
Ib
a--a
d~a
a tl
--c
a II
c/a
~ c
Fig. 2. abA* (~ R l.
L e t us n o w s u p p o s e t h a t R c o n t a i n s a w o r d w
such that I w l > 84. T h e n o n e c a n f a c t o r i z e w as
w = vlv2v3v4vsv6
with
Iv 1 [ = 11,
Iv6[ = 12
d<
c tl
b/
C~a
II
Iv21= [v41=8,
and
Iv5[=42,
[v3[ > 3.
d~
- ~ ( c d a d b d a c a d a b ) 2 g,
d~bll
Fig. 3. bA*~R 2.
130
r, s ~ A * ,
w h i c h is a c o n t r a d i c t i o n .
L e t us n o w s h o w that w: = v2v3v4 ~ R a. If it
were not true, o n e w o u l d h a v e w~ - tabs or wl -
I N F O R M A T I O N PROCESSING LETTERS
If w 1 -
s - sodcs,
g ~ A*,
IN I >/32,
dc~ ~ R ] ,
g - roab? ,
? E A*,
Ir [ >~ 22,
ab? ~ R~,
- sodcs',
s' E A*,
dcs' ~ R~,
s ' - roabr',
r'~ h*.
b d a c ( a d b d ) 2,
(dbda)2cadb,
(dbda)2dbd,
which is a contradiction.
By the s y m m e t r y of 0, o n e also has v3 ff A ' c A *
and, therefore, v3 ~ { a, d }*. This is a c o n t r a d i c t i o n
because v 3 is square-free a n d there exists n o
square-free w o r d of length larger t h a n 3 on a
two-letter alphabet. W e c o n c l u d e that R is finite
and, therefore, also L2(M(A, 0)) is finite.
3 March 1986
References
[1] J. Berstel, Sur les mots sans carr~ drfinis par un morphisme, in: Lecture Notes in Computer Science 71
(Springer, Berlin, 1979) 16-25.
[2] A. Bertoni, M. Brambilla, G. Mauri and N. Sabadini, An
application of the theory of free partially commutative
monoids: Asymptotic densities of trace languages, in: Lecture Notes in Computer Science 118 (Springer, Berlin,
198t) 205-215.
[3] P. Cartier and D. Foata, Probl~mes Combinatoires de
Commutation et Rdarrangements, Lecture Notes in
Mathematics 85 (Springer, Berlin, 1969).
[4] R. Cori and Y. Metivier, Rational subsets of some partially abelian monoids, Preprint No. 8418, U.E.R. de
Mathrmatiques et Informatique, Univ. de Bordeaux 1,
1984.
[5] R. Cori and D. Perrin, Sur la reconnaissabilit~ dans les
monoides partiellement commutatifs libres, RAIRO I.T.,
to appear.
[6] M. Crochemore, Sharp characterization of square-free
morphisms, Theoret. Comput. Sci. 18 (1982) 221-226.
[7] R. Dean, A sequence without repeats on x, x - l , y, v 1,
Amer. Math. Monthly 72 (1965) 383-385.
[8] M.R. Formisano, Mots infinis sans carr6 partiellement
abrliens sur trois lettres, Preprint No. 84.19, U.E.R. de
Mathrmatiques et Informatique, Univ. de Bordeaux 1,
1984.
[9] M. Lothaire, Combinatorics on Words, Encyclopedia of
Mathematics and its Applications 17 (Addison-Wesley,
Reading, MA, 1983).
[10] P. Pleasants, Nonrepetitive sequences, Proc. Cambridge
Phil. Soc. 68 (1970) 267-274.
[11] A. Thue, Ober unendliche Zeichenreihen, Norske Vid.
Selsk. Skr. 1. Mat. Nat. K1. Christiania 7 (1906) 1-22.
[12] A. Thue, Uber die gegenseitige Lage gleicher Teile gewisser
Zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. KI.
Christiania 1 (1912) 1-67.
131