On Additive Complexity of Infinite Words

Graham Banero Department of Mathematics Simon Fraser University 8888 University Drive Burnaby, BC V5A 1S6 Canada

                    gbanero@sfu.ca

Abstract

We consider questions related to the structure of infinite words (over an integer alphabet) with bounded additive complexity, i.e., words with the property that the number of distinct sums exhibited by factors of the same length is bounded by a constant that depends only on the word. We describe how bounded additive complexity impacts the slope of the word and how a non-erasing morphism may affect the boundedness of a given word’s additive complexity. We prove the existence of recurrent words with constant additive complexity equal to any given odd positive integer. In the last section, we discuss a generalization of additive complexity. Our results suggest that words with bounded additive complexity may be viewed as a generalization of balanced words.

1 Introduction

In this note we consider infinite words ω = x_{1}x_{2}x_{3} ⋯ with x_{i} ∈ S, where S is a set of integers. If B = y_{1}y_{2} ⋯ y_{n} (here B has length n) is a factor of ω, i.e., ω = x_{1}x_{2} ⋯ x_{m}y_{1}y_{2} ⋯ y_{n}z_{1}z_{2} ⋯, then the sum of B is defined by ∑ B = y_{1} + y_{2} + ⋯ + y_{n}. We are primarily concerned with words ω for which there is some M ∈ ℕ such that for all n ≥ 1,

|{∑ B : B is a factor of ω with length n}| ≤ M.

If such an M exists, ω is said to have bounded additive complexity. We will discuss questions such as the following: If ω is an infinite word with bounded additive complexity, what else can we say about ω? What conditions are equivalent to bounded additive complexity? What closure properties does the set of words with bounded additive complexity possess?

1.1 Terminology and Motivation

For the remainder of this note, S, T will always denote sets of integers called alphabets, and unless explicitly stated otherwise we will assume that S and T are finite. An element B = x_{1}x_{2} ⋯ x_{n} of the free monoid S^{∗} generated by S is called a finite word over S with length |B| = n. We define the sum of B as

∑ B = x_{1} + x_{2} + ⋯ + x_{n},

and for s ∈ S, we let

|B|_{s} = |{x_{i} : 1 ≤ i ≤ n, x_{i} = s}| .

If there are words B′, B′′ such that A = B′BB′′ ∈ S^{∗}, then B is said to be a factor of A. The identity element of S^{∗}, called the empty word, has length 0 and sum 0, and is a factor of every word.

An infinite word over S is a sequence ω : ℕ ↦ S and is usually written ω = x_{1}x_{2}x_{3} ⋯, where ω(i) = x_{i} ∈ S for all i ∈ ℕ. The set of infinite words over S is denoted by S^{ℕ}, and we let S^{∞} = S^{∗} ∪ S^{ℕ}. For n ≥ m ∈ ℕ, we let ω[m, n] = x_{m}x_{m+1} ⋯ x_{n}, and the word B ∈ S^{∗} is said to be a factor of ω if there exist m, n such that B = ω[m, n]. In this case, B is said to occur in the interval [m, n] = {m + i : i = 0, 1, …, n − m}. The set of all factors of the infinite word ω is F(ω), and the set of all factors of ω with length n is F^{n}(ω).

An infinite word ω is said to be recurrent if all of its factors occur infinitely often. If there exists, for all n ∈ ℕ, a positive integer K(n) such that every B′ ∈ F^{n}(ω) is a factor of every B ∈ F^{K(n)}(ω), then ω is uniformly recurrent.

Definition 1. For k ∈ ℕ, an additive k-power is a word ω_{1}ω_{2} ⋯ ω_{k} ∈ S^{∗} such that |ω_{1}| = |ω_{2}| = ⋯ = |ω_{k}| and ∑ ω_{1} = ∑ ω_{2} = ⋯ = ∑ ω_{k}. An infinite word ω contains an additive k-power if some factor of ω is an additive k-power.

An infamous problem in combinatorics on words is that of whether or not there exists an infinite word over some finite subset of ℤ containing no additive square (i.e., additive 2-power). This problem, which is to this day unsolved, appears in print as early as 1992 in a paper of Pirillo and Varricchio [14] in the language of semigroups; independently, Halbeisen and Hungerbühler [11] asked the question in the more combinatorial form described here. A number of articles have been inspired by this problem [3, 5, 8, 10]. In particular, Cassaigne, Currie, Schaeffer, and Shallit [5] show that there is an infinite word over {0, 1, 3, 4} with no additive cube (i.e., additive 3-power). There is also relevant information to be found in the study of planar lattice walks [9, 15].

Motivated by this problem of avoidability of additive squares, Ardal, Brown, Jungić, and Sahasrabudhe [2] introduced the notion of additive complexity as follows.

Definition 2. Let ω be an infinite word over the alphabet S. The additive complexity of ω is the map ρ_{ω}^{Σ} : ℕ ↦ ℕ given by

ρ_{ω}^{Σ}(n) = |{∑ B : B ∈ F^{n}(ω)}| .

Thus, ρ_{ω}^{Σ}(n) is the number of distinct sums exhibited by factors of ω with length n. We say that ω has bounded additive complexity if there exists M ∈ ℕ such that ρ_{ω}^{Σ}(n) ≤ M for all n ∈ ℕ.

The definition of the additive complexity of an infinite word is in the same spirit as the abelian complexity [16] of a word ω, which is the function defined on ℕ that, for n ∈ ℕ, counts the maximum number of factors of length n such that no two are permutations of one another. While it is clear that bounded abelian complexity implies bounded additive complexity, Ardal et al. [2] give a simple example to show that the converse is false.

Ardal et al. [2] also proved the following theorem, connecting boundedness of additive complexity with the existence of additive k-powers.

Theorem 3. If ω is an infinite word over S with bounded additive complexity, then ω contains an additive k-power for all k ∈ ℕ.

As an example of infinite words with bounded additive complexity we mention the family of balanced words, i.e., words ω ∈ S^{ℕ} such that for all n ∈ ℕ, any two B, B′ ∈ F^{n}(ω) and any s ∈ S, one has ||B|_{s} − |B′|_{s}| ≤ 1. See the remark after Theorem 4.

1.2 Overview

In Section 2, we define the slope of a word, obtain a new characterization of words with bounded additive complexity in terms of slope, and examine necessary and sufficient conditions for the slope of a word with bounded additive complexity to be a rational number. We develop results pertaining to the factorization of words with bounded additive complexity and rational slope, and prove a closure property for these words involving the contraction of certain intervals.

Section 3 is concerned with the relationship between morphisms (i.e., concatenation preserving mappings) and boundedness of additive complexity. More specifically, we explicitly describe the morphisms which map all words to words with bounded additive complexity. We also describe the words whose image under any morphism has bounded additive complexity. Using the theory developed in this section, we conjecture a way to explicitly construct all words with bounded additive complexity and rational slope.

In Section 4 we construct, for every k ∈ ℕ, a recurrent word ω ∈ {0, 1, …, 2k}^{ℕ} having constant additive complexity (i.e., ρ_{ω}^{Σ}(n) = 2k + 1 for all n ∈ ℕ).

Finally, Section 5 discusses a generalization to complexities defined by an arbitrary morphism S^{∗} ↦ ℤ^{t}, t ≥ 1.

2 Slopes of Words and Bounded Additive Complexity

For a finite word ω, the slope of ω is defined as

slope (ω) = \frac{1}{|ω|} ∑ ω.

The slope of an infinite word ω is

slope (ω) = lim_{n→∞} \frac{1}{n} ∑ ω[1, n] = lim_{n→∞} slope (ω[1, n]) ,

provided that this limit exists. For a word ω, we may visualize each image ω(n) as the point (n, ∑ ω[1, n]) ∈ ℤ^{2} in the plane. Saying that slope (ω) exists is then, intuitively, the same as saying that this set of points has a line of best fit passing through the origin. It is an easy exercise to construct a word ω for which slope (ω) does not exist.

The fact [12, p. 50] that any two nonempty factors B and B′ of a balanced binary word ω ∈ {0, 1}^{ℕ} satisfy

|slope (B) − slope (B′) | < \frac{1}{|B|} + \frac{1}{|B′|}

implies (since then the sequence {slope (ω[1, n])}_{n∈ℕ} is Cauchy) that slope (ω) exists for all balanced binary words. One thereby derives that for all nonempty factors B of ω,

|slope (B) − slope (ω) | ≤ \frac{1}{|B|}.

In fact, a balanced binary word ω is eventually periodic (i.e., there are A, B ∈ {0, 1}^{∗} such that ω = ABBB ⋯) if and only if slope (ω) ∈ ℚ [12, p. 52].

In the rest of this section we will prove generalizations of the aforementioned results, using words with bounded additive complexity in place of balanced binary words.

2.1 Slope of a Word With Bounded Additive Complexity

We start by noticing that there are infinite words whose slope exists, yet do not have bounded additive complexity. For, consider the word ω ∈ {0, 1}^{ℕ}, defined by the rule for all i ∈ ℕ, that ω(i) = 1 if and only i is a power of 2. Since ω contains arbitrarily long factors consisting of only 0s, and yet 1 occurs infinitely many times, ω does not have bounded additive complexity. But clearly, slope (ω) = 0.

Our main tool in this section will be the following theorem of Ardal et al. [2].

Theorem 4. The infinite word ω ∈ S^{ℕ} has bounded additive complexity if and only if there exists M ∈ ℕ such that for all n ∈ ℕ and all B, B′ ∈ F^{n}(ω),

|∑ B − ∑ B′| < M.

Note that this condition holds for balanced words over S if M > ∑_{s∈S} |s|. Further, we have the following lemma from Theorem 4, which generalizes one of the aforementioned properties of balanced binary words.

Lemma 5. Let ω ∈ S^{ℕ} have bounded additive complexity and M be as in Theorem 4. Then, for any two nonempty factors B and B′ of ω,

|slope (B) − slope (B′) | < \frac{M}{|B|} + \frac{M}{|B′|}.

Proof. We use induction on |B|+|B′|. If |B| = |B′|, the claim of the lemma is a restatement of Theorem 4, whence the base case |B|+|B′| = 2 holds. For the inductive step, assume without loss of generality that |B| > |B′|, and put B = CD with |C| = |B′|. Since |D| + |B′| < |B| + |B′|, the induction hypothesis gives

|slope (D) − slope (B′) | < \frac{M}{|D|} + \frac{M}{|B′|}.

Now,

|slope (B) − slope (B′) | = |\frac{|D|}{|B|}slope (D) + \frac{|C|}{|B|}slope (C) − slope (B′)|

≤ \frac{|D|}{|B|}|slope (D) − slope (B′) | + \frac{|C|}{|B|}|slope (C) − slope (B′) |

< \frac{|D|}{|B|} (\frac{M}{|D|} + \frac{M}{|B′|}) + \frac{|C|M}{|B||B′|} = \frac{M}{|B|} + \frac{M}{|B′|},

as desired.

In the following theorem we characterize words with bounded additive complexity in terms of how quickly they approach their slope. Again, we note the analogy with balanced binary words.

Theorem 6. Let ω ∈ S^{ℕ}. Then ρ_{ω}^{Σ}(n) is bounded if and only if slope (ω) exists and there is M ∈ ℕ such that for any nonempty factor B of ω, we have

|slope (B) − slope (ω) | ≤ \frac{M}{|B|}.

Proof. Assume that ω has bounded additive complexity and let M be as in Theorem 4. Lemma 5 shows that the sequence {slope (ω[1, n])}_{n=1}^{∞} is Cauchy, and hence slope (ω) exists.

Let ε > 0 be given. Select N ∈ ℕ with |slope (ω[1, n]) − slope (ω) | < ε and M < nε, for all integers n ≥ N. By Lemma 5,

|slope (B) − slope (ω) | ≤ |slope (B) − slope (ω[1, n]) | + |slope (ω[1, n]) − slope (ω) |

< \frac{M}{|B|} + \frac{M}{n} + ε < \frac{M}{|B|} + 2ε.

Since ε > 0 was arbitrary, we are done.

Conversely, suppose that slope (ω) exists and there is some M ∈ ℕ such that for every nonempty factor B of ω,

|slope (B) − slope (ω) | ≤ \frac{M}{|B|}.

Then for every factor B′ of ω with |B| = |B′|,

|∑ B − ∑ B′| ≤ |∑ B − |B|slope (ω)| + |∑ B′ − |B′|slope (ω)| ≤ 2M,

and the result follows from Theorem 4.

2.2 Comparing Factors of Two Words with Bounded Additive Complexity

As a first application of Theorem 6, we show that if two words with bounded additive complexity have differing slopes, then their factor sets must have a finite intersection.

Lemma 7. Suppose that ω_{1} ∈ S^{ℕ} and ω_{2} ∈ T^{ℕ} have bounded additive complexity. If slope (ω_{1}) ≠ slope (ω_{2}), there exists M ∈ ℕ such that slope (B_{1}) ≠ slope (B_{2}) whenever B_{1} ∈ F(ω_{1}), B_{2} ∈ F(ω_{2}) and |B_{1}|, |B_{2}| ≥ M.

Proof. Suppose slope (ω_{1}) ≠ slope (ω_{2}), and use Theorem 6 to get positive integers M_{1} and M_{2} large enough that

|slope (B_{1}) − slope (ω_{1})| ≤ \frac{M_{1}}{|B_{1}|} ∀B_{1} ∈ F(ω_{1})

and

|slope (B_{2}) − slope (ω_{2})| ≤ \frac{M_{2}}{|B_{2}|} ∀B_{2} ∈ F(ω_{2}).

Select M ∈ ℕ so that

max \{\frac{M_{1}}{M} , \frac{M_{2}}{M} \} < \frac{1}{2} |slope (ω_{1}) − slope (ω_{2})| ,

and let B_{1} ∈ F(ω_{1}) and B_{2} ∈ F(ω_{2}) be given with |B_{1}|, |B_{2}| ≥ M. Then slope (B_{1}) cannot equal slope (B_{2}), or else

|slope (ω_{1}) − slope (ω_{2})| = |slope (ω_{1}) − slope (B_{1}) + slope (B_{2}) − slope (ω_{2})|

≤ |slope (ω_{1}) − slope (B_{1})| + |slope (B_{2}) − slope (ω_{2})|

≤ \frac{M_{1}}{M} + \frac{M_{2}}{M} < |slope (ω_{1}) − slope (ω_{2})| ,

a contradiction.

The existence of M as above implies that if B_{1}, B_{2} are sufficiently long factors of ω_{1} and ω_{2} respectively, then we have slope (B_{1}) ≠ slope (B_{2}). In particular, B_{1} ≠ B_{2}, and so we have the following corollary to Lemma 7.

Corollary 8. Under the hypotheses of Lemma 7, the set F(ω_{1}) ∩ F(ω_{2}) is finite.

The converse to the above corollary is false. To see this, we consider the periodic words ω_{1}, ω_{2} ∈ {0, 1}^{ℕ} given by ω_{1} = 010101 ⋯ and ω_{2} = 001100110011 · · ·. It is readily checked that ω_{1}, ω_{2} both have bounded additive complexity and slope equal to \frac{1}{2}; however, 0101 is a factor of every sufficiently long factor of ω_{1}, whereas 0101 ∉ F(ω_{2}). Hence F(ω_{1}) ∩ F(ω_{2}) is finite, even though slope (ω_{1}) = slope (ω_{2}).

We have as of yet been unable to prove or disprove the converse of Lemma 7. Therefore we leave this, and a related question, as open problems.

Problem 9. Prove or disprove the converse of Lemma 7.

Problem 10. Let ω_{1} ∈ S^{ℕ} and ω_{2} ∈ T^{ℕ} have bounded additive complexity, and suppose further that slope (ω_{1}) = slope (ω_{2}). Under what conditions are there infinitely many pairs (B_{1}, B_{2}) ∈ F(ω_{1}) × F(ω_{2}) such that |B_{1}| = |B_{2}| and slope (B_{1}) = slope (B_{2})?

2.3 Rationality of Slope

In this section we are concerned with necessary and sufficient conditions for the slope of a word ω with bounded additive complexity to be rational. We observe that Sturmian words, as balanced binary words, are words with bounded additive complexity. Hence, bounded additive complexity does not imply rationality of slope [12, ch. 2].

Recalling that by Theorem 3, ω contains an additive k-power for every k ∈ ℕ, we first have the following.

Theorem 11. Let ω ∈ S^{ℕ} have bounded additive complexity and assume that slope (ω) = p/q, where p and q ≥ 1 are relatively prime integers. There exists K ∈ ℕ such that any additive k-power in ω with k ≥ K has slope p/q.

Proof. By Theorem 4, there exists M ∈ ℕ such that if B_{1} and B_{2} are factors of ω with equal lengths, then | ∑ B_{1} − ∑ B_{2}| ≤ M. Let j = M + 1 and let J = J_{1}J_{2} ⋯ J_{jq} be any additive jq-power in ω. By Theorem 6,

\frac{M}{jq|J_{1}|} ≥ |slope (J) − slope (ω)| = |\frac{jq ∑ J_{1}}{jq|J_{1}|} − \frac{p}{q}| = \frac{1}{q|J_{1}|} |q ∑ J_{1} − p|J_{1}|| ,

whence

1 > \frac{M}{j} ≥ |q ∑ J_{1} − p|J_{1}|| .

Since q ∑ J_{1} and p|J_{1}| are integers, q ∑ J_{1} = p|J_{1}|. Thus

slope (J) = \frac{1}{|J_{1}|} ∑ J_{1} = \frac{p}{q} = slope (ω) ,

and consequently every additive k-power in ω with k ≥ jq has slope equal to p/q.

Next we give a necessary and sufficient condition for rationality of the slope of a word with bounded additive complexity.

Lemma 12. Let ω ∈ S^{ℕ} be a word with bounded additive complexity. Then slope (ω) is rational if and only if there exists some infinite collection C of factors of ω such that for any B, B′ ∈ C, slope (B) = slope (B′).

Proof. If slope (ω) is rational, the existence of such a collection C follows from Theorem 11.

Conversely, assume such a collection C exists. We let {B_{i} : i ∈ ℕ} ⊂ C be such that |B_{i}| ≥ i, i ≥ 1. Theorem 6 gives M ∈ ℕ such that for any i,

|slope (B_{1}) − slope (ω) | ≤ |slope (B_{1}) − slope (B_{i}) | + |slope (B_{i}) − slope (ω) |

= |slope (B_{i}) − slope (ω) | ≤ \frac{M}{|B_{i}|} ≤ \frac{M}{i} .

Hence, slope (B_{1}) = slope (ω). In particular, slope (ω) is rational.

Lemma 12 is perhaps better re-phrased as a statement about words ω with bounded additive complexity and irrational slope. In particular, it implies that ω has only finitely many factors of slope equal to any number. One might then surmise that the number of such factors has a uniform bound independent of the given rational; however, our next result implies that this is not the case.

Corollary 13. Let ω ∈ S^{ℕ} have bounded additive complexity. Then (i) slope (ω) is irrational if and only if for every α ∈ ℚ, the set

F_{α}(ω) = {B ∈ F(ω) : slope (B) = α}

is finite; (ii) for every k ∈ ℕ, there exists α ∈ ℚ such that |F_{α}(ω)| > k.

Proof. The statement (i) follows directly from Lemma 12, and by a theorem of Brown [4], (ii) holds for any infinite word over a finite set of integers.

Let ω ∈ S^{ℕ} have bounded additive complexity with slope (ω) = p/q, for some relatively prime p, q ∈ ℤ. We will associate with ω a finite coloring of the natural numbers which we will use to provide us with better insight into the structure of ω. First, we use Theorem 6 to get M ∈ ℕ such that

|∑ ω[1, n] − \frac{np}{q}| ≤ M

for all n ∈ ℕ. We define the coloring χ_{ω} : ℕ ↦ [−M, M] by

χ_{ω}(m) = ∑ ω[1, mq] − mq · slope (ω) = ∑ ω[1, mq] − mp.

The coloring χ_{ω} has the following property.

Lemma 14. Let ω ∈ S^{ℕ} have bounded additive complexity with slope (ω) = p/q for some relatively prime p, q ∈ ℤ. Then for m > n, χ_{ω}(m) = χ_{ω}(n) if and only if slope (ω[nq + 1, mq]) = p/q.

Proof. Since χ_{ω}(m) = χ_{ω}(n) if and only if

∑ ω[1, mq] − mp = ∑ ω[1, nq] − np,

it follows that for m > n, χ_{ω}(m) = χ_{ω}(n) if and only if

slope (ω[nq + 1, mq]) = \frac{1}{mq − nq} ∑ ω[nq + 1, mq] = \frac{p}{q}.

The next result may be viewed as a stronger version of Theorem 3, under the additional hypothesis that the slope of the word in question is rational.

Theorem 15. Let ω ∈ S^{ℕ} have bounded additive complexity with slope (ω) = p/q, where p, q ∈ ℤ. For every k, ℓ ∈ ℕ, there exists M(k, ℓ) ∈ ℕ such that every B ∈ F(ω) of length M(k, ℓ) contains an additive ℓ-power B_{1}B_{2} … B_{ℓ} such that k divides |B_{1}| and slope (B_{i}) = p/q, i = 1, 2, …, ℓ.

Proof. Let k and ℓ be given positive integers. By van der Waerden’s Theorem [17] applied to the set kℕ there exists, for any positive integer n, a positive integer N = N(n, k, ℓ) such that any n-coloring of N consecutive positive integers contains a monochromatic (ℓ+1)-term arithmetic progression with gap a multiple of k.

Let slope (ω) = p/q, for some relatively prime p, q ∈ ℤ, and let M and the coloring χ_{ω} : ℕ ↦ [−M, M] be as above. Let M(k, ℓ) = q(N(2M + 1, k, ℓ) + 1), let m ≥ 1 be arbitrary, and let B = ω[m, m + M(k, ℓ) − 1]. Let t ∈ ℕ be such that m ∈ ((t − 1)q, tq]. Then, from tq < m + q, it follows that

q(t + N(2M + 1, k, ℓ)) = tq + qN(2M + 1, k, ℓ) ≤ m + q + qN(2M + 1, k, ℓ) − 1
= m + M(k, ℓ) − 1,

and we conclude that {jq : t ≤ j ≤ t + N(2M + 1, k, ℓ)} ⊂ [m, m + M(k, ℓ) − 1]. Let {a + idk : i = 0, 1, … ℓ} be a χ_{ω}-monochromatic (ℓ + 1)-term arithmetic progression with gap dk, for some natural number d, that is contained in the interval [t, t+N(2M +1, k, ℓ)−1]. For factors B_{i} = ω[q(a + (i − 1)dk) + 1, q(a + idk)], i = 1, …, ℓ, we have that |B_{i}| = dkq and, by Lemma 14, slope (B_{i}) = p/q.

2.4 Factorizations of Words with Bounded Additive Complexity and Rational Slope

Recall that a balanced binary word is eventually periodic if and only if its slope is rational. The following result shows that a generalization of this property holds for words with bounded additive complexity.

Theorem 16. Let ω ∈ S^{ℕ} have bounded additive complexity. Then slope (ω) ∈ ℚ if and only if ω = AB_{1}B_{2}B_{3} ⋯, where {B_{i}}_{i∈ℕ} is a sequence of nonempty factors of ω such that slope (B_{1}) = slope (B_{i}) for all i ∈ ℕ. Moreover, slope (B_{1}) = slope (ω).

Proof. Assuming that ω = AB_{1}B_{2}B_{3} ⋯ with slope (B_{1}) = slope (B_{i}), for all i ∈ ℕ, we deduce that slope (ω) is rational by Lemma 12.

On the other hand, assume p/q = slope (ω) ∈ ℚ for some relatively prime p, q ∈ ℤ. By the pigeonhole principle, there exists an increasing sequence {x_{i}}_{i=1}^{∞} of positive integers which is monochromatic under χ_{ω}. By Lemma 14, the proof is complete with A = ω[1, x_{1}q], and for all i ∈ ℕ, B_{i} = ω[x_{i}q + 1, x_{i+1}q].

For ω ∈ S^{ℕ} with bounded additive complexity and rational slope, there may not exist a factorization as in Theorem 16 where {|B_{i}|}_{i∈ℕ} is bounded, even if ω is recurrent. We construct an example to illustrate this point.

To begin the construction, let X′_{n} ∈ [1, n]^{∗} denote the finite word obtained from concatenating all elements of [1, n]^{n} in lexicographical order, from least to greatest, and consider the word ω′ = X′_{1}X′_{2}X′_{3} ⋯ ∈ ℕ^{ℕ}.

We define the word ω = X_{1}X_{2}X_{3} ⋯, where

X_{n} = \begin{cases}01^{ω′(n)}2, & if ω′(n) is odd; \\ 21^{ω′(n)}0, & otherwise. \end{cases}

The word ω is recurrent since ω′ is recurrent. To show that ω has bounded additive complexity, we let B ∈ F(ω) be given, and examine separately the following cases:

(a) B = 1^{|B|};

(b) B = Y_{i}X_{i+1}X_{i+2} ⋯ X_{i+k}Y_{i+k+1}, where Y_{i} is a suffix of X_{i} and Y_{i+k+1} is a prefix of X_{i+k+1}.

In case (a), ∑ B = |B|, and in case (b), we have

∑ B = ∑ Y_{i} + ∑ Y_{i+k+1} + |X_{i+1}X_{i+2} ⋯ X_{i+k}|,

where |Y_{i}|−1 ≤ ∑ Y_{i} ≤ |Y_{i}|+1 and |Y_{i+k}|−1 ≤ ∑ Y_{i+k} ≤ |Y_{i+k}|+1. In either case, we have |B| − 2 ≤ ∑ B ≤ |B| + 2. Therefore, if B′ ∈ F^{|B|}(ω) is given, then |∑ B − ∑ B′| ≤ 4. By Theorem 4, ω has bounded additive complexity. Moreover, slope (ω) = 1 ∈ ℚ by Theorem 16, since slope (X_{i}) = 1 for all i ∈ ℕ.

All that remains is to show that ω cannot be written as ω = AB_{1}B_{2}B_{3} ⋯, where slope (B_{i}) = 1 for all i ∈ ℕ and there exists M such that 0 < |B_{i}| < M for all i ∈ ℕ. For this, consider, for a given n ∈ ℕ, the sequence {k_{n,i}}_{i∈ℕ} defined by the following rule: k_{n,1} is the least positive integer such that ω[n, k_{n,1}] has slope 1, and for i > 1, k_{n,i} is the least positive integer such that ω[k_{n,i−1} + 1, k_{n,i}] has slope 1. Then it is enough to show, for all n ≥ 1, that the sequence {k_{n,i}}_{i∈ℕ} does not have bounded gaps. For this, note that 001^{m}221^{m+1}00 occurs infinitely many times, for all odd m ∈ ℕ. Let 001^{m}221^{m+1}00 = ω[ℓ + 1, ℓ + 2m + 7] with ℓ > k_{n,1}, and assume for a contradiction that {k_{n,i}}_{i∈ℕ} has no gap of size at least m. Thus, for some i ∈ ℕ, one of the following holds:

(a) k_{n,i} = ℓ;

(b) k_{n,i} = ℓ + 1;

(c) k_{n,i} = ℓ + 2;

(d) k_{n,i} = ℓ + h, for some h ∈ [3, m − 1].

In case (a), k_{n,i+1} = ℓ + m + 4, giving a gap of size m + 4. In case (b), k_{n,i+1} = ℓ + m + 3, giving a gap of size m + 2. In case (c), k_{n,i+j} = k_{n,i+j−1} + 1 for all j = 1, 2, …, m, whence k_{n,i+m} = ℓ + m + 2. Moreover, k_{n,i+m+1} = ℓ + 2m + 7, giving a gap size of m + 5. In case (d), k_{n,i+j} = k_{n,i+j−1} + 1 for j = 1, 2, …, m − h + 2, and so k_{n,i+m−h+2} = ℓ + m + 2. As in case (c), k_{n,i+m−h+3} = ℓ + 2m + 7, and we obtain a gap size of m + 5. Since m was an arbitrary odd positive integer, and all cases lead to a contradiction, the proof is complete.

The above example should be contrasted with the following result.

Theorem 17. Let ω ∈ S^{ℕ} be a uniformly recurrent word with bounded additive complexity, and suppose that slope (ω) ∈ ℚ. Then ω admits a factorization of the form ω = AB_{1}B_{2}B_{3} ⋯, where {B_{i}}_{i∈ℕ} is a sequence of nonempty factors of ω such that:

(i) slope (B_{i}) = slope (ω) for all i ∈ ℕ;

(ii) {|B_{i}|}_{i∈ℕ} is bounded.

Proof. For a given factor B of ω, let d(B) = ∑ B − |B|slope (ω). Since slope (ω) is rational, Theorem 6 lets us pick a particular B ∈ F(ω) such that |d(B)| is as large as possible, and we assume without loss of generality that ∑ B > slope (ω) |B|. Since ω is uniformly recurrent, there is a least positive integer K = K(|B|) such that every factor of length at least K has B as a factor. Suppose ω[i + 1, j] = B, select the minimum i′ ∈ [j + 2, j + K + 1] such that B = ω[i′ + 1, i′ + j − i], and let A = ω[j + 1, i′].

We claim that BA = ω[i + 1, i′] has slope equal to that of ω. If this claim holds, then the above argument may be repeated with B = ω[i′ + 1, i′ + j − 1] in place of B = ω[i + 1, j], and since |BA| < |B| + K + 2 the result follows. Thus, it suffices to prove the claim, and we proceed to this end. Observe that maximality of d(B) implies d(B) ≥ d(BAB) = 2d(B) + d(A). In other words d(A) ≤ −d(B), and since |d(B)| is maximum, d(A) = −d(B). Hence d(BA) = d(B) + d(A) = 0, so that slope (BA) = slope (ω).

2.5 Contraction

The results developed in the last two subsections suggest that, in a word ω ∈ S^{ℕ} with bounded additive complexity and rational slope p/q, there is an abundance of intervals [m, n] such that slope (ω[m, n]) = p/q. It is tempting, then, to wonder how the removal of some of these intervals affects the slope of ω. The next result shows that after contracting (i.e., removing) any set I of intervals such that slope (ω[m, n]) = p/q for every [m, n] ∈ I, we are left with a word with bounded additive complexity and slope p/q.

If I is a set of intervals, its elements are separated if whenever [i, j], [k, ℓ] ∈ I with i ≤ k, we have j + 1 < k.

Definition 18. Given a word ω ∈ S^{ℕ} and i, j ∈ ℕ, we can form a word ω′ given by ω′(k) = ω(k) for k < i and ω′(k) = ω(k + j − i + 1) for k ≥ i. We say that ω′ is obtained from ω by contraction of [i, j], and we write ω′ = ω \ [i, j]. We extend this definition in the natural way to contraction of any set I of separated intervals. Similarly, if ω′ is the word obtained from ω via contraction of I, we will write ω′ = ω \ I.

Theorem 19. Let ω ∈ S^{ℕ} be a word with bounded additive complexity, and suppose p/q = slope (ω) ∈ ℚ. If I is a set of separated intervals such that slope (ω[m, n]) = p/q for all [m, n] ∈ I, then ω \ I has bounded additive complexity and slope (ω \ I) = p/q.

Proof. Since every suffix of ω also has bounded additive complexity and slope p/q, we may assume that I is infinite. Hence, I = {[i_{k}, j_{k}] : k ∈ ℕ}, for some j_{k} ≥ i_{k} > j_{k−1} + 1 ≥ i_{k−1}, k ≥ 1. We put B_{k} = ω[i_{k}, j_{k}].

Let A_{1} = ω[1, i_{1} − 1] if i_{1} > 1, and otherwise let A_{1} be empty. For k > 1, let A_{k} be the nonempty word such that ω[i_{k−1}, j_{k}] = B_{k−1}A_{k}B_{k}. Thus ω = A_{1}B_{1}A_{2}B_{2}A_{3}B_{3} ⋯, and we must show that ω \ I = A_{1}A_{2}A_{3} ⋯ has bounded additive complexity and slope p/q. Let A ∈ F(ω \ I) and write A = A′_{ℓ}A_{ℓ+1} ⋯ A_{m−1}A′_{m}, for some ℓ < m ∈ ℕ, where A′_{ℓ} (resp. A′_{m}) is a possibly empty prefix (resp. suffix) of A_{ℓ} (resp. A_{m}). Let B = B_{ℓ}B_{ℓ+1} ⋯ B_{m−1}. By Theorem 6 there exists M ∈ ℕ, independent of A, such that

M ≥ |∑ A′_{ℓ}B_{ℓ}A_{ℓ+1}B_{ℓ+1} ⋯ B_{m−1}A′_{m} − \frac{p}{q}|A′_{ℓ}B_{ℓ}A_{ℓ+1}B_{ℓ+1} ⋯ B_{m−1}A′_{m}||

= |∑ B + ∑ A − \frac{p}{q}|A| − \frac{p}{q}|B|| = |∑ A − \frac{p}{q}|A|| ,

whence

|slope (A) − \frac{p}{q}| ≤ \frac{M}{|A|}.

A second application of Theorem 6 yields the desired result.

3 Bounded Additive Complexity and Morphisms

A map ϕ : S^{∞} ↦ T^{∞} is called a morphism if ϕ(BB′) = ϕ(B)ϕ(B′) for all B ∈ S^{∗} and B′ ∈ S^{∞}. Clearly, ϕ is uniquely determined by its assignments on the elements of S, and we say that ϕ is generated by these assignments. We call ϕ a non-erasing morphism if no nonempty word maps to the empty word.

Non-erasing morphisms receive special attention in combinatorics on words because, being compatible with the concatenation of words, they relate the form of the input word with the form of the output word. Below we investigate the effect of non-erasing morphisms on boundedness of additive complexity.

3.1 Anchors

We begin by introducing the following terminology.

Definition 20. If ϕ : S^{∞} ↦ T^{∞} is a non-erasing morphism, we say that ϕ anchors ω ∈ S^{ℕ} if ϕ(ω) ∈ T^{ℕ} has bounded additive complexity. If ϕ anchors every element of S^{ℕ}, then ϕ is said to be an anchor.

In this section we give necessary and sufficient conditions for ϕ to be an anchor and an explicit arithmetic description of all anchors from S^{∞} to T^{∞}. We note that, as a result of the following theorem, whether or not a morphism is an anchor may be checked in linear time depending on the size of S.

Theorem 21. Let ϕ : S^{∞} ↦ T^{∞} be a non-erasing morphism. Then ϕ is an anchor if and only if slope (ϕ(s)) = slope (ϕ(s′)) for all s, s′ ∈ S.

The proof of Theorem 21 relies on the following two lemmas. In both lemmas we take that S = {s_{1}, s_{2}, …, s_{k}} and that ϕ : S^{∞} ↦ T^{∞} is a non-erasing morphism.

Lemma 22. The following statements are equivalent:

(i) slope (ϕ(s)) = slope (ϕ(s′)) for all s, s′ ∈ S;

(ii) For every B_{1}, B_{2} ∈ S^{∗}, |ϕ(B_{1})| = |ϕ(B_{2})| implies ∑ ϕ(B_{1}) = ∑ ϕ(B_{2}).

Proof. To see that (ii) implies (i), we prove the contrapositive. Suppose that (i) does not hold. Let s_{i} ∈ S be such that slope (ϕ(s_{1})) ≠ slope (ϕ(s_{i})) and put

p = \frac{lcm(|ϕ(s_{1})|, |ϕ(s_{i})|)}{|ϕ(s_{1})|}, q = \frac{lcm(|ϕ(s_{1})|, |ϕ(s_{i})|)}{|ϕ(s_{i})|}.

Then

|ϕ(s_{1}^{p})| = p|ϕ(s_{1})| = q|ϕ(s_{i})| = |ϕ(s_{i}^{q})|,

but

∑ ϕ(s_{1}^{p}) = p ∑ ϕ(s_{1}) ≠ q ∑ ϕ(s_{i}) = ∑ ϕ(s_{i}^{q}).

So (ii) does not hold.

On the other hand, suppose (i) holds, and let B ∈ T^{∗} have B = ϕ(B′) for some B′ ∈ S^{∗}. Since

|B| = ∑_{1≤i≤k} |ϕ(s_{i})||B′|_{s_{i}} = ∑_{1≤i≤k} \frac{|ϕ(s_{1})| ∑ ϕ(s_{i})}{∑ ϕ(s_{1})}|B′|_{s_{i}},

we have

∑ B = ∑_{1≤i≤k} (|B′|_{s_{i}} ∑ ϕ(s_{i})) = \frac{|B| ∑ ϕ(s_{1})}{|ϕ(s_{1})|} = |B|slope (ϕ(s_{1})) .

We conclude that (ii) holds.

Lemma 23. If condition (ii) in Lemma 22 holds, then

max {|∑ ϕ(B_{1}) − ∑ ϕ(B_{2})| : B_{1}, B_{2} ∈ S^{∗}, ||ϕ(B_{1})| − |ϕ(B_{2})|| ≤ 2N − 2}

exists for any fixed N ∈ ℕ.

Proof. Let B_{1}, B_{2} ∈ S^{∗} satisfy ||ϕ(B_{1})|−|ϕ(B_{2})|| ≤ 2N −2. If slope (ϕ(B_{1})) ≠ slope (ϕ(B_{2})), putting

p = \frac{lcm(|ϕ(B_{1})|, |ϕ(B_{2})|)}{|ϕ(B_{1})|}, q = \frac{lcm(|ϕ(B_{1})|, |ϕ(B_{2})|)}{|ϕ(B_{2})|}

yields |ϕ(B_{1}^{p})| = |ϕ(B_{2}^{q})| yet ∑ ϕ(B_{1}^{p}) ≠ ∑ ϕ(B_{2}^{q}), contradicting our hypothesis. Thus,

∑ ϕ(B_{1}) − \frac{|ϕ(B_{1})|}{|ϕ(B_{2})|} ∑ ϕ(B_{2}) = 0.

We assume that |ϕ(B_{2})| ≥ |ϕ(B_{1})|. Now,

|∑ ϕ(B_{1}) − ∑ ϕ(B_{2})| = |\frac{|ϕ(B_{1})|}{|ϕ(B_{2})|} − 1| |∑ ϕ(B_{2})| ≤ |\frac{|ϕ(B_{1})|}{|ϕ(B_{2})|} − 1| |ϕ(B_{2})| max S_{2}
≤ (2N − 2) max S_{2}.

We are now ready to prove Theorem 21.

Proof of Theorem 21. By Lemma 22, it suffices to prove that ϕ is an anchor if and only if |ϕ(B_{1})| = |ϕ(B_{2})| implies ∑ ϕ(B_{1}) = ∑ ϕ(B_{2}), for every B_{1}, B_{2} ∈ S^{∗}.

We first assume this condition does not hold, and show that ϕ is not an anchor. Therefore, let B_{1}, B_{2} ∈ S^{∗} be such that |ϕ(B_{1})| = |ϕ(B_{2})|, but ∑ ϕ(B_{1}) − ∑ ϕ(B_{2}) = k > 0. Then for m ∈ ℕ, B_{1}^{m}, B_{2}^{m} satisfy

|ϕ(B_{1}^{m})| = m|ϕ(B_{1})| = m|ϕ(B_{2})| = |ϕ(B_{2}^{m})|

and

∑ ϕ(B_{1}^{m}) − ∑ ϕ(B_{2}^{m}) = m (∑ ϕ(B_{1}) − ∑ ϕ(B_{2})) = mk → ∞

as m → ∞. By Theorem 4, the image of ω = B_{1}B_{2}B_{1}^{2}B_{2}^{2}B_{1}^{3}B_{2}^{3} ⋯ ∈ S^{ℕ} under ϕ does not have bounded additive complexity, and ϕ is not an anchor.

Conversely, we assume that the condition holds and show that ϕ is an anchor. To this end, let ω ∈ S^{ℕ} and let B_{1}, B_{2} ∈ T^{∗} be equally long factors of ϕ(ω). Write B_{1} = U_{1}ϕ(U_{2})U_{3} and B_{2} = V_{1}ϕ(V_{2})V_{3}, where U_{2}, V_{2} ∈ S^{∗}, U_{1}, U_{3}, V_{1}, V_{3} ∈ T^{∗}, and

|U_{1}|, |U_{3}|, |V_{1}|, |V_{3}| < N = max_{s∈S_{1}} |ϕ(s)|,

so that ||ϕ(U_{2})| − |ϕ(V_{2})|| ≤ 2N − 2. By Lemma 23

M = max {|∑ ϕ(U) − ∑ ϕ(V)| : U, V ∈ S^{∗}, ||ϕ(U)| − |ϕ(V)|| ≤ 2N − 2}

exists, and since {U ∈ T^{∗} : |U| < N} is finite, we may set

M′ = max {|∑ U − ∑ V | : U, V ∈ T^{∗}, |U|, |V | < N}

to obtain

|∑ B_{1} − ∑ B_{2}| = |(∑ U_{1} − ∑ V_{1}) + (∑ ϕ(U_{2}) − ∑ ϕ(V_{2})) + (∑ U_{3} − ∑ V_{3})|
≤ |∑ U_{1} − ∑ V_{1}| + |∑ ϕ(U_{2}) − ∑ ϕ(V_{2})| + |∑ U_{3} − ∑ V_{3}|
≤ 2M′ + M.

By Theorem 4, the morphism ϕ is an anchor.

If ϕ : S^{∞} ↦ T^{∞} is an anchor, the map a ↦ slope (ϕ(a)) takes only one value ||ϕ||, and we call this value the weight of ϕ.

Corollary 24. Let ϕ : S^{∞} ↦ T^{∞} be an anchor and ω ∈ S^{ℕ}. Then slope (ϕ(ω)) = ||ϕ||.

Proof. By the definition of an anchor and by Theorem 6, slope (ϕ(ω)) exists. Now, since slope (ϕ(ω[1, n])) = ||ϕ|| for all n ∈ ℕ, and since {slope (ϕ(ω[1, n]))}_{n∈ℕ} is a subsequence of {slope (ϕ(ω)[1, n])}_{n∈ℕ}, the result follows.

Our next result is an extension of Theorem 21, and it provides an explicit arithmetic description of the anchors of a given weight in terms of a matrix equation.

Suppose S = {s_{1}, …, s_{k}} and T = {t_{1}, …, t_{ℓ}}, and let ϕ : S^{∞} ↦ T^{∞} be a non-erasing morphism. We associate a matrix M(ϕ) ∈ ℤ^{k×ℓ} with ϕ by defining M(ϕ)_{i,j} = |ϕ(s_{i})|_{t_{j}} for all i = 1, 2, …, k and j = 1, 2, …, ℓ. Also, with every α ∈ ℚ we associate a column vector t_{α} ∈ ℚ^{ℓ} by defining (t_{α})_{j} = t_{j} − α for all j = 1, 2, …, ℓ.

Corollary 25. The morphism ϕ : S^{∞} ↦ T^{∞} is an anchor if and only if there exists α ∈ ℚ such that M(ϕ)t_{α} = 0.

Proof. Theorem 21 implies that ϕ is an anchor of weight α ∈ ℚ if and only if

∑_{1≤j≤ℓ} M(ϕ)_{i,j}t_{j} = ∑ ϕ(s_{i}) = α|ϕ(s_{i})| = α ∑_{1≤j≤ℓ} M(ϕ)_{i,j},

for all i = 1, 2, …, k.

The following general problem has yet to be explored further.

Problem 26. Let an infinite word ω ∈ S^{ℕ} and a morphism ϕ : S^{∞} ↦ T^{∞} be given. Under what circumstances is it decidable whether or not ϕ anchors ω?

3.2 Preserving Bounded Additive Complexity Under Morphisms

In this section we characterize the words such that their image under any non-erasing morphism has bounded additive complexity.

Earlier we mentioned the abelian complexity of an infinite word ω, and at this time we present a formal definition thereof.

Definition 27. Let ω ∈ S^{ℕ}. The abelian complexity of ω is the map ρ_{ω}^{ψ} : ℕ ↦ ℕ that associates, with each n ∈ ℕ, the maximum number of distinct elements of F^{n}(ω), no two of which are permutations of each other (the use of the symbol ψ in this notation will be explained in Section 5). The abelian complexity of ω is said to be bounded if there exists M ∈ ℕ such that ρ_{ω}^{ψ}(n) ≤ M for all n ∈ ℕ.

Richomme, Saari, and Zamboni [16] characterized words with bounded abelian complexity in the following way.

Lemma 28. Let ω ∈ S^{ℕ}. Then ω has bounded abelian complexity if and only if there exists C ∈ ℕ such that for all n ∈ ℕ and all s ∈ S, ||B|_{s} − |B′|_{s}| < C whenever B, B′ ∈ F^{n}(ω).

This fact will be our main tool in proving the following result.

Theorem 29. Let ω ∈ S^{ℕ}. The following are equivalent.

(i) The word ω has bounded abelian complexity;

(ii) For all finite T ⊂ ℤ, every non-erasing morphism ϕ : S^{∞} ↦ T^{∞} anchors ω.

Proof. First, assume (i) holds. Then, for a finite T ⊂ ℤ and a non-erasing morphism ϕ : S^{∞} ↦ T^{∞}, a theorem of Cassaigne, Richomme, Saari, and Zamboni [6] asserts that ϕ(ω) has bounded abelian complexity and consequently ϕ(ω) has bounded additive complexity.

Next, assume that (i) does not hold. We will exhibit a finite T ⊂ ℤ and a non-erasing morphism ϕ : S^{∞} ↦ T^{∞} such that ϕ(ω) has unbounded additive complexity. We may assume that ω has bounded additive complexity, or else we can take T = S and ϕ equal to the identity. By Theorem 4 there is M ∈ ℕ such that | ∑ B − ∑ B′| < M whenever B, B′ ∈ F(ω) are equally long. For all n ∈ ℕ we define

C(n) = max{||B|_{s} − |B′|_{s}| : B, B′ ∈ F^{n}(ω), s ∈ S}.

By Lemma 28, the sequence {C(n)}_{n∈ℕ} is unbounded, and so we may choose a subsequence {C(n_{k})}_{k∈ℕ} such that C(n_{k}) → ∞ as k → ∞. By the pigeonhole principle there is s ∈ S and a strictly increasing sequence {k_{j}}_{j∈ℕ} such that, for all j ∈ ℕ, there are B′_{j}, B′′_{j} ∈ F^{n_{k_{j}}} (ω) with

|B′_{j}|_{s} − |B′′_{j}|_{s} = C (n_{k_{j}}) .

If s + 1 ∈ S we take T = S\{s}, otherwise T = (S\{s}) ∪ {s + 1}. Let ϕ : S^{∞} ↦ T^{∞} be generated by the assignments t ↦ t for all t ∈ S\{s} and s ↦ s + 1. Then

∑ ϕ(B′_{j}) − ∑ ϕ(B′′_{j}) = C (n_{k_{j}}) + (∑ B′_{j} − ∑ B′′_{j})) ≥ C (n_{k_{j}}) − M → ∞

as j → ∞. By Theorem 4, ϕ(ω) does not have bounded additive complexity.

3.3 Anchored Words and Splicing

A word ω ∈ S^{ℕ} is called anchored if there exists a finite alphabet T, an anchor ϕ : T^{∞} ↦ S^{∞}, and a word ω′ ∈ T^{ℕ} such that ϕ(ω′) = ω. If there exists n such that ω \ [1, n] is anchored, then ω is eventually anchored. Notice that eventually anchored words have rational slope.

It follows from Theorem 17 that every uniformly recurrent word with bounded additive complexity and rational slope is eventually anchored. On the other hand, we also showed that not every recurrent word with bounded additive complexity and rational slope is eventually anchored. Thus, the question arises as to how one may construct all words with bounded additive complexity and rational slope.

Our purpose here is to make a conjecture concerning the above problem, taking into account the work done in Subsection 2.4. To state the conjecture, we need a definition.

Definition 30. Let n ∈ ℕ be given and suppose ω_{1}, …, ω_{n} be infinite words, each over a finite integer alphabet. A splice of {ω_{1}, …, ω_{n}} is any word ω of the form

ω = B_{1,1}B_{2,1} ⋯ B_{n,1}B_{1,2} ⋯ B_{n,2} ⋯,

where B_{i,1}B_{i,2} … B_{i,j} is a prefix of ω_{i}, for all j ∈ ℕ and all i = 1, 2, …, n. In particular, we leave open the possibility that B_{i,j} is empty for some i, j ∈ ℕ, so long as infinitely many B_{i,j} are nonempty.

We observe the following closure property of words with bounded additive complexity.

Lemma 31. If ω_{1}, …, ω_{n} are words with bounded additive complexity, all of which have slope α, then any splice ω of {ω_{1}, …, ω_{n}} has bounded additive complexity and slope α.

Proof. We can permute an arbitrary factor B ∈ F(ω) to obtain a word B′ of the form B′ = A_{1}A_{2} … A_{n}, where A_{i} ∈ F(ω_{i}) for 1 ≤ i ≤ n. By Theorem 6, there are positive integers M_{i}, depending only on ω_{i}, such that

|∑ A_{i} − α|A_{i}|| ≤ M_{i}

for all i = 1, 2, …, n. Therefore,

|∑ B − α|B|| = |∑ B′ − α|B′|| ≤ ∑_{1≤i≤n} |∑ A_{i} − α|A_{i}|| ≤ ∑_{1≤i≤n} M_{i},

and in view of Theorem 6, dividing by |B| yields the result.

We observe that the word constructed in Subsection 2.4 is a splice of a set containing three anchored words, each of which has slope 1; these words are ω_{1} = 111 ⋯, ω_{2} = 020202 ⋯ and ω_{3} = 202020 · · ·. Indeed, we conjecture that every word with bounded additive complexity and rational slope has this form.

Problem 32. Prove or disprove the following conjecture: every word with bounded additive complexity and rational slope is a splice of a finite set of eventually anchored words, each of which has the same slope.

4 Words With Constant Additive Complexity

Another noteworthy inquiry pertaining to additive complexity is that of what sequences {s_{n}}_{n=1}^{∞} over ℕ satisfy ρ_{ω}^{Σ}(n) = s_{n} for all n ∈ ℕ and some infinite word ω over a finite integer alphabet. In particular, we are interested in finding words, if there are any, which have constant additive complexity. The question of existence, without further qualification, may be answered by considering the words ω_{n} ∈ {1, 2, …, n}^{ℕ} given by ω_{n}(i) = i, i = 1, 2, …, n − 1 and ω_{n}(i) = n, i ≥ n. Clearly, ω_{n} has ρ_{ω_{n}}^{Σ}(i) = n for all i ∈ ℕ. We also note that ρ_{ω_{n}}^{ψ}(i) = n for all i ∈ ℕ. This was observed by Currie and Rampersad [7].

The question of whether or not there exist recurrent words with constant additive complexity equal to any given natural number cannot be answered so easily. Indeed, for the abelian complexity, Currie and Rampersad [7] have shown that there are no recurrent words ω having ρ_{ω}^{ψ}(n) = k for all n ∈ ℕ, if k ≥ 4. Our next result shows the existence of, for any given k ∈ ℕ, recurrent words ω with ρ_{ω}^{Σ}(n) = 2k + 1 for all n ∈ ℕ.

Theorem 33. Let k ∈ ℕ. There exists a recurrent word ω ∈ {0, 1, 2, …, 2k}^{ℕ} having ρ_{ω}^{Σ}(n) = 2k + 1 for all n ∈ ℕ.

Proof. Let ω′ be any infinite word over S = {0, 1, 2, …, k}^{ℕ} such that every finite word in S^{∗} is a factor of ω′. Note that ω′ is recurrent.

Let ϕ : {0, 1, 2 …, k}^{∞} ↦ {0, 1, 2, …, 2k}^{∞} be the anchor generated by ϕ(i) = i(2k − i), 0 ≤ i ≤ k. Applying it, we obtain the word ω = ϕ(ω′); we note that ω is recurrent. By examining separately the cases n odd and n even, we will show that ρ_{ω}^{Σ}(n) = 2k + 1 for all n ∈ ℕ.

First, let n = 2j + 1, for some j ∈ ℕ. Then for B ∈ F^{n}(ω), there exists B′ ∈ F^{j}(ω′) such that B = sϕ(B′) or B = ϕ(B′)s for some s ∈ {0, 1, 2, …, 2k}. By definition of ω′ and ϕ, we have

{∑ B : B ∈ F^{n}(ω)} = {2kj + s : s = 0, 1, 2, …, 2k}.

Thus, we have ρ_{ω}^{Σ}(n) = 2k + 1 in the odd case.

Next, let n = 2j, for some j ∈ ℕ. Then for B ∈ F^{n}(ω), there exists B′ ∈ F^{j}(ω′) such that B = ϕ(B′), or there exists B′′ ∈ F^{j−1}(ω′) such that B = sϕ(B′′)t for some s, t ∈ {0, 1, 2, …, 2k}. In the first case, ∑ B = 2kj; in the second case, the set of possible sums for B is {2kj + s : s = −k, …, −1, 0, 1, …, k}. Finally, ρ_{ω}^{Σ}(n) = 2k + 1 in the even case as well. This completes the proof.

5 Lattice Complexities

For the remainder of this note, μ will denote a morphism of S^{∗} into the additive monoid ℤ^{t}, t ≥ 1, i.e., for all B, B′ ∈ S^{∗}, we have μ(BB′) = μ(B) + μ(B′).

Definition 34. If ω ∈ S^{ℕ}, the μ-complexity of ω is the map ρ_{ω}^{μ} : ℕ ↦ ℕ given by

ρ_{ω}^{μ}(n) = |{μ(B) : B ∈ F^{n}(ω)}|.

Any such map is known as a lattice complexity for ω.

Thus, the additive complexity ρ_{ω}^{Σ} of a word ω ∈ S^{ℕ} is the ∑-complexity, where ∑ : S^{∗} ↦ ℤ is generated by ρ_{ω}^{Σ}(s) = s, s ∈ S. As a second example of a lattice complexity, consider an ordered alphabet S = {s_{1}, …, s_{k}}. Letting ψ : S^{∗} ↦ ℤ^{k} be the Parikh map [13], i.e., the morphism generated by

ψ(s_{1}) = (1, 0, 0, ⋯, 0)
ψ(s_{2}) = (0, 1, 0, ⋯, 0)
⋮ ⋮  ⋮
ψ(s_{k}) = (0, 0, 0, ⋯, 1),

we see that ρ_{ω}^{ψ} is precisely the abelian complexity of ω.

Many of the results we proved for words with bounded additive complexity have analogues in this more general setting. For example, one may easily prove the following result by passing to components and applying Theorem 4.

Theorem 35. A word ω ∈ S^{ℕ} has bounded μ-complexity if and only if there exists M ∈ ℕ such that for all n ∈ ℕ and all B, B′ ∈ F^{n}(ω), we have ||μ(B) − μ(B′)|| ≤ M, where || · || is the Euclidean norm on ℤ^{t}.

We observe that Lemma 28 is a corollary of Theorem 35. For another example of how results on additive complexity readily generalize to results on lattice complexities, define a k-power modulo μ as a word B = B_{1}B_{2} ⋯ B_{k} ∈ S^{∗} such that μ(B_{1}) = μ(B_{2}) = ⋯ = μ(B_{k}) and |B_{1}| = |B_{2}| = ⋯ = |B_{k}|. Then in view of Theorem 35, the following is essentially due to Ardal et al. [2].

Theorem 36. If ω ∈ S^{ℕ} has bounded μ-complexity, then ω contains a k-power modulo μ for every k ∈ ℕ.

For B ∈ S^{∗}, define its slope modulo μ as slope_{μ} (B) = |B|^{−1}μ(B), and define the slope of ω ∈ S^{ℕ} modulo μ in the natural way. By substituting slope_{μ} () for slope () and μ(B) for ∑ B, and by replacing the assumption slope (ω) ∈ ℚ by slope_{μ} (ω) ∈ ℚ^{t}, one may also prove results (we omit the details) analogous to Theorems 6, 11, 15, 16, 17, 19, and 21, as well as to Lemmas 5, 7, 12, 14, 22, 23, and 31. In particular, we note that these results hold for the abelian complexity; for this special case, Theorem 21 is due to Cassaigne et al. [6] and Theorem 6 is due to Adamczewski [1].

It would be interesting to study the converse question as to whether or not lattice complexities can be used to gain further insight into additive complexity.

6 Acknowledgments

The author is pleased to thank Veso Jungić and Tom Brown for helpful conversations and for editorial suggestions, which have significantly improved the quality of this paper.

References

[1] B. Adamczewski, Balances for fixed points of primitive substitutions, Theoret. Comput. Sci. 307 (2003), 47–75.

[2] H. Ardal, T. Brown, V. Jungić, and J. Sahasrabudhe, On abelian and additive complexity in infinite words, Integers 12 (2012), #A21 (electronic).

[3] Y. Au, A. Roberston, and J. Shallit, Van der Waerden’s Theorem and avoidability in words, Integers 11 (2011) #A6 (electronic).

[4] T. Brown, Approximations of additive squares in infinite words, Integers 12 (2012), #A22 (electronic).

[5] J. Cassaigne, J. D. Currie, L. Schaeffer, and J. Shallit, Avoiding three consecutive blocks of the same size and same sum, preprint, http://arxiv.org/abs/1106.5204.

[6] J. Cassaigne, G. Richomme, K. Saari, and L. Q. Zamboni, Avoiding abelian powers in binary words with bounded abelian complexity, Int. J. Found. Comput. Sci. 22 (2011), 905–920.

[7] J. Currie and N. Rampersad, Recurrent words with constant abelian complexity, Adv. in Appl. Math 47 (2011), 116–124.

[8] A. R. Freedman, Sequences on sets of four numbers, to appear.

[9] J. Gerver and L. Ramsey, On certain sequences of lattice points, Pacific J. Math. 83 (1979), 357–363.

[10] J. Grytczuk, Thue type problems for graphs, points, and numbers, Discrete Math. 308 (2008), 4419–4429.

[11] L. Halbeisen and N. Hungerbühler, An application of van der Waerden’s theorem in additive number theory, Integers 0 (2000), #A7 (electronic).

[12] M. Lothaire, Algebraic Combinatorics on Words, Addison-Wesley, 2002.

[13] R. Parikh, On context-free languages, J. Assoc. Comput. Mach. 13 (1966), 570–581.

[14] G. Pirillo and S. Varricchio, On uniformly repetitive semigroups. Semigroup Forum 49 (1994), 125–129.

[15] C. Pomerance, Collinear subsets of lattice point sequences - an analog of Szemerédi’s theorem, J. Combin. Theory Ser. A 28 (1980), 140–149.

[16] G. Richomme, K. Saari, and L. Q. Zamboni, Abelian complexity of minimal subshifts, J. London Math Soc. 83 (2010), 79–95.

[17] B. L. van der Waerden, Beweis einer Baudetschen Vermutung, Nieuw Archief voor Wiskunde 15 (1927), 212–216.

2010 Mathematics Subject Classification: Primary 68R15; Secondary 05D10. Keywords: combinatorics on words, additive square, subword complexity.

Received September 17 2012; revised version received January 6 2013. Published in Journal of Integer Sequences, January 7 2013.

Return to Journal of Integer Sequences home page.