Properties of Fibonacci Languages: S.S Yu, Yu-Kuang Zhao
Properties of Fibonacci Languages: S.S Yu, Yu-Kuang Zhao
www.elsevier.com/locate/disc
Abstract
The Fibonacci language Fu; v is the set of all Fibonacci words, where the rst word and the
second word in the Fibonacci sequence are u and v, respectively. We show that the language
Fu; v is context-free free. We also show that Fu; v is not dense if the word uv contains at least two
distinct letters. Let wi denote the ith Fibonacci word. When considering the Fibonacci language
Fa; b for two distinct letters a and b, we show that for k¿2 and 16i ¡ k, the word wi wi is not
a prex of the Fibonacci word wk . We also show that for k¿2, the language Fk = {wnk | n¿1}
is a code.
c 2000 Elsevier Science B.V. All rights reserved.
1. Introduction
Let X be a nite alphabet consisting of more than one element and let {a; b} ⊆ X . Let
X ∗ be the free monoid generated by X . Let 1 be the empty word and let X + =X ∗ \{1}.
The length of a word x is denoted by lg (x).
In this paper, for two words u; v ∈ X + , we consider the following two types of
Fibonacci sequences of words:
(1) w1 = u; w2 = v; w3 = uv; : : : ; wn = wn−2 wn−1 ; : : : ;
(2) w10 = u; w20 = v; w30 = vu; : : : ; wn0 = wn−1
0 0
wn−2 ;::: .
Clearly, lg (wi ) ¿ lg (wi−1 ) for every i¿3. Let Fu; v ={wi | i¿1} and Fu;0 v ={wi0 | i¿1}.
The language Fa; b is a DOL language generated by the DOL rules a → b and b → ab
(see [9]). The sequence of Fibonacci words plays a very important role in the com-
binatorial theory of free monoids for the recursively dened structure and remarkable
combinatorial properties of Fibonacci words. Some properties concerning the Fibonacci
language Fu; v have been investigated by De Luca in [6], by Fan and Shyr in [1] and by
∗Corresponding author.
E-mail addresses: pyu@
ower.amath.nchu.edu.tw (S. Yu), zhao@chinyi.ncit.edu.tw (Y. Zhao).
0012-365X/00/$ - see front matter
c 2000 Elsevier Science B.V. All rights reserved.
PII: S 0 0 1 2 - 3 6 5 X ( 0 0 ) 0 0 0 8 9 - 3
216 S.S. Yu, Y. Zhao / Discrete Mathematics 224 (2000) 215–223
Knuth et al. in [4]. In this paper, we investigate properties of the Fibonacci language
Fu; v either.
Section 2 is dedicated to investigate the relationships between Fibonacci words and
primitive words. A word f ∈ X + which is not a power of any other word is called a
primitive word. Let Q be the set of all primitive words over X [10]. It is known that
every word in X + can be uniquely expressed as a power of a primitive word [8]. For
x ∈ X + , if x = fn , n¿1, and f is a primitive word, then we call√f the primitive root
√ √
of the word x and is denoted by x. For a language A ⊆ X + , let A = { x | x ∈ A}. In
Section 2, we characterize the Febonacci language Fu; v consisting of primitive words.
A word w ∈ X ∗ is said to be a proper d-factor of a word z ∈ X + if w 6= z and
z = wx = yw for some words x; y. The family of words which have i distinct proper
d-factors is denoted by D(i). A word x ∈ X + is d-primitive if x = wy1 = y2 w, where
w ∈ X + and y1 ; y2 ∈ X ∗ , implies that x = w and y1 = y2 = 1. The set D(1) is exactly
the family of all d-primitive words. For the properties of D(i), one is referred to [12].
Consider wi ∈ Fa; b . In Section 3, we show that {w1 ; w2 ; w3 } ⊆ D(1) and wi ∈ D(j) for
i¿4 and j = bi=2c.
If x = a1 a2 · · · an , where ai ∈ X , then we dene the reverse (or mirror image) of the
word x to be x̂ = an · · · a2 a1 . A word x is called palindrome if x = x̂. Remark that if
u = a and v = b, then wbi = wi0 , i¿1. Let R be the set of all palindrome words over the
alphabet X . Note that 1 ∈ R. Clearly, if x ∈ XX + ∩ R, then x 6∈ D(1).
The palindrome words and languages are studied by De Luca in [6,7], by Knuth et al.
in [4], and by Lin in his Master thesis [5]. For the motivation of studying palindrome
words and languages, one is referred to [7,8]. We derive that Fa; b ∩ R = {a; b; bab} and
Fa; b Fa; b ∩ R = {aa; bb; aba; babbab; w4 w6 } ∪ {w2n w3 | n¿1} in Section 3.
Section 4 deals with the properties concerning the Fibonacci language Fu; v related
to formal language theory. We show that Fu; v is context-free free and not dense. Items
not dened here or in the subsequence sections can be found in books [2] and [10].
A non-empty language L is a code if for x1 ; x2 ; : : : ; x n ; y1 ; y2 ; : : : ; ym ∈ L, x1 x2 · · · x n =
y1 y2 · · · ym implies that m = n and xi = yi for i = 1; 2; : : : ; n. In Section 5, we show
that for k¿2, Fk = {wnk | n¿1} ⊆ Fa; b is a code.
In [1], Fan and Shyr have proved that the Fibonacci languages Fa; b and Fa;0 b are
subsets of Q. Now, we shall characterize non-empty words u and v such that Fu; v ⊆ Q.
Lemma 2 (Shyr and Yu [11]). Let xqm = gk for some m; k¿1; x ∈ X + ; q ∈ Q and
g ∈ Q; with x 6∈ q+ . Then q 6= g and lg (g) ¿ lg (qm−1 ).
S.S. Yu, Y. Zhao / Discrete Mathematics 224 (2000) 215–223 217
√ √
Proposition 3. Let u; v ∈ X + . Then uvvuv 6∈ Q if and only if u = v. If uvvuv 6∈ Q;
then v 6∈ Q.
√ √ √
Proof. If u = v, say u = q for some q ∈ Q, then clearly uvvuv ∈ qq+ ; hence
uvvuv 6∈ Q. Now, suppose that uvvuv 6∈ Q. By Lemma 1, vuvuv 6∈ Q. There exist g ∈ Q
and k¿2 such that v(uv)2 =gk . By Lemma 2, lg (g) ¿ lg (uv). Thus, k =2. This implies
that there exist v1 ; v2 ∈ X + such that v =v1 v2 and g=vuv1 =v2 uv, i.e., v1 v2 uv1 =v2 uv1 v2 .
Since lg (vuv1 ) = lg (v2 uv), lg (v1 ) = lg (v2 ). As v1 v2 uv1 = v2 uv1 v2 , v1 = v2 and v1 u =
√ √ √ √ √ √
v2 u = uv1 . By Lemma 1, v1 = u. Thus, v = v1 v1 = v1 = u and v 6∈ Q.
√ √ √
Proof. If u = v, say u = q for some q ∈ Q, then clearly Fu; v ⊆ q+ . Remark that
√ √ √ √
w = u, w2 = v and wi = wi−2 wi−1 for i¿3. Suppose u 6= v. Clearly, v 6= uv and
√1 √ √ √
uv 6= vuv. That is, wk 6= wk+1 for 16k63. As wi =wi−2 wi−1 =wi−2 wi−3 wi−2 =
wi−4 wi−3 wi−3 wi−4 wi−3 for every i¿5, by (1) of Proposition 3, w5 ; w6 ; w7 ∈ Q. Again,
by (2) of Proposition 3, wj ∈ Q for every j¿8.
Proof. If Fu; v ⊆ Q, then clearly u; v; uv; vuv ∈ Q. Now, let u; v; uv; vuv ∈ Q. Since
{u; v; uv; vuv} ⊆ Fu; v and Fu; v * q+ for any q ∈ Q, by Proposition 4, Fu; v ⊆ Q.
√ √
Proposition 6. For u; v ∈ X + ; Fu; v = Fu;0 v if and only if u= v.
√ √
Proof. If Fu; v = Fu;0 v , then uv = vu. By Lemma 1, u = v. Now suppose that
√ √
u = v. Then there exist q ∈ Q and i; j¿1 such that u = qi and v = qj . One has that
Fu; v ⊆ q+ and Fu;0 v ⊆ q+ . For every k¿1, since lg (wk ) = lg (wk0 ), wk = wk0 . Therefore,
Fu; v = Fu;0 v .
Proof. Suppose there exists i¿3 such that, wi 6p wi+1 . Then wi =wi−2 wi−1 and wi+1 =
wi−1 wi = wi−1 wi−2 wi−1 . Since wi−2 wi−1 = wi 6p wi+1 = wi−1 wi−2 wi−1 , wi−2 wi−1 =
√ √
wi−1 wi−2 . Thus, wi−2 = wi−1 . This implies that wi−2 6p wi−1 . Thus, one must have
√ √ √ √ √ √
that wi−3 = wi−2 . Finally, we shall get that u = w1 = w2 = v.
218 S.S. Yu, Y. Zhao / Discrete Mathematics 224 (2000) 215–223
√ √ √
Let q = u. If u = v, then Fu; v ⊆ q+ . Thus, wi = qr and wi+1 = qs for some r; s¿1
and s ¿ r. Then wi 6p wi+1 .
Lemma 9. For i¿4; wi+1 y1 6= y2 wi+1 for every non-empty preÿx y1 and sux y2
of wi .
Proposition 10. For i¿4; wi = x(yx)j for some x; y ∈ X ∗ and j¿0 with
lg (x)¿lg (wi−2 ) if and only if (1) x = wi or (2) x = wi−2 ; y = wi−3 and wi = xyx.
Proof. Let i¿4. If (1) x = wi and y = 1 or (2) x = wi−2 and y = wi−3 , then clearly
wi = x or wi = xyx.
Conversely, by the observation of w1 = a, w2 = b, w3 = ab, w4 = bab, w5 = abbab
and w6 = bababbab, the result is true for i = 4; 5; 6. Now, let i¿7 and wi = x(yx)j for
some x; y ∈ X ∗ and j¿0 with lg (x)¿ ∗ lg (wi−2 ). If x = wi , then clearly wi = x(yx)j
for y = 1 and j = 0. Since wi = wi−2 wi−3 wi−2 and lg (wi−3 ) ¡ lg (wi−2 ), if x = wi−2 ,
then wi = x(yx)j implies that y = wi−3 , j = 1 and wi = xyx. Consider the case that
x 6= wi−2 and x 6= wi . As wi = wi−2 wi−3 wi−2 = x(yx)j and lg(x)¿lg(wi−2 ), j = 1 and
wi = xyx. By the condition lg(x)¿lg(wi−2 ), there exist a non-empty proper prex y1
and a non-empty proper sux y2 of wi−3 such that x = wi−2 y1 = y2 wi−2 . As i¿7,
i − 3¿4. This contradicts the result wi−2 y1 6= y2 wi−2 obtained in Lemma 9.
Proof. By [1], Fa; b ∩ R2 = Fa; b \ {a; b; ab; bab}. In [13], we show that R2 ∩ (R ∩ Q) = ∅,
where 1 6∈ Q. In [1], it is shown that Fa; b ⊆ Q. Since a; b; bab ∈ R and ab 6∈ R, Fa; b ∩
R = {a; b; bab}.
Proposition 13. Fa; b Fa; b ∩ R = {aa; bb; aba; babbab; w4 w6 } ∪ {w2n w3 | n¿1}.
220 S.S. Yu, Y. Zhao / Discrete Mathematics 224 (2000) 215–223
Proof. Suppose on the contrary that Fu; v is not context-free free. Then there is an in-
nite context-free subset of Fu; v . That is, there exist x1 ; x2 ; x3 ; x4 ; x5 ∈ X ∗ , lg(x2 x4 )¿1,
such that {x1 x2n x3 x4n x5 | n¿0} ⊆ Fu; v . Remark that w1 = u, w2 = v, wi = wi−2 wi−1 for
i¿3, Fu; v = {wi | i¿1} and lg(wi ) ¡ lg(wi+1 ) for every i¿2. There is k¿3 such that
wk = x1 x2j x3 x4j x5 for some j¿1 and lg(wk−1 ) ¿ lg(x2 x4 ). This implies that lg(wk+1 ) =
lg(wk−1 ) + lg(wk ) ¿ lg(x1 x2j+1 x3 x4j+1 x5 ). Thus x1 x2j+1 x3 x4j+1 x5 6∈ Fu; v , a contradiction.
Therefore, Fu; v is context-free free.
A word is said to be 4-powers free if it has no subword in the form x4 for any
word x ∈ X + . A language is called 4-powers free if every word in this language is
4-powers free. A language L is dense if for every x ∈ X ∗ , X ∗ xX ∗ ∩ L 6= ∅. If X = {c}
and u; v ∈ X + , then clearly, Fu; v is dense. In the following proposition, we consider the
case that |X |¿2.
It is shown that languages F11 = {wn | n = 2k − 1; k¿1} and F21 = {wn | n = 2k; k¿1}
are codes [1], where w1 = a, w2 = b and wi = wi−2 wi−1 , i¿3. In this section, we are
going to show that for k¿2, the language Fk = {wnk | k¿1} is also a code.
√ √
Proof. By observation, w1
p w2 and w2
p w3 . Since a=a 6= b= b, by Proposition
7, wi
p wi+1 for every i¿3.
Remark 17. (1) If wi1 6p wj and wi2 6p wj for some i1 ; i2 ; j¿1 with i1 ¿i2 , then
wi2 6p wi1 .
(2) wi 6p wj implies that j − i is an even number.
Proof. Since wj = wj−2 wj−1 = wj−2 wj−3 wj−2 = wj−4 wj−3 wj−3 wj−4 wj−3 for every j¿5,
w5 = w1 w2 w2 w1 w2 . We shall prove this proposition by induction on the number j. Now
suppose we know the result for 56j6n. Consider the word wk . If i = n − 3 such that
wi 6p wn+1 , by wn+1 = wn−3 wn−2 wn−2 wn−3 wn−2 , wn−3 wn−2 wn−2 wn−3 wn−2 6p wn+1 . If
there is i ¡ n − 3 such that wi 6p wn+1 , then by Remark 17, 16i6n − 5. Since wn+1 =
wn−1 wn , wi 6p wn−1 with i6(n−1)−4. By the induction hypothesis, wi wi+1 wi+1 wi wi+1
6p wn−1 . Thus wi wi+1 wi+1 wi wi+1 6p wn+1 .
Proof. As F21 is a code, it is true for every even number k. Now, let k¿3 be an odd
number. Suppose Fk is not a code. Then there exist wi1 ; wi2 ; : : : ; win ; wj1 , wj2 ; : : : ; wjm ∈ Fk
for some nite integers m; n¿1 such that wi1 6= wj1 and wi1 wi2 · · · win = wj1 wj2 · · · wjm .
Since wi1 6= wj1 , let i1 ¡ j1 . Then wi1 6p wj1 . By the denition of Fk , j1 ¿2k¿6.
By Remark 17 and k is an odd number, i1 6j1 − 2k6j1 − 6. From Proposition 18,
one has that wi1 wi1 +1 wi1 +1 wi1 wi1 +1 6p wj1 . By Proposition 19, wi1 +1 wi1 +1
p wi2 . Thus,
wi2 6p wi1 +1 wi1 +1 ; and hence wi2 6p wi1 +1 . Since wi1 +1 6∈ Fk and wi1
p wi1 +1 , i2 6
i1 − k6i1 − 3, that is, i2 6(i1 + 1) − 4. Again, wi2 wi2 +1 wi2 +1 wi2 wi2 +1 6p wi1 +1 . Similarly,
wi3 ¡p wi2 +1 and i3 6(i2 + 1) − 4. Since n is nite, there exists an integer 16r6n such
that wir
p wir +1 . This contradicts the condition that wi1 wi2 · · · win = wj1 wj2 · · · wjm .
By a similar proof, one can derive that for every k¿2 and m¿1, the language
Fk = {wnk+m | n¿0} is a code. This result extends the results, F11 and F21 being codes,
obtained in [1].
S.S. Yu, Y. Zhao / Discrete Mathematics 224 (2000) 215–223 223
Acknowledgements
The author would like to thank the referee for his careful reading of the manuscript
and valuable suggestions.
References
[1] C.M. Fan, H.J. Shyr, Some properties of bonacci languages, Tamkang J. Math. 27 (2) (1996)
165–182.
[2] J.E. Hopcroft, J.D. Ullman, Formal Languages and Their Relation to Automata, Addison-Wesley,
Reading, MA, 1969.
[3] J. Karhumaki, On cube-free !-words generated by binary morphism, Discrete Appl. Math. 5 (1985)
279–297.
[4] D.E. Knuth, J.H. Morris, V.R. Pratt, Fast pattern matching in strings, SIAM J. Comput. 6 (1977)
323–350.
[5] Y.Y. Lin, in: Properties of words and the related homomorphisms, Master Thesis, Institute of Applied
Mathematics, Chung-Yuan Christan University, Chung-Li, Taiwan, 1995.
[6] A. De Luca, A combinatorial property of bonacci words, Inform. Process Lett. 12 (1981) 193–195.
[7] A. De Luca, On the combinatorial problems in free monoids, Discrete Math. 38 (1982) 207–225.
[8] R.C. Lyndon, M.P. Schutzenberger, The equation aM = bN cP in a free group, Michigan Math. J. 9
(1962) 289–298.
[9] G. Rozenberg, A. Salomaa, The Mathematical Theory of L Systems, Academic Press, New York, 1980.
[10] H.J. Shyr, Free monoids and languages, 2nd Edition, Hon Min Book Company, Taichung, Taiwan,
1991.
[11] H.J. Shyr, S.S. Yu, Non-primitive words in the language p+ q+ , Soochow J. Math. 20 (4) (1994)
535–546.
[12] S.S. Yu, d-Minimal languages, Discrete Appl. Math. 89 (1998) 243–262.
[13] S.S. Yu, Palindrome words and reverse closed languages, Internat. J. Comput. Math. (2000), in press.