Rich, Sturmian, and trapezoidal words

In this paper we explore various interconnections between rich words, Sturmian words, and trapezoidal words. Rich words, first introduced in arXiv:0801.1656 by the second and third authors together with J. Justin and S. Widmer, constitute a new class…

Authors: Aldo de Luca, Amy Glen, Luca Q. Zamboni

RICH, STURMIAN, AND TRAPEZOID AL WORDS ALDO DE LUCA, AMY GLEN, AND LUCA Q. ZAMBONI A B S T R AC T . In this paper we explore various interconn ections between rich words, S turmian words, and trapezoid al words. Rich words, first in troduced in [15] by seco nd and thir d autho rs together with J. Justin and S. W idmer , constitute a new class o f finite and infinite words characterized by having the m aximal number o f palindro mic f actors. Every finite Sturm ian word is rich, but not conversely [11]. T rapezoidal words were first intro duced by the first author in study ing the behavior of the subword complexity o f finite Sturmian words. Unfo rtunately this prop erty does not ch aracterize finite Stur mian words. In this no te we show that the o nly trapezoidal p alindromes are Stur mian. More genera lly we sho w that Sturmian p alindromes can be character ized either in terms o f their subword complexity (the trapezoid al p roperty) or in terms of their p alindromic comp le xity . W e also obtain a similar characteriz ation of rich palin dromes in terms of a relation b etween palindr omic complexity and subword com ple xity . 1. I N T RO D U C T I O N In [11], X. Droubay , J. J ustin, and G. Pirillo s ho wed that a finite word W of length | W | has at most | W | + 1 many distinct palindromic factors, inclu ding the empty word. In [15], the second and third authors together with J. Jus tin and S. W i dmer initiated a unified st udy of b oth finite and infinite w ords chara cterized by this palindromic richness property . Accordingly we say that a fi nite word W is rich if and only if it has | W | + 1 distinct palindromic f acto r s, and an infinite word is rich if all of its factors are rich. Droubay , Justin and Pirillo sh o wed that all Epi sturmian w ords (in par- ticular all Sturmian words) are rich. Other examples of rich words are complementation symmetric sequences [15], symbol ic codings of trajectories of sym metric interval exchange transformati ons [13, 14], and certain β -expansions where β i s a simpl e Parry number [1]. Let u b e a non-empty fa ctor of a finite or infini te word W . A fa ctor of W having exactly two occurrences of u, o ne as a prefix, and one as a suffix, is called a complete r eturn to u i n W . In [15], the following f act is establis hed: Pr oposition 1. A finite or infinite word W is rich if and only if for eac h non-empt y pali ndr omic factor u of W, every complete r eturn to u in W is a palindr ome. In s hort, W is rich if all com plete returns to palindromes are palin dromes. Giv en a finite or infinite w ord W , let C W ( n ) (respectiv ely P W ( n )) denote the subwor d c omplexity function (respec- tiv ely the palindr omic comple xity function ) which associates to each numb e r n ≥ 0 the number of distinct factors (respecti vely palindromi c factors) of W of l ength n. Infinite Sturmian words are characterized by bot h their subword complexity and palindromic complexity . An infinite word W is Sturmian if and only i f C W ( n ) = n + 1 for each n ≥ 0 . In [12], X. Droubay and G. Pirill o showed that W is Sturmian i f and only if P W ( n ) = 1 wh ene ver n is ev en, and P W ( n ) = 2 wh ene ver n is odd. In [7], the first aut hor stud ied the com ple xity fun ction o f fini te words W. He sh o wed that if Date : February 2, 2008. 1991 Mathematics Subject Classification. 68 R15. K ey wor ds and phrases. Sturmia n word s , palindromes, palindromic complexity . 1 2 ALDO DE LUCA, AMY GLEN, AND LUCA Q. ZAMBONI W is a finite Sturmian word (meanin g a f actor o f a Sturmian word), then the graph o f C W ( n ) as a function o f n (for 0 ≤ n ≤ | W | ) is that of a regular trapezoid: that is C W ( n ) increases by 1 with each n on som e interval of length r , then C W ( n ) is constant on s ome in terv al of leng th s, and fi- nally C W ( n ) decreases by 1 with each n on an int er val of the same size r . Such a word is said to be trapezoidal . More precisely , for any word W let us denote by R W the sm a llest integer p s uch that W has no right special factor of length p, and by K W the lengt h of t he shortest unrepeated su f fix of W . Then we say that W is a tr apezoidal wor d if and only if | W | = R W + K W . Howe ver , in [7] the first author shows that the property of being trapezoidal does n ot characterize finit e Sturm ian words. For instance, the word aaab ab i s not S turmian although it is trapezoidal. 1 The m ain results of this note are to give characterizations of both rich palindromes a nd Sturmian palindromes in terms of the palindromic comp le xi ty functions. W e also s ho w that ev ery trapezoidal word is rich, b ut not con versely . In the case of rich palindromes we prov e 2 : Theor em 1. Let W be a finite wor d. Then the following two conditions ar e equivalent: (A) W is a rich pali ndr ome. (B) P W ( n ) + P W ( n + 1) = C W ( n + 1) − C W ( n ) + 2 for each 0 ≤ n ≤ | W | . While for Sturmian palindromes we prove 3 : Theor em 2. Let W be a wor d of length N . Then the following thr ee conditions ar e equivalent: (A ’) W is a Sturmian palindr ome. (B’) P W ( n ) + P W ( N − n ) = 2 for each 0 ≤ n ≤ N . (C’) W is a trapezoidal palindr ome. 2. R I C H V S T R A P E Z O I D A L W O R D S In this section we show that all trapezoidal words are rich: Pr oposition 2. Let W be a trapezoidal wor d. Then W is rich. Pr oof. W e proceed by inducti on on | W | . The resul t is clearly true if | W | ≤ 2 . Suppose eve ry trapezoidal word of length less than N is rich, and suppose that W is trapezoidal (say on the letters { a, b } ) of length N . Let us suppose to th e contrary that W is not rich. Then, by Proposition 1, in W there exists a com plete return to som e p a lindrome P wh ich is not a palindrom e . Since, on a bi nar y alphabet, a complete return to a l etter is always a palindrom e, we can write (wi thout loss of generality) t hat P = aU a with U possibly empty . Since the prefix and suffi x of W of length N − 1 are both rich (by the induction hypothesis), it follows that aU a is both a prefix and a suffi x of W, and that these are t he only two occurrences of aU a i n W . So W itself is the complete return to aU a which is no t a palindrome. In particul a r W is not a palindrome, which im plies that | W | ≥ 2 | aU a | + 2 . It follows that K W = | aU a | + 1 since aU a occurs twice in W and i f some longer suffi x of W occurred more t han once i n W, then aU a would occur at l ea st three times in W . Since W is trapezoidal, we have R W + K W = | W | . Now the word W has a period q = | W | − | aU a | = 1 In [5], F . D’Alessandr o classified all non- S turmian trapezoidal w ords. 2 An infinite version of Theorem 1 was obtained by the second and thir d au thors tog ether with M . Bucci and A. De Luca in [4] using completely different methods. 3 A different character ization of Sturmian palindromes w a s obtain ed by A. de Lu ca an d A. De Luca in [8 ]. See also [9]. RICH, STUR M IAN, AND TRAPEZ OID AL WORDS 3 R W + K W − ( K W − 1) = R W + 1 . Let π W denote the minim a l period of W. Then π W ≤ R W + 1 . Since for any word W , π W ≥ R W + 1 , it fol lo ws that π W = R W + 1 . From Proposit ion 28 of [8] we deduce that W is a Sturmian, and hence rich, a contradiction.  Remark 1. W e n ote that the con verse is false; in fact aa bbaa is rich but not trapezoidal. 3. P RO O F O F T H E O R E M 1 W e first show t hat (B) impl ies (A). W e assu me W satisfies (B). T aking n = | W | and using P W ( | W | + 1) = C W ( | W | + 1) = 0 and C W ( | W | ) = 1 , we deduce t hat P W ( | W | ) = 1 , and hence W is a palindrom e . It remains to s ho w th a t W is rich. Let S denote the total number of distinct palindromic f actors of W . W e will sho w that S = | W | + 1 . Since W itself is a palindrome we ha ve S − 1 = | W | − 1 X n =0 P W ( n ) Similarly since the empty word is a palindrome we ha ve S − 1 = | W | X n =1 P W ( n ) Thus 2 S − 2 = | W | − 1 X n =0 P W ( n ) + | W | X n =1 P W ( n ) = | W | − 1 X n =0 ( P W ( n ) + P W ( n + 1)) = | W | − 1 X n =0 ( C W ( n + 1) − C W ( n ) + 2) = C W ( | W | ) − C W (0) + 2 | W | = 1 − 1 + 2 | W | = 2 | W | . Hence S = | W | + 1 as required. Next we show that (A) implies (B). W e proceed by inducti on on th e length of W . The result is easil y verified in the case | W | ≤ 2 . Now sup pose the result is true for all rich pali ndromes of length less than N and suppose W is a palind rome of length N . Let V denote t he palindrome of length N − 2 o btained by removing the first and l ast letter of W. Since V i s also rich (see [15]), by the induction hypothesis we hav e P V ( n ) + P V ( n + 1 ) = C V ( n + 1) − C V ( n ) + 2 for each 0 ≤ n ≤ N − 2 . Let N 0 denote the lengt h of a shortest factor U of W which is not a factor of V . Then for 0 ≤ n < N 0 − 1 we have P W ( n ) + P W ( n + 1) = C W ( n + 1) − C W ( n ) + 2 . The word U is either a prefix or a suffix of W . W e claim that it is in fact b oth a prefi x and a su f fix of W , in ot her words a palindrom e. Suppose to t he contrary t hat U is not a palindrom e . W ithout loss of generality we may assume th at U is a suf fix of W. Let U ′ denote the longest palindromic suffi x of U. Since | U ′ | < N 0 , we h a ve U ′ is also a factor of V . H e nce there exists a compl ete return Z of U ′ which is a proper suf fix of W . Since W i s rich, Z is a palindrom e. Since we are assuming that U is not a pali ndrome and that U ′ is the longest p a lindromic suffix of U, i t follows 4 ALDO DE LUCA, AMY GLEN, AND LUCA Q. ZAMBONI that | Z | > | U | . Since W is a palindrome, Z is also a prefix of W , and hence the prop e r suf fix U of Z occurs in V , a contradicti on. Thus U is a palindrome, and hence both a prefix and a suffix of W . Thus U is the only factor of W of length N 0 which is not a factor of V . Thus we h a ve P W ( N 0 ) = P V ( N 0 ) + 1 and C W ( N 0 ) = C V ( N 0 ) + 1 . Since P V ( N 0 − 1) + P V ( N 0 ) = C V ( N 0 ) − C V ( N 0 − 1) + 2 , P V ( N 0 − 1) = P W ( N 0 − 1) , and C V ( N 0 − 1) = C W ( N 0 − 1) , we d e duce that P W ( N 0 − 1) + ( P W ( N 0 ) − 1) = ( C W ( N 0 ) − 1 ) − C W ( N 0 − 1) + 2 and hence P W ( N 0 − 1) + P W ( N 0 ) = C W ( N 0 ) − C W ( N 0 − 1) + 2 in other words equality in (B) also holds for n = N 0 − 1 . W e now claim that t he only palindromic suffix of W of length greater than N 0 is W itself. In fact, if W admit ted a proper palindromic suffix of length greater than N 0 , then U would be a fac tor of V , a contradiction. T hus we have P W ( n ) = P V ( n ) for all N 0 < n < N . (3.1) Also, for each N 0 < n < N , let U X (respecti vely ¯ X U ) denote the prefix (respectively suffix) of W o f length n, where ¯ X denotes the reversal of X. Since U X is not a palindrome it follows t hat U X 6 = ¯ X U. Th us C W ( n ) = C V ( n ) + 2 for all N 0 < n < N . (3.2) W e now verify (B) for n = N 0 . Starting with P V ( N 0 ) + P V ( N 0 + 1) = C V ( N 0 + 1) − C V ( N 0 ) + 2 we obtain ( P W ( N 0 ) − 1) + P W ( N 0 + 1) = ( C W ( N 0 + 1) − 2) − ( C W ( N 0 ) − 1 ) + 2 and hence P W ( N 0 ) + P W ( N 0 + 1) = C W ( N 0 + 1) − C W ( N 0 ) + 2 . W e next verify (B) for N 0 < n ≤ N − 2 . Starting with P V ( n ) + P V ( n + 1) = C V ( n + 1 ) − C V ( n ) + 2 and using (3.1) and (3.2) we obtain P W ( n ) + P W ( n + 1) = ( C W ( n + 1) − 2) − ( C W ( n ) − 2 ) + 2 and hence P W ( n ) + P W ( n + 1) = C W ( n + 1) − C W ( n ) + 2 . It remain s to verify (B) for n = N − 1 and n = N . If W is the constant word, then P W ( N − 1) = 1 , P W ( N ) = 1 , P W ( N + 1) = 0 , C W ( N − 1) = 1 , C W ( N ) = 1 , and C W ( N + 1) = 0 . Otherwise, P W ( N − 1) = 0 , P W ( N ) = 1 , P W ( N + 1) = 0 , C W ( N − 1) = 2 , C W ( N ) = 1 , and C W ( N + 1) = 0 . In either case one readily verifies (B) for n = N − 1 and n = N . This compl etes the proo f of Theorem 1. RICH, STUR M IAN, AND TRAPEZ OID AL WORDS 5 4. P RO O F O F T H E O R E M 2 W e begin with the following lemma: Lemma 1. Let W be a wor d of length N sat isfying either condi tion of Theor em 2. Then W is a rich palindr ome. Hence by Theor em 1 we have P W ( n ) + P W ( n + 1) = C W ( n + 1) − C W ( n ) + 2 for 0 ≤ n ≤ N . Pr oof. Since any Sturmian word i s trapezoidal, by Propositi on 2 one has that if W sati sfie s ei- ther condition (A ’) or (C’), t hen it is rich. Let us suppose that W satisfies conditio n (B’). Since P W ( N ) = P W (0) = 1 , we hav e W is a palin drome. T o see that W is rich, let S = P W (0) + P W (1) + P W (2) + ... + P W ( N ) denote the number of distinct palindromic factors of W . Then 2 S = P W (0) + P W ( N ) + P W (1) + P W ( N − 1) + . . . + P W ( N ) + P W (0) = 2( N + 1) . Whence S = N + 1 = | W | + 1 .  W e not e that condi tion (B’) is equiv alent t o saying that the word P W (0) P W (1) P W (2) ...P W ( N ) is a θ -palin drome on the alph a bet { 0 , 1 , 2 } wi th respect to th e inv oluto ry antim orphim θ defined by θ (0) = 2 , θ ( 2) = 0 and θ (1 ) = 1 . Assume fi rst that W i s a Sturmi a n palindrome. For 0 ≤ n ≤ N − 1 , set D W ( n ) = C W ( n + 1) − C W ( n ) . In [7], th e first author showed that t he word D W (0) D W (1) D W (2) ....D W ( N − 1) i s of the form 1 r 0 s ( − 1) r . In other words, that W is a trapezoidal wor d: C W ( n ) increases by 1 with each n on an interv al of length r , then stabilizes, and ev entually decreases by 1 with each n on an interv al of the sam e s ize r . The trapezoidal prop e rty of W together wit h the p re ceding lem ma imply that the w ord P W (0) P W (1) P W (2) ...P W ( N ) begins with a block of the form 121212 . . . (correspondin g to the interval of l e ngth r on which C W ( n + 1) − C W ( n ) = 1) , and terminates with a block o f the form . . . 010101 (corresponding to the interval o n which C W ( n + 1) − C W ( n ) = − 1) , and moreover by the trapezoidal property , these two blocks are of t he same length. Between these two b locks i s either a b lock of the form 11 . . . 1 1 or of the form 202 . . . 020 corresponding to the interval on which C W ( n + 1) − C W ( n ) = 0 . Hence W s a tisfies conditio n (B’). Next sup pose W sati sfie s (B’). First observe that for each n we ha ve P W ( n ) ∈ { 0 , 1 , 2 } , and P W (1) 6 = 0 . If P W (1) = 1 , then W is equal to the constant word, and hence a Sturm ian palindrome. Next suppos e P W (1) = 2 . In this case W i s a binary palindrom ic word, say on the alphabet { a, b } . T o show t hat W is Sturmian, it suffices to show that W is balanced, i.e., giv en an y two factors u and v of W of the same length, we ha ve || u | a − | v | a | ≤ 1 , where | u | a denotes the number of occurrences of th e letter a in u. Suppose to the contrary t hat W is not balanced. Then, it is well known (see for instance Proposition 2.1.3 in [3]) that there e xists a palindrome U such that both aU a and bU b are factors of W . Thus W contains two distinct palindrom es of the sam e length, which im plies th a t | U | is odd. For o therwise, if | U | were even, then takin g k = 2 − 1 | U | + 1 , we hav e P W (2 k ) = 2 , and hence by (B’) P W ( N − 2 k ) = 0 , and hence P W ( N ) = 0 , a contradiction. Since W is a palindrome and contains both aU a and bU b, t he pali ndrome U must ha ve at least two complete returns in W , one beginning in U a, wh ich we denot e by X , and one beginning in U b, which we denote by Y . Since W is rich we have both X and Y are palindromes with X 6 = Y . If both | X | and | Y | are greater than | U | + 1 , then both | X | and | Y | must be ev en. In fac t, suppose to the contrary that | X | were od d. Then | X | ≥ | U | + 2 . But then W would contain three 6 ALDO DE LUCA, AMY GLEN, AND LUCA Q. ZAMBONI palindromes of length | U | + 2 , namely aU a, bU b, and the central palindrom ic factor of length | U | + 2 o f X which is necessarily disti nct from both aU a and bU b since X cannot contain an occurrence of U other th a n as a prefix and as a su f fix. The sam e ar gum ent sho ws that | Y | must be e ven. W ithout loss of gener ality we can assume | X | ≤ | Y | . Then, as X and the central palindrom e of Y of l ength | X | are distinct, it fol lo ws that W contains two distinct palind r omes of e ven length | X | . Thus, P W ( | X | ) = 2 , and hence P W ( N − | X | ) = 0 , and hence P W ( N ) = 0 , a contradiction. Thus it remains to consider the case in which either | X | or | Y | is equal to | U | + 1 . W ithout loss of generality suppose | X | = | U | + 1 . This means that X = U a = aU and hence U i s the constant word U = a | U | . In this case | Y | ≥ | U | + 2 and by the previous argument must be ev en. But t hen X and t he central palindrome of Y of lengt h | X | are two distinct pa lindromic f actors of W of e ven length, a contradiction. Thus we ha ve shown that conditi ons (A ’) and (B’) are equiv alent. Now we show that (A ’) is equivalent to (C’). The first author showed in [7] t hat every finite Sturmian word is trapezoidal. Thus (A ’) implies (C’). T o see that (C’) implies (A ’), we proceed by induction on | W | . The result i s clearly true if | W | ≤ 2 . Next suppose th e result is true for | W | < N and let W be a trapezoidal palindrom e of lengt h N . Since a t ra pezoidal word is necessarily on a two-letter alphabet, s ay { a, b } , we can writ e, without loss of generality , W = aV a. T hen V is a trapezoidal palindrome, si nce factors of trapezoidal words are trapezoidal (see [5 ] ). By the inductio n hypothesis , V is a Sturmian palin drome. If W is not Sturmian, then there exists a palindrom e U su ch that aU a and bU b are factors of W. Since V is Sturmian, we ha ve aU a is both a p re fix and suffix of W, and bU b is a factor of V . Since in V , al l complete returns to U are p a lindromes, b e tween an o cc urrence of bU b in V and the suffix aU of V there must be an occurrence of bU a. Since V i s a palindrome we have aU b is also a factor of V . Hence each of aU a, bU b, aU b, and bU a is a f actor of W . This implies that both aU and bU are right special factors of W , a c ontradiction since the trapezoidal property implies that for any 0 ≤ n ≤ | W | , t here e xis ts at most one right special factor of W of length n. Thus W must be Sturmian. This concludes our proof of Theorem 2. Remark: A. De Luca [10] sug gested th e fol lo wing alternate si mple p r oof th at (C’) impl ies (A ’): Let W be a trapezoidal palindrome. W ithout l oss of generality we can ass ume th a t | W | ≥ 2 , for otherwise the result is clear . Let U denote the longest proper palindromi c suf fix of W. Since W is a palin drome, U is the long e st border of W , whence | W | = π W + | U | . By Proposition 2, W is rich, hence U is the longest repeated suffi x of W . Thus K W = | U | + 1 . Since W is trapezoidal we ha ve that π W = | W | − | U | = R W + K W − | U | = R W + 1 . By Proposition 28 of [8] we deduce that W is Sturmian. R E F E R E N C E S [1] P . Ambr o ˇ z, Z. Mas ´ akov ´ a, E. Pelantov ´ a , C. Frougny , Palindr omic complexity of infinite words a s sociated with simple Parry numbers, Ann. Inst. Fourier (Grenoble) , 56 (2006), p. 2131–2 160. [2] V . Anne, L.Q. Zamboni, I. Z orca, Palindromes and p s eudo-p alindromes in episturm ian and pseu do- palindro mic infinite w ords, In W ords 2005 , (S. Brlek, C. Reutenauer , ed itors) , 36 Pub lications du LA CIM, p. 91–10 0, 2005 . [3] J. Berstel, P . S ´ e ´ eb old, Sturmian words, in Algebraic Combinatorics on W ord s, En c y clopedia of Mathemat- ics and its Application s , 90 , C ambridg e University Press, ISBN: 05 21812208 , 20 02. [4] M. Bucc i, A. De Lu ca, A. Glen , L.Q. Zambon i, A co nnection between palindro mic and factor c omplexity using return words, preprint (2008). [5] F . D’ Aless andro, A comb inatorial p roblem on trapezo idal words, Th eor et. Comput. Sci., 273 (2002 ), p. 11–33 . RICH, STUR M IAN, AND TRAPEZ OID AL WORDS 7 [6] A. de Luca, Sturmian words: structure combina torics an d their arithmetics, Theor et. Compu t. S ci. , 183 (1997 ), p. 45–82 . [7] A. de Lu ca, On the com binatorics of finite words, Theoret. Comp. Sci. 218 (199 9), p. 13–3 9. [8] A. de Lu ca, A. De Luc a, Combin atorial Properties of Sturmian Palindromes, Intern at. J. Foun d. Comput. Sci., 17 (2006 ), p. 557–5 74. [9] A. de L uca, A. De Luca, Some cha racterizations of finite Stur mian words, Theoret. Comput. Sc i., 356 (2006 ), p. 118–1 25. [10] A. De Luca, priv ate communication. [11] X. Droub ay , J. Justin, G. Pirillo , Epistur mian words and some con structions of de Luca and Rauzy , Theoret. Comput. Sci. 255 (2001) , p. 539–5 53. [12] X. Droub ay , G. Pirillo, P a lindromes and sturm ian words, Theoret. Comp ut. Sci., 22 3 (19 99), p. 73– 85. [13] S. Ferenczi, L.Q. Zamboni, Language of k -interval e x change transfor mations, Bull. London Math. Soc. , to appear (2008 ). [14] S. Ferenczi, L.Q. Zambon i, Structure of symmetric k -interval exchange transformations, preprint (2008). [15] A. Glen, J. Justin, S. W idmer, L. Q. Za mboni, Palindrom ic richness, preprin t 2008 . D I P A RT I M E N T O D I M AT E M A T I C A E A P P L I C A Z I O N I “ R . C AC C I O P P O L I ” , U N I V E R S I T ` A D E G L I S T U D I D I N A P O L I F E D E R I C O I I , V I A C I N T I A , M O N T E S . A N G E L O , I - 8 0 1 2 6 N A P O L I , I TALY E-mail addr ess : aldo.delu ca@unina.it L A C I M , U N I V E R S I T ´ E D U Q U ´ E B E C ` A M O N T R ´ E A L , C . P . 8 8 8 8 , S U C C U R S A L E C E N T R E - V I L L E , M O N T R ´ E A L , Q U ´ E B E C , H 3 C 3 P 8 , C A NA DA . E-mail addr ess : amy.glen@ gmail.com I N S T I T U T C A M I L L E J O R DA N , U N I V E R S I T ´ E C L AU D E B E R N A R D L YO N 1 , 4 3 B O U L E V A R D D U 1 1 N O V E M B R E 1 9 1 8 , 6 9 6 2 2 V I L L E U R B A N N E C E D E X F R A N C E E-mail addr ess : luca@unt. edu

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment