# Three-gap theorem

In mathematics, the three-gap theorem, three-distance theorem, or Steinhaus conjecture states that if one places n points on a circle, at angles of θ, 2θ, 3θ, ... from the starting point, then there will be at most three distinct distances between pairs of points in adjacent positions around the circle. When there are three distances, the largest of the three always equals the sum of the other two. Unless θ is a rational multiple of π, there will also be at least two distinct distances.
This result was conjectured by Hugo Steinhaus, and proved in the 1950s by Vera T. Sós, János Surányi [hu], and Stanisław Świerczkowski; more proofs were added by others later. Applications of the three-gap theorem include the study of plant growth and musical tuning systems, and the theory of light reflection within a mirrored square.

## Statement

The three-gap theorem can be stated geometrically in terms of points on a circle. In this form, it states that if one places $n$ points on a circle, at angles of $\theta ,2\theta ,\dots ,n\theta$ from the starting point, then there will be at most three distinct distances between pairs of points in adjacent positions around the circle. An equivalent and more algebraic form involves the fractional parts of multiples of a real number. It states that, for any positive real number $\alpha$ and integer $n$, the fractional parts of the numbers $\alpha ,2\alpha ,\dots ,n\alpha$ divide the unit interval into subintervals with at most three different lengths. The two problems are equivalent under a linear correspondence between the unit interval and the circumference of the circle, and a correspondence between the real number $\alpha$ and the angle $\theta =2\pi \alpha$.

## Applications
### Plant growth

In the study of phyllotaxis, the arrangements of leaves on plant stems, it has been observed that each successive leaf on the stems of many plants is turned from the previous leaf by the golden angle, approximately 137.5°. It has been suggested that this angle maximizes the sun-collecting power of the plant's leaves. If one looks end-on at a plant stem that has grown in this way, there will be at most three distinct angles between two leaves that are consecutive in the cyclic order given by this end-on view.
For example, in the figure, the largest of these three angles occurs three times, between the leaves numbered 3 and 6, between leaves 4 and 7, and between leaves 5 and 8. The second-largest angle occurs five times, between leaves 6 and 1, 9 and 4, 7 and 2, 10 and 5, and 8 and 3. And the smallest angle occurs only twice, between leaves 1 and 9 and between leaves 2 and 10. The phenomenon of having three types of distinct gaps depends only on fact that the growth pattern uses a constant rotation angle, and not on the relation of this angle to the golden ratio; the same phenomenon would happen for any other rotation angle, and not just for the golden angle. However, other properties of this growth pattern do depend on the golden ratio. For instance, the fact that golden ratio is a badly approximable number implies that points spaced at this angle along the Fermat spiral (as they are in some models of plant growth) form a Delone set; intuitively, this means that they are uniformly spaced.

### Music theory

In music theory, a musical interval describes the ratio in frequency between two musical tones. Intervals are commonly considered consonant or harmonious when they are the ratio of two small integers; for instance, the octave corresponds to the ratio 2:1, while the perfect fifth corresponds to the ratio 3:2. Two tones are commonly considered to be equivalent when they differ by a whole number of octaves; this equivalence can be represented geometrically by the chromatic circle, the points of which represent classes of equivalent tones. Mathematically, this circle can be described as the unit circle in the complex plane, and the point on this circle that represents a given tone can be obtained by the mapping the frequency $\nu$ to the complex number exp⁡(2πilog$_2$⁡ν){\textstyle \exp(2\pi i\log _{2}\nu )}. An interval with ratio $\rho$ corresponds to the angle $2\pi \log _{2}\rho$ between points on this circle, meaning that two musical tones differ by the given interval when their two points on the circle differ by this angle. For instance, this formula gives $2\pi$ (a whole circle) as the angle corresponding to an octave. Because 3/2 is not a rational power of two, the angle on the chromatic circle that represents a perfect fifth is not a rational multiple of $2\pi$, and similarly other common musical intervals other than the octave do not correspond to rational angles.
A tuning system is a collection of tones used to compose and play music. For instance, the equal temperament commonly used for the piano is a tuning system, consisting of 12 tones equally spaced around the chromatic circle. Some other tuning systems do not space their tones equally, but instead generate them by some number of consecutive multiples of a given interval. An example is the Pythagorean tuning, which is constructed in this way from twelve tones, generated as the consecutive multiples of a perfect fifth in the circle of fifths. The irrational angle formed on the chromatic circle by a perfect fifth is close to 7/12 of a circle, and therefore the twelve tones of the Pythagorean tuning are close to, but not the same as, the twelve tones of equal temperament, which could be generated in the same way using an angle of exactly 7/12 of a circle. Instead of being spaced at angles of exactly 1/12 of a circle, as the tones of equal temperament would be, the tones of the Pythagorean tuning are separated by intervals of two different angles, close to but not exactly 1/12 of a circle, representing two different types of semitones. If the Pythagorean tuning system were extended by one more perfect fifth, to a set of 13 tones, then the sequence of intervals between its tones would include a third, much shorter interval, the Pythagorean comma.
In this context, the three-gap theorem can be used to describe any tuning system that is generated in this way by consecutive multiples of a single interval. Some of these tuning systems (like equal temperament) may have only one interval separating the closest pairs of tones, and some (like the Pythagorean tuning) may have only two different intervals separating the tones, but the three-gap theorem implies that there are always at most three different intervals separating the tones.

### Mirrored reflection

A Sturmian word is infinite sequences of two symbols (for instance, "H" and "V") describing the sequence of horizontal and vertical reflections of a light ray within a mirrored square, starting along a line of irrational slope. Equivalently, the same sequence describes the sequence of horizontal and vertical lines of the integer grid that are crossed by the starting line. One property that all such sequences have is that, for any positive integer n, the sequence has exactly n + 1 distinct consecutive subsequences of length n. Each subsequence occurs infinitely often with a certain frequency, and the three-gap theorem implies that these n + 1 subsequences occur with at most three distinct frequencies. If there are three frequencies, then the largest frequency must equal the sum of the other two. One proof of this result involves partitioning the y-intercepts of the starting lines (modulo 1) into n + 1 subintervals within which the initial n elements of the sequence are the same, and applying the three-gap theorem to this partition.

## History and proof

The three-gap theorem was conjectured by Hugo Steinhaus, and its first proofs were found in the late 1950s by Vera T. Sós, János Surányi [hu], and Stanisław Świerczkowski. Later researchers published additional proofs, generalizing this result to higher dimensions, and connecting it to topics including continued fractions, symmetries and geodesics of Riemannian manifolds, ergodic theory, and the space of planar lattices. Mayero (2000) formalizes a proof using the Coq interactive theorem prover.
The following simple proof is due to Frank Liang. Let θ be the rotation angle generating a set of points as some number of consecutive multiples of θ on a circle. Define a gap to be an arc A of the circle that extends between two adjacent points of the given set, and define a gap to be rigid if its endpoints occur later in the sequence of multiples of θ than any other gap of the same length. From this definition, it follows that every gap has the same length as a rigid gap. If A is a rigid gap, then A + θ is not a gap, because it has the same length and would be one step later. The only ways for this to happen are for one of the endpoints of A to be the last point in the sequence of multiples of θ (so that the corresponding endpoint of A + θ is missing) or for one of the given points to land within A + θ, preventing it from being a gap. A point can only land within A + θ if it is the first point in the sequence of multiples of θ, because otherwise its predecessor in the sequence would land within A, contradicting the assumption that A is a gap. So there can be at most three rigid gaps, the two on either side of the last point and the one in which the predecessor of the first point (if it were part of the sequence) would land. Because there are at most three rigid gaps, there are at most three lengths of gaps.

## Related results

Liang's proof additionally shows that, when there are exactly three gap lengths, the longest gap length is the sum of the other two. For, in this case, the rotated copy A + θ that has the first point in it is partitioned by that point into two smaller gaps, which must be the other two gaps. Liang also proves a more general result, the "$3d$ distance theorem", according to which the union of $d$ different arithmetic progressions on a circle has at most $3d$ different gap lengths. In the three-gap theorem, there is a constant bound on the ratios between the three gaps, if and only if θ/2π is a badly approximable number.
A closely related but earlier theorem, also called the three-gap theorem, is that if A is any arc of the circle, then the integer sequence of multiples of θ that land in A has at most three lengths of gaps between sequence values. Again, if there are three gap lengths then one is the sum of the other two.