JACO 939-01 Sturmian Words and the Permutation that Orders {α}, {2α},..., {nα}

Kevin O’Bryant [email protected] http://www.math.uiuc.edu/∼obryant February 14, 2002

Abstract We study algebraic properties of the permutation that orders the frac- tional parts {α}, {2α},..., {nα}. Specifically, for each irrational α and positive integer n define πα,n = π to be the permutation of 1, 2, . . . , n for which 0 < {π(1)α} < {π(2)α} < ··· < {π(n)α} < 1. We give a formula for the sign of πα,n, and also show that for each α, there are infinitely many n for which the multiplicative order of πα,n is less than n. The permutations πα,n have previously been studied combinatorially and analytically, and it is natural to ask whether algebraic properties have any meaning. We demonstrate that these permutations do arise in an algebraic setting. The factors of length n of a Sturmian word can be interpreted as the n + 1 vertices of an n-dimensional simplex. In the investigation of these simplices we are led to define a family of matrices indexed by n and by the slope of the Sturmian word. For a fixed n, we show that these matrices generate a representation of the symmetric group on n symbols, and moreover the matrix formed from a Sturmian word with slope α corresponds to the permutation πα,n.

1 Sturmian words are infinite words over the alphabet {0, 1} that have ex- actly n + 1 factors of length n for each n ≥ 0, e.g., if α is irrational then ∞ (b(n + 1)αc − bnαc)n=1 is Sturmian. They arise in many fields, including game theory, diophantine approximation, and theoretical computer science. Sturmian words are examples of 1-dimensional quasicrystals, at least with respect to some of the ‘working definitions’ currently in use. In contrast to the study of crys- tals, group theory has not been found very useful in the study of quasicrystals. According to M. Senechal [Sen95], “The one-dimensional case suggests that symmetry may be a relatively unimportant feature of aperiodic crystals.” We show that symmetric groups arise naturally when studying the set of all Stur- mian words. Let W be a Sturmian word, and let

n T o Fn(W ) := (W (i + 1),W (i + 2),...,W (i + n)) : i ≥ 0 be the set of factors of W of length n, interpreted as column vectors. By the definition of Sturmian, Fn(W ) is a set of n+1 n-dimensional {0, 1}-vectors, and we consider these vectors to be the vertices of a simplex. We show below that 1 the simplex Fn(W ) is not degenerate, and in fact has volume n! , independent of W . We prove this in the following manner. We first translate the simplex Fn(W ) so that a distinguished vertex is at the origin. We then order the non-zero vertices of the translated simplex and list them as columns of a matrix; call this matrix Mn(W ). Surprisingly, the set

{Mn(W ): W is Sturmian } generates a faithful representation Σn of Sn, the symmetric group on n symbols. It follows immediately that |det (Mn(W ))| = 1, and consequently vol (Fn(W )) = 1 n! . There is an implied map from {Mn(W ): W is Sturmian} into Sn; we label the image of Mn(W ) under this map πα,n, where |{i ≤ N : W (i) = 1}| α := lim n→∞ N is the slope of W (which must be irrational). Unexpectedly, the permutation πα,n has the property of ordering the fractional parts {α}, {2α},..., {nα}, i.e., with πα,n,

0 < {πα,n(1)α} < {πα,n(2)α} < ··· < {πα,n(n)α} < 1.

We are thus led—in our quest to understand the simplex Fn(W ) and the ma- trix Mn(W )—to study the permutation that orders fractional parts of multiples of an irrational. The permutation πα,n has already been studied extensively; we mention two notable results. S´os[S´os57]studied this permutation from a combinatorial view in connection with continued fractions, and gave a recurrence relation giving πα,n(i) in terms of

2 πα,n(i−1), πα,n(1), πα,n(n) and n. An immediate corollary of this recurrence is the famous Three-Distance Theorem, first conjectured by Steinhaus and proven independently by S´os[S´os57], Swierczkowski´ [Swi59],´ Erd˝os,and Sz¨usz. We direct the reader to Slater [Sla67] for historical notes on this problem, and to Alessandri & Berth´e[AB98] for some recent generalizations. Schoißengeier [Sch84] studied this permutation analytically, via Dedekind sums, culminating in his explicit formula for the star-discrepancy of the ∞ ({nα})n=1. To our knowledge, these permutations have not arisen previously in an algebraic setting. We begin a study of algebraic properties of πα,n in Section 3 of this paper. We show that n Y b2`αc sgn(πα,2n) = sgn(πα,2n+1) = (−1) `=1 for all irrational α and all n ≥ 1. We also show, as a corollary of a lemma of S´os[S´os57], that the multiplicative order of π divides φ(n) for infinitely α,n√ 5−1 many n. For some special numbers, such as φ = 2 , it is possible to give more precise statements: ord(πφ,f2n ) = 2 and ord(πφ,f2n+1 ) = 4, where fn is the n-th Fibonacci number. For fixed α, the order of πα,n appears to vary wildly as n → ∞. For example, we have ord(πφ,74) = 79170 and ord(πφ,89) = 4, whereas the expected order of a permutation on 74 (resp. 89) symbols is roughly 10500 (resp. 23700). Our analysis of πα,n leads us back to Sturmian words. In Lemma 3.5(iii) we evaluate the sum (modulo 2) of the Hamming weights of the n + 1 subwords of length n of a Sturmian word. Specifically, X h(~w) ≡ n (mod 2).

~w∈Fn(W ) Note that the right-hand-side of this congruence is independent of W . Section 1 contains a brief—and certainly incomplete—guide to the literature of Sturmian words, Beatty , and the permutation πα,n. In Section 2, we discuss Sturmian words and the representation Σn. In Section 3, we prove some facts about the order and sign of πα,n. Section 4 is a list of questions raised by the results in Sections 2 and 3 that we have been unable to answer. Sections 2 and 3 are logically independent and may be read in any order. A Mathematica notebook containing code for generating the functions and examples in this paper, and many more, is available from the author.

1 A Brief Guide to Related Literature

∞ ∞ A is a sequence of the form (bnα + βc)n=1 or (dnα + βe)n=1, where α > 0 and β are (possibly rational) real numbers. The Beatty word associated with the Beatty sequence B is a function W : N → {0, 1} such that W (i) = 1 iff i ∈ B. If α is irrational, then the Beatty words associated to ∞ ∞ (bnα + βc)n=1 and (dnα + βe)n=1 are Sturmian, and all Sturmian words arise

3 in this manner. These and many other results basic to the theory of Sturmian words and Beatty sequences are found in [Lot02, Chapter 2]. Several surprising semigroups of matrices have arisen recently in the theory of Beatty sequences. The tip of this iceberg can be seen in the many papers of Stolarsky, Porta, and Fraenkel, in various combinations of authorship, which are listed in the bibliography [FPS90], [Fra94], [FLS72], [PS90], [PS91], [Sto76], [Sto94], [Sto96]. Hankel determinants of Beatty words have been studied in detail, see espe- cially [APWW98] and [KTW99]. In the author’s opinion, the most compelling open problem in the theory of Beatty sequences is Fraenkel’s Conjecture.

Fraenkel’s Conjecture: Suppose that m ≥ 3, α1 > α2 > ··· > αm > 1 with strict inequalities, and the m Beatty sequences (bkαi + βic)k≥1 are disjoint and 2m−1 cover the positive integers. Then αi = 2i−1 .

2m−1 i−1 The sequences (bkαi + βic)k≥1 with αi = 2i−1 and βi = 1 − 2 (1 ≤ i ≤ i−1 m) do partition the positive integers, but the choice βi = 1 − 2 is not the only choice that leads to a partition. Fraenkel’s Conjecture has recently been established for m ≤ 6 by Tijdeman [Tij00b]. An up to date (and quite readable) account of Fraenkel’s Conjecture can be found in Tijdeman’s article [Tij00a]. In addition, [Tij00a] contains the most extensive (although by no means complete) bibliography of recent work related to Beatty sequences of which this author is aware. The bibliographies of Brown [Bro93] and Stolarsky [Sto76] cover the early development of the theory. There have been many publications recently concerning Sturmian words and we cannot do justice to this literature. The survey of Berstel [Ber96] gives an excellent overview, and Chapter 2 of the book “Algebraic Combinatorics on Words” [Lot02] gives a rigorous introduction. S´osand Schoißengeier showed that properties of the sequence ({nα})n≥1 are intimately connected to properties of the of α. Sto- larsky [Sto76], Brown [Bro93] and others have made explicit the relation be- tween Sturmian words with slope α and the continued fraction expansion of α. One aim of this work is to make a direct connection between Sturmian words and ({nα})-sequences. Boyd & Steele [BS79] give formulas for the length of the longest increasing subsequence of πα,n, based on an explicit solution to a linear programming problem. The works of S´os[S´os57](some of her results are reproved, in English, in [Sla67] and [S´os58])and Schoißengeier have already been mentioned. We are not aware of any treatment of algebraic properties of πα,n. The benchmark for algebraic properties of permutations is the work of Erd˝os

& Tur`anon random permutations. They identified [ET65]√ the expected order of a permutation on n symbols to be asymptotic to nlog( n) (and moreover give the limiting distribution in [ET67]), as well as a host of similar results for the number of cycles, length of the longest cycle, etc.

4 2 Sturmian words

If W is a Sturmian word, then there are real numbers α, β such that either

W (i) = b(i + 1)α + βc − biα + βc or W (i) = d(i + 1)α + βe − diα + βe .

The slope of W is α, which is necessarily irrational, and if W and V are Sturmian words with the same slope, then Fn(W ) = Fn(V ). Both of these results are proven in [Lot02, Chapter 2]. Thus we may unambiguously write Fn(α) for the set of factors of length n of a Sturmian word with slope α. In particular, Fn(α) is the set of factors of length n of the word sα = sα(1)sα(2) ··· , where sα(i) := b(i + 1)αc − biαc, the so-called characteristic Sturmian word with slope α. In this paper, the reader who wishes to think only of sα sequences loses nothing.

Example: The Sturmian word with slope e−1 ≈ 0.368 begins (0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1,... ). The 6-th population, arranged in anti- lexicographic order, is

1 1 1 0 0 0 0   0 0 0 1 1 0 0               −1 1 0 0 0 0 1 1 F6(e ) =   ,   ,   ,   ,   ,   ,   . 0 1 1 1 0 0 0               0 0 0 0 1 1 0  1 1 0 0 0 0 1 



We can prove that |Fn(α)| = n + 1 by ‘sliding rulers’. Take two rulers, 1 2 bnαc one with the integers 0, 1,... , n marked, and another with 0, α , α , ... , α marked. We call these the “integer” ruler and the “α” ruler, respectively. Place the two rulers, integer ruler on top, so that the “0” marks line up, and with the bnαc “0” ends on the left and the “n” and “ α ” ends on the right. Since

1 b(k + 1)αc − bkαc = 1 ⇔ there is a multiple of α in the interval [k, k + 1) we can read off a factor of length n by writing down a “0” or a “1” according to whether there is an “α” mark in [k, k + 1), as measured on the integer ruler, for k = 0, 1, . . . , n − 1. Now slowly move the “α” ruler to the right, writing down a new member of Fn(α) whenever an “α” mark passes an “integer” mark (this is valid since 1 the multiples of α are dense modulo 1). By the time we have moved the “α” 1 1 ruler a distance of α (when − α would aline with 0), each “integer” mark has been passed exactly once (“0” being the first). There are n + 1 “integer” marks, and so |Fn(α)| = n + 1. We have written down the n + 1 factors of length n in anti-lexicographic order, and each vector differs from the previous one either in two consecutive coordinates (a (1, 0)T becomes a (0, 1)T ) or in the last

5 coordinate ( a (..., 1)T becomes a (..., 0)T ). We can reconstruct the population from the first population vector and the list of the order in which the “integer” marks 1, 2, . . . , n are passed. As was noted, each “integer” mark was passed exactly once, so this list is a permutation of {1, 2, . . . , n}. We show in this paper (the proof of Lemma 2.4) that the first factor can be reconstructed from this permutation, i.e., this permutation alone encodes the entire set of factors of length n. It will be convenient to use several notations for permutations interchange- ably. We use standard cycle notation, and sometimes abbreviate

 1 2 ··· n  σ = = [σ(1), . . . , σ(n)]. σ(1) σ(2) ··· σ(n)

We multiply permutations from right to left. 1 bkαc The largest multiple of α less than k is α , so the “k” mark is passed when bkαc we slide the “α” ruler a distance of k− α . This is proportional to kα−bkαc = {kα}, the fractional part of kα, so the marks are passed in increasing order of {kα}. In other words, if the permutation is [σ(1), σ(2), . . . , σ(n)] (i.e., σ(j) is the mark on the integer ruler that is the j-th one passed), then {σ(i − 1)α} < {σ(i)α} for 2 ≤ i ≤ n. This permutation depends only on α and n; we label it πα,n. Fn(α) consists of n+1 n-dimensional vectors, naturally defining a simplex in Rn. Whenever a family of simplices arises, there are several questions that must be asked. Can the simplex Fn(α) be degenerate? If Fn(α) is not degenerate, can one express its volume as a function of n and α? Under what conditions on ∼ α, β, n is Fn(α) = Fn(β)? 1 The first and second questions are answered by the formula vol(Fn(α)) = n! , which we prove in Theorem 2.10. Computer calculation suggests an answer to the third question, which we state as a conjecture in Section 4. To analyze a simplex, one first orders the vertices (we order them anti- lexicographically since this is the order that our rulers argument generates Fn(α)). Then, one translates the simplex so that one vertex is at the ori- gin (we move the last factor to ~0). Finally, one writes the coordinates of the other vertices as the columns of a matrix. If this matrix is non-singular, then the simplex is not degenerate. In fact, the volume of the simplex is the ab- solute value of the determinant divided by n!. Thus we are led to define Mn(α) := (~v1−~vn+1,~v2−~vn+1, . . . ,~vn−~vn+1), where Fn(α) = {~v1,~v2, . . . ,~vn+1} ordered anti-lexicographically. Stolarsky & Porta [personal communication] observed experimentally that Mn(α) has determinant ±1, and moreover that the roots of its characteristic polynomial are roots of unity. These observations are confirmed by Theorem 2.1.

√ 5−1 Example: The Sturmian word with slope φ = 2 ≈ 0.618 begins (1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0,... ). One computes the factors of length 5, arranged

6 in anti-lexicographic order, to be

1 1 1 1 0 0   1 1 0 0 1 1             F5(φ) = 0 , 0 , 1 , 1 , 1 , 0 .             1 1 1 0 0 1  1 0 0 1 1 1 

From this, we find πφ,5 = [5, 2, 4, 1, 3] = (1534)(2), and

1 1 1 1 0  0 0 −1 −1 0    M5(φ) = 0 0 1 1 1  .   0 0 0 −1 −1 0 −1 −1 0 0

Note also that 0 < {5φ} < {2φ} < {4φ} < {1φ} < {3φ} < 1. 

In the following sections, we will give a representation Σn (of the symmetric group on n symbols) in SLn(C) that contains {Mn(α): α ∈ (0, 1) \ Q}. We will also compute the character of this representation, establishing that Σn is similar to the representation of Sn as permutation matrices, and display the intertwining matrices, i.e., the matrices Q such that Q−1MQ is a permutation matrix for every M ∈ Σn.

2.1 The Map Sn → SLn(C)

Let ~ei (1 ≤ i ≤ n) be the n-dimensional column vector with every component 0 except the i-th component, which is 1. We set ~en+1 = ~0, the n-dimensional 0 ~ vector. We write the identity matrix as In := (~e1,~e2, . . . ,~en). Let δi := ~ei+1 −~ei ~ (1 ≤ i ≤ n). In particular, δn = −~en. Set D(σ) := {1} ∪ {k : σ−1(k − 1) > σ−1(k)}. In other words, D(σ) consists of those k for which k − 1 does not occur before k in [σ(1), σ(2), . . . , σ(n)]. For example, D([1, 3, 5, 4, 2, 6]) = {1, 3, 5}. σ P σ σ ~ Set ~w1 := i∈D(σ) ~ei. For 1 ≤ j ≤ n, set ~wj+1 := ~wj + δσ(j). We now define two matrices: the n × (n + 1) matrix

σ σ σ σ Lσ := (~w1 , ~w2 , . . . , ~wn, ~wn+1), and the square n × n matrix

σ σ σ σ σ σ Mσ := (~w1 − ~wn+1, ~w2 − ~wn+1, . . . , ~wn − ~wn+1).

Theorem 2.10 below shows that Mn(α) = Mπα,n , justifying our definitions.

Example: Set n = 5 and σ = [5, 2, 3, 1, 4] = (1, 5, 4)(2)(3). We find that σ σ σ ~ D(σ) = {1, 2, 5}, and so ~w1 = ~e1 + ~e2 + ~e5. By definition ~w2 = ~w1 + δσ(1) =

7 σ ~w1 + ~e6 − ~e5 = ~e1 + ~e2, and so on. Thus 1 1 1 1 0 0 1 1 0 0 1 1   Lσ = 0 0 1 0 0 0   0 0 0 1 1 0 1 0 0 0 0 1 and 1 1 1 1 0  0 0 −1 −1 0    Mσ = 0 0 1 0 0  .   0 0 0 1 1  0 −1 −1 −1 −1

Note that the first column of Mσ is ~e1; that this is always the case is proven ~ in Lemma 2.2. Further, the second column of Mσ is ~e1 + δσ(1), the third is ~ ~ ~e1 + δσ(1) + δσ(2), and so forth. This pattern holds in general and is proved in Lemma 2.3 below. It is not immediate from the definitions that Lσ is always a {0, 1}-matrix or that Mσ is a {−1, 0, 1}-matrix; we prove this in Lemma 2.4. The proof of Lemma 2.5 relies on reconstructing σ and Lσ from Mσ. This reconstruction proceeds as follows. The ‘−1’ entries of Mσ are in the second σ and fifth rows; this gives ~w6 = ~e2 + ~e5, which is the last column of Lσ. In fact, the j-th column of Lσ is the j-th column of Mσ plus ~e2 +~e5. Once we know the σ σ σ σ columns of Lσ := (~w1 , ~w2 , . . . , ~w6 ), we can use the definition of ~wj+1 to find ~ σ σ ~ σ(j). For example, δσ(4) = ~w5 − ~w4 = ~e2 − ~e1 = δ1, and so σ(4) = 1. Lemma 2.6 generalizes the observation that 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0     M[1,2,4,3,5] = M(4,3) = 0 0 1 0 0 + 0 0 0 1 0 .     0 0 0 1 0 0 0 0 −2 0 0 0 0 0 1 0 0 0 1 0

From an earlier example, recall that πφ,5 = [5, 2, 4, 1, 3] = (1, 5, 3, 4)(2), and one may directly verify that Mπφ,5 = Mφ(5). This is no accident, by Theorem 2.10 below Mα(n) = Mπα,n for all α and n. The equation

M(4,3)Mπφ,5 = M(4,3)(1,5,3,4)(2) = M(1,5,4)(2)(3), which is the same as 1 0 0 0 0 1 1 1 1 0  1 1 1 1 0  0 1 0 0 0 0 0 −1 −1 0  0 0 −1 −1 0        0 0 1 1 0 0 0 1 1 1  = 0 0 1 0 0  ,       0 0 0 −1 0 0 0 0 −1 −1 0 0 0 1 1  0 0 0 1 1 0 −1 −1 0 0 0 −1 −1 −1 −1 is an example of the isomorphism of Theorem 2.1. 

8 Theorem 2.1. The set of matrices Σn := {Mσ : σ ∈ Sn} is a faithful repre- sentation of Sn. That is, the map σ 7→ Mσ is an isomorphism. The proof we give of this is more a verification than an explanation. We remark that there are several anti-isomorphisms involved in our choices. We have chosen to multiply permutations right-to-left rather than left-to-right. We have chosen to consider the list [a, b, c, . . . ] as the permutation taking 1 to a, 2 to b, 3 to c, etc., rather than the permutation taking a to 1, b to 2, c to 3, etc. Finally, we have chosen to define the vectors ~wσ to be columns rather than rows. We begin with some simple observations about Mσ before proving Theo- rem 2.1. σ σ ~ We defined ~wj+1 := ~wj + δσ(j). An easy inductive consequence of this σ σ Pj ~ definition is that ~wj+1 = ~w1 + i=1 δσ(i) for 1 ≤ j ≤ n; we use this repeatedly and without further fanfare.

σ σ Lemma 2.2. ~w1 − ~wn+1 = ~e1. σ σ Pn ~ Pn ~ Proof. Since ~wn+1 = ~w1 + i=1 δσ(i), all we need to show is that i=1 δσ(i) = −~e1. As {1, 2, . . . , n} = {σ(1), σ(2), . . . , σ(n)}, we have

n n n σ σ X ~ X ~ X ~wn+1 − ~w1 = δσ(i) = δi = (~ei+1 − ~ei) = ~en+1 − ~e1 = −~e1. i=1 i=1 i=1 Pj−1 ~ Lemma 2.3. The j-th column of Mσ is ~e1 + i=1 δσ(i). σ σ Proof. The j-th column of Mσ is defined as ~wj − ~wn+1. If j = 1, then this lemma reduces to Lemma 2.2. If j > 1, then Lemma 2.2 gives

j−1 ! j−1 σ σ σ X ~ σ X ~ ~wj − ~wn+1 = ~w1 + δσ(i) − (~w1 − ~e1) = ~e1 + δσ(i). i=1 i=1

Lemma 2.4. The entries of Lσ are 0 and 1. The entries of Mσ are -1, 0, and 1.

Proof. It is easily seen from Lemma 2.3 that Mσ is a {−1, 0, 1}-matrix, and this also follows from the more subtle observation that Lσ is a {0, 1}-matrix. σ To prove the Lσ is a {0, 1}-matrix is the same as showing that each ~wj (1 ≤ σ P j ≤ n + 1) is a {0, 1}-vector. This is obvious for ~w1 := i∈D(σ) ~ei. We have σ σ Pj ~ Pj ~ Pn ~wj+1 = ~w1 + i=1 δσ(i); define ~v, ci by ~v := i=1 δσ(i) = i=1 ci~ei. ~ The i-th component of ~v can only be affected by δi−1 (which adds 1 to the ~ i-th component) and δi (which subtracts 1). It is thus clear that ci is (-1), (0), (0), or (1) depending, respectively, on whether (only i), (i − 1 and i), (neither i − 1 nor i), or (only i − 1) is among {σ(1), σ(2), . . . , σ(j)}. To show that σ σ ~wj+1 = ~w1 + ~v is a {0, 1}-vector, we need to show two things. First, if ci = −1 σ then i ∈ D(σ) (and so the i-th component of ~w1 is 1). Second, if ci = 1 then σ i 6∈ D(σ) (and so the i-th component of ~w1 is 0).

9 If ci = −1, then i is and i − 1 is not among {σ(1), . . . , σ(j)}. This means that σ−1(i − 1) > j ≥ σ−1(i), and so by the definition of D, i ∈ D(σ). If, on the other hand, ci = 1, then i − 1 is and i is not among {σ(1), . . . , σ(j)}. This means that σ−1(i−1) ≤ j < σ−1(i), and so by the definition of D, i 6∈ D(σ).

Lemma 2.5. The map σ 7→ Mσ is 1-1.

Proof. Given Mσ, we find σ. We first note that moving from Lσ to σ is easy σ σ ~ since ~wj+1 − ~wj = δσ(j). Some effort is involved in finding Lσ from Mσ. We σ need to find ~wn+1. Every row of Lσ contains at least one 0 (explanation below). Thus Mσ will σ contain a -1 in exactly those rows in which ~wn+1 contains a 1, and we are done. σ σ ~ σ We have ~wj+1 = ~wj + δσ(j) = ~wj + ~eσ(j)+1 − ~eσ(j). The σ(j)-th row of ~eσ(j)+1 σ σ is 0, and ~wj ,~eσ(j) are {0, 1}-vectors, so the σ(j)-th row of ~wj+1 is either 0 or −1. But by Lemma 2.4, Lσ is a (0, 1)-matrix, whence the σ(j)-th row of the (j + 1)-st column of Lσ is 0.

We define Vk to be the matrix all of whose entries are 0, save the k-th column, which is ~ek−1 − 2~ek + ~ek+1.

Lemma 2.6. M(k,k−1) = In + Vk, for 2 ≤ k ≤ n. Proof. Follow the definitions. With σ = (k, k − 1), we have D(σ) = {1, k}, (k,k−1) (k,k−1) (k,k−1) ~wj = ~ej + ~ek for n ≥ j 6= k, ~wk = ~ek−1 + ~ek+1 and ~wn+1 = ~ek. We have laid the necessary groundwork, and turn now to proving Theo- rem 2.1.

Proof. We have already seen in Lemma 2.5 that the map σ 7→ Mσ is 1-1; all that remains is to show that this map respects multiplication, i.e., for any σ, τ ∈ Sn, Mτ Mσ = Mτσ. Since we may write τ as a product of transpositions of the form (k, k − 1) it is sufficient to show that M(k,k−1)Mσ = M(k,k−1)σ for every k (2 ≤ k ≤ n) and σ ∈ Sn. We need to split the work into two cases: σ−1(k − 1) < σ−1(k) and σ−1(k − −1 1) > σ (k). In each case we first describe the rows of M(k,k−1)Mσ − Mσ using Lemma 2.6, and then compute the columns of M(k,k−1)σ − Mσ from the definition. We will find that M(k,k−1)Mσ − Mσ = M(k,k−1)σ − Mσ in each case, which concludes the proof. Since the two cases are handled identically, we present only the first case. −1 −1 Suppose that σ (k − 1) < σ (k). By Lemma 2.6, M(k,k−1)Mσ − Mσ = VkMσ. The matrix Vk is zero except in the (k − 1, k), (k, k), and (k + 1, k) positions (note: we sometimes refer to positions which do not exist for k = n; the reader may safely ignore this detail), where it has value 1, -2, 1, respectively. Thus VkMσ is zero except in the (k − 1)-st and (k + 1)-st rows (which are the same as the k-th row of Mσ), and the k-th row (which is -2 times the k-th row of Mσ).

10 We now describe the k-th row of Lσ. By the hypothesis of this case, k 6∈ σ σ σ Pj ~ D(σ), so the k-th row of ~w1 is 0. Since ~wj+1 = ~w1 + i=1 δσ(i), the k-th row σ −1 −1 −1 of ~wj is 0 for 1 ≤ j ≤ σ (k − 1), is 1 for σ (k − 1) < j ≤ σ (k), and is 0 for −1 −1 σ (k) < j ≤ n + 1. This gives the k-th row of Mσ as σ (k − 1) ‘0’s followed by σ−1(k) − σ−1(k − 1) ‘1’s, followed by n − σ−1(k) ‘0’s. We now compute M(k,k−1)σ − Mσ. The columns of L(k,k−1)σ are given by (k,k−1)σ (k,k−1)σ Pj ~ ~wj+1 = ~w1 + i=1 δ(k,k−1)σ(i) (except the first, but the first column of −1 −1 Mτ is ~e1, independent of τ). Now (k, k −1)σ(i) = σ(i) for i 6∈ {σ (k), σ (k − Pj ~ Pj ~ −1 −1 1)}, so that i=1 δ(k,k−1)σ(i) = i=1 δσ(i) for j < σ (k−1) and for j ≥ σ (k). For σ−1(k − 1) ≤ j < σ−1(k),

j j ! X ~ X ~ ~ ~ δ(k,k−1)σ(i) = δσ(i) − δk−1 + δk. i=1 i=1

Thus the (j + 1)-st column of M(k,k−1)σ − Mσ is

j j  (k,k−1)σ (k,k−1)σ σ σ  X ~ X ~ ~wj+1 − ~wn+1 − ~wj+1 − ~wn+1 = δ(k,k−1)σ(i) − δσ(i), i=1 i=1

−1 −1 ~ ~ which is ~0 for j < σ (k −1) and for j ≥ σ (k), and −δk−1 +δk = ~ek−1 −2~ek + −1 −1 ~ek+1 for σ (k − 1) ≤ j < σ (k). We have shown that M(k,k−1)Mσ − Mσ = −1 −1 M(k,k−1)σ − Mσ in the case σ (k − 1) < σ (k).

2.2 The Character of the Representation We review the needed facts and definitions from the representation theory of finite groups (an excellent introduction is [Sag01]). A representation of a finite group G is a homomorphism R : G → SLm(C) for some m ≥ 1. The repre- sentation is said to be faithful if the homomorphism is in fact an isomorphism. The character of R is the map g 7→ tr(R(g)), with tr being the trace function. We will use Corollary 1.9.4(5) of [Sag01], which states that if two representa- tions R1, R2 of G have the same character, then they are similar, i.e., there is a −1  matrix Q such that ∀g ∈ G Q R1(g)Q = R2(g) . The matrix Q is called the intertwining matrix for the representations R1, R2. Set Pσ = (pij), with pij = 1 if j = σ(i), and 0 otherwise. This is the familiar representation of Sn as permutation matrices. We will also use the notation h(~w) for the Hamming weight of the {0, 1}-vector ~w, i.e., the number of 1’s.

Theorem 2.7. The representations {Pσ : σ ∈ Sn} and {Mσ : σ ∈ Sn} are similar.

Proof. The character of {Pσ : σ ∈ Sn} is obviously given by tr(Pσ) = #{i: σ(i) = i}. We will show that tr(Mσ) = #{i: σ(i) = i} also, thereby establishing that the representations are similar.

11 σ σ We first note that tr(Mσ) = tr(Lσ) − h(~wn+1), since every “1” in ~wn+1 is subtracted from exactly one diagonal position when we form Mσ from Lσ by σ subtracting ~wn+1 from each column. We show below that σ tr(Lσ) = h(~w1 ) − 1 + #{i: σ(i) = i}, so by Lemma 2.2 we have

σ σ tr(Mσ) = h(~w1 ) − 1 + #{i: σ(i) = i} − h(~wn+1) = #{i: σ(i) = i}, which will conclude the proof. Until this point we have found it convenient to think of Lσ in terms of its columns. That is not the natural viewpoint to take in proving that tr(Lσ) = σ h(~w1 ) − 1 + #{i: σ(i) = i}, however. The difference between the (j + 1)-st and ~ j-th columns of Lσ is δσ(j) = ~ei+1 − ~ei; we think of this relationship as a “1” moving down from the i-th row to the (i + 1)-st row. In looking at the matrix Lσ we see each “1” in the first column continues across to the east, occasionally moving down a row (southeast), or even ‘off’ the bottom of the matrix. We call the path a “1” takes a snake.

Example: With σ = [1, 4, 5, 8, 2, 3, 9, 6, 10, 7], we find  1 0 0 0 0 0 0 0 0 0 0   0 1 1 1 1 0 0 0 0 0 0     0 0 0 0 0 1 0 0 0 0 0     1 1 0 0 0 0 1 1 1 1 1     0 0 1 0 0 0 0 0 0 0 0  Lσ =    0 0 0 1 1 1 1 1 0 0 0     0 0 0 0 0 0 0 0 1 1 0     1 1 1 1 0 0 0 0 0 0 1     0 0 0 0 1 1 1 0 0 0 0  0 0 0 0 0 0 0 1 1 0 0

The matrix Lσ has 3 snakes beginning in positions (1, 1), (4, 1), and (8, 1). The first snake occupies the positions (1, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 6), (4, 7), (4, 8), (4, 9), (4, 10), and (4, 11). 

Only the last snake moves off the bottom of Lσ; after all, n only occurs once σ in a permutation. The other snakes, of which there are h(~w1 ) − 1, begin on or below the diagonal and end on or above the diagonal. Thus each must intersect the diagonal at least once. Moreover, each fixed point of σ will keep a snake on σ a diagonal for an extra row. Thus, tr(Lσ) = h(~w1 ) − 1 + #{i: σ(i) = i}. We turn now to identifying the intertwining matrices, i.e., the matrices Q −1 such that Q MσQ = Pσ for every σ ∈ Sn. −1 Theorem 2.8. The n × n matrix Q = (qij) satisfies Q MσQ = Pσ for every n−1 σ ∈ Sn iff there are complex numbers a, b with (na+b)b 6= 0 and q11 = a+b, q1k = a, qkk = b, qk,k−1 = −b (2 ≤ k ≤ n).

12 Proof. We first note that it is sufficient to restrict σ to a generating set of Sn. To −1 see this, let Sn = hσ1, . . . , σri. If Q satisfies Q MσQ = Pσ for every σ ∈ Sn, −1 then clearly Q Mσi Q = Pσi (1 ≤ i ≤ r). In the other direction, if Q satisfies −1 Q Mσi Q = Pσi (1 ≤ i ≤ r) and σ = σi1 σi2 . . . σis , then

s Y   Q−1M Q = Q−1 M M ... M  Q = Q−1M Q σ σi1 σi2 σis σij j=1 s Y = Pσ = PQs = Pσ. ij j=1 σij j=1

Thus we can restrict our attention to the transpositions (k, k − 1) (2 ≤ k ≤ n). We identified M(k,k−1) in Lemma 2.6 as M(k,k−1) = In + Vk, where Vk is the matrix all of whose entries are zero, save the k-th column, which is ~ek−1 − 2~ek + ~ek+1. We suppose that Q = (qij) satisfies M(k,k−1)Q = QP(k,k−1) to find linear constraints on the unknowns qij. We will find that these constraints (for 2 ≤ k ≤ n) are equivalent to q11 = a + b, q1k = a, qkk = b, qk,k−1 = −b (2 ≤ k ≤ n). The determinant of Q is easily seen to be (na + b)bn−1, so that as long as this −1 is nonzero, Q MσQ = Pσ for every σ ∈ Sn. We have M(k,k−1)Q = InQ + VkQ, so that M(k,k−1)Q = QP(k,k−1) is equivalent to VkQ = Q(P(k,k−1) − In). This is a convenient form since most entries in the matrices Vk and P(k,k−1) −In are zero. The entries of the product VkQ are 0 except for the (k − 1)-st, k-th, and (k + 1)-st rows which are equal to the k-th row of Q, to -2 times the k-th row of Q, and to the k-th row of Q, respectively. The entries of the product Q(P(k,k−1) − In) are 0 except for the (k − 1)-st and k-th columns, which are equal to the k-th column of Q minus the (k − 1)-st column of Q, and to the (k − 1)-st column of Q minus the k-th column of Q, respectively. The entries which are zero in one matrix or other lead to the families of equations qkj = 0 (for j 6∈ {k − 1, k}) and qjk = qj,k−1 (for j 6∈ {k − 1, k, k + 1}). The entries which are non-zero in both products give the six equations     qk,k−1 qkk qk−1,k − qk−1,k−1 qk−1,k−1 − qk−1,k −2qk,k−1 −2qkk =  qkk − qk,k−1 qk,k−1 − qkk  , qk,k−1 qkk qk+1,k − qk+1,k−1 qk+1,k−1 − qk+1,k which are equivalent to qk−1,k−1 = qk−1,k +qk,k, qk,k−1 = −qkk, and qk+1,k−1 = qk+1,k + qkk. Taking qnn = b and q1n = a, the result follows.

13 Corollary 2.9.

 1  1  −1 1 0  1 1 0       −1 1  1 1 1    .  Mσ =  ..  ·Pσ · . ..  .  .  . .       ..  . ..   0 .  . 1 .  −1 1 ...... 1 1

Proof. Set a = 0, b = 1 in Theorem 2.8. All that needs to be checked is that Q−1 is as claimed, i.e., the n×n matrix with “1”s on and below and the diagonal and “0”s above the diagonal.

We remark that, since it is easy to recover Lσ from Mσ (see the proof of Lemma 2.4) this Corollary gives a simple method for computing the factors of length n of a Sturmian word with slope α given only the permutation ordering {α},..., {nα} (we don’t even need α). Also, we note that the matrix with “1”s on and below the diagonal is a summation operator, and its inverse is a difference operator. It is not inconceivable that Corollary 2.9 could be proved directly. We summarize the results of this paper, as they relate to Mn(α) and Fn(α), in Theorem 2.10. Theorem 2.10. Let α ∈ (0, 1) be irrational, and n ≥ 1 an integer.

−1 i. Mn(α) = Mπα,n = QPπα,n Q (see Theorem 2.8 for the definition of Q);

ii. det(Mn(α)) = ±1.

1 iii. vol(Fn(α)) = n! . Qn b2`αc iv. det(M2n(α) = det(M2n+1(α)) = `=1(−1) .

v. If πα,n(n) = n, then

ord(Mn−1(α)) = ord(Mn(α)) = ord(πα,n(1) mod n).

vi. If πα,n(1) = n, then

ord(Mn−1(α)) = ord(−πα,n(n) mod n)

and ord(Mn(α)) = ord(−πα,n(n) mod gn),

 πα,n(n)+1  where g is the smallest positive integer such that gcd n, g = 1.

14 Proof. (i) It is clear from our ‘sliding ruler’ discussion that there is a vector Pj ~ ~u such that Fn(α) = {~u + i=1 δπα,n(i) : 0 ≤ j ≤ n}. From the proof of Lemma 2.4, we know that for any given permutation σ, there is a unique vector Pj ~ πα,n ~v such that each of ~v + i=1 δσ(i) is a {0, 1}-vector. Thus ~u = ~w1 , and πα,n πα,n πα,n Fn(α) = {~w1 , ~w2 , . . . , ~wn+1 }. Hence Mn(α) = Mπα,n . That Mπα,n = −1 QPπα,n Q follows directly from Theorem 2.1. (ii) The entries of Mn(α) are integers, so det(Mn(α)) is an integer also. The −1 matrix Mn(α) has the same multiplicative order as πα,n since Q Mn(α)Q = r r Pπα,n , and in particular there is an r such that (Mn(α)) = In. Thus (det(Mn(α))) = 1, and so det(Mn(α)) = ±1. (iii) This follows immediately from | det(Mn(α))| = 1. Parts (iv), (v), and (vi) follow from part (i) and Theorem 3.2 below.

3 The Permutation that Orders the Fractional Parts {α}, {2α},..., {nα}

√ Table 1 gives the sign and multiplicative order of π 2,n for 2 ≤ n ≤ 100. Visually √ √ inspecting the table, one quickly notices that sgn(π 2,2n) = sgn(π 2,2n+1), and that ord(π√ ) is surprisingly small for n = 28, 29, 69, 70. Note that 29 and 70 2,n √ are denominators of convergents to 2. These observations are explained by Theorem 3.2. In [S´os57], S´osproved Lemma 3.1, giving πα,n in terms of only πα,n(1), πα,n(n), and n. Her method of proof is similar to our proof of Lemma 3.4 below. The lemma is also proved—in terse English—in [Sla67]. We will derive Theorem 3.2(i) and (ii) from S´os’sLemma. Lemma 3.1 (S´os). Let 1 ≤ k < n. Then  π (1), 1 ≤ π (k) ≤ n − π (1);  α,n α,n α,n πα,n(k +1)−πα,n(k) = πα,n(1) − πα,n(n), n − πα,n(1) < πα,n(k) ≤ πα,n(n);  −πα,n(n), πα,n(n) < πα,n(k) ≤ n.

The surprising Three-Distance Theorem is an immediate corollary: If α is irrational, the n + 1 points 0, {α}, {2α},..., {nα} divide the interval [0, 1) into n + 1 subintervals which have at most 3 distinct lengths! Alessandri & Berth´e[AB98] give an excellent and up-to-date survey of generalizations of the Three-Distance Theorem, as well as some new results. −1 Schoißengeier gave a formula of quite a different nature for πα,n. Since his formula is difficult to state without introducing much notation, and since we do not use his formula here, we omit the statement, and refer the interested reader to Sections 1-3 of [Sch84]. We write sgn(σ) to denote the sign of the permutation σ, i.e., sgn(σ) = 1 if σ is an even permutation and sgn(σ) = −1 is σ is an odd permutation. We write ord(σ) to denote the multiplicative order of the permutation σ, and write ord(x mod n) to denote the least positive integer t such that xt ≡ 1 (mod n).

15 √ Table 1: Algebraic properties of πα,n with α = 2 and 2 ≤ n ≤ 100

n sgn(πα,n) ord(πα,n) n sgn(πα,n) ord(πα,n) n sgn(πα,n) ord(πα,n)

2 1 1 35 1 93 68 1 22 3 1 3 36 1 35 69 1 2 4 -1 4 37 1 155 70 1 2 5 -1 4 38 -1 420 71 1 20 6 -1 6 39 -1 120 72 -1 122 7 -1 6 40 -1 40 73 -1 792 8 1 4 41 -1 40 74 -1 708 9 1 12 42 1 300 75 -1 2340 10 1 6 43 1 420 76 1 396 11 1 2 44 1 315 77 1 7524 12 1 2 45 1 1368 78 1 75 13 1 6 46 -1 168 79 1 72 14 -1 40 47 -1 912 80 -1 240 15 -1 26 48 1 494 81 -1 744 16 -1 16 49 1 560 82 1 840 17 -1 16 50 1 532 83 1 3774 18 1 17 51 1 45 84 1 816 19 1 77 52 -1 532 85 1 82 20 1 16 53 -1 92 86 -1 8360 21 1 15 54 -1 1386 87 -1 2730 22 -1 68 55 -1 48 88 -1 30360 23 -1 22 56 1 54 89 -1 6216 24 1 23 57 1 1200 90 1 11270 25 1 36 58 1 3960 91 1 12122 26 1 12 59 1 342 92 1 168 27 1 60 60 1 1508 93 1 435 28 -1 4 61 1 924 94 1 6035 29 -1 4 62 -1 174 95 1 180 30 -1 276 63 -1 228 96 -1 1848 31 -1 132 64 -1 4872 97 -1 64680 32 1 36 65 -1 60 98 -1 30 33 1 190 66 1 583 99 -1 30 34 1 50 67 1 65 100 1 1608

16 The primary goal of this section is to prove Theorem 3.2, although Corollary 3.3 and Lemma 3.5(i) and (iii) are of independent interest.

Theorem 3.2. Let α 6∈ Q and n ∈ Z+.

i. If πα,n(n) = n, then ord(πα,n−1) = ord(πα,n) = ord(πα,n(1) mod n).

ii. If πα,n(1) = n, then ord(πα,n−1) = ord(−πα,n(n) mod n), and ord(πα,n) = ord(−πα,n(n) mod gn), where g is the least positive integer  πα,n(n)+1  such that gcd n, g = 1.

Qn b2`αc iii. sgn(πα,2n) = sgn(πα,2n+1) = `=1(−1) .

3.1 The Multiplicative Order of the Permutation Parts (i) and (ii) of Theorem 3.2 follow from S´os’sLemma.

Theorem 3.2 (i). If πα,n(n) = n, then

ord(πα,n−1) = ord(πα,n) = ord(πα,n(1) mod n).

Proof. Suppose that πα,n(n) = n. The only difference between πα,n and πα,n−1 is that πα,n fixes n; obviously ord(πα,n−1) = ord(πα,n). We show that the length of every orbit divides ord(πα,n(1) mod n), and that the length of the orbit of 1 is exactly ord(πα,n(1) mod n). From S´os’s Lemma (Lemma 3.1), we have in this case for 1 ≤ k < n the congruence πα,n(k + 1) ≡ πα,n(k) + πα,n(1) (mod n). By induction, this gives πα,n(k) ≡ kπα,n(1) (mod n) for 1 ≤ k ≤ n. Thus, the orbit of the point k is

2 3 k, kπα,n(1), kπα,n(1) , kπα,n(1) ,...

The length of the orbit of k divides ord(πα,n(1) mod n), and in particular the orbit of 1 has length equal to ord(πα,n(1) mod n).

Theorem 3.2 (ii). If πα,n(1) = n, then ord(πα,n−1) = ord(−πα,n(n) mod n), and ord(πα,n) = ord(−πα,n(n) mod gn), where g is the least positive integer  πα,n(n)+1  such that gcd n, g = 1.

Proof. Suppose that πα,n(1) = n. S´os’sLemma gives πα,n(k) ≡ (1 − k)πα,n(n) (mod n). For 1 ≤ k < n we have πα,n−1(k) = πα,n(k+1) ≡ (1−(k+1))πα,n(n) = r r −kπα,n(n) (mod n). Thus for r ≥ 1 we have πα,n−1(k) ≡ k(−πα,n(n)) (mod n). The length of the orbit of k under πα,n−1 divides ord(−πα,n(n) mod n), and in particular the orbit of 1 has length equal to ord(−πα,n(n) mod n). This proves that ord(πα,n−1) = ord(−πα,n(n) mod n). For notational convenience, set x = −πα,n(n). Now from πα,n(k) ≡ (1 − k)πα,n(n) = (k − 1)x (mod n) it is readily seen by induction that for R ≥ 0 we have R R 2 R πα,n(k) ≡ kx − x + x + ··· + x (mod n). (1)

17 r  Let r be the least positive integer for which ∀k πα,n(k) = k , i.e., let r be the least common multiple of the length of the orbits of πα,n. We must show that r = ord(x mod gn). Define the integer γ by gγ = x − 1, and note that gcd(γ, n) = 1. We may rearrange Eq. (1), setting R = r, as

xr − 1 ≡ (k − 1)(xr − 1) (mod n), (2) x − 1

xr −1 the division being real, not modular. With k = 1, Eq. (2) becomes 0 ≡ x−1 = xr −1 xr −1 gγ (mod n), which holds iff g ≡ 0 (mod n). This, in turn, holds iff there xr −1 r is an integer β with βn = g , i.e., βng = x − 1. Thus r is a multiple of ord(x mod gn), and in particular r ≥ ord(x mod gn).  ord(x mod gn)  We claim that ∀k πα,n (k) = k , so that r ≤ ord(x mod gn), which will conclude the proof. We have

xord(x mod gn) − 1 βgn βn = = x − 1 gγ γ and (k − 1)(xord(x mod gn) − 1) ≡ 0 (mod n), βn so that substituting r = ord(x mod gn) into Eq. (2) we write γ ≡ 0 (mod n), which holds for all k since gcd(γ, n) = 1. Thus r ≤ ord(x mod gn). For quadratic irrationals one can easily identify the convergents and inter- mediate fractions and, if the denominators have enough structure, explicitly compute ord(πα,n) when n or n+1 is such a denominator. We have for example √ 5−1 Corollary 3.3. Let φ = 2 , and fn be the n-th Fibonacci number. Then for n ≥ 2,

ord(πφ,−1+f2n ) = ord(πφ,f2n ) = 2 and

ord(πφ,−1+f2n+1 ) = ord(πφ,f2n+1 ) = 4.

Proof. From the continued fraction expansion of φ we know that πφ,f2n (f2n) = 2 f2n and πφ,f2n (1) = f2n−1. The identity f2n−1 − f2nf2n−2 = 1 shows that ord(f2n−1 mod f2n) = 2 for n ≥ 2, whence by Corollary 3.2 ord(πφ,−1+f2n ) = ord(πφ,f2n ) = 2.

The continued fraction expansion of φ also tells us πφ,f2n+1 (1) = f2n+1 and 2 πφ,f2n+1 (f2n+1) = f2n. The identity f2n−f2n+1f2n−1 = −1 shows ord(−f2n mod f2n+1) = 4 for n ≥ 2, whence by Corollary 3.2, ord(πφ,−1+f ) = 4. 2n+1  f2n+1 g is defined as the least positive integer such that gcd f2n+1, g = 1. In particular, g|f2n + 1, and so the identity

4 (−f2n) − 1 = f2n−1(f2n − 1)f2n+1(f2n + 1) ≡ 0 (mod gf2n+1)

18 2 shows that ord(−f2n mod gf2n+1) divides 4, and the identity (−f2n) −f2n+1f2n−1 = −1 shows that ord(−f2n mod gf2n+1) ≥ ord(−f2n mod f2n+1) = 4, whence ord(−f2n mod gf2n+1) = 4 and by Corollary 3.2, ord(πφ,f2n+1 ) = 4.

3.2 The Sign of the Permutation Recall that a k-cycle is even exactly if k is odd. We define ρ(n, k) to be the (n − k)-cycle (n, n − 1, . . . , k + 1). Define also Bα(k) := |{q : 1 ≤ q < k, {qα} < {kα}}| , which measures the number of integers in [1, k) that are ‘better’ denominators for approximating α from below. Clearly,

πα,n = πα,n−1 ρ(n, Bα(n))

= ρ(1,Bα(1)) ρ(2,Bα(2)) . . . ρ(n, Bα(n)) n Y = ρ(k, Bα(k)) k=1 Pn so that πα,n is the product of k=1(k − Bα(k) − 1) transpositions. We will show that for k odd, Bα(k) ≡ 0 (mod 2), which will be used to demonstrate that sgn(πα,2n) = sgn(πα,2n+1). By the definition of Sturmian, Fn(α) contains n + 1 {0, 1}-vectors. It is immediate from the characterization of Fn(α) as the factors of the word ∞ (b(i + 1)αc − biαc)i=1 that ~w ∈ Fn(α) contains either bnαc or dnαe compo- nents which are “1”. From the ‘rulers’ argument of Section 2, Fn(α) contains exactly Bα(n) + 1 vectors with Hamming weight dnαe and exactly n − Bα(n) vectors with Hamming weight bnαc. Our proof of Lemma 3.4 is similar in spirit to S´os’sproof of Lemma 3.1.

Lemma 3.4. For k ≥ 3 and 0 < α < 1/2, α irrational, Bα(k)+B1−α(k) = k−1, and  1 − k, {kα} ∈ [0, α);  Bα(k) − 2Bα(k − 1) + Bα(k − 2) = k − 1, {kα} ∈ [α, 2α); 0, {kα} ∈ [2α, 1).

Proof. Observe that 0 < {qα} < {kα} iff {k(1 − α)} < {q(1 − α)} < 1, so that q with 1 ≤ q < k is in either the set {q : 1 ≤ q < k, {qα} < {kα}} or in the set {q : 1 ≤ q < k, {q(1 − α)} < {k(1 − α)}}, and is not in both. Thus, Bα(k) + B1−α(k) = k − 1. We think of the points 0, {α},..., {kα} as lying on a circle with circum- √ 1 2πjα −1 ference 1, and labeled P0,P1,...,Pk, respectively, i.e., Pj := e = √ 2π 1 2π{jα} −1 2π e . “The arc PiPj” refers to the half-open counterclockwise arc from Pi to Pj, containing Pi but not Pj. We say that three distinct points A, B, C are in order if B 6∈ CA. We say that A, B, C, D are in order if both A, B, C and C,D,A are in order. Essentially, if when moving counter-clockwise around

19 the circle starting from A, we encounter first the point B, then C, then D, and finally A (again), then A, B, C, D are in order. By rotating the circle so that Pi 7→ Pi+1 (0 ≤ i ≤ k), we find that each P on the arc Pk−2Pk−1 is rotated onto a P on the arc Pk−1Pk. Specifically, the number of P0,P1,...,Pk−2 on Pk−2Pk−1 is the same as the number of P1,P2,...,Pk−1 on Pk−1Pk. Set

X := {P0,P1,...,Pk−2} and Y := {P1,P2,...,Pk−1}, so that what we have observed is

X ∩ Pk−2Pk−1 = Y ∩ Pk−1Pk . (3) Also, we will use

Bα(k) = Y ∩ P0Pk .

Now, first, suppose that {kα} ∈ [0, α), so that the points P0,Pk,Pk−2,Pk−1 are in order on the circle. We have  X ∩ Pk−2Pk−1 = X ∩ P0Pk−1 \ P0Pk−2   = X ∩ P0Pk−1 \ X ∩ P0Pk−2   X ∩ Pk−2Pk−1 = X ∩ P0Pk−1 − X ∩ P0Pk−2

= (Bα(k − 1) + 1) − (Bα(k − 2) + 1)

= Bα(k − 1) − Bα(k − 2), and similarly   Y ∩ Pk−1Pk = Y ∩ Pk−1P0 ∪ Y ∩ P0Pk   = Y \ Y ∩ P0Pk−1 ∪ Y ∩ P0Pk

Y ∩ Pk−1Pk = (|Y | − Y ∩ P0Pk−1 ) + Y ∩ P0Pk

= (k − 1 − Bα(k − 1)) + Bα(k)

= Bα(k) − Bα(k − 1) − (1 − k), so that Eq. (3) becomes Bα(k − 1) − Bα(k − 2) = Bα(k) − Bα(k − 1) − (1 − k), as claimed in the statement of the theorem. Now suppose that {kα} ∈ [α, 2α), so that the points P0,Pk−1,Pk,Pk−2 are in order. By arguing as in the above case, we find   X ∩ Pk−2Pk−1 = X \ X ∩ P0Pk−2 ∪ X ∩ P0Pk−1 , and so X ∩ Pk−2Pk−1 = Bα(k − 1) − Bα(k − 2) + (k − 1). Likewise,   Y ∩ Pk−1Pk = Y ∩ P0Pk \ Y ∩ P0Pk−1 so that Y ∩ Pk−1Pk = Bα(k) − Bα(k − 1). Thus, in this case Eq. (3) becomes Bα(k−1)−Bα(k−2)+(k−1) = Bα(k)−Bα(k−1), as claimed in the statement of the theorem.

20 Finally, suppose that {kα} ∈ [2α, 1), so that the points P0,Pk−2,Pk−1,Pk are in order. We find   X ∩ Pk−2Pk−1 = X ∩ P0Pk−1 \ X ∩ P0Pk−2 and X ∩ Pk−2Pk−1 = Bα(k − 1) − Bα(k − 2). Also,   Y ∩ Pk−1Pk = Y ∩ P0Pk \ Y ∩ P0Pk−1 and so Y ∩ Pk−1Pk = Bα(k) − Bα(k − 1). As claimed, we have Bα(k − 1) − Bα(k − 2) = Bα(k) − Bα(k − 1). Lemma 3.5 makes explicit the connection between Lemma 3.4, arithmetic properties of Bα, and the permutation πα,n. We will not use part (iii) elsewhere in this paper; we include it because it is of independent interest. Lemma 3.5. Let α ∈ (0, 1) be irrational and n ∈ Z+.

i. If k is odd, then Bα(k) is even.

ii. If k is even, then Bα(k) ≡ bkαc + 1 (mod 2).

iii. The total number of “1”s in Fn(α) has the same parity as n, i.e., X h(~w) ≡ n (mod 2).

~w∈Fn(α)

Proof. By Lemma 3.4, Bα(k) + B1−α(k) = k − 1. Thus for odd k, Bα(k) + B1−α(k) is even, and so either both Bα(k) and B1−α(k) are even or both are odd. This means that, for part (i), without loss of generality we may assume 1 that 0 < α < 2 . Reducing the recurrence relation in Lemma 3.4 modulo 2, under the hypoth- esis that k is odd, we find that Bα(k) ≡ Bα(k − 2) (mod 2). Since Bα(1) = 0, we see that Bα(k) ≡ 0 (mod 2) for all odd k, proving (i). We write  1,P is true; [[P ]] = 0,P is false. 1 For even k and 0 < α < 2 , the recurrence relation in Lemma 3.4 reduces to

Bα(k) + Bα(k − 2) ≡ [[{kα} ∈ [0, 2α)]] (mod 2). 0 Set β = 2α, k = 2` and B (i) = Bα(2i). We have 0 Bα(k) = Bα(2`) = B (`) ≡ B0(` − 1) + [[{`β} ∈ [0, β)]] (mod 2) ` X ≡ B0(1) + [[{iβ} ∈ [0, β)]] (mod 2) i=2

= Bα(2) + b`βc = 1 + b2`αc = 1 + bkαc ,

21 P` since i=2[[{iβ} ∈ [0, β)]] (with β ∈ (0, 1)) counts the integers in the interval 1 (β, `β]. This proves part (ii) of the lemma for 0 < α < 2 . 1 Now suppose that 2 < α < 1. By Lemma 3.4, Bα(k) = k − 1 − B1−α(k) ≡ 1 1+B1−α(k) (mod 2). By the argument (for 0 < α < 2 ) given above, B1−α(k) ≡ 1 + bk(1 − α)c (mod 2). We have

Bα(k) ≡ bk(1 − α)c (mod 2) = k − bkαc − {k(1 − α)} − {kα} ≡ bkαc + 1 (mod 2), where we have used {k(1−α)}+{kα} = 1 (since α is irrational). This concludes the proof of part (ii). To prove part (iii), observe that by the ‘ruler’ argument of Section 2, the first Bα(n) + 1 population vectors (ordered anti-lexicographically) each have Hamming weight dnαe = bnαc + 1, and the remaining n + 1 − (Bα(n) + 1) population vectors each have Hamming weight bnαc. This gives X h(~w) = (Bα(n) + 1)(bnαc + 1) + (n + 1 − (Bα(n) + 1)) bnαc

~w∈Fn(α)

= 1 + Bα(n) + (n + 1) bnαc .

Now, if n is odd, then by part (i), Bα(n) ≡ 0 (mod 2) and obviously n + 1 ≡ 0 (mod 2), whence 1 + Bα(n) + (n + 1) bnαc ≡ 1 (mod 2). If n is even, then by part (ii) Bα(n) ≡ bnαc + 1, whence 1 +Bα(n) + (n + 1) bnαc ≡ 0 (mod 2). This establishes part (iii). Theorem 3.2 (iii). n Y b2`αc sgn(πα,2n) = sgn(πα,2n+1) = (−1) . `=1

Proof. We have πα,2n+1 = πα,2n ρ(2n+1,Bα(2n+1)). The permutation ρ(2n+ 1,Bα(2n + 1)) is the product of 2n + 1 − Bα(2n + 1) − 1 transpositions, which is an even number by Lemma 3.5(i). Thus sgn(πα,2n+1) = sgn(πα,2n). By Lemma 3.5(ii), for all integers k  0, k odd; k − B (k) + 1 ≡ α bkαc , k even.

k−Bα(k) 2n Since the sign of the permutation ρ(k, Bα(k)) is (−1) and (−1) = 1, we have

2n ! 2n 2n Y Y sgn(πα,2n) = (−1) sgn ρ(k, Bα(k)) = (−1) sgn (ρ(k, Bα(k))) k=1 k=1 2n 2n n Y Y Y = (−1)(−1)k−Bα(k) = (−1)k−Bα(k)+1 = (−1)b2`αc. k=1 k=1 `=1

22 4 Unanswered Questions

The most significant question we have been unable to answer is why the matrices formed from Sturmian words in Section 2 lie in a common representation of Sn. We made two choices with little motivation: we ordered the factors anti- lexicographically; and we subtracted the last factor from the others. What happens if we order the factors differently, or subtract the second factor from the others? Understanding why the structure revealed in Section 2 exists might allow us to predict other phenomena. Lucas Wiman [personal communication] has proved that

 c  Gn := Mn−1(α) n : gcd(c, n) = 1 is isomorphic to the multiplicative group modulo n, and asks if this is the largest subset of {Mn−1(α): 0 < α < 1} that is a group. We have shown that the volume of the simplex Fn(α) is independent of α. When are two such simplices actually congruent?

∼ Conjecture: For α, β ∈ (0, 1) be irrational, Fn(α) = Fn(β) (as simplices) iff Fn(α) = Fn(β) or Fn(α) = Fn(1 − β).

We have verified this conjecture for n ≤ 10 by direct computation. At least, can any such simplex be cut and reassembled (in the sense of Hilbert’s 3rd Problem: see Eves [Eve72] for the basic theory and Sydler [Syd65] for a complete characterization) into the shape of another? While we have identified the matrix Mn(α), there are many interesting questions that we remain unable to answer. We don’t believe that there is a PN PN bound on n=1 det(Mn(α)) = n=1 sgn(πα,n) that is independent of N, but this sum must grow very slowly. We suspect that

N X sgn(πα,n)  log N n=1 √ 5−1 13 for almost all α. For example, with α = 2 and N < e ≈ 442413,

N X sgn(πα,n) < 10. n=1

In Section 3.1 we showed that ord(πα,n) is regularly extremely small relative to the average order of a permutation on n symbols. For each irrational α, are there infinitely many values of n for which ord(πα,n) is exceptionally large? One might hope for an explicit formula for ord(πα,n) in terms of the base-α Ostrowski expansion of n, but this seems to be extremely difficult. Are metric results more approachable? Specifically, what is the distribution of ord(πα,n) and sgn(πα,n) for α taken uniformly from (0, 1)?

23 Since ord(πα,n) appears to vary wildly, it may be advantageous to consider PN its average behavior. Can one give an asymptotic expansion of n=1 ord(πα,n)? R 1 What can be said about I(n) := 0 ord(πα,n) dα? Surprisingly, although I(n) seems to be rapidly increasing, it is not monotonic. Specifically, I(18) > I(19), I(27) > I(28), I(30) > I(31), I(35) > I(36) > I(37), and I(38) > I(39). Is this the ‘law of small numbers’, or are there infinitely many values of n for which I(n + 1) > I(n)? We are not aware of any non-trivial bounds, upper or lower, on I(n). Bα is an interesting function in its own right. We gave a formula for Bα(n) (mod 2) in Lemma 3.5. Is it possible to give a nice formula for Bα(n) for other moduli? It seems likely that there are arbitrarily large integers which are not in the range of Bα, although we have been unable to show that it does not √ √ contain all nonnegative integers. For example, B( 5−3)/2(k) 6= 3,B 2(k) 6= 7 7 and Be−1 (k) 6= 23 for k ≤ 10 . It is perhaps noteworthy that the least k for which Be−1 (k) = 25 is k = 22154, a reminder that Bα can take new, small values even at large k. From the theory of continued fractions we know that there are infinitely many k for which Bα(k) = 0. Is there an x 6= 0 and irrational α for which there are infinitely many k such that Bα(k) = x?

Acknowledgements

I am grateful to Horacio Porta & Kenneth B. Stolarsky for bringing Mn(α) to my attention, and for making their conjectures and data available. I also wish to thank my thesis advisor, Kenneth B. Stolarsky, for his guidance and careful reading, and Lucas Wiman for his many probing questions.

References

[AB98] Pascal Alessandri and Val´erie Berth´e. Three distance theorems and combinatorics on words. Enseign. Math. (2), 44(1-2):103–132, 1998. [APWW98] J.-P. Allouche, J. Peyri`ere, Z.-X. Wen, and Z.-Y. Wen. Hankel de- terminants of the Thue-Morse sequence. Ann. Inst. Fourier (Greno- ble), 48(1):1–27, 1998. [Ber96] Jean Berstel. Recent results in Sturmian words. In Developments in language theory, II (Magdeburg, 1995), pages 13–24. World Sci. Publishing, River Edge, NJ, 1996. [Bro93] Tom C. Brown. Descriptions of the characteristic sequence of an irrational. Canad. Math. Bull., 36(1):15–21, 1993. [BS79] David W. Boyd and J. Michael Steele. Monotone subsequences in the sequence of fractional parts of multiples of an irrational. J. Reine Angew. Math., 306:49–59, 1979.

24 [ET65] P. Erd˝osand P. Tur´an. On some problems of a statistical group- theory. I. Z. Wahrscheinlichkeitstheorie und Verw. Gebiete, 4:175– 186 (1965), 1965. [ET67] P. Erd˝osand P. Tur´an. On some problems of a statistical group- theory. III. Acta Math. Acad. Sci. Hungar., 18:309–320, 1967. [Eve72] Howard Eves. A survey of geometry. Allyn and Bacon Inc., Boston, Mass., revised edition, 1972. [FLS72] Aviezri S. Fraenkel, Jonathan Levitt, and Michael Shimshoni. Characterization of the set of values f(n) = [nα], n = 1, 2, ··· . Discrete Math., 2(4):335–345, 1972. [FPS90] A. S. Fraenkel, H. Porta, and K. B. Stolarsky. Some arithmetical semigroups. In Analytic number theory (Allerton Park, IL, 1989), pages 255–264. Birkh¨auser Boston, Boston, MA, 1990. [Fra94] Aviezri S. Fraenkel. Iterated floor function, algebraic numbers, discrete chaos, Beatty subsequences, semigroups. Trans. Amer. Math. Soc., 341(2):639–664, 1994. [KTW99] Teturo Kamae, Jun-ichi Tamura, and Zhi-Ying Wen. Hankel de- terminants for the and Pad´eapproximation. Acta Arith., 89(2):123–161, 1999. [Lot02] M. Lothaire. Algebraic Combinatorics on Words. Cam- bridge University Press, Cambridge, U.K., first edition, 2002. Currently available online at http://www-igm.univ-mlv.fr/ ~berstel/Lothaire/. [PS90] Horacio Porta and Kenneth B. Stolarsky. Half-silvered mirrors and Wythoff’s game. Canad. Math. Bull., 33(1):119–125, 1990. [PS91] Horacio A. Porta and Kenneth B. Stolarsky. Wythoff pairs as semi- group invariants. Adv. Math., 85(1):69–82, 1991. [Sag01] Bruce E. Sagan. The symmetric group. Springer-Verlag, New York, second edition, 2001. Representations, combinatorial algorithms, and symmetric functions. [Sch84] Johannes Schoißengeier. On the discrepancy of (nα). Acta Arith., 44(3):241–279, 1984. [Sen95] Marjorie Senechal. Quasicrystals and geometry. Cambridge Uni- versity Press, Cambridge, 1995. [Sla67] Noel B. Slater. Gaps and steps for the sequence nθ mod 1. Proc. Cambridge Philos. Soc., 63:1115–1123, 1967.

25 [S´os57] Vera T. S´os. A l´anct¨ortekegy geometriai interpret´aci´oja ´esalka- lmaz´asai [On a geometrical theory of continued fractions]. Mat. Lapok, 8:248–263, 1957. [S´os58] Vera T. S´os.On the distribution mod 1 of the sequence nα. Ann. Univ. Sci. Budapest E¨otv¨osSect. Math., 1:127–134, 1958. [Sto76] Kenneth B. Stolarsky. Beatty sequences, continued fractions, and certain shift operators. Canad. Math. Bull., 19(4):473–482, 1976. [Sto94] Kenneth B. Stolarsky. Certain sequences of Wythoffian matrices, and maximal geometric progressions therein. J. Combin. Theory Ser. A, 68(2):361–371, 1994. [Sto96] Kenneth B. Stolarsky. Positive factors of Wythoff matrices. Semi- group Forum, 53(3):271–277, 1996. [Swi59]´ S. Swierczkowski.´ On successive settings of an arc on the circum- ference of a circle. Fund. Math., 46:187–189, 1959. [Syd65] J.-P. Sydler. Conditions n´ecessaires et suffisantes pour l’´equivalence des poly`edresde l’espace euclidien `atrois dimensions. Comment. Math. Helv., 40:43–80, 1965. [Tij00a] R. Tijdeman. Exact covers of balanced sequences and Fraenkel’s conjecture. In Algebraic number theory and Diophantine analysis (Graz, 1998), pages 467–483. de Gruyter, Berlin, 2000. [Tij00b] R. Tijdeman. Fraenkel’s conjecture for six sequences. Discrete Math., 222(1-3):223–234, 2000.

26