Université du Québec à Montréal, Montréal (QC), Canada,
11email: [email protected], [email protected] 22institutetext: Institute for Advanced Study in Mathematics
Harbin Institute of Technology, Harbin, PR China
22email: [email protected]
Block-counting sequences are not purely morphic
Abstract
Let be a positive integer larger than , let be a finite word over and let be the number of occurrences of the word in the -expansion of mod for any non-negative integer . In this article, we first give a fast algorithm to generate all sequences of the form ; then, under the hypothesis that is a prime, we prove that all these sequences are -uniformly but not purely morphic, except for ; finally, under the same assumption of as before, we prove that the power series is algebraic of degree over .
1 Introduction, definitions and notation
Given a positive integer larger than and a finite word over , the block-counting sequence counts the number of occurrences of the word in the -expansion of for each non-negative integer . Let us define to be a sequence over such that for all non-negative integer . The analytical as well as the combinatorial properties of these sequences have been studied since 1900’s after Thue and some well-known sequences are strongly related to this notion. Recall that the -Thue-Morse sequence can be defined as (see, for example, Page 15 in [4]) and the -Rudin-Shapiro sequence can also be defined as (see, for example, Example 3.3.1 in [4]). In this article, we review some common properties of usual block-counting sequences and generalize them to all block-counting sequences.
To be able to announce our results, here we recall some definitions and notation. Let be a finite set. It will be called an alphabet and its elements will be called letters. Let denote the free monoid generated by under concatenations and let denote the set of infinite concatenations of elements in . Let . A finite word over the alphabet is an element in and an infinite word over is an element in . Particularly, the empty word is an element in and it is denoted by . The length of a word , denoted by , is the number of letters that it contains. The length of the empty word is and the length of any infinite word is infinite. For any non-empty word , it can be denoted by , where are elements in . A word is called a factor of if there exist two integers such that , this factor can also be denoted by . A factor is called a prefix (resp. a suffix ) of the word if there exists a positive integer such that and (resp. ). For any finite word and any positive integer , let denote the concatenation of copies of , i.e. times. Particularly, . For any pair of words such that is a factor of , let denote the number of occurrences of in .
Let and be two alphabets, a morphism from to is a map from to satisfying for any pair of elements in . The morphism is called -uniform if for all elements , and it is called non-uniform otherwise. A morphism is called a coding function if it is -uniform and it is called non-erasing if for all .
Let be a finite alphabet and let be an infinite sequence over , it is called morphic if there exists an alphabet , an infinite sequence over , a non-erasing morphism from to and a coding function from to , such that is a fixed point of and . Moreover, the sequence is called uniformly morphic if is -uniform for some integer , and it is called non-uniformly morphic otherwise. The sequence is called purely morphic if and .
For any positive integer , let . For any let ; for any , let .
In Section2, we give a fast algorithm to generate all block-counting sequences. It is well-known that the Thue-Morse sequence can be generated by the following algorithm (see, for example, [12, A008277]):
Example 1
Let be a sequence of words over the such that and that for all , then the Thue-Morse sequence satisfies .
In Section2, we prove that the Rudin-Shapiro sequence can also be generalized by a similar algorithm, see 4. More generally, we find fast algorithms to generate all block-counting sequences. These algorithms are given by 3 and 5 in Section2.
From the definitions recalled as above, any morphic word can be classified as either a uniformly morphic word or a non-uniformly morphic word. However, from a recent article [5], Allouche and Shallit proved that all uniformly morphic sequences are also non-uniformly morphic. This result implies that all sequences in the family of morphic sequences are also in its subfamily of non-uniformly morphic sequences. Indeed, many works can be found in the literature in the direction of characterizing all those non-uniformly morphic sequences which are not uniformly morphic, for example, one can find [2][13][7][1][8][9][6]. However, in [5], it is proved actually that all uniformly morphic sequences are also non-uniformly non-purely morphic. In other words, from the construction of the proof given in [5], a nontrivial coding function is required. In Section 3, we investigate all those uniformly morphic sequences which are not purely morphic. It is already known that the Rudin-Shapiro sequence is in this case (Example 26 in [3]). In section 3, we prove that all other sequences in the form of have the same property when and is a prime. The result is announced as follows:
Theorem 2
Let be a prime number and . The sequence is a -uniformly morphic. Moreover, if and , this sequence is purely morphic and if not is it non-purely morphic.
2 Windows functions and
For any positive integer and non-negative integer , let denote the expansion of in the base . For a given word , , let and let . A word is called a -word if . For a given string , let , and let be a function such that for any , satisfies the following propriety:
2.1 Block-counting sequences for non--words
Proposition 3
Let a positive number, let , let be a -word and let . If we let be a sequence of words such that , that
and that , then .
Proof
First, it is obvious that is a prefix of . Now let . For any integers and such that , . Indeed, since , , thus, has exactly one more -factor of length than only if , and this factor can be or not. Moreover, only if is a prefix of . Consequently, only if and . Hence, for any ,
This implies that
which concludes the proof.∎
2.2 Block-counting sequences for -words
Proposition 5
Let be a positive number, let a -word and let . Let be such that and
and let .
By letting if and if not, for , then
Lemma 6
Let be a positive number, , a -word
and let , then for any integer satisfying :
1) ;
2) ;
3) only if is a -word and .
Proof
For any integer satisfying , we first remark that . Since and have the same set of -factors, . Second, if is not a -word than and has the same set of -factors. But if is a -word, then and thus, can have at most one more factors of length than . Consequently, . Moreover, in the latter case, only if is a prefix of . So only if .∎
Proof (of Proposition 5)
We first remark that is a prefix of .
Further, for any integer satisfying and , from Lemma 6,
This implies that
which concludes the proof.∎
Example 7
Let us compute the sequence with. From the previous theorem, set , , and . For any words such that with for some integer , . Thus, one can compute
is the limit of when tends to infinite.∎
3 are not purely morphic
From now on, we work with a prime number.
We first prove that is not purely morphic when . We will need a simple notation, for , let .
Proposition 8
For any prime number and for any , the sub-sequences of the form are either constant (called type 1) or of the form
for some integer (called type 2). Moreover, is of type 2 if and only if is a suffix of .∎
For the sequence , let us define a -block to be a sub-sequence of the form for some integer . From the previous proposition, a -block is either of type 1 or type 2. For a -block of type 2, let us define its index to be an integer such that for all .
Proposition 9
For any prime number and any , if there exists a word such that is a prefix of and that , then is a multiple of .
Proof
Proposition 10
For any prime integer and any , the sequence cannot have a prefix such that for some positive integer .
This proposition will be proved with the help of the following lemmas.
Lemma 11
Let , then for any words and for any positive integer , there exists a word such that , and .
Proof
Let and . It is clear that and because none of the added factor of size ends with .
Lemma 12
Let be a word in such that . Let such that where and are the longest suffixes of respectively and that are prefixes of . Then there exists a word such that and that .
Proof
If , then let .
If , because have , then because doesn’t have multiple suffixes of the same length. Suppose that is the longest. It is clear that . We define to be a word satisfying . In this case, , and .
Now we are able to prove Proposition 10.
Proof (of Proposition 10)
We only need to prove that there exist such that
i.e. there exists some such that and
For , let . One has for some word , some letter and some non-negative integer . Note that . Since is prime, one has if . Thus, there exists such that .
Now we are able to prove the principle theorem in most cases:
Theorem 13
For any prime number and any , the sequence is -uniformly morphic for any and non-purely morphic when and .
Proof
Here we prove the particular cases.
Proposition 14
For any prime number and for any , the sequence is purely morphic.
Proof
It is easy to check that for any non-negative integer , satisfies the following property:
Thus, it is easy to check that is the fixed point of the morphism: for all , where,
∎
Proposition 15
The sequence is non-purely morphic.
Proof
The sequence begins with . Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form . Here we prove that cannot have a prefix of the form with .
If has a prefix of the form with . Let us suppose that for some non-negative integers such that and . First note that for any satisfying .
Also note that, for , and for some . This is because if , then , , , , and .
Finally, note that , because, we know that so if then . Similarly, if .
Now if , then and , which contradicts to .
If , then and , which contradicts to .
If , then and but .
If , then and . Thus, we have . But on the other hand, , which is a contradiction.
In all cases, . ∎
Proposition 16
For any prime number , the sequence is non-purely morphic.
Proof
The sequence begins with . Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form . Here we prove that cannot have a prefix of the form with .
First, let us prove that if is a prefix of , then is a multiple of . It is easy to check that is not a prefix of when . Let us suppose that . In this case, begins with . Thus, .
Let us suppose that for some nonnegative integers such that . We first prove that . If it is the case, then is a multiple of and since has one less than in their p-expansions. this contradicts the fact that .
Now let us suppose that . In this case, contains the factor . Thus, is a factor of type 2 announced in proposition 8. But the word is also a word of type 2 and the word cannot have two different factors of type 2 such that the special letters are at different positions. Thus, should be a prefix of and consequently is a multiple of .
Second, is not a multiple of . Because, if it is in this case, and . But , thus, . Consequently, .
Third, if is not a multiple of but larger than , let us suppose that for some positive integers such that . Let , we then have . But in this case, or , but . Thus, . ∎
Proposition 17
The sequence is non-purely morphic.
Proof
The sequence begins with . Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form . We will prove that its only prefix of square shape is .
Let be a prefix of . Because of that, one can note that , in particular, . Using this, we will prove this proposition by proving all the different possibility for the word .
For now on, can be any word in and and positive integer. Note that the computation is made in binary basis.
i) If with , we have because .
ii) If , one can simply note that .
iii) If then because .
iv) If with then , because .
v) If with we have , because .
vi) Finally, if with , we have on one hand because . We also have , which is a contradiction.
An attentive reader will remark that this cover all the number strictly bigger than 1. ∎
Proposition 18
For any prime number the sequence is non-purely morphic.
Proof
The sequence begins with . Thus, if this sequence is purely morphic, then this sequence has infinitely many prefixes of the form . It suffices to prove that if then is not a prefix of .
Let be a prefix of .
Suppose that . This means that for a word and some letters with . Because is a prefix of , begins with the letters and . Thus .
Let such that ; it exists because and . Thus, . Because , also and or which is not equal to . Therefore, is not a prefix of .
Suppose now that . Let for some positive integer such that and and let for some word and some letter .
Since is prime, there exists such that for some word . Let , thus and .
Since , for any , we have thus which means that .
Hence, cannot be a prefix of if which concludes the proof. ∎
4 Algebraicity
By Christol’s theorem [11], we know that the power series is algebraic over . Now we prove that is algebraic of degree . Indeed, if we let denote , and write for short, then
The irreduciblity of the the above functional equations is straightforward from the Eisenstein’s criterion. We thus have the following propriety:
Proposition 19
For any prime number and any finite word in , the power series is algebraic of degree over .
5 Final remarks
The authors remark that the fast algorithms introduced in Section 2 for -words and non--words are much different. However, the generating functions given in Section 4 for -words and non--words are quite similar. Thus, we believe that the algorithms in Section 2 can be unified for both -words and non--words.
References
- [1] Allouche, G., Allouche, J.P., Shallit, J.: Kolam indiens, dessins sur le sable aux îles Vanuatu, courbe de Sierpinski et morphismes de monoïde. Annales de l’Institut Fourier 56(7), 2115–2130 (2006), https://aif.centre-mersenne.org/articles/10.5802/aif.2235/
- [2] Allouche, J.P., Bétréma, J., Shallit, J.O.: Sur des points fixes de morphismes d’un monoïde libre. RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications 23(3), 235–249 (1989), http://www.numdam.org/item/ITA_1989__23_3_235_0/
- [3] Allouche, J.P., Cassaigne, J., Shallit, J., Zamboni, L.Q.: A taxonomy of morphic sequences (2017), https://arxiv.org/abs/1711.10807
- [4] Allouche, J.P., Shallit, J.: Automatic Sequences: Theory, Applications, Generalizations. Cambridge University Press (2003)
- [5] Allouche, J.P., Shallit, J.: Automatic Sequences Are Also Non-uniformly Morphic, pp. 1–6. Springer International Publishing, Cham (2020), https://doi.org/10.1007/978-3-030-55857-4_1
- [6] Allouche, J.P., Shallit, J., Wen, Z.X., Wu, W., Zhang, J.M.: Sum-free sets generated by the period--folding sequences and some sturmian sequences. Discrete Mathematics 343(9), 111958 (2020), https://www.sciencedirect.com/science/article/pii/S0012365X20301448
- [7] Bartholdi, L.: Endomorphic presentations of branch groups. Journal of Algebra 268(2), 419–443 (2003), https://www.sciencedirect.com/science/article/pii/S0021869303002680
- [8] Bartholdi, L., Siegenthaler, O.: The twisted twin of the Grigorchuk group. International Journal of Algebra and Computation 20(04), 465–488 (2010), https://doi.org/10.1142/S0218196710005728
- [9] Benli, M.G.: Profinite completion of Grigorchuk’s group is not finitely presented. International Journal of Algebra and Computation 22(05), 1250045 (2012), https://doi.org/10.1142/S0218196712500452
- [10] Cateland, E.: Suites digitales et suites k-régulières. Theses, Université Sciences et Technologies - Bordeaux I (Jun 1992), https://tel.archives-ouvertes.fr/tel-00845511
- [11] Christol, G., Kamae, T., Mendès France, M., Rauzy, G.: Suites algébriques, automates et substitutions. Bull. Soc. Math. France 108(4), 401–419 (1980), http://www.numdam.org/item?id=BSMF_1980__108__401_0
- [12] OEIS Foundation Inc.: The On-Line Encyclopedia of Integer Sequences (2022), published electronically at http://oeis.org
- [13] Shallit, J.: Automaticity iv: sequences, sets, and diversity. Journal de Théorie des Nombres de Bordeaux 8(2), 347–367 (1996), http://www.jstor.org/stable/43974217