Open and Closed Prefixes of Sturmian Words
aa r X i v : . [ m a t h . C O ] J un Open and Closed Prefixes of Sturmian Words
Alessandro De Luca and Gabriele Fici DIETI, Universit`a di Napoli Federico II, Italy [email protected] Dipartimento di Matematica e Informatica, Universit`a di Palermo, Italy [email protected]
Abstract.
A word is closed if it contains a proper factor that occursboth as a prefix and as a suffix but does not have internal occurrences,otherwise it is open. We deal with the sequence of open and closed pre-fixes of Sturmian words and prove that this sequence characterizes everyfinite or infinite Sturmian word up to isomorphisms of the alphabet. Wethen characterize the combinatorial structure of the sequence of openand closed prefixes of standard Sturmian words. We prove that everystandard Sturmian word, after swapping its first letter, can be writtenas an infinite product of squares of reversed standard words.
Keywords:
Sturmian word; closed word; standard word; central word; semicen-tral word.
In a recent paper with M. Bucci [1], the authors dealt with trapezoidal words,also with respect to the property of being closed (also known as periodic-like [2])or open. Factors of Sturmian words are the most notable example of trapezoidalwords, and in fact the last section of [1] showed the sequence of open and closedprefixes of the Fibonacci word, a famous characteristic Sturmian word.In this paper we build upon such results, investigating the sequence of openand closed prefixes of Sturmian words in general, and in particular in the stan-dard case. More precisely, we prove that the sequence oc ( w ) of open and closedprefixes of a word w (i.e., the sequence whose n -th element is 1 if the prefix oflength n of w is closed, or 0 if it is open) characterizes every (finite or infinite)Sturmian word, up to isomorphisms of the alphabet.In [1], we investigated the structure of the sequence oc ( F ) of the Fibonacciword. We proved that the lengths of the runs (maximal subsequences of consecu-tive equal elements) in oc ( F ) form the doubled Fibonacci sequence. We prove inthis paper that this doubling property holds for every standard Sturmian word,and describe the sequence oc ( w ) of a standard Sturmian word w in terms of the semicentral prefixes of w , which are the prefixes of the form u n xyu n , where x, y are letters and u n xy is an element of the standard sequence of w . As a conse-quence, we show that the word ba − w , obtained from a standard Sturmian word Alessandro De Luca and Gabriele Fici w starting with letter a by swapping its first letter, can be written as the infiniteproduct of the words ( u − n u n +1 ) , n ≥
0. Since the words u − n u n +1 are reversalsof standard words, this induces an infinite factorization of ba − w in squares ofreversed standard words.Finally, we show how the sequence of open and closed prefixes of a standardSturmian word of slope α is related to the continued fraction expansion of α . Let us begin with some notation and basic definitions; for those not includedbelow, we refer the reader to [1] and [3].Let Σ = { a, b } be a 2-letter alphabet. Let Σ ∗ and b Σ ∗ stand respectively forthe free monoid and the free group generated by Σ . Their elements are called words over Σ . The length of a word w is denoted by | w | . The empty word , denotedby ε , is the unique word of length zero and is the neutral element of Σ ∗ and b Σ ∗ .A prefix (resp. a suffix ) of a word w is any word u such that w = uz (resp. w = zu ) for some word z . A factor of w is a prefix of a suffix (or, equivalently, a suffixof a prefix) of w . An occurrence of a factor u in w is a factorization w = vuz . Anoccurrence of u is internal if both v and z are non-empty. The set of prefixes,suffixes and factors of the word w are denoted by Pref ( w ), Suff ( w ) and Fact ( w ),respectively. From the definitions, we have that ε is a prefix, a suffix and a factorof any word. A border of a word w is any word in Pref ( w ) ∩ Suff ( w ) differentfrom w .A factor v of a word w is left special in w (resp. right special in w ) if av and bv are factors of w (resp. va and vb are factors of w ). A bispecial factor of w isa factor that is both left and right special.The word e w obtained by reading w from right to left is called the reversal (or mirror image ) of w . A palindrome is a word w such that e w = w . In particular,the empty word is a palindrome.We recall the definitions of open and closed word given in [4]: Definition 1.
A word w is closed if and only if it is empty or has a factor v = w occurring exactly twice in w , as a prefix and as a suffix of w (with nointernal occurrences). A word that is not closed is called open . The word aba is closed, since its factor a appears only as a prefix and as asuffix. The word abaa , on the contrary, is not closed. Note that for any letter a ∈ Σ and for any n >
0, the word a n is closed, a n − being a factor occurringonly as a prefix and as a suffix in it (this includes the special case of single letters,for which n = 1 and a n − = ε ).More generally, any word that is a power of a shorter word is closed. Indeed,suppose that w = v n for a non-empty v and n >
1. Without loss of generality,we can suppose that v is not a power itself. If v n − has an internal occurrencein w , then there exists a proper prefix u of v such that uv = vu , and it is a basicresult in Combinatorics on Words that two words commute if and only if theyare powers of a same shorter word, in contradiction with our hypothesis on v . pen and Closed Prefixes of Sturmian Words 3 Remark 2.
The notion of closed word is equivalent to that of periodic-like word[2]. A word w is periodic-like if its longest repeated prefix is not right special.The notion of closed word is also closely related to the concept of completereturn to a factor, as considered in [5]. A complete return to the factor u in aword w is any factor of w having exactly two occurrences of u , one as a prefixand one as a suffix. Hence, w is closed if and only if it is a complete return toone of its factors; such a factor is clearly both the longest repeated prefix andthe longest repeated suffix of w (i.e., the longest border of w ). Remark 3.
Let w be a non-empty word over Σ . The following characterizationsof closed words follow easily from the definition:1. the longest repeated prefix (resp. suffix) of w does not have internal occur-rences in w , i.e., occurs in w only as a prefix and as a suffix;2. the longest repeated prefix (resp. suffix) of w is not a right (resp. left) specialfactor of w ;3. w has a border that does not have internal occurrences in w ;4. the longest border of w does not have internal occurrences in w .Obviously, the negations of the previous properties characterizate openwords. In the rest of the paper we will use these characterizations freely andwithout explicit mention to this remark.We conclude this section with two lemmas on right extensions. Lemma 4.
Let w be a non-empty word over Σ . Then there exists at most oneletter x ∈ Σ such that wx is closed.Proof. Suppose by contradiction that there exist a, b ∈ Σ such that both wa and wb are closed. Let va and v ′ b be the longest borders of wa and wb , respectively.Since va and v ′ b are prefixes of w , one has that one is a prefix of the other.Suppose that va is shorter than v ′ b . But then va has an internal occurrence in wa (that appearing as a prefix of the suffix v ′ ) against the hypothesis that wa is closed. ⊓⊔ When w is closed, then exactly one such extension is closed. More precisely,we have the following (see also [2, Prop. 4]): Lemma 5.
Let w be a closed word. Then wx , x ∈ Σ , is closed if and only if wx has the same period of w .Proof. Let w be a closed word and v its longest border; in particular, v is thelongest repeated prefix of w . Let x be the letter following the occurrence of v as a prefix of w . Clearly, wx is has the same period as w , and it is closed as itsborder vx cannot have internal occurrences. Conversely, if y = x is a letter, then wy has a different period and it is open as its longest repeated prefix v is rightspecial. ⊓⊔ For more details on open and closed words and related results see [1,2,4,6,7].
Alessandro De Luca and Gabriele Fici
Let Σ ω be the set of (right) infinite words over Σ , indexed by N . An elementof Σ ω is a Sturmian word if it contains exactly n + 1 distinct factors of length n , for every n ≥
0. A famous example of Sturmian word is the Fibonacci word F = abaababaabaababaababa · · · If w is a Sturmian word, then aw or bw is also a Sturmian word. A Sturmianword w is standard (or characteristic ) if aw and bw are both Sturmian words.The Fibonacci word is an example of standard Sturmian word. In the nextsection, we will deal specifically with standard Sturmian words. Here, we focuson finite factors of Sturmian words, called finite Sturmian words . Actually, finiteSturmian words are precisely the elements of Σ ∗ verifying the following balanceproperty: for any u, v ∈ Fact ( w ) such that | u | = | v | one has || u | a − | v | a | ≤ || u | b − | v | b | ≤ St denote the set of finite Sturmian words. The language St is factorial(i.e., if w = uv ∈ St , then u, v ∈ St ) and extendible (i.e., for every w ∈ St thereexist letters x, y ∈ Σ such that xwy ∈ St ).We recall the following definitions given in [8]. Definition 6.
A word w ∈ Σ ∗ is a left special (resp. right special) Sturmianword if aw, bw ∈ St (resp. if wa, wb ∈ St). A bispecial Sturmian word is aSturmian word that is both left special and right special.
For example, the word w = ab is a bispecial Sturmian word, since aw , bw , wa and wb are all Sturmian. This example also shows that a bispecial Sturmianword is not necessarily a bispecial factor of some Sturmian word (see [9] for moredetails on bispecial Sturmian words). Remark 7.
It is known that if w is a left special Sturmian word, then w is aprefix of a standard Sturmian word, and the left special factors of w are prefixesof w . Symmetrically, if w is a right special Sturmian word, then the right specialfactors of w are suffixes of w .We now define the sequence of open and closed prefixes of a word. Definition 8.
Let w be a finite or infinite word over Σ . We define the sequenceoc ( w ) as the sequence whose n -th element is if the prefix of length n of w isclosed, or otherwise. For example, if w = abaaab , then oc ( w ) = 101001.In this section, we prove the following: Theorem 9.
Every (finite or infinite) Sturmian word w is uniquely determined,up to isomorphisms of the alphabet Σ , by its sequence of open and closed prefixesoc ( w ) . We need some intermediate lemmas. pen and Closed Prefixes of Sturmian Words 5
Lemma 10.
Let w be a right special Sturmian word and u its longest repeatedprefix. Then u is a suffix of w .Proof. If w is closed, the claim follows from the definition of closed word. If w is open, then u is right special in w , and by Remark 7, u is a suffix of w . ⊓⊔ Lemma 11.
Let w be a right special Sturmian word. Then wa or wb is closed.Proof. Let u be the longest repeated prefix of w and x the letter following theoccurrence of u as a prefix of w . By Lemma 10, u is a suffix of w . Clearly, thelongest repeated prefix of wx is ux , which is also a suffix of wx and cannot haveinternal occurrences in wx otherwise the longest repeated prefix of w would notbe u . Therefore, wx is closed. ⊓⊔ So, by Lemmas 4 and 11, if w is a right special Sturmian word, then one of wa and wb is closed and the other is open. This implies that the sequence ofopen and closed prefixes of a (finite or infinite) Sturmian word characterizes itup to exchange of letters. The proof of Theorem 9 is therefore complete. In this section, we deal with the sequence of open and closed prefixes of standardSturmian words. In [1] a characterization of the sequence oc ( F ) of open andclosed prefixes of the Fibonacci word F was given.Let us begin by recalling some definitions and basic results about standardSturmian words. For more details, the reader can see [10] or [3].Let α be an irrational number such that 0 < α <
1, and let [0; d + 1 , d , . . . ]be the continued fraction expansion of α . The sequence of words defined by s − = b , s = a and s n +1 = s d n n s n − for n ≥
0, converges to the infinite word w α , called the standard Sturmian word of slope α . The sequence of words s n iscalled the standard sequence of w α .Note that w α starts with letter b if and only if α > /
2, i.e., if and onlyif d = 0. In this case, [0; d + 1 , d , . . . ] is the continued fraction expansion of1 − α , and w − α is the word obtained from w α by exchanging a ’s and b ’s. Hence,without loss of generality, we will suppose in the rest of the paper that w startswith letter a , i.e., that d > n ≥ −
1, one has s n = u n xy, (1)for x, y letters such that xy = ab if n is odd or ba if n is even. Indeed, thesequence ( u n ) n ≥− can be defined by: u − = a − , u = b − , and, for every n ≥ u n +1 = ( u n xy ) d n u n − , (2)where x, y are as in (1). Alessandro De Luca and Gabriele Fici
Example 12.
The Fibonacci word F is the standard Sturmian word of slope(3 −√ /
2, whose continued fraction expansion is [0; 2 , , , , . . . ], so that d n = 1for every n ≥
0. Therefore, the standard sequence of the Fibonacci word F is thesequence defined by: f − = b , f = a , f n +1 = f n f n − for n ≥
0. This sequenceis also called the sequence of
Fibonacci finite words . Definition 13.
A standard word is a finite word belonging to some standardsequence. A central word is a word u ∈ Σ ∗ such that uxy is a standard word, forletters x, y ∈ Σ . It is known that every central word is a palindrome. Actually, central wordsplay a central role in the combinatorics of Sturmian words and have severalcombinatorial characterizations (see [10] for a survey). For example, a word over Σ is central if and only if it is a palindromic bispecial Sturmian word. Remark 14.
Let ( s n ) n ≥− be a standard sequence. It follows by the definitionthat for every k ≥ n ≥ −
1, the word s kn +1 s n is a standard word. Inparticular, for every n ≥ −
1, the word s n +1 s n = u n +1 yxu n xy is a standardword. Therefore, for every n ≥ −
1, we have that u n xyu n +1 = u n +1 yxu n (3)is a central word.The following lemma is a well known result (cf. [11]). Lemma 15.
Let w be a standard Sturmian word and ( s n ) n ≥− its standardsequence. Then:1. A standard word v is a prefix of w if and only if v = s kn s n − , for some n ≥ and k ≤ d n .2. A central word u is a prefix of w if and only if u = ( u n xy ) k u n − , for some n ≥ , < k ≤ d n , and distinct letters x, y ∈ Σ such that xy = ab if n isodd or ba if n is even. Note that ( u n xy ) d n +1 u n − is a central prefix of w , but this does not contra-dict the previous lemma since, by (2), ( u n xy ) d n +1 u n − = u n +1 yxu n .Recall that a semicentral word (see [1]) is a word in which the longest repeatedprefix, the longest repeated suffix, the longest left special factor and the longestright special factor all coincide. It is known that a word v is semicentral if andonly if v = uxyu for a central word u and distinct letters x, y ∈ Σ . Moreover, xuy is a factor of uxyu and thus semicentral words are open, while central wordsare closed. Proposition 16.
The semicentral prefixes of w are precisely the words of theform u n xyu n , n ≥ , where x, y and u n are as in (1) . pen and Closed Prefixes of Sturmian Words 7 Proof.
Since u n is a central word, the word u n xyu n is a semicentral word bydefinition, and it is a prefix of u n xyu n +1 = u n +1 yxu n , which in turn is a prefixof w by Lemma 15.Conversely, assume that w has a prefix of the form uξηu for a central word u and distinct letters ξ, η ∈ Σ . From Lemma 15 and (1), we have that uξηu = ( u n xy ) k u n − · ξη · ( u n xy ) k u n − , for some n ≥ k ≤ d n , and distinct letters x, y ∈ Σ such that xy = ab if n isodd or ba if n is even. In particular, this implies that ξη = yx .If k = d n , then u = u n +1 yxu n +1 , and we are done. So, suppose by contra-diction that k < d n . Now, on the one hand we have that ( u n xy ) k +1 u n − yx is aprefix of w by Lemma 15, and so ( u n xy ) k +1 u n − is followed by yx as a prefix of w ; on the other hand we have uξηu = ( u n xy ) k u n − · yx · ( u n xy ) k u n − = ( u n xy ) k · u n − yxu n xy · ( u n xy ) k − u n − = ( u n xy ) k · u n xyu n − xy · ( u n xy ) k − u n − = ( u n xy ) k +1 · u n − xy · ( u n xy ) k − u n − , so that ( u n xy ) k +1 u n − is followed by xy as a prefix of w , a contradiction. ⊓⊔ The next theorem shows the behavior of the runs of open and closed prefixesin w by determining the structure of the last elements of the runs. Theorem 17.
Let vx , x ∈ Σ , be a prefix of w . Then:1. v is open and vx is closed if and only if there exists n ≥ such that v = u n xyu n ;2. v is closed and vx is open if and only if there exists n ≥ such that v = u n xyu n +1 = u n +1 yxu n .Proof.
1. If v = u n xyu n +1 = u n +1 yxu n , then v is semicentral and thereforeopen. The word vx is closed since its longest repeated prefix u n x occurs only asa prefix and as a suffix in it.Conversely, let vx be a closed prefix of w such that v is open, and let ux bethe longest repeated suffix of vx . Since vx is closed, ux does not have internaloccurrences in vx . Since u is the longest repeated prefix of v (suppose the longestrepeated prefix of v is a z longer than u , then vx , which is a prefix of z , wouldbe repeated in v and hence in vx , contradiction) and v is open, u must havean internal occurrence in v followed by a letter y = x . Symmetrically, if ξ isthe letter preceding the occurrence of u as a suffix of v , since u is the longestrepeated suffix of v one has that u has an internal occurrence in v preceded bya letter η = ξ . Thus u is left and right special in w . Moreover, u is the longestspecial factor in v . Indeed, if u ′ is a left special factor of v , then u must be aprefix of u ′ . But ux cannot appear in v since vx is closed, and if uy was a leftspecial factor of v , it would be a prefix of v . Symmetrically, u is the longest right Alessandro De Luca and Gabriele Fici special factor in v . Thus v is semicentral, and the claim follows from Proposition16. 2. If v = u n xyu n +1 = u n +1 yxu n , then v is a central word and therefore itis closed. Its longest repeated prefix is u n +1 . The longest repeated prefix of vx is either a d − (if n = 0) or u n x (if n > u n +1 x . Therefore, vx is open.Conversely, suppose that vx is any open prefix of w such that v is closed. If vx = a d b , then v = u xyu = u yxu and we are done. Otherwise, by 1), thereexists n ≥ | u n ξyu n | < | v | < | u n +1 yξu n +1 | , where { ξ, y } = { a, b } . Weknow that u n ξyu n +1 is closed and u n ξyu n +1 ξ is open; it follows v = u n ξyu n +1 = u n xyu n +1 , as otherwise there should be in w a semicentral prefix strictly between u n xyu n and u n +1 yxu n +1 . ⊓⊔ Note that, for every n ≥
1, one has: u n +1 yxu n +1 = u n +1 yxu n ( u − n u n +1 )= u n xyu n +1 ( u − n u n +1 )= u n xyu n ( u − n u n +1 ) . Therefore, starting from an (open) semi-central prefix u n xyu n , one has a run ofclosed prefixes, up to the prefix u n xyu n +1 = u n +1 yxu n = u n xyu n ( u − n u n +1 ), fol-lowed by a run of the same length of open prefixes, up to the prefix u n +1 yxu n +1 = u n +1 yxu n ( u − n u n +1 ) = u n xyu n ( u − n u n +1 ) . See Table 1 for an illustration. prefix of w open/closed example u n xyu n open aabau n xyu n x closed aabaau n xyu n xy closed aabaab . . . . . . . . . u n xyu n +1 = u n +1 yxu n closed aabaabaau n +1 yxu n y open aabaabaaau n +1 yxu n yx open aabaabaaab . . . . . . . . . u n +1 yxu n +1 open aabaabaaabaau n +1 yxu n +1 y closed aabaabaaabaab Table 1.
The structure of the prefixes of a standard Sturmian word w = aabaabaaabaabaa · · · with respect to the u n prefixes. Here d = d = 2 and d = 1. In Table 2, we show the first elements of the sequence oc ( w ) for a standardSturmian word w = aabaabaaabaabaa · · · of slope α = [0; 3 , , , . . . ], i.e., with d = d = 2 and d = 1. One can notice that the runs of closed prefixes arefollowed by runs of the same length of open prefixes. pen and Closed Prefixes of Sturmian Words 9 n w a a b a a b a a a b a a b a aoc ( w ) 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 Table 2.
The sequence oc ( w ) of open and closed prefixes for the word w = aabaabaaabaabaa · · · The words u − n u n +1 are reversals of standard words, for every n ≥
1. Indeed,let r n = f s n for every n ≥ −
1, so that r − = b , r = a , and r n +1 = r n − r d n n for n ≥
0. Since by (1) s n = u n xy and s n +1 = u n +1 yx , one has r n = yxu n and r n +1 = xyu n +1 , and therefore, by (3), u n r n +1 = u n +1 r n . (4)Multiplying (4) on the left by u − n and on the right by r − n , one obtains r n +1 r − n = u − n u n +1 . (5)Since r n +1 = r n − r d n n , one has that r n +1 r − n = r n − r d n − n , and therefore r n +1 r − n is the reversal of a standard word. By (5), u − n u n +1 is the reversal of a standardword.Now, note that for n = 0, one has u xyu = u yxu = a d and ( u − u ) = ba d − . Thus, we have the following: Theorem 18.
Let w be the standard Sturmian word of slope α , with < α < / , and let [0; d + 1 , d , . . . ] , with d > , be the continued fraction expansion of α . The word ba − w obtained from w by swapping the first letter can be writtenas an infinite product of squares of reversed standard words in the following way: ba − w = Y n ≥ ( u − n u n +1 ) , where ( u n ) n ≥− is the sequence defined in (1) .In other words, one can write w = a d ba d − Y n ≥ ( u − n u n +1 ) . Example 19.
Take the Fibonacci word. Then, u = ε , u = a , u = aba , u = abaaba , u = abaababaaba , etc. So, u − u = a , u − u = ba , u − u = aba , u − u = baaba , etc. Indeed, u − n u n +1 is the reversal of the Fibonacci finite word f n − . By Theorem 18, we have: F = ab Y n ≥ ( u − n u n +1 ) = ab Y n ≥ ( f f n ) = ab · ( a · a )( ba · ba )( aba · aba )( baaba · baaba ) · · · i.e., F can be obtained by concatenating ab and the squares of the reversals ofthe Fibonacci finite words f n starting from n = 0.Note that F can also be obtained by concatenating the reversals of the Fi-bonacci finite words f n starting from n = 0: F = Y n ≥ f f n = a · ba · aba · baaba · ababaaba · · · and also by concatenating ab and the Fibonacci finite words f n starting from n = 0: F = ab Y n ≥ f n = ab · a · ab · aba · abaab · abaababa · · · One can also characterize the sequence of open and closed prefixes of a stan-dard Sturmian word w in terms of the directive sequence of w .Recall that the continuants of an integer sequence ( a n ) n ≥ are defined as K [ ] = 1, K [ a ] = a , and, for every n ≥ K [ a , . . . , a n ] = a n K [ a , . . . , a n − ] + K [ a , . . . , a n − ] . Continuants are related to continued fractions, as the n -th convergent of[ a ; a , a , . . . ] is equal to K [ a , . . . , a n ] /K [ a , . . . , a n ].Let w be a standard Sturmian word and ( s n ) n ≥− its standard sequence.Since | s − | = | s | = 1 and, for every n ≥ | s n +1 | = d n | s n | + | s n − | , then onehas, by definition, that for every n ≥ | s n | = K [1 , d , . . . , d n − ] . For more details on the relationships between continuants and Sturmianwords see [12].By Theorems 17 and 18, all prefixes up to a d are closed; then all prefixesfrom a d b till a d ba d − are open, then closed up to a d ba d − · u − u , open againup to a d ba d − · ( u − u ) , and so on. Thus, the lengths of the successive runs ofclosed and open prefixes are: d , d , | u | − | u | , | u | − | u | , | u | − | u | , | u | − | u | ,etc. Since d = K [1 , d −
1] and, for every n ≥ | u n +1 | − | u n | = | s n +1 | − | s n | = ( d n − | s n | + | s n − | = K [1 , d , . . . , d n − , d n − , we have the following: pen and Closed Prefixes of Sturmian Words 11 Corollary 20.
Let w and α be as in the previous theorem and let, for every n ≥ , k n = K [1 , d , . . . , d n − , d n − . Then oc ( w ) = Y n ≥ k n k n . Acknowledgments
We thank an anonymous referee for helpful comments that led us to add theformula in Corollary 20 to this final version. We also acknowledge the support ofthe PRIN 2010/2011 project “Automi e Linguaggi Formali: Aspetti Matematicie Applicativi” of the Italian Ministry of Education (MIUR).
References
1. Bucci, M., De Luca, A., Fici, G.: Enumeration and Structure of Trapezoidal Words.Theoretical Computer Science (2013) 12–222. Carpi, A., de Luca, A.: Periodic-like words, periodicity and boxes. Acta Informatica (2001) 597–6183. Lothaire, M.: Algebraic Combinatorics on Words. Encyclopedia of Mathematicsand its Applications. Cambridge Univ. Press, New York, NY, USA (2002)4. Fici, G.: A Classification of Trapezoidal Words. In: WORDS 2011, 8th Interna-tional Conference on Words. Volume 63 of Electronic Proceedings in TheoreticalComputer Science. (2011) 129–1375. Glen, A., Justin, J., Widmer, S., Zamboni, L.Q.: Palindromic richness. EuropeanJ. Combin. (2009) 510–5316. Bucci, M., de Luca, A., De Luca, A.: Rich and Periodic-Like Words. In: DLT 2009,13th International Conference on Developments in Language Theory. Volume 5583of Lecture Notes in Comput. Sci. Springer (2009) 145–1557. Fici, G., Lipt´ak, Zs.: Words with the Smallest Number of Closed Factors. In: 14thMons Days of Theoretical Computer Science. (2012)8. de Luca, A., Mignosi, F.: Some combinatorial properties of Sturmian words. The-oret. Comput. Sci. (1994) 361–3859. Fici, G.: A Characterization of Bispecial Sturmian Words. In: MFCS 2012, 37thInternational Symposium on Mathematical Foundations of Computer Science. Vol-ume 7464 of Lecture Notes in Comput. Sci., Springer Berlin Heidelberg (2012)383–39410. Berstel, J.: Sturmian and episturmian words. In: CAI 2007, Second InternationalConference on Algebraic Informatics. Volume 4728 of Lecture Notes in ComputerScience., Springer (2007) 23–4711. Fischler, S.: Palindromic prefixes and episturmian words. J. Combin. Theory Ser.A113