Collapse: a Fibonacci and Sturmian Game
Total Page:16
File Type:pdf, Size:1020Kb
Collapse: A Fibonacci and Sturmian Game Dennis D.A. Epple Jason Siefken∗ Abstract We explore the properties of Collapse, a number game closely related to Fibonacci words. In doing so, we fully classify the set of periods (minimal or not) of finite Fibonacci words via careful examination of the Exceptional (sometimes called singular) finite Fibonacci words. Collapse is not a game in the Game Theory sense, but rather in the recreational sense, like the 15-puzzle (the game where you slide numbered tiles in an attempt to arrange them in order). It was created in an attempt to better understand Sturmian words (to be explained later). Collapse is played by manipulating finite sequences of integers, called words, using three rules. Before we introduce the rules, we need some notation. For an alphabet A, a word w is one of the following: a finite list of symbols w = w1w2w3 ··· wn (finite word), an infinite list of symbols w = w1w2w3 ··· (infinite word), or a bi-infinite list of symbols w = ··· w−1w0w1w2w3 ··· (bi-infinite word). The wi in each of these cases are called the letters of w. The number of letters of a finite word w is called the length of w and denoted by jwj. A subword of the word w = w1w2w3 ··· is a finite word u = wkwk+1wk+2 ··· wk+n composed of a contiguous segment of w and denoted by u ⊆ w. For words u = u1u2 ··· um and w = w1w2 ··· wn, the concatenation of u and w is the word uw = u1u2 ··· umw1w2 ··· wn: Similarly, wk is the concatenation of w with itself k times. ∗I would like to acknowledge the University of Victoria for their support and Professor Robert Burton for introducing me to the structures in the Fibonacci word. 1 Definition 1. If w is a finite word, we denote by w∗ the bi-infinite periodic word formed by repeating w, e.g. (123)∗ = ··· 123123 ··· : When writing w∗ we will always assume w to be as short as possible, e.g. instead of (1212)∗ we would write (12)∗. The goal of Collapse is to take a finite word on the alphabet A = N, called a starting word (we explain which words will be allowed in a moment), and reduce it, using only the rules listed below, to a word of the form (r)∗ where r is a single letter. Rules. (i) You may replace any letter n with the letter n + 1 followed by the letter n + 2. For example, 434 ! 4454 is a valid application. (ii) You may replace any pair of consecutive letters of the form n + 1 followed by n + 2 with the single letter n. For example, 4454 ! 434 is a valid application. (iii) You may replace a word S (or S∗) by a periodic word T ∗ with S ⊂ T ∗ (respectively S∗ ⊆ T ∗) as long as jT j ≤ jSj. For example, 3453 ! (345)∗ or (345)∗ ! (534)∗ are valid applications. To apply rule (i) or (ii) to a bi-infinite periodic word X∗, one should apply the rule to every occurrence of X. For example (343)∗ ! (4543)∗. A few samples of how to apply the above rules: (ii) (ii) (iii) 5667 −! 45 −! 3 −! (3)∗ (iii) (iii) (ii) 656 −! (65)∗ −! (56)∗ −! (4)∗ (i) (iii) (ii) (ii) 233 −! 3433 −! (343)∗ −! (23)∗ −! (1)∗ Exercise. Reduce 64556. You may have noticed that rule (iii) has some interesting consequences. For example, we can eliminate any prefix that also appears as a suffix, because if x and y are finite words then the word xyx is contained in the periodic word (xy)∗. Further, we may cyclically permute the letters since xy is contained in (yx)∗. It is worth noting that using rule (iii) in different ways can change the eventual solution, for example: 343 ! (343)∗ ! (23)∗ ! (1)∗ 343 ! (34)∗ ! (2)∗ 2 Let us now go about considering the starting words. The most naive way to obtain a word that can be reduced using the rules of Collapse is to start with any integer and expand it to a word using rule (i) repeatedly. For example, the rows of Figure 1 show the words obtained from 0 by repeatedly applying rule (i) to each letter. 0 1 2 2 3 3 4 3 4 45 4 5 5 6 4 5 56 5 6 675 6 6 7 6 7 7 8 Figure 1: Applications of rule (i) to obtain starting words. Of course, if these were the only staring words, it would make Collapse a fairly boring game since you could always win by using only rule (ii). However, a small modification will give this game a rich flavour. Definition 2. A starting word of Collapse is any subword of the word X where X is obtained by repeatedly applying rule (i) to the word 0. For example, if Rn is the nth row of the tree in Figure 1, any subword of Rn is a valid starting word. Exercise. Reduce the following words: 33, 455, 6756, 667677. Now that you are familiar with Collapse, we present the following questions. Question A. Can all starting words be reduced? Question B. Which starting words can be reduced in more than one way? 1 A Sturmian Excursion It turns out that we can answer questions about Collapse by understanding certain properties of Sturmian words (or Sturmian sequences). The precise relationship between Sturmian words and Collapse is given in Section 3. Definition 3. For any real number α 2 [0; 1], the characteristic Sturmian word Sα = a1a2 ::: is defined by ai = b(i + 1)αc − biαc: An alternative definition for Sα is the following. 3 Definition 4. For α 2 [0; 1], let [0; 1 + a1; a2;::: ] be the continued fraction expansion of α with the convention that if α 2 Q, then an = 1 is the last letter of the expansion. The (finite) standard Sturmian words of Sα are the finite words Si defined by S0 = 1; S1 = 0; . an−1 Sn = (Sn−1) Sn−2; and Sα = lim Si. i!1 It should be noted that for α 2 [0; 1], there is a larger set, the set of all Sturmian words associated with α. These words arise as limits of Sα, but are not needed for our investigation. We refer the curious reader to Lothaire [3] and Fogg [2]. Now, considering the number of subwords of Sα of a particular length, we get the following interesting property. Proposition 5 (Fogg [2]). Let α 2 [0; 1]. Then the number of distinct subwords of Sα of length n is at most n + 1, with equality if α2 = Q. We can say even more if n is the length of a standard Sturmian word of Sα. Proposition 6 (de Luca [4]). All rotates (cyclic permutations) of a standard Sturmian word are distinct. Proof. Let pi denote the number of 1's in Si and qi the length of Si. The recursion for Si implies the following recursions for pi and qi: p0 = 1; q0 = 0; p1 = 0; q1 = 1; pn = an−1pn−1 + pn−2; qn = an−1qn−1 + qn−2: It is easy to verify by induction that jpiqi−1 − pi−1qij = 1 and so gcd(pi; qi) = 1 for all i. Now suppose that Si can be written as a nontrivial rotate of itself. k Then Si = w for some word w and k > 1. But then k divides both pi and qi, a contradiction. Proposition 7. Let α 2 [0; 1] n Q. Then every rotate of the standard Sturmian word Si appears in Sα infinitely often. Proof. If i ≤ 1, then the statement holds trivially. For i > 1, we will show that every rotate of Si appears in Si+3 and thus in Sα. Using the recursion for Sturmian words, we have ai+2 ai+2−1 ai+1 ai Si+3 = (Si+2) Si+1 = (Si+2) (Si+1) Si(Si) Si−1: Since ai ≥ 1 for i > 1, the word SiSi, which contains every rotate of Si, is a subword of Si+3. Lastly it is clear from the Sturmian recursion that Si+3 appears infinitely often in Sα. 4 This proof can be modified, using slightly more arithmetic, to show that all rotates of Si do in fact appear in Si+2. We remark that the previous proposi- tion also holds for rational α 2 [0; 1] with the obvious exception that S1 = 0 (respectively S1 = 1) does not appear in Sα if α = 1 (respectively α = 0). As a corollary of the previous propositions, we observe that if n = jSij is the length of a standard Sturmian word for α 2 [0; 1]nQ, then of the n+1 subwords of length n appearing in Sα, exactly one is not a rotate of Si. These words will be crucial in the investigation of Collapse. 2 A Fibonaccian Analogy Let us examine the characteristic Sturmian word that will be our main concern in ( p )2 F S 1− 5 this paper. The infinite Fibonacci word is the word = ', where ' = 2 is the square of the inverse of the Golden Ratio. In this case, the standard Sturmian words generating F are the Fibonacci words Fn given by F0 = 1; F1 = 0; . Fn = Fn−1Fn−2: Notice that fn = jFnj satisfies the recursion for the Fibonacci numbers with f0 = f1 = 1. The first few Fibonacci words are: F0 = 1; F1 = 0; F2 = 01; F3 = 010; F4 = 01001; F5 = 01001010: There is a strong connection between Collapse and Fibonacci words. Consider the word given by the nth row of the tree in Figure 1 (the row starting with the letter n) and use rule (i) repeatedly on all letters less than 2n − 1 until all letters of the word are either 2n − 1 or 2n.