Prefix palindromic length of the Thue-Morse word
Anna E. Frid
Aix Marseille Univ, CNRS
Centrale Marseille, I2M
Marseille, France
[email protected]
( )
Abstract
The prefix palindromic length PPLu(n) of an infinite word u is the minimal number of concatenated palindromes needed to express the prefix of length n of u. In a 2013 paper with Puzynina and Zamboni we stated the conjecture that PPLu(n) is unbounded for every infinite word u which
is not ultimately periodic. Up to now, the conjecture has been proven for almost all words, including all words avoiding some power p. However, even in that simple case the existing upper bound for the minimal number n such that PPLu(n)>K is greater than any constant to the power K. Precise values of PPLu(n) are not known even for simplest examples like the Fibonacci word.
In this paper, we give the first example of such a precise computation and compute the function of the prefix palindromic length A307319 of the Thue-Morse word A010060, a famous test object for all functions on infinite words. It happens that this sequence is 2-regular, which raises the question if this fact can be generalized to all automatic sequences.
1 Introduction
By the usual definition, a palindrome is a finite word p=p[1]⋯p[n] on a finite alphabet such that p[i]=p[n−i+1] for every i. We consider decompositions of a finite word s to a minimal number of palindromes which we call a palindromic length of s: for example, the palindromic length of abbaba is equal to 3 since this word is not a concatenation of two palindromes, but abbaba=(abba)(b)(a)=(a)(bb)(aba). A decomposition to a minimal possible number of palindromes is called optimal.
In this paper, we are interested in the palindromic length of prefixes of an infinite word u=u[1]⋯u[n]⋯, denoted by PPLu(n).
The length of the shortest prefix of u of palindromic length k is denoted by SPu(k) and can be considered as a kind of an inverse function to PPLu(n). Clearly, SPu(k) can be infinite: for example, if u=abababab⋯, SPu(k)=∞ for every k≥3.
The following conjecture was first formulated, in slightly different terms, in our 2013 paper with Puzynina and Zamboni [12].
Conjecture 1**.**
For every non ultimately periodic word u, the function PPLu(n) is unbounded, or, which is the same, SPu(k)<∞ for every k∈N.
In fact, there were two versions of the conjecture considered in our paper [12], one with the prefix palindromic length and the other with the palindromic length of any factor of u. However, Saarela [14] later proved the equivalence of these two statements.
In the same initial paper [12], the conjecture was proved for the case when u is p-power-free for some p, as well as for the more general case when a so-called (p,l)-condition holds for some p and l. Due to the above-mentioned result by Saarela, this means that the conjecture is proven for almost all words, since almost all words contain as long p-power-free factors as needed. However, for some cases, the conjecture remains unsolved, and, for example, its proof for all Sturmian words [10] required a special technique.
Most published papers on palindromic length concern algorithmic aspects; in particular, there are several fast effective algorithms for computing PPLu(n) [8, 5, 13].
The original proof of Conjecture 1 for the p-power-free words is not constructive. The upper bound for a length N such that PPL(N)≥K for a given K is given as a solution of a transcendental equation and grows with K faster than any exponential function. However, this does not look the best possible bound. So, it is reasonable to state the following conjecture.
Conjecture 2**.**
If a word u is p-power free for some p, then
[TABLE]
or, which is the same, SPu(k)≤Ck for some C. The constant C can be chosen independently of u as a function of p.
In this paper, we consider in detail the case of the Thue-Morse word A010060, a classical example of a word avoiding powers greater than 2 [3]. We give precise formulas for its prefix palindromic length and discuss its properties. This is a simple but necessary step before considering all p-power-free words, or all fixed points of uniform morphisms, or any other family of words containing the Thue-Morse word.
The results of this paper, in less detail, have been announced in the proceedings of DLT 2019 [9], together with some other results on the prefix palindromic length.
Throughout this paper, we use the notation w(i..j]=w[i+1]..w[j] for a factor of a finite or infinite word w starting at position i+1 and ending at j.
The following lemma is a particular case of a statement by Saarela [14, L. 6]. We give its proof for the sake of completeness.
Lemma 3**.**
For every word u and for every n≥0, we have
[TABLE]
Proof.
Consider the prefixes v and va of u of length n and n+1 respectively. Clearly, for any decomposition u=p1⋯pk to k palindromes ua=p1⋯pka is a decomposition of ua to k+1 palindrome. On the other hand, for any palindromic decomposition ua=q1⋯qk, we have either qk=a, and then u=q1⋯qk−1, or qk=apka, for a (possibly empty) palindrome pk, and then u=q1⋯qk−1apk is a decomposition of u to k+1 palindromes. If initial decompositions were optimal, this gives PPLu(n+1)≤PPLu(n)+1 and PPLu(n)≤PPLu(n+1)+1. ∎
So, the first differences of the prefix palindromic length can be equal only to -1, 0, or 1, and the graph never jumps.
In this paper, it is convenient to consider the famous Thue-Morse word A010060
[TABLE]
as the fixed point starting with a of the morphism
[TABLE]
Both images of letters under this morphism, which is the square of the usual Thue-Morse morphism a→ab,b→ba, are palindromes.
It is thus easy to see that every prefix of the Thue-Morse word of length 4k is a palindrome, so that PPLt(4k)=1 for all k≥0. The first values of PPLt(n) and of SPt(k) are given below, see also the A307319 entry of the OEIS [15].
[TABLE]
As for the shortest prefix of a given palindromic length, we give its length in decimal and quaternary notation; see also the A320429 entry of the OEIS [15].
[TABLE]
Now we are going to prove the self-similarity properties which we observe.
2 Recurrence relations
Theorem 4**.**
The following identities hold for all n≥0:
[TABLE]
To prove Theorem 4, we need several observations. First of all, the shortest non-empty palindrome factors in the Thue-Morse word are a, b, aa, bb, aba, bab, abba, baab. All palindromes of length more than 3 are of even length and have aa or bb in the center: if t(i..i+2k] is a palindrome, then t(i+k−1,i+k+1]=aa or bb.
Let us say that an occurrence of a palindrome t(i..j] is of type (i′,j′) if i′ is the residue of i and j′ is the residue of j modulo 4. For example, the palindrome t(5..7]=aa is of type (1,3), the palindrome t(4,8]=baab is of type (0,0), and the palindrome t(7..9]=bb is of type (3,1).
Proposition 5**.**
Every occurrence of a palindromic factor of length not equal to one or three to the Thue-Morse word is of a type (m,4−m) for some m∈{0,1,2,3}.
Proof.
Every such a palindrome in the Thue-Morse word is of even length which we denote by 2k, and every occurrence of it is of the form t(i..i+2k]. Its center t(i+k−1,i+k+1] is equal to aa or bb, and these two words always appear in t at positions of the form t(2l−1,2l+1] for some l≥1. So, i+k−1=2l−1, meaning that i=2l−k and i+2k=2l+k. So, modulo 4, we have i+(i+2k)=4l≡0, that is, i≡−(i+2k). ∎
Note that the palindromes of odd length in the Thue-Morse word are, first, a and b, which can be of type (0,1), (1,2), (2,3) or (3,0), and second, aba and bab, which can only be of type (2,1) or (3,2).
Proposition 6**.**
Let t(i..i+k] for i>0 be a palindrome of length k>0 and of type (m,4−m) for some m=0. Then t(i−1..i+k+1] is also a palindrome, as well as t(i+1..i+k−1].
Proof.
The type of the palindrome is not (0,0), meaning that its first and last letters t[i+1] and t[i+k] are not the first the last letters of τ-images of letters. Since these first and last letters are equal and their positions in τ-images of letters are symmetric and determine their four-blocks abba or baab, the letters t[i] and t[i+k+1] are also equal, and thus t(i−1..i+k+1] is a palindrome. As for t(i+1..i+k−1], it is a palindrome since is obtained from the palindrome t(i..i+k] by erasing the first and the last letters. ∎
Let us say that a decomposition of t(0..4n] to palindromes is a [math]-decomposition if all palindromes in it are of type (0,0). The minimal number of palindromes in a 0-decomposition is denoted by PPLt0(4n).
Proposition 7**.**
For every n≥1, we have PPLt(n)=PPLt0(4n)≥PPLt(4n).
Proof.
It is sufficient to note that τ is a bijection between all palindromic decompositions of t(0..n] and 0-decompositions of t(0..4n]. ∎
Proposition 8**.**
If (3) holds for n=N−1, then
[TABLE]
Proof.
The equality (3) means that PPLt(4N−2)=min(PPLt(N−1),PPLt(N))+2, but since due to Lemma 3 we have PPLt(N)≤PPLt(N−1)+1, we also have
min(PPLt(N−1),PPLt(N))+2≥PPLt(4N)+1. ∎
Now we can start the main proof of Theorem 4.
The proof is done by induction on n. Clearly, PPLt(0)=0, PPLt(1)=PPLt(4)=1, and PPLt(2)=PPLt(3)=2, the equalities (1)–(4) hold for n=0, and moreover, (1) is true for n=1. Now suppose that they all, and, by Proposition 8, the equality (5), hold for all n<N, and (1) holds also for n=N. We fix an N>0 and prove for it the following sequence of propositions.
Proposition 9**.**
An optimal decomposition to palindromes of the prefix t(0..4N+1] cannot end by a palindrome of length 3.
Proof.
Suppose the opposite: some optimal decomposition of t(0..4N+1] ends by the palindrome t(4N−2..4N+1]. This palindrome is preceded by an optimal decomposition of t(0..4N−2]. So, PPLt(4N+1)=PPLt(4N−2)+1; but by (5) applied to N−1, which we can use by the induction hypothesis, PPLt(4N−2)>PPLt(4N). So, PPLt(4N+1)>PPLt(4N)+1, contradicting to Lemma 3.
∎
Proposition 10**.**
There exists an optimal decomposition to palindromes of the prefix t(0..4N+2] which does not end by a palindrome of length 3.
Proof.
The opposite would mean that all optimal decompositions of t(0..4N+2] end by the palindrome t(4N−1..4N+2] preceded by an optimal decomposition of t(0..4N−1]. So, PPLt(4N+2)=PPLt(4N−1)+1; by the induction hypothesis, PPLt(4N−1)=PPLt(4N)+1. So, PPLt(4N+2)=PPLt(4N)+2, and thus another optimal decomposition of t(0..4N+2] can be obtained as an optimal decomposition of t(0..4N] followed by two palindromes of length 1. A contradiction.
∎
Proposition 11**.**
For every m∈{1,2,3}, the equality holds
[TABLE]
Proof.
Consider an optimal decomposition t(0..4N+m]=p1⋯pk, where k=PPLt(4N+m). Denote the ends of palindromes as 0=e0<e1<⋯<ek=4N+m, so that pi=t(ei−1,ei] for each i. Since m=0 and due to Proposition 5, there exist some palindromes of length 1 or 3 in this decomposition. Let pj be the last of them.
Suppose first that j=k. Then due to the two previous propositions, pk can be taken of length 1 not 3, so that t(0..4N+m−1]=p1⋯pk−1 is decomposable to k−1 palindromes. Due to Lemma 3, we have PPLt(4N+m−1)=k−1, and thus PPLt(4N+m)=PPLt(4N+m−1)+1. Again due to Lemma 3, we have PPLt(4N+m+1)≥PPLt(4N+m)−1=PPLt(4N+m−1), and so the statement holds.
Now suppose that j<k, so that ej≡−ej+1≡ej+2≡⋯≡(−1)k−jekmod4. Here pj is the last palindrome in an optimal decomposition of p1⋯pj and it is of length 1 or 3. But if ej≡1 or 2mod4, pj can be taken of length 1 due to the two previous propositions applied to some smaller length; and if ej≡3mod4, it is of length 1 since the suffix of length 3 of t(0..4n+3]) is equal to abb or to baa, so, it is not a palindrome. So, anyway, we can take pj of length one: pj=t(ej−1,ej].
Since ej≡±ek and ek≡m=0mod4, we may apply Proposition 6 and see that pj′=t(ej−1..ej+1+1] is a palindrome, as well as pj+1′=t(ej+1+1..ej+2−1] and so on up to pk−1′=t(ek−1+(−1)k−j..ek−(−1)k−j]. So, p1⋯pj−1pj′⋯pk−1′ is a decomposition of t(0..4N+m−(−1)k−j] to k−1 palindromes. So, as above, PPLt(4N+m)=PPLt(4N+m−(−1)k−j)+1, and since PPLt(4N+m+(−1)k−j)≥PPLt(4N+m)−1=PPLt(4N+m−(−1)k−j), the proposition holds. ∎
Proposition 12**.**
Every optimal palindromic decomposition of t(0..4N+4] is a 0-decomposition, and thus PPLt(4N+4)=PPLt(N+1).
Proof.
Suppose the opposite; then the last palindrome in the optimal decomposition which is not of type (0,0) is of type (m,0) and thus is of length 1 not 3. Since the proof of Theorem 4 proceeds by induction on N, this proposition is true for all n<N, and thus the palindrome of type (m,0) is the very last palindrome of the optimal decomposition. Since the suffix of length 3 of t(0..4N+4] is equal to bba or aab and thus is not a palindrome, the last palindrome of the optimal decomposition is of length 1, meaning that PPLt(4N+4)=PPLt(4N+3)+1. Now let us use Proposition 11 applied to m=3,2,1; every time we get PPLt(4N+m)=PPLt(4N+m−1)+1. Summing up these inequalities, we get PPLt(4N+4)=PPLt(4N)+4, which is impossible since PPLt(4N)=PPLt(N) and PPLt(4N+4)≤PPLt(N+1)≤PPLt(N)+1. A contradiction. ∎
We have proven
(1) for n=N+1. It remains to prove (2)–(4) for n=N. Indeed, we know that
[TABLE]
Now to prove (2) suppose by contrary that PPLt(4N+1)≤PPLt(4N)=PPLt(N). Due to Proposition 11, this means that PPLt(4N+1)=PPLt(4N+2)+1, that is, PPLt(4N+2)<PPLt(4N), and, again by Proposition 11, PPLt(N+1)=PPLt(4N+2)−2. Thus, PPLt(N)−PPLt(N+1)≥3, a contradiction to (6).
So, (2) is proven.
The equality (4) is proven symmetrically. Now (3) follows from both these equalities in combination with Proposition 11, completing the proof of Theorem 4.
3 Corollaries
The first differences (dt(n))n=0∞ of the prefix palindromic length are defined as dt(n)=PPLt(n+1)−PPLt(n); here we set PPLt(0)=0. Due to Lemma 3, dt(n)∈{−1,0,+1} for every n; so, it is a sequence on a finite alphabet which we prefer to denote {\leavevmodeto12.54pt\vboxto12.54pt\pgfpicture\makeatletter\lower-2.0ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfont\pgfsys@beginscope\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscopeto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.8pt\pgfsys@invoke \pgfsys@moveto0.0pt8.5359pt\pgfsys@lineto8.5359pt0.0pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@moveto2.0pt8.5359pt\pgfsys@curveto2.0pt9.64049pt1.10458pt10.5359pt0.0pt10.5359pt\pgfsys@curveto-1.10458pt10.5359pt-2.0pt9.64049pt-2.0pt8.5359pt\pgfsys@curveto-2.0pt7.43132pt-1.10458pt6.5359pt0.0pt6.5359pt\pgfsys@curveto1.10458pt6.5359pt2.0pt7.43132pt2.0pt8.5359pt\pgfsys@closepath\pgfsys@moveto0.0pt8.5359pt\pgfsys@fill\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \pgfsys@transformcm1.00.00.01.00.0pt8.5359pt\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@moveto10.5359pt0.0pt\pgfsys@curveto10.5359pt1.10458pt9.64049pt2.0pt8.5359pt2.0pt\pgfsys@curveto7.43132pt2.0pt6.5359pt1.10458pt6.5359pt0.0pt\pgfsys@curveto6.5359pt-1.10458pt7.43132pt-2.0pt8.5359pt-2.0pt\pgfsys@curveto9.64049pt-2.0pt10.5359pt-1.10458pt10.5359pt0.0pt\pgfsys@closepath\pgfsys@moveto8.5359pt0.0pt\pgfsys@fill\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \pgfsys@transformcm1.00.00.01.08.5359pt0.0pt\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture,\leavevmodeto12.54pt\vboxto4pt\pgfpicture\makeatletter\lower-2.0ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfont\pgfsys@beginscope\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscopeto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.8pt\pgfsys@invoke \pgfsys@moveto0.0pt0.0pt\pgfsys@lineto8.5359pt0.0pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@moveto2.0pt0.0pt\pgfsys@curveto2.0pt1.10458pt1.10458pt2.0pt0.0pt2.0pt\pgfsys@curveto-1.10458pt2.0pt-2.0pt1.10458pt-2.0pt0.0pt\pgfsys@curveto-2.0pt-1.10458pt-1.10458pt-2.0pt0.0pt-2.0pt\pgfsys@curveto1.10458pt-2.0pt2.0pt-1.10458pt2.0pt0.0pt\pgfsys@closepath\pgfsys@moveto0.0pt0.0pt\pgfsys@fill\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \pgfsys@transformcm1.00.00.01.00.0pt0.0pt\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@moveto10.5359pt0.0pt\pgfsys@curveto10.5359pt1.10458pt9.64049pt2.0pt8.5359pt2.0pt\pgfsys@curveto7.43132pt2.0pt6.5359pt1.10458pt6.5359pt0.0pt\pgfsys@curveto6.5359pt-1.10458pt7.43132pt-2.0pt8.5359pt-2.0pt\pgfsys@curveto9.64049pt-2.0pt10.5359pt-1.10458pt10.5359pt0.0pt\pgfsys@closepath\pgfsys@moveto8.5359pt0.0pt\pgfsys@fill\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \pgfsys@transformcm1.00.00.01.08.5359pt0.0pt\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture,\leavevmodeto12.54pt\vboxto12.54pt\pgfpicture\makeatletter\lower-2.0ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfont\pgfsys@beginscope\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscopeto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.8pt\pgfsys@invoke \pgfsys@moveto0.0pt0.0pt\pgfsys@lineto8.5359pt8.5359pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@moveto2.0pt0.0pt\pgfsys@curveto2.0pt1.10458pt1.10458pt2.0pt0.0pt2.0pt\pgfsys@curveto-1.10458pt2.0pt-2.0pt1.10458pt-2.0pt0.0pt\pgfsys@curveto-2.0pt-1.10458pt-1.10458pt-2.0pt0.0pt-2.0pt\pgfsys@curveto1.10458pt-2.0pt2.0pt-1.10458pt2.0pt0.0pt\pgfsys@closepath\pgfsys@moveto0.0pt0.0pt\pgfsys@fill\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \pgfsys@transformcm1.00.00.01.00.0pt0.0pt\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \definecolor[named]pgffillcolorrgb0,0,0\pgfsys@color@gray@fill0\pgfsys@invoke \pgfsys@moveto10.5359pt8.5359pt\pgfsys@curveto10.5359pt9.64049pt9.64049pt10.5359pt8.5359pt10.5359pt\pgfsys@curveto7.43132pt10.5359pt6.5359pt9.64049pt6.5359pt8.5359pt\pgfsys@curveto6.5359pt7.43132pt7.43132pt6.5359pt8.5359pt6.5359pt\pgfsys@curveto9.64049pt6.5359pt10.5359pt7.43132pt10.5359pt8.5359pt\pgfsys@closepath\pgfsys@moveto8.5359pt8.5359pt\pgfsys@fill\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@beginscope\pgfsys@invoke \pgfsys@transformcm1.00.00.01.08.5359pt8.5359pt\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}. We write these symbols joining the ends of intervals from left to right, so that the sequence (dt(n)) becomes the plot of PPLt(n).
The following corollary of Theorem 4 is more or less straightforward.
Corollary 13**.**
The sequence (dt(n)) is the fixed point of the morphism
[TABLE]
Proof. Theorem 4 immediately means that PPLt(4n),…,PPLt(4n+4) are determined by PPLt(n) and PPLt(n+1), and moreover, dt(4n), …, dt(4n+3) are determined by dt(n). This means exactly that the sequence dt(n) is a fixed point of a morphism of length 4. The equality (2) means that the first symbol of any morphic image of δ is ; the equality (4) means that the last symbol of any morphic image of δ is ; the two symbols in the middle can be found from (3) and depend on dt(n). □
With the previous corollary, we can draw the plot of PPLt(n) as the fixed point of δ.
The next proposition can be obtained from Theorem 4 by elementary computations. Recall that SP(k)=SPt(k) is the length n of the shortest prefix of t such that its palindromic length PPLt(n) is equal to k.
Proposition 14**.**
We have SPt(1)=1, SPt(2)=2, SPt(3)=6 and for all k>0,
[TABLE]
Proof. Let us introduce SP2(k) as the minimal number n such that PPLt(n)=PPLt(n+1)=k. By definition, SP2(k)≥SP(k). The first values of SP(k) and SP2(k) are given below.
[TABLE]
From the definition of the morphism δ we immediately see that a new value n=SP(k) can appear either in the middle of the δ-image of d(n′)=d(SP2(k−2)), or in the middle of the δ-image of d(n′′), where n′′=SP(k−1)−1. The latter case is also the only possible way to get a new value n=SP2(k). So,
[TABLE]
[TABLE]
As we see from the table, for 3≤k≤5, we have
SP(k−1)≤SP2(k−1)<SP(k). The first inequality is obvious, but let us prove the second one by induction. Its base is observed for 3≤k≤5, so, consider k≥6 such that for all k′=k−3,k−2,k−1 we have SP2(k′−1)<SP(k′).
In particular, SP2(k−4)<SP(k−3), so due to (7), we have SP(k−2)=4SP2(k−4)+2, and so due to (8),
[TABLE]
On the other hand, we have SP2(k−2)<SP(k−1), so, (7) becomes SP(k)=4SP2(k−2)+2, and together with (8) this gives
[TABLE]
Combining (9), (10), the induction base SP2(k−4)<SP(k−3) and the fact that all the values are integers, we obtain that SP2(k−1)<SP(k) for all k≥3. We also see that (10) is true for all k≥4, proving this proposition. □
The following corollary of the previous proposition can be proved by straightforward induction.
Corollary 15**.**
In the 4-ary numeration system, we have SP(3k+2)=((12)k2)4 for all k≥0; SP(3k)=(1(12)k−12)4 for all k≥1; SP(3k+1)=(2(12)k−12)4 for all k≥1.
Another direct consequence of Proposition 14 is
Corollary 16**.**
We have
[TABLE]
whereas liminflnnPPLt(n)=0 since PPLt(4m)=1 for all m.
4 Regularity
The sequence (PPLt(n)) is closely related to the Thue-Morse word, the most classical example of a 2-automatic sequence. In general, a sequence w=(w[n]) is called k-automatic if there exists a finite automaton such that for the input equal to the k-ary representation of n, the output is equal to w[n]. Equivalently, due to a theorem by Cobham [7], a sequence is k-automatic if and only if it is an image under a coding c:Σ→Δ of a fixed point of a k-uniform morphism φ: w=c(w′), where w′=φ(w′) [1, Ch. 6]. So, the Thue-Morse word is 2-automatic since it is a fixed point of the 2-uniform morphism a→ab,b→ba, and the sequence (d(n)) is 4-automatic since it is a fixed point of δ. In both cases, the coding can be taken to be trivial: c(x)=x for every letter x. It is also well-known that a sequence is k-automatic if and only if it is km-automatic for any integer m, so, the Thue-Morse word is also 4-automatic and the sequence (d(n)) is 2-automatic.
A more general notion of a k-regular sequence was introduced by Allouche and Shallit [2], see also [1, Ch. 16]. A sequence (a(n)) is called k-regular (on Z) if there exists a finite number of sequences {(a1(n)),…,(as(n))} such that for every integer i≥0 and 0≤b<ki there exist c1,…,cs∈Z such that for all n≥0 we have
[TABLE]
It is also known that a sequence is k-automatic if and only if it is k-regular and takes on finitely many values [1, Thm. 16.1.4]. Moreover, a sequence a=(a(n)) is k-regular if and only if there exist r sequences a1=a,…,ar and a matrix-valued morphism μ such that if
[TABLE]
then
[TABLE]
for 0≤b<k [1, Thm. 16.1.3].
Many sequences related to k-automatic words are k-regular, as it was shown by Charlier, Rampersad and Shallit [6]. However, it seems that the general approach from the mentioned paper does not directly work for the palindromic length, so, we have to prove the following corollary only for the Thue-Morse word.
Corollary 17**.**
The sequence PPLt(n) is 4-regular.
Proof. The sequence (d(n)), here considered on the alphabet {−1,0,1}, is 4-automatic as a fixed point of δ and thus 4-regular, as well as its image (e(n)) under the following coding:
[TABLE]
So, for each b=0,1,2,3 it is sufficient to combine the respective matrices μ for d and e with the following equalities equivalent to Theorem 4:
[TABLE]
Remark 18*.*
In fact, every sequence with k-automatic first differences is k-regular, which can be proven with a similar construction, perhaps with several auxiliary sequences like (e(n)).
5 Conclusion
Up to my knowledge, the results of this paper are thus far only precise formulas for the prefix palindromic length of a non-trivial infinite word not constructed especially for that.
Even for famous and simple examples like Toeplitz words or the Fibonacci word A003849, lower bounds for the prefix palindromic length are difficult [11, 9]. The only more or less universal lower bounds for all p-power-free words are those from the first paper on the subject [12], with SP(k) growing faster than any constant to the power k. Later [11], some calculations allowed a reasonable exponential conjecture on the SP(k) of the Fibonacci word, but it is not clear how to prove it. So, the following more particular open questions can be added to general Conjectures 1 and 2.
Problem 1**.**
Find a precise formula for the prefix palindromic length of the period-doubling word A096268, or a lower bound for its limsup.
Problem 2**.**
Find a precise formula for the prefix palindromic length of the Fibonacci word A003849, or a lower bound for its limsup.
Problem 3**.**
Is it true that the function PPLu(n) is k-regular for any k-automatic word u? Fibonacci-regular for the Fibonacci word?