Morphisms, Symbolic Sequences, and Their Standard Forms

F. Michel Dekking DIAM Delft University of Technology Mekelweg 4 2628 CD Delft The Netherlands

                f.m.dekking@tudelft.nl

Abstract

Morphisms are homomorphisms under the concatenation operation of the set of words over a finite alphabet. Changing the elements of the finite alphabet does not change the morphism in an essential way. We propose a method to select a unique representative from all these morphisms. This has applications to the classification of the shift dynamical systems generated by morphisms. In a similar way, we propose the selection of a representing sequence out of the class of symbolic sequences over an alphabet of fixed cardinality. Both methods are useful for the storing of symbolic sequences in databases, such as The On-Line Encyclopedia of Integer Sequences. We illustrate our proposals with the k-symbol Fibonacci sequences.

1 Introduction

Here is a sequence on an alphabet of six letters:

x = 1, 4, 2, 1, 6, 3, 5, 4, 2, 3, 5, 6, 1, 4, 2, 1, ….

Why should one be interested in this sequence? Well, if one projects with the letter-to-letter map 1, 3, 5 → 0, 2, 4, 6 → 1, one obtains the Thue-Morse sequence

0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, ….

This is the most famous pure morphic sequence (\underline{A010060}, \underline{A001285}, \underline{A010059}). The sequence x can be obtained from a 3-block morphism (see Section 4) starting from the Thue-Morse morphism

0 → 01, 1 → 10.

This gives that x itself is pure morphic under the square of the morphism

ζ : 1 → 23, 2 → 14, 3 → 21, 4 → 56, 5 → 63, 6 → 54.

It is shown by Coven, Dekking, and Keane [5] that the shift dynamical system generated by ζ is topologically isomorphic to the Thue-Morse system, and that there essentially are only 12 injective morphisms (with associated infinite sequences) that have this property. How should x be added to the On-Line Encyclopedia of Integer Sequences?

There is a problem here. The choice of the alphabet is quite arbitrary, another popular choice is {0, 1, 2, 3, 4, 5}. But even with a fixed alphabet of 6 letters, there are 6!=720 morphisms, generating as many sequences, which are essentially the same.

The ternary Thue-Morse sequence generated by a → abc, b → ac, c → b occurs 12 times in OEIS, exhausting all 3! possibilities of the two alphabets {0, 1, 2} and {1, 2, 3}. It is inconceivable that this could be done for a pure morphic sequence on an alphabet of, say, 20 letters. So what one needs is a canonical way to extract one morphism out of these huge collections. This will be done in the next section. In Section 3 we propose a simple way to standardize symbolic sequences. In Section 4 and 5 we illustrate our approach with a discussion of the k-symbol Fibonacci morphisms.

2 Standard forms of morphisms

Let θ be a morphism on r letters. The standard alphabet is the set A = {1, 2, …, r}. Let Π be a permutation on A. The permuted version of θ is the morphism θ′ given by

θ′(a) = Π^{−1}θ(Π(a)), for a ∈ A.

A morphism θ is called uniform if |θ(a)| = |θ(b)| for all a, b ∈ A, where |w| denotes the length of a word w.

Definition 1. The standard form of a uniform morphism θ is obtained by permuting the letters of the standard alphabet in such a way that the permuted version has the smallest word θ′(1)θ′(2) ⋯ θ′(r) in the lexicographical order on words.

As an example, let θ be the Toeplitz or period doubling morphism, see \underline{A096268}: Fixed point of the morphism 0 → 01, 1 → 00, \underline{A056832}: Fixed point of the morphism 1 → 12, 2 → 11, \underline{A035263}: Trajectory of 1 under the morphism 1 → 10, 0 → 11.

The second OEIS entry is on the standard alphabet. The permuted version, with Π = 1 ⇄ 2 is 1 → 22, 2 → 21. Since 1211 < 2212, the standard form of the morphism is 1 → 12, 2 → 11.

Remark 2. A caveat: the standard form of a morphism has some undesirable properties. For instance, the square of the standard form need not be equal to the standard form of the square.

Note that the standard form of a morphisms is uniquely defined, since

θ′(1)θ′(2) ⋯ θ′(r) = θ(1)θ(2) ⋯ θ(r) ⟹ θ′ = θ.

This need not hold in the non-uniform case. For example, if θ is given by

θ(1) = 12, θ(2) = 312, θ(3) = 3123,

then θ(123) = 123123123, and the same word appears under the version of θ permuted by Π = 1 → 2 → 3.

Definition 3. The standard form of a morphism θ is obtained in the following way. First, permute the letters of the standard alphabet in such a way that the permuted version θ′ has the smallest word w_{χ} := θ′(1)θ′(2) ⋯ θ′(r) in the lexicographical order on words. Among all permutations that have the same w_{χ}, choose the one with the lexicographically smallest vector (|θ′(1)|, |θ′(2)|, …, |θ′(r)|).

Note that once more, the standard form is uniquely defined.

The standard form of ternary Thue-Morse is the morphism 1 → 123, 2 → 13, 3 → 2.

3 Standard forms of symbolic sequences

We now focus on infinite sequences generated by morphisms, and in particular fixed points of morphisms. These are typical examples of what we call symbolic sequences, where a change of symbols does not change the essential properties of the sequence. An example of a non-symbolic sequence on four symbols is (s_{n}) = \underline{A002828}, which gives the least number of squares that add up to n.

Without loss of generality we assume that all symbols of A = {1, …, r} occur in a sequence over A. We then have the following very simple way to pick a representing sequence.

Definition 4. The standard form of a sequence x over A is Π(x), where Π is the permutation of A which yields the smallest sequence in lexicographical order.

For example, the standard form of the the Toeplitz or period doubling sequence is 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, …, and the standard form of the ternary Thue-Morse sequence is 1, 2, 3, 1, 3, 2, 1, 2, 3, 2, 1, 3, 1, . . .. It is easily seen that both sequences are the unique fixed point of the corresponding morphism, given in its standard form. This will not happen in general. An exception, for example, is the 6-symbol Thue-Morse morphism of Section 1. For archiving purposes we recommend to store both the fixed points of the standard form of the morphism and the standard form of these fixed points.

4 k-symbol Fibonacci morphisms and sequences

For any N the N-block morphism θ̂_{N} of a morphism θ yields pure morphic sequences on an alphabet of p(N) symbols, where p(·) is the subword complexity function of a sequence generated by θ (cf. [7, p. 95]).

In this section we take a look at another famous morphism, the Fibonacci morphism

φ : 0 → 01, 1 → 0.

It is well known (see, e.g.,[7, p. 105]) that p(N) = N +1, so φ̂_{N} is a morphism on an alphabet of N + 1 symbols.

We describe how to obtain for N = 2 the 3-symbol Fibonacci morphism φ̂_{2}. The blocks of length 2 occurring in the language of φ are 00, 01, and 10. We have

φ(00) = 0101 =: u_{1}u_{2}u_{3}u_{4}, φ(01) = 010 =: v_{1}v_{2}v_{3}, φ(10) = 001 =: w_{1}w_{2}w_{3}.

The rule is now that the length of φ̂_{2}(j_{1}j_{2}) is equal to the length of φ(j_{1}). So since u_{1}u_{2}, u_{2}u_{3} = 01, 10, v_{1}v_{2}, v_{2}v_{3} = 01, 10 and w_{1}w_{2} = 00, one obtains on the 2-blocks

00 → 01, 10, 01 → 01, 10, 10 → 00.

Coding these to the standard alphabet {1, 2, 3} by 00 ↔ 3, 01 ↔ 1 and 10 ↔ 2, we obtain the standard form

φ̂_{2}(1) = 12 φ̂_{2}(2) = 3, φ̂_{2}(3) = 12.

The unique fixed point of φ̂_{2} is

x^{(2)} = 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, ….

This sequence will not be found^{1} in the OEIS. However, the sequence obtained by mapping 1 → 2, 2 → 0, 3 → 1 is sequence \underline{A159917}, and is described as the “Fixed point of the morphism 0 → 01, 1 → 2, 2 → 01”. Except for a relationship with the so-called Fibbinary numbers (\underline{A003714}), no other properties are given. We will make a connection with the sequence (a_{n}) = 0, 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 0, … given in \underline{A120614}. Its definition is

a_{n} = g_{n} − g_{n−1} where g_{k} = ⌊Φ⌊k/Φ⌋⌋ and Φ = (1 + \sqrt{5})/2.  (1)

From its comments one can deduce that the sequence 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 0, … obtained after deleting the initial entry 0 is a fixed point of the morphism

0 → 102,  1 → 102,  2 → 02.

Coding this morphism to the standard alphabet via 0 → 1, 1 → 3, 2 → 2 we obtain the morphism θ given by

θ(1) = 312, θ(2) = 12, θ(3) = 312.

1As of November 2015.

We will compare θ with φ̂_{2}^{2}. Note that

φ̂_{2}^{2}(1) = 123, φ̂_{2}^{2}(2) = 12, φ̂_{2}^{2}(3) = 123.

We say a morphism α on A can be rotated if (α(a))_{1} = b for all a ∈ A, and some fixed b ∈ A. The rotated morphism is the morphism denoted ρα, defined by

ρα(a) = b^{−1} α(a) b for all a ∈ A.

In the literature such a rotated morphism is also known as a conjugated morphism. Note that ρ^{2}φ̂_{2}^{2} = θ. This implies that φ̂_{2}^{2} and θ generate the same language (this is not hard to prove, but see also [1, Lemma 3]). Thus arbitrarily long subwords of x^{(2)} will occur in the sequence (a_{n}) from Equation (1), standardized, and conversely. Actually, a little bit more is true. In the following we write shortly η := φ̂_{2}^{2}.

Proposition 5. Let η be defined by η(1) = 123, η(2) = 12, η(3) = 123, and let θ be defined by θ(1) = 312, θ(2) = 12, θ(3) = 312. Then the fixed point 12312123123 ⋯ of η equals the left shift of the fixed point 31231212312 ⋯ of θ.

Proof. Note first that for all n

η^{n}(2) = η^{n}(1)[η^{n−1}(3)]^{−1}, θ^{n}(2) = [θ^{n−1}(3)]^{−1}θ^{n}(1),

simply because η(2) = η(1)3^{−1} and θ(2) = 3^{−1}θ(1). The proposition will be proved if we show that for all n

3η^{n}(1) = θ^{n}(1)3.

This will be done by induction over two levels. Obviously 3η(1) = 3123 = θ(1)3, and 3η^{2}(1) = 312312123 = θ^{2}(1)3. We have for n ≥ 2

3η^{n+1}(1) = 3η^{n}(1)η^{n}(2)η^{n}(3) = θ^{n}(1)3 η^{n}(1)[η^{n−1}(3)]^{−1} 3^{−1}θ^{n}(1)3
= θ^{n}(1) θ^{n}(1)3 [3^{−1}θ^{n−1}(1)3]^{−1} 3^{−1}θ^{n}(1)3
= θ^{n}(3) θ^{n}(1) [θ^{n−1}(3)]^{−1} θ^{n}(1)3
= θ^{n}(3) θ^{n}(1) θ^{n}(2)3 = θ^{n+1}(1)3.

We end this section with 4-symbol Fibonacci. The words of length 3 in the Fibonacci language are 001, 010, 100, and 101. Coding these to the standard alphabet {1, 2, 3, 4} by 001 ↔ 3, 010 ↔ 1, 100 ↔ 2 and 101 ↔ 4, we obtain the standard form morphism

φ̂_{3}(1) = 12, φ̂_{3}(2) = 3, φ̂_{3}(3) = 14, φ̂_{3}(4) = 3.

It has just one fixed point, which is

x^{(3)} = 1, 2, 3, 1, 4, 1, 2, 3, 1, 2, 3, 1, 4, 1, 2, 3, ….

This happens to be \underline{A138967}, which indeed deserves to be called the Infinite Fibonacci word on the alphabet {1, 2, 3, 4}. To prove this, note that φ̂_{3}^{2} is the morphism

1 → 241, 2 → 241, 3 → 24, 4 → 24.

If we make this morphism injective by merging symbols with equals images (cf. [2]), we obtain the morphism ¯1 → ¯1¯3¯1, ¯3 → ¯1¯3, which is the square of the Fibonacci morphism. Hence, indeed, the recipe in the Comments of \underline{A138967}: “replace ¯1 by 1,2,3 and ¯3 by 1,4 in the infinite 2-symbol Fibonacci word”, generates x^{(3)}.

5 A tale of two sequences

In the previous section we showed that the sequence (a_{n+1}) = 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 0, … given in \underline{A120614} essentially equals the 3-symbol Fibonacci sequence. Its definition is

a_{n} = g_{n} − g_{n−1} where g_{k} = ⌊Φ⌊k/Φ⌋⌋ and Φ = (1 + \sqrt{5})/2.

Here (g_{n}) is \underline{A120613} given by

(g_{n+1}) = 1, 1, 3, 4, 4, 6, 6, 8, 9, 9, 11, 12, 12, 14, 14, 16, 17, 17, 19, 19, 21, 22, 22, ….

This sequence was contributed to OEIS by Cloitre in 2006, but the only reference in its description is to a sequence in the paper [6] by Griffiths, a paper which occurred in 2011. On page 502 in [6] Griffiths states “Incidentally, it is interesting to note that the sequence

⌊\frac{⌊(n + 1)Φ⌋ − 1}{Φ}⌋

is also related to the golden string. The first few terms are given by 1, 1, 3, 4, 4, 6, 6, 8, 9, 9, 11, 12, 12, 14, 14, 16, 17, 17, 19, 19, 21, 22, 22, ….” Griffiths does not give any references to other work.

Problem 6. How to show that ⌊Φ⌊\frac{n}{Φ}⌋⌋ = ⌊\frac{⌊nΦ⌋−1}{Φ}⌋ for all n ≥ 1?

Using 1/Φ = Φ − 1, the relation is equivalent to

⌊Φ⌊nΦ − n⌋⌋ = ⌊Φ⌊nΦ⌋ − ⌊nΦ⌋ − Φ + 1⌋.

Taking −n out of the floor, and bringing ⌊nΦ⌋ to the other side this is equivalent to

⌊Φ⌊nΦ⌋ − nΦ + ⌊nΦ⌋⌋ = ⌊Φ⌊nΦ⌋ − Φ + 1⌋ for all n ≥ 1.  (2)

This clearly exposes the close relationship between the two sequences: putting {nΦ} = nΦ − ⌊nΦ⌋, we of course have −1 ≤ −{nΦ} ≤ 0 and −Φ + 1 = −0.618 . . .. We thus see that Equation (2) is equivalent to

{Φ⌊nΦ⌋} < Φ − 1 ⟺ {Φ⌊nΦ⌋} < {nΦ} for all n ≥ 1.  (3)

Let a be the basic sequence \underline{A000201} in the papers by Carlitz et al. in [3], and [4]:

a(n) = ⌊nΦ⌋.

Then Equation (2) is equivalent to

a(a(n) − n) = a(a(n) − 1) − a(n) − 1.  (4)

But this relation will not be found in the papers by Carlitz et al. The reason is that they consequently avoid the shift operator. For instance, if e(n) := ⌊(n + 1)/Φ⌋ is the fifth basic sequence defined by Carlitz et al., then e(n) = a(n + 1) − (n + 1), but this equation does not occur. We remark that (e(n)) is \underline{A060143} shifted, and \underline{A005206} shifted (Hofstadter G-sequence). It is amusing that Equation (4) can be rewritten as a(n) = a(a(n) − 1) − a(a(n) − n) − 1, which is a Hofstadter-Conway type of recursion (cf. \underline{A004001}).

After this digression we will now prove the equivalence in Equation (3).

Proposition 7. For all positive integers n:

{⌊nΦ⌋Φ} < Φ − 1 ⟺ {⌊nΦ⌋Φ} < {nΦ}.

We prove this proposition with the following lemma.

Lemma 8. Let Φ = \frac{1}{2}(1 + \sqrt{5}) be the golden mean. Then for all positive integers n

{⌊nΦ⌋Φ} = (1 − Φ){nΦ} + 1.

Proof. All that we use is the relation Φ^{2} = Φ + 1.

{⌊nΦ⌋Φ} = ⌊nΦ⌋Φ − ⌊⌊nΦ⌋Φ⌋
= nΦ^{2} − Φ{nΦ} − ⌊⌊nΦ⌋Φ⌋
= nΦ + n − Φ{nΦ} − ⌊⌊nΦ⌋Φ⌋
= ⌊nΦ⌋ + {nΦ} + n − Φ{nΦ} − ⌊⌊nΦ⌋Φ⌋
= (1 − Φ){nΦ} + n + ⌊nΦ⌋ − ⌊⌊nΦ⌋Φ⌋
= (1 − Φ){nΦ} + 1.

Here the last step holds because the integer n + ⌊nΦ⌋ − ⌊⌊nΦ⌋Φ⌋ has to be equal to 1, since 0 ≤ {⌊nΦ⌋Φ} ≤ 1, and −0.73 < 1 − Φ ≤ (1 − Φ){nΦ} ≤ 0.

Proposition 7 follows directly from Lemma 8 by noting that the line y = (1 − Φ)x + 1 has a negative slope, and cuts the line y = x at x = Φ − 1.

The following well known relationship (see, e.g., [4, Equation (1.11)]) is a corollary to the proof of Lemma 8.

Corollary 9. For all positive integers n: ⌊⌊nΦ⌋Φ⌋ = ⌊nΦ⌋ + n − 1.

References

[1] Jean-Paul Allouche, Michael Baake, Julien Cassaigne, and David Damanik, Palindrome complexity, Theoret. Comput. Sci. 292 (2003), 9–31.

[2] François Blanchard, Fabien Durand, and Alejandro Maass, Constant-length substitutions and countable scrambled sets, Nonlinearity 17 (2004), 817–833.

[3] L. Carlitz, V. E. Hoggatt Jr., and Richard Scoville, Fibonacci representations, Fibonacci Quart. 10 (1972), 1–28.

[4] L. Carlitz, R. Scoville, and T. Vaughan, Some arithmetic functions related to Fibonacci numbers, Fibonacci Quart. 11 (1973), 337–386.

[5] Ethan M. Coven, F. Michel Dekking, and Michael S. Keane, Topological conjugacy of constant length substitution dynamical systems, preprint, 2015,

   http://arxiv.org/abs/1401.0126.

[6] Martin Griffiths, The golden string, Zeckendorf representations, and the sum of a series, Amer. Math. Monthly 118 (2011), 497–507.

[7] Martine Queffélec, Substitution Dynamical Systems – Spectral Analysis, Lecture Notes in Mathematics, Vol. 1294, 2nd edition, Springer, 2010.

2010 Mathematics Subject Classification: Primary 68R15; Secondary 37B10, 11B85. Keywords: morphism, substitution, pure morphic, Fibonacci word, standard form.

(Concerned with sequences \underline{A000078}, \underline{A000201}, \underline{A001285}, \underline{A002828}, \underline{A003714}, \underline{A004001}, \underline{A005206}, \underline{A007413}, \underline{A010059}, \underline{A010060}, \underline{A035263}, \underline{A056832}, \underline{A060143}, \underline{A080843}, \underline{A096268}, \underline{A120613}, \underline{A120614}, \underline{A138967}, \underline{A159917}, \underline{A216190}, \underline{A254990}, and \underline{A255014}.)

Received August 31 2015; revised version received December 7 2015. Published in Journal of Integer Sequences, December 16 2015.

Return to Journal of Integer Sequences home page.