betaFeedback

WorksComputer Science

An example of an automatic sequence with non-regular abelian complexity

Abstract

Answering a question of Madill and Rampersad, we give an example a of a 22-automatic sequence whose abelian complexity is not 22-regular.

Introduction

Combinatorics on words studies finite or infinite sequences taking their values in a given (usually finite) set, called an alphabet. One branch deals with finite sequences where the elements can be unordered, leading to “abelian concepts”. Two early occurrences of such notions are [11 p. 240] and [20]. For more about this subject and possible applications, see [5, 12].

Here we will address a question about “abelian complexity”. Let x=(x(n))n≥0\mathbf{x}=(x(n))_{n\ge0} be a sequence over a finite alphabet. The factor complexity ρx(n)\rho_{\mathbf{x}}(n) counts the number of distinct length-nn blocks appearing in x\mathbf{x}, while the abelian complexity ρxab(n)\rho_{\mathbf{x}}^{\mathrm{ab}}(n) counts the number of length-nn blocks where the order of the symbols does not matter. Both measures have been studied extensively in the literature; for abelian complexity, see, for example, [25].

A sequence x=(x(n))n≥0\mathbf{x}=(x(n))_{n\ge0} over a finite alphabet is said to be kk-automatic if there is a finite deterministic automaton with output (DFAO) that, on input nn expressed in base k≥2k\ge2, terminates in a state with output x(n)x(n). Equivalently ([9] and [3 Thm. 6.3.2]), a sequence is kk-automatic if and only if it is the image, under a coding, of a fixed point of a kk-uniform morphism (i.e., the image of each letter has length equal to kk). The automatic sequences form a large and interesting class that has been studied for more than 50 years [9, 3].

The kk-regular sequences are a generalization of kk-automatic sequences [2, 3]. We say that a sequence x=(x(n))n≥0\mathbf{x}=(x(n))_{n\ge0} over Z\mathbb{Z} is kk-regular if its kk-kernel

Kk(x):={(x(kin+e))n≥0:i≥0, 0≤e<ki}\mathcal{K}_k(\mathbf{x}) := \left\{(x(k^i n+e))_{n\ge0} : i\ge0,\ 0\le e<k^i\right\}

spans a finite-dimensional vector space over Q\mathbb{Q}.

It is known that the factor complexity of a kk-automatic sequence is kk-regular [6 Prop. 4.3] (a weaker result had been proven earlier by Mossé [18]). A question in Madill and Rampersad [19] (to which the answer was widely conjectured to be yes) asked whether the same is true for the abelian complexity of a kk-automatic sequence. This holds for several sequences that have been investigated, for example, successively:

  • the Thue–Morse sequence, whose abelian complexity is periodic, and hence kk-regular for every kk [25 Thm. 3.1]. That early overview also contains two nice results, namely [25 Thm. 1.7 and Thm. 3.3]. We leave to the reader the pleasure of applying those two theorems to construct kk-automatic sequences whose abelian complexity is periodic, and hence kk-regular for every kk.

  • the regular paperfolding sequence [19].

  • fixed points of kk-uniform morphisms φ\varphi on {0,1}\{0,1\} such that ∣φ(0)∣0−∣φ(1)∣0≠1\lvert\varphi(0)\rvert_0-\lvert\varphi(1)\rvert_0\ne1, which is a consequence of [4 Cor. 1].

  • the Golay–Shapiro sequence (aka the Rudin–Shapiro sequence) [17].

  • the Thue–Morse sequence over a ternary alphabet, which is an easy consequence of [15 Thm. 4.1].

  • the Cantor sequence [8 Thm. 2].

  • the generalized Thue–Morse sequences, which is an easy consequence of [10 Cor. 1].

  • automatic sequences satisfying certain extra conditions [10 Thm. 2].

  • automatic sequences s\mathbf{s} such that the Parikh vectors of the length-nn prefixes of s\mathbf{s} form a synchronized sequence and such that the abelian complexity of s\mathbf{s} is bounded above by a constant [26].

  • automatic sequences that are fixed points of Parikh-collinear morphisms [24 Thm. 3].

  • the 2-block coding of generalized Cantor sequences c\mathbf{c} that have mirror-invariant sets of factors [16 Thm. 1].

An even stronger conjecture appears in [21]: namely, that the ℓ\ell-abelian complexity of a kk-automatic sequence is kk-regular. Several papers give positive answers to this question; see [8 CDO+, 13, 16, 21].

However, in this note we give an example of a kk-automatic sequence whose abelian complexity is not kk-regular (see Theorem 7). This result also refutes a conjecture of Popoli and two of the present authors [PSS24, Conj. 4] about additive complexity, since for binary sequences additive complexity and abelian complexity coincide.

Construction and main theorem

Let N={0,1,2,…}\mathbb{N} = \{0,1,2,\ldots\}. A factor of an infinite word is a finite contiguous subword appearing in it. For a finite word uu, let ∣u∣|u| be its length and ∣u∣a|u|_a the number of occurrences of the letter aa. The abelian complexity ρxab(n)\rho_{\mathbf{x}}^{\mathrm{ab}}(n) of a binary word x\mathbf{x} then counts the distinct pairs (∣u∣0,∣u∣1)(|u|_0, |u|_1) among its length-nn factors [25].

Lemma 1. Let x\mathbf{x} be an infinite binary word. For all n≥0n \ge0, we let MnM_n and LnL_n, respectively, denote the maximum and minimum numbers of 11’s in length-nn factors of x\mathbf{x}. Then, for all n≥0n \ge0, we have ρxab(n)=Mn−Ln+1\rho_{\mathbf{x}}^{\mathrm{ab}}(n) = M_n - L_n + 1.

Proof. Sliding a window one position changes its count by at most 1, so all intermediate counts occur.

Remark 2. For binary sequences the quantity Mn−LnM_n - L_n is exactly the balance function of Adamczewski [1].

For n∈Nn \in\mathbb{N}, define d3(n)d_3(n) to be the number of occurrences of the digit 3 in the base-4 expansion of nn, i.e.,

if n=∑i=0ℓni4i with n0,…,nℓ∈{0,1,2,3}, then d3(n)=∣nℓ⋯n0∣3.\text{if } n = \sum_{i=0}^{\ell} n_i 4^i \text{ with } n_0,\ldots,n_\ell\in\{0,1,2,3\}, \text{ then } d_3(n) = |n_\ell\cdots n_0|_3.

Define the sequences s=(s(n))n≥0\mathbf{s} = (s(n))_{n \ge0} and b=(b(n))n≥0\mathbf{b} = (b(n))_{n \ge0} by

s(n)=d3(n) mod 3s(n) = d_3(n) \bmod3

and

b(n)={1,if s(n)=0;0,if s(n)≠0.b(n) = \begin{cases} 1, & \text{if } s(n) = 0;\\ 0, & \text{if } s(n) \ne0. \end{cases}

The first few values of these sequences can be found in Table 1.

x\mathbf{x}x(0)x(1)x(2)⋯x(63)x(0)x(1)x(2)\cdots x(63)
d3\mathbf{d}_30001000100011112000100010001111200010001000111121112111211122223
s\mathbf{s}0001000100011112000100010001111200010001000111121112111211122220
b\mathbf{b}1110111011100000111011101110000011101110111000000000000000000001

Table 1. The values of the sequences d3\mathbf{d}_3, s\mathbf{s}, and b\mathbf{b} for 0≤n≤630 \le n \le63.

Note that (d3(n))n≥0(d_3(n))_{n\ge0} and (s(n))n≥0(s(n))_{n\ge0} differ for the first time at n=63=43−1n = 63 = 4^3 - 1, for which we have d3(63)=3d_3(63) = 3 and thus s(63)=0s(63) = 0. The binary word b\mathbf{b} records the positions of 0 in s\mathbf{s} (also known as the characteristic sequence of 0’s in s\mathbf{s}).

Since d3(4n+j)=d3(n)d_3(4n+j)=d_3(n) for j<3j<3 and d3(4n+3)=d3(n)+1d_3(4n+3)=d_3(n)+1 for all n≥0n\ge0, we have the following result.

Lemma 3. The sequence ss is the fixed point starting with 0 of the morphism σ:{0,1,2}∗→{0,1,2}∗\sigma:\{0,1,2\}^* \to\{0,1,2\}^*, a↦aaa(a+1)a\mapsto aaa(a+1), where letters are added modulo 3.

Remark 4. It may be interesting to study the morphisms σr\sigma_r, r≥1r\ge1, where a↦ar(a+1)a\mapsto a^r(a+1) and letters are taken mod rr. When r=1r=1 we obtain the Thue–Morse morphism for which the corresponding sequence is 2-automatic and its abelian complexity is 2-regular, as mentioned previously. When r=3r=3 and A={0,1,2}A=\{0,1,2\}, we obtain the morphism of Lemma 3 for which we have Theorem 7. What can be said for other values of rr and AA?

With σ\sigma one can associate the matrix Mσ\mathcal{M}_{\sigma} in N3×3\mathbb{N}^{3\times3} where (Mσ)i,j=∣σ(j)∣i(\mathcal{M}_{\sigma})_{i,j}=|\sigma(j)|_i for i,j∈{0,1,2}i,j\in\{0,1,2\}, i.e.,

Mσ=(301130013).(1)\mathcal{M}_{\sigma} = \begin{pmatrix} 3 & 0 & 1 \\ 1 & 3 & 0 \\ 0 & 1 & 3 \end{pmatrix}. \tag*{(1)}

Its eigenvalues are 44, λ\lambda and λˉ\bar{\lambda}, where λ=12(5+i3)\lambda=\frac{1}{2}(5+i\sqrt{3}).

Lemma 5. Every pair of letters in {0,1,2}\{0,1,2\} occurs in s\mathbf{s}.

Proof. Observe that all three letters occur in σ2(0)=0001000100011112\sigma^2(0)=0001000100011112. Now, for a∈{0,1,2}a\in\{0,1,2\}, the pairs aaaa and a(a+1)a(a+1) occur inside σ(a)\sigma(a), and (a+1)a(a+1)a occurs across the boundary in σ(aa)\sigma(aa).

Lemma 6. The sequence b\mathbf{b} is 2-automatic.

Proof. The sequence s\mathbf{s} is 4-automatic by Lemma 3, as the morphism σ\sigma is 4-uniform. Since b\mathbf{b} is obtained from s\mathbf{s} by applying the coding 0↦10\mapsto1; 1,2↦01,2\mapsto0, the sequence b\mathbf{b} is also 4-automatic. It is known that, for m≥1m\ge1, a sequence is kk-automatic if and only if it is kmk^m-automatic; see, for example, [3 Thm. 6.6.4]. In particular, the sequence b\mathbf{b} is 2-automatic.

We now formulate our main contribution.

Theorem 7. The sequence b\mathbf{b} is 2-automatic, while its abelian complexity ρbab\rho_{\mathbf{b}}^{\mathrm{ab}} is not 2-regular.

An exact formula for a subsequence of ρbab\rho_{\mathrm{b}}^{\mathrm{ab}}

For all m∈Nm \in\mathbb{N}, write Nm=(Nm(0),Nm(1),Nm(2))N_m=(N_m(0),N_m(1),N_m(2)), where Nm(a)=∣σm(0)∣aN_m(a)=\lvert\sigma^m(0)\rvert_a, i.e., NmTN_m^{\mathsf{T}} is the first column of the matrix (Mσ)m(\mathcal{M}_{\sigma})^m. Observe that ∑a=02Nm(a)=∣σm(0)∣=4m\sum_{a=0}^{2}N_m(a)=\lvert\sigma^m(0)\rvert=4^m. Put

g(m)=max⁡aNm(a)−min⁡aNm(a).(2)g(m)=\max_{a}N_m(a)-\min_{a}N_m(a). \tag*{(2)}

These counts satisfy

N0=(1,0,0),Nm+1(a)=3Nm(a)+Nm(a−1).(3)N_0=(1,0,0),\qquad N_{m+1}(a)=3N_m(a)+N_m(a-1). \tag*{(3)}

The first few values of the vectors (Nm)m≥0(N_m)_{m\geq0} are

(1,0,0),(3,1,0),(9,6,1),(28,27,9),(93,109,54),(333,420,271),(1,0,0),(3,1,0),(9,6,1),(28,27,9),(93,109,54),(333,420,271),

so the first few values of (g(m))m≥0(g(m))_{m\geq0} are 1,3,8,19,55,1491,3,8,19,55,149. We will prove the following exact formula for the sequence (ρbab(4m))m≥0(\rho_{\mathrm{b}}^{\mathrm{ab}}(4^m))_{m\geq0}, whose first few values are

2, 5, 14, 38, 95, 260, 707, 1787, 4805, 13112.2,\ 5,\ 14,\ 38,\ 95,\ 260,\ 707,\ 1787,\ 4805,\ 13112.

Proposition 8. For all m≥0m\geq0, set a(m)=ρbab(4m)a(m)=\rho_{\mathrm{b}}^{\mathrm{ab}}(4^m). Then, for all m≥0m\geq0, we have

a(m+1)−a(m)=3g(m)anda(m)=2+3∑j=0m−1g(j),a(m+1)-a(m)=3g(m)\quad\text{and}\quad a(m)=2+3\sum_{j=0}^{m-1}g(j),

where the sequence (g(m))m≥0(g(m))_{m\geq0} is defined in (2). In particular, a(m)≡2(mod3)a(m)\equiv2\pmod{3} for all m≥0m\geq0.

To prove this result, we need a lemma.

Lemma 9. To each letter a∈{0,1,2}a\in\{0,1,2\}, assign a real weight wt⁡(a)\operatorname{wt}(a). Define the weight of a word z=z1⋯zℓz=z_1\cdots z_\ell to be the sum of its letter weights, i.e., wt⁡(z)=∑i=1ℓwt⁡(zi)\operatorname{wt}(z)=\sum_{i=1}^{\ell}\operatorname{wt}(z_i). For a∈{0,1,2}a\in\{0,1,2\} and m≥0m\geq0, let wt⁡m(a)\operatorname{wt}_m(a) be the weight of σm(a)\sigma^m(a), and let HmH_m be the greatest weight of a length-4m4^m factor of ss. Then, for all m≥0m\geq0,

Hm+1=Hm+3max⁡awt⁡m(a).H_{m+1}=H_m+3\max_{a}\operatorname{wt}_m(a).

Proof. Take m≥0m\geq0. By Lemma 3, ss is a fixed point of a 4-uniform morphism, so every length-4m+14^{m+1} factor consists of a suffix of one length-4m4^m substitution block, three complete blocks, and a prefix of a fifth block. The suffix and prefix together have length 4m4^m and form a factor of ss, since every pair of letters occurs by Lemma 5. Their weight is at most HmH_m, which shows that Hm+1≤Hm+3max⁡awt⁡m(a)H_{m+1}\leq H_m+3\max_a\operatorname{wt}_m(a).

For equality, for each m≥0m\geq0, choose a letter cmc_m maximizing wt⁡m\operatorname{wt}_m, i.e.,

wt⁡m(cm)=max⁡awt⁡m(a).\operatorname{wt}_m(c_m)=\max_{a}\operatorname{wt}_m(a).

Since σm+1(a)=σm(aaa(a+1))\sigma^{m+1}(a)=\sigma^m(aaa(a+1)), we have wt⁡m+1(a)=3wt⁡m(a)+wt⁡m(a+1)\operatorname{wt}_{m+1}(a)=3\operatorname{wt}_m(a)+\operatorname{wt}_m(a+1). Recall that letters are taken modulo 3; the alphabet is Z/3Z\mathbb{Z}/3\mathbb{Z}. We can choose the letters of the sequence (cm)m≥0(c_m)_{m\geq0} successively with cm+1∈{cm−1,cm}c_{m+1}\in\{c_m-1,c_m\}. Indeed, we have

wt⁡m+1(cm)−wt⁡m+1(cm+1)=3wt⁡m(cm)−2wt⁡m(cm+1)−wt⁡m(cm−1)≥0,\operatorname{wt}_{m+1}(c_m)-\operatorname{wt}_{m+1}(c_m+1)=3\operatorname{wt}_m(c_m)-2\operatorname{wt}_m(c_m+1)-\operatorname{wt}_m(c_m-1)\geq0,

where we used that cm+2=cm−1c_m+2=c_m-1. The inequality wt⁡m+1(cm)≥wt⁡m+1(cm+1)\operatorname{wt}_{m+1}(c_m)\geq\operatorname{wt}_{m+1}(c_m+1) implies that cm+1c_{m+1} maximizing wt⁡m+1\operatorname{wt}_{m+1} can be chosen in {cm−1,cm}\{c_m-1,c_m\}.

We prove inductively that HmH_m is attained by a factor starting in the first block of either σm(cm−1)σm(cm)\sigma^m(c_m-1)\sigma^m(c_m) or σm(cm)σm(cm+1)\sigma^m(c_m)\sigma^m(c_m+1). In other words, there exist words p,s,x,yp,s,x,y such that spsp is a length-4m4^m factor of maximal weight, with ss nonempty, σm(cm−1)=xs\sigma^m(c_m-1)=xs and σm(cm)=py\sigma^m(c_m)=py; or σm(cm)=xs\sigma^m(c_m)=xs and σm(cm+1)=py\sigma^m(c_m+1)=py.

For the base case m=0m=0, take the single letter c0c_0, at the start of c0(c0+1)c_0(c_0+1), which occurs in ss by Lemma 5. This has maximum weight by definition.

Now turn to the induction step. Write c=cmc=c_m, Ua=σm(a)U_a=\sigma^m(a). The word

σm+1(c−1)σm+1(c)=Uc−1Uc−1Uc−1UcUcUcUcUc+1(4)\sigma^{m+1}(c-1)\sigma^{m+1}(c)=U_{c-1}U_{c-1}U_{c-1}U_cU_cU_cU_cU_{c+1} \tag*{(4)}

is a factor of ss since (c−1)c(c-1)c occurs in ss by Lemma 5. By the induction hypothesis, there is a maximizing factor zz of length 4m4^m starting in the first block of either Uc−1UcU_{c-1}U_c or UcUc+1U_cU_{c+1}. We consider two cases. For a word ww, let pref⁡t(w)\operatorname{pref}_t(w) (resp., suff⁡t(w)\operatorname{suff}_t(w)) be the length-tt prefix (resp., suffix) of ww.

Case 1. Suppose that zz starts in the first block of Uc−1UcU_{c-1}U_c. We have z=suff⁡4m−t(Uc−1)pref⁡t(Uc)z=\operatorname{suff}_{4^m-t}(U_{c-1})\operatorname{pref}_t(U_c) for some 0≤t<4m0\leq t<4^m. In the length-2⋅4m+12\cdot4^{m+1} factor highlighted in (4), consider the factor suff⁡4m−t(Uc−1)UcUcUcpref⁡t(Uc)\operatorname{suff}_{4^m-t}(U_{c-1})U_cU_cU_c\operatorname{pref}_t(U_c) starting in position 2⋅4m+t2\cdot4^m+t. Since the weight function is additive, the weight of this length-4m+14^{m+1} factor is

wt⁡(suff⁡4m−t(Uc−1))+wt⁡(UcUcUc)+wt⁡(pref⁡t(Uc))=wt⁡(z)+3wt⁡(Uc)=Hm+3max⁡awt⁡m(a),\begin{aligned} \operatorname{wt}(\operatorname{suff}_{4^m-t}(U_{c-1}))+\operatorname{wt}(U_cU_cU_c)+\operatorname{wt}(\operatorname{pref}_t(U_c))=\operatorname{wt}(z)+3\operatorname{wt}(U_c) \\ &=H_m+3\max_a\operatorname{wt}_m(a), \end{aligned}

by definition of cc and zz. Since we have found a length-4m+14^{m+1} factor with this weight, we conclude that Hm+1≥Hm+3max⁡awt⁡m(a)H_{m+1}\geq H_m+3\max_a\operatorname{wt}_m(a).

Case 2. Suppose that zz starts in the first block of UcUc+1U_cU_{c+1}. We have z=suff⁡4m−t(Uc)pref⁡t(Uc+1)z=\operatorname{suff}_{4^m-t}(U_c)\operatorname{pref}_t(U_{c+1}) for some 0≤t<4m0\leq t<4^m. In the length-2⋅4m+12\cdot4^{m+1} factor highlighted in (4), consider the factor suff⁡4m−t(Uc)UcUcUcpref⁡t(Uc+1)\operatorname{suff}_{4^m-t}(U_c)U_cU_cU_c\operatorname{pref}_t(U_{c+1}) starting in position 3⋅4m+t3\cdot4^m+t. Similarly to the first case, its weight is Hm+3max⁡awt⁡m(a)H_m+3\max_a\operatorname{wt}_m(a).

We turn to the proof of Proposition 8.

Proof of Proposition 8. For all n≥0n\geq0, let MnM_n and LnL_n, respectively, denote the maximum and minimum numbers of 1’s in length-nn factors of b\mathbf{b}. By Lemma 1, we have

a(m)=ρbab(4m)=M4m−L4m+1(5)a(m)=\rho_{\mathbf{b}}^{\mathrm{ab}}(4^m)=M_{4^m}-L_{4^m}+1 \tag*{(5)}

for all m≥0m\geq0. To obtain the first formula of the statement, we apply Lemma 9 to two different sequences of weights.

First, apply Lemma 9 to the weights wt⁡(0)=1\operatorname{wt}(0)=1 and wt⁡(1)=wt⁡(2)=0\operatorname{wt}(1)=\operatorname{wt}(2)=0. This particular weight simply counts the number of 0’s in words. With the notation of this lemma, HmH_m then gives the maximum number of 0’s in length-4m4^m factors of ss, which is M4mM_{4m} since b\mathbf{b} is the characteristic sequence of 0’s in ss. Now we examine the weight wt⁡m(a)\operatorname{wt}_m(a) of σm(a)\sigma^m(a). Note that each letter 0, 1, 2 in σm(0)\sigma^m(0) corresponds to the letter aa, a+1a+1, a+2a+2 (if we count modulo 3) in σm(a)\sigma^m(a). Therefore, the counts of 0, 1, 2 in σm(a)\sigma^m(a) are permutations of the counts of 0, 1, 2 in σm(0)\sigma^m(0). In other words, the columns of (Mσ)m(\mathcal{M}_{\sigma})^m are cyclic permutations of each other. Consequently, recalling the definition of Nm(a)=∣σm(0)∣aN_m(a)=|\sigma^m(0)|_a at the beginning of the section, Lemma 9 with Hm+1=Hm+3max⁡awt⁡m(a)H_{m+1}=H_m+3\max_a\operatorname{wt}_m(a) yields the recurrence relation

M4m+1=M4m+3max⁡aNm(a).M_{4m+1}=M_{4m}+3\max_a N_m(a).

Second, applying Lemma 9 to the weights wt⁡(0)=−1\operatorname{wt}(0)=-1 and wt⁡(1)=wt⁡(2)=0\operatorname{wt}(1)=\operatorname{wt}(2)=0 gives in a similar way

L4m+1=L4m+3min⁡aNm(a).L_{4m+1}=L_{4m}+3\min_a N_m(a).

Together with (5), these recurrence relations give

a(m+1)=M4m+1−L4m+1+1=M4m−L4m+1+3(max⁡aNm(a)−min⁡aNm(a))=a(m)+3g(m),\begin{aligned} a(m+1)&=M_{4m+1}-L_{4m+1}+1\\ &=M_{4m}-L_{4m}+1+3\left(\max_a N_m(a)-\min_a N_m(a)\right)\\ &=a(m)+3g(m), \end{aligned}

which is the first equality of the statement. For the second, use this recurrence repeatedly and recall that a(0)=2a(0)=2. □

Parity and non-regularity

In this section, we consider the complex numbers

ω=e2πi/3=−12+i32andλ=3+ω=(5+i3)/2=7eiθ,\omega=e^{2\pi i/3}=-\frac{1}{2}+i\frac{\sqrt{3}}{2} \quad\text{and}\quad \lambda=3+\omega=(5+i\sqrt{3})/2=\sqrt{7}e^{i\theta},

where θ=arctan⁡(3/5)\theta=\arctan(\sqrt{3}/5) is the argument of λ\lambda (recall that λ\lambda is an eigenvalue of Mσ\mathcal{M}_{\sigma} defined in (1)).

Lemma 10. We have ∑a=02Nm(a)=4m\sum_{a=0}^{2}N_m(a)=4^m and ∑a=02ωaNm(a)=λm\sum_{a=0}^{2}\omega^aN_m(a)=\lambda^m.

Proof. The first equality follows by definition, as we have

∑a=02Nm(a)=∑a=02∣σm(0)∣a=∣σm(0)∣=4m.\sum_{a=0}^{2}N_m(a)=\sum_{a=0}^{2}|\sigma^m(0)|_a=|\sigma^m(0)|=4^m.

For the second equality, we proceed by induction on m≥0m\ge0. The case m=0m=0 is clear, since N0=(1,0,0)N_0=(1,0,0) and for m=1m=1, we have N1=(3,1,0)N_1=(3,1,0), so

∑a=02ωaN1(a)=ω0⋅3+ω⋅1+ω2⋅0=λ\sum_{a=0}^{2}\omega^aN_1(a)=\omega^0\cdot3+\omega\cdot1+\omega^2\cdot0=\lambda

by definition. Now assume that the second equality holds for m≥0m \ge0. Using the recurrence given in (3), the fact that ω−1=ω2\omega^{-1}=\omega^2 and the induction hypothesis, we get

∑a=02ωaNm+1(a)=3∑a=02ωaNm(a)+ω∑a=02ωa−1Nm(a−1)=(3+ω)⋅λm=λm+1,\sum_{a=0}^{2}\omega^aN_{m+1}(a)=3\sum_{a=0}^{2}\omega^aN_m(a)+\omega\sum_{a=0}^{2}\omega^{a-1}N_m(a-1)=(3+\omega)\cdot\lambda^m=\lambda^{m+1},

as desired.

Since the matrix Mσ\mathcal{M}_\sigma has only simple eigenvalues, it is diagonalizable. It is therefore straightforward to express the entries of (Mσ)m(\mathcal{M}_\sigma)^m as linear combinations of the mmth powers of these eigenvalues. In particular, a few elementary manipulations yield the vector NmN_m.

Lemma 11. For each letter a∈{0,1,2}a\in\{0,1,2\}, we have

Nm(a)=4m+2⋅7m/2cos⁡(mθ−2π3a)3.N_m(a)=\frac{4^m+2\cdot7^{m/2}\cos\left(m\theta-\frac{2\pi}{3}a\right)}{3}.

Proof. Using the first equality in Lemma 10 and the two equalities derived from identifying the real and imaginary parts in the second equality of Lemma 10, we obtain a system of three equations in the unknowns Nm(0),Nm(1),Nm(2)N_m(0),N_m(1),N_m(2), whose solution is

Nm(0)=13(4m+2⋅7m/2cos⁡(mθ)).(6)N_m(0)=\frac{1}{3}\left(4^m+2\cdot7^{m/2}\cos(m\theta)\right). \tag*{(6)}
Nm(1)=13(4m−7m/2cos⁡(mθ)+3⋅7m/2sin⁡(mθ)).(7)N_m(1)=\frac{1}{3}\left(4^m-7^{m/2}\cos(m\theta)+\sqrt{3}\cdot7^{m/2}\sin(m\theta)\right). \tag*{(7)}
Nm(2)=13(4m−7m/2cos⁡(mθ)−3⋅7m/2sin⁡(mθ)).(8)N_m(2)=\frac{1}{3}\left(4^m-7^{m/2}\cos(m\theta)-\sqrt{3}\cdot7^{m/2}\sin(m\theta)\right). \tag*{(8)}

Recalling the formula cos⁡(x−y)=cos⁡(x)cos⁡(y)+sin⁡(x)sin⁡(y)\cos(x-y)=\cos(x)\cos(y)+\sin(x)\sin(y) and the particular values cos⁡(2π3)=−12\cos\left(\frac{2\pi}{3}\right)=-\frac{1}{2}, sin⁡(2π3)=32\sin\left(\frac{2\pi}{3}\right)=\frac{\sqrt{3}}{2}, this gives the formula in the statement.

Lemma 12

Lemma 12. The real number θπ\frac{\theta}{\pi} is irrational.

Proof. Using the values N2(0)=9N_2(0)=9 (see the first few values of (Nm)m≥0(N_m)_{m\ge0} given after (3)) and the equality in Lemma 11 for a=0a=0 and m=2m=2, we get cos⁡(2θ)=1114∈Q\cos(2\theta)=\frac{11}{14}\in\mathbb{Q}. Niven’s theorem (see [23 Thm. 1, p. 132] and the discussion there) restricts rational cosines of rational multiples of π\pi to {0,±12,±1}\{0,\pm\frac{1}{2},\pm1\}. This implies that 2θ2\theta is not a rational multiple of π\pi, which is enough.

The next lemma determines the parity of the sequence g(3n)g(3n) in terms of ∣cos⁡(3nθ)∣|\cos(3n\theta)|. The first few values of the latter sequence are shown in Figure 1.

Figure 1. The first few values of (∣cos⁡(3nθ)∣)n≥1(|\cos(3n\theta)|)_{n\geq1}.

Lemma 13. For all n≥1n\ge1, we have g(3n)≡0(mod2)g(3n)\equiv0\pmod{2} if and only if ∣cos⁡(3nθ)∣<1/2|\cos(3n\theta)|<1/2.

Proof. Taking the recurrence (3) modulo 2 shows that the sequence (Nm)m≥1(N_m)_{m\ge1} cycles through the three vectors (1,1,0),(1,0,1),(0,1,1)(1,1,0),(1,0,1),(0,1,1) (note that N0=(1,0,0)N_0=(1,0,0)). Thus, for n≥1n\ge1, N3n(0)N_{3n}(0) is even and the other two counts N3n(1),N3n(2)N_{3n}(1),N_{3n}(2) are odd. From (2), their range g(3n)g(3n) is even exactly when N3n(0)N_{3n}(0) lies strictly between the other two quantities N3n(1),N3n(2)N_{3n}(1),N_{3n}(2). Indeed,

the only orderings of the natural numbers N3n(0)N_{3n}(0), N3n(1)N_{3n}(1), N3n(2)N_{3n}(2) giving an even range are when N3n(1)<N3n(0)<N3n(2)N_{3n}(1) < N_{3n}(0) < N_{3n}(2) or N3n(2)<N3n(0)<N3n(1)N_{3n}(2) < N_{3n}(0) < N_{3n}(1). Lemma 11 gives

(Nm(0)−Nm(1))(Nm(0)−Nm(2))=7m9(3cos⁡(mθ)−3sin⁡(mθ))(3cos⁡(mθ)+3sin⁡(mθ))=7m3(3cos⁡2(mθ)−sin⁡2(mθ))=7m3(4cos⁡2(mθ)−1).\begin{aligned} (N_m(0)-N_m(1))(N_m(0)-N_m(2)) &= \frac{7^m}{9}\left(3\cos(m\theta)-\sqrt{3}\sin(m\theta)\right)\left(3\cos(m\theta)+\sqrt{3}\sin(m\theta)\right) \\ &= \frac{7^m}{3}\left(3\cos^2(m\theta)-\sin^2(m\theta)\right) \\ &= \frac{7^m}{3}\left(4\cos^2(m\theta)-1\right). \end{aligned}

Consequently,

g(3n)≡0(mod2)⟺73n3(4cos⁡2(3nθ)−1)<0⟺∣cos⁡(3nθ)∣<1/2.(9)g(3n) \equiv0 \pmod{2} \Longleftrightarrow\frac{7^{3n}}{3}\left(4\cos^2(3n\theta)-1\right)<0 \Longleftrightarrow|\cos(3n\theta)|<1/2. \tag*{(9)}

as desired.

Recall that a sequence (x(n))n≥0(x(n))_{n\geq0} is eventually periodic if x(n+p)=x(n)x(n+p)=x(n) for some p≥1p\geq1 and all sufficiently large nn.

Proposition 14. The sequence (ρab(4m) mod 2)m≥0(\rho_{ab}(4^m)\bmod2)_{m\geq0} is not eventually periodic.

Proof. For the sake of conciseness, set a(m)=ρab(4m)a(m)=\rho_{ab}(4^m) for all m≥0m\geq0.

Recall that Lemma 12 implies that θ\theta is not a rational multiple of π\pi. Fix a positive integer pp. The angles (3pnθ)n≥1(3pn\theta)_{n\geq1} are dense modulo π\pi, even after deleting finitely many terms. This is the density theorem for irrational rotations (Kronecker’s theorem); see, e.g., [14 Thm. 439, p. 376]. The conditions ∣cos⁡t∣<1/2|\cos t|<1/2 and ∣cos⁡t∣>1/2|\cos t|>1/2 each hold on nonempty open intervals. Lemma 13 implies that (g(3pn) mod 2)n≥1(g(3pn)\bmod2)_{n\geq1} takes both values infinitely often. It follows that (g(m) mod 2)m≥0(g(m)\bmod2)_{m\geq0} cannot be eventually periodic with any period pp. By Proposition 8, the same is true of (a(m) mod 2)m≥0(a(m)\bmod2)_{m\geq0}, since eventual periodicity is preserved by taking first differences. This proves the statement.

We have everything in our hands to prove the main theorem.

Proof of Theorem 7. The fact that the sequence b is 2-automatic follows from Lemma 6. Now assume, to the contrary, that ρbab\rho_{\mathrm{b}}^{\mathrm{ab}} is 2-regular. By [3 Cor. 16.1.6], the sequence (ρbab(n) mod 2)n≥0(\rho_{\mathrm{b}}^{\mathrm{ab}}(n) \bmod2)_{n\geq0} is 2-automatic.

Observe that, if a sequence (x(n))n≥0(x(n))_{n\geq0} is 2-automatic, then the sequence (x(4n))n≥0(x(4^n))_{n\geq0} is eventually periodic. Indeed, there is a DFAO A\mathcal{A} that, when fed with the binary expansion of nn, outputs x(n)x(n). Since the binary expansion of 4n4^n is 1(00)n1(00)^n for every n≥0n\geq0, the sequence of states (q0⋅1(00)n)n≥0(q_0 \cdot1(00)^n)_{n\geq0} reached from the initial state of A\mathcal{A} is eventually periodic. As the state set is finite, this sequence is eventually periodic, and hence so is the corresponding output sequence (x(4n))n≥0(x(4^n))_{n\geq0}.

Applying this to our case, the sequence (ρbab(4n) mod 2)n≥0(\rho_{\mathrm{b}}^{\mathrm{ab}}(4^n) \bmod2)_{n\geq0} is eventually periodic, contradicting Proposition 14. □

Acknowledgments

Narad Rampersad is supported by NSERC grant RGPIN-2025-04076. Michel Rigo is supported by the FNRS grant T.196.23 (PDR). Jeffrey Shallit is supported by NSERC grant RGPIN-2024-03725. Manon Stipulanti is an FNRS Research Associate (CQ) supported by the Research grant 1.C.104.24F.

Declaration of AI Usage

Part of this paper was obtained through extended discussion with GPT Astra 6, a large language AI model. We have extensively rewritten the original arguments. The authors take responsibility for all of the contents.

References

  1. [1]Boris Adamczewski. Balances for fixed points of primitive substitutions. Theoret. Comput. Sci., 307:47–75, 2003.DOI
  2. [2]Jean-Paul Allouche and Jeffrey Shallit. The ring of k-regular sequences. Theoret. Comput. Sci., 98(2):163–197, 1992.
  3. [3]Jean-Paul Allouche and Jeffrey Shallit. Automatic Sequences: Theory, Applications, Generalizations. Cambridge University Press, Cambridge, 2003.
  4. [4]Francine Blanchet-Sadri, Daniel Seita, and David Wise. Computing abelian complexity of binary uniform morphic words. Theoret. Comput. Sci., 640:41–51, 2016.
  5. [5]Manolis Christodoulakis and Michalis Christou. Abelian concepts in strings: a review. In Jan Holub, Bruce W. Watson, and Jan Ždárek, editors, Festschrift for Bořivoj Melichar, pages 19–45. Czech Technical University, Prague, 2012. Available at https://www.stringology.org/papers/Festschrift_BM70.pdf.
  6. [6][CD10] Arturo Carpi and Valerio D’Alonzo. On factors of synchronized sequences. Theoret. Comput. Sci., 411(44-46):3932–3937, 2010.DOI
  7. [8][CLW18] Jin Chen, Xiao-Tao Lü, and Wen Wu. On the k-abelian complexity of the Cantor sequence. J. Combin. Theory Ser. A, 155:287–303, 2018.arxiv.org/abs/1703.04063
  8. [9][Cob72] Alan Cobham. Uniform tag sequences. Math. Systems Theory, 6:164–192, 1972.DOI
  9. [10][CW19] Jin Chen and Zhi-Xiong Wen. On the abelian complexity of generalized Thue-Morse sequences. Theoret. Comput. Sci., 780:66–73, 2019.DOI
  10. [11][Erd61] Paul Erdős. Some unsolved problems. Magyar Tud. Akad. Mat. Kutató Int. Közl., 6:221–254, 1961.
  11. [12][FP23] Gabriele Fici and Svetlana Puzynina. Abelian combinatorics on words: A survey. Computer Sci. Rev., 47:100532, 2023.DOI
  12. [13][Gre15] Florian Greinecker. On the 2-abelian complexity of the Thue-Morse word. Theoret. Comput. Sci., 593:88–105, 2015.arxiv.org/abs/1404.3906
  13. [14][HW79] G. H. Hardy and E. M. Wright. An Introduction to the Theory of Numbers. Oxford University Press, 5th edition, 1979.
  14. [15][KK17] Idrissa Kaboré and Boucaré Kientéga. Abelian complexity of Thue-Morse word over a ternary alphabet. In Combinatorics on words, volume 10432 of Lecture Notes in Comput. Sci., pages 132–143. Springer, Cham, 2017.DOI
  15. [16][LCW22] Xiao-Tao Lü, Jin Chen, and Zhi-Xiong Wen. On the 2-abelian complexity of generalized Cantor sequences. Theoret. Comput. Sci., 936:172–183, 2022.DOI
  16. [17][LCWW17] Xiao-Tao Lü, Jin Chen, Zhi-Xiong Wen, and Wen Wu. On the abelian complexity of the Rudin-Shapiro sequence. J. Math. Anal. Appl., 451(2):822–838, 2017.DOI
  17. [18][Mos96] Brigitte Mossé. Reconnaissabilité des substitutions et complexité des suites automatiques. Bull. Soc. Math. France, 124(2):329–346, 1996.DOI
  18. [19][MR13] Blake Madill and Narad Rampersad. The abelian complexity of the paperfolding word. Discrete Math., 313(7):831–838, 2013.arxiv.org/abs/1208.2856
  19. [20][Par66] Rohit J. Parikh. On context-free languages. J. Assoc. Comput. Mach., 13:570–581, 1966.DOI
  20. [21]Aline Parreau, Michel Rigo, Eric Rowland, and Élise Vandomme. A new approach to the 2-regularity of the ℓ-abelian complexity of 2-automatic sequences. Electron. J. Combin., 22(1):Paper 1.27, 44, 2015.
  21. [23]Bonaventura Paolillo and Giovanni Vincenzi. On the rational values of trigonometric functions of angles that are rational in degrees. Math. Mag., 94(2):132–134, 2021.DOI
  22. [24]Michel Rigo, Manon Stipulanti, and Markus A. Whiteland. Automatic abelian complexities of Parikh-collinear fixed points. Theory Comput. Syst., 68(6):1622–1639, 2024.arxiv.org/abs/2405.18032
  23. [25]Gwénaël Richomme, Kalle Saari, and Luca Q. Zamboni. Abelian complexity of minimal subshifts. J. Lond. Math. Soc. (2), 83(1):79–95, 2011.DOI
  24. [26]Jeffrey Shallit. Abelian complexity and synchronization. INTEGERS, 21:Paper No. A36, 2021.arxiv.org/abs/2011.00453

Paper details

vlnc:W_kgystqwr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC0-1.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

GPT-6 Astra (bare)

View statement
Looking for related papers…
Contents