Dynamics

Almost every orbit is fair

Double a number and keep the fractional part, and do it again, and again. Where the orbit goes is written in the number's binary digits, and for almost every starting point it spends exactly a quarter of its time in each quarter of the interval. The proof is a short argument about Fourier coefficients being pushed to infinity — and it leaves room for a set of exceptions with no length at all, which includes every fraction and, for all anyone can prove, every number anyone has ever named.

Worth reading first: The histogram an orbit leaves · The orbit written as a word.

The histogram an orbit leaves found that a long orbit of the logistic map at four settles into a fixed distribution, the same whichever starting point is chosen — and quoted, without proving it, the property that makes that true. The property is called ergodicity, and the essay named where its proof lives: in the doubling map, x2xmod1x \mapsto 2x \bmod 1, which the logistic map is carried onto by a change of coordinates, and whose ergodicity is “a genuinely provable statement about binary expansions”.

This is that proof. Its conclusion is simple to state. Take almost any starting point, run the doubling map, and record how often the orbit lands in a given interval. In the long run the share of time spent there is exactly the interval’s length — a quarter for each quarter, an eighth for each eighth — so the orbit is fair to every part of the interval. The word almost is the whole subtlety, and the exceptions it allows are numerous, interesting and impossible to see.

How long four orbits of the doubling map spend in each quarter. Grouped bars for four starting points of the doubling map, each group showing the fraction of time the orbit spends in each quarter of the unit interval, against a dashed line at one quarter.
Fig. 1 Four thousand steps of the doubling map from four starting points, each bar the share of steps spent in one quarter of the interval. The point with random binary digits spends almost exactly a quarter in each. Champernowne’s number, built to contain every block of digits, comes close. The orbit of 1/3 lives entirely in the two middle quarters, and the point with no two 1s together never enters the top one.

The orbit is written in the digits

Doubling a number in binary shifts its digits one place left; taking the fractional part deletes the digit that crossed the point. So if x=0.d1d2d3x = 0.d_1 d_2 d_3 \ldots in binary, the orbit is 0.d2d3d40.d_2 d_3 d_4 \ldots, then 0.d3d40.d_3 d_4 \ldots, and so on. The orbit written as a word built this correspondence; here it is the tool.

Which quarter the nn-th point lies in is decided by its first two digits — 0000 for the bottom quarter, 0101, 1010, 1111 for the others — which are digits dn+1d_{n+1} and dn+2d_{n+2} of the starting point. So the share of time the orbit spends in the bottom quarter is the frequency of the block 0000 among consecutive pairs of digits of xx, and similarly for every other quarter, and for eighths with blocks of three digits.

That is also why every orbit in these figures is computed from digits and never by doubling a number on a computer. The orbit a computer draws explained what goes wrong: a floating-point number has 53 binary digits, doubling discards one each step, and after 53 steps every computed orbit reaches zero and stays there. The digits are the map’s own definition, and reading them is exact.

The figure’s four orbits are four kinds of digit sequence. A seeded sequence of fair coin tosses gives the random point, and its pairs 0000, 0101, 1010, 1111 each occur about a quarter of the time. The digits of 13\tfrac13 are 01010101\ldots, whose pairs are only 0101 and 1010. The point with no two 1s together never has the pair 1111. Champernowne’s number strings together the binary numerals 1,10,11,100,101,1, 10, 11, 100, 101, \dots and so contains every block of digits eventually.

Almost every number is balanced

Émile Borel proved in 1909 that almost every number is normal: every block of kk binary digits occurs among its digits with frequency exactly 2k2^{-k}. By the correspondence above, that is the statement that almost every orbit of the doubling map spends in every dyadic interval a share of time equal to the interval’s length.

“Almost every” has a precise meaning. The set of exceptions has length zero: it can be covered by intervals whose total length is as small as desired. The reason is the law of large numbers, applied to digits. If digits were chosen by fair coin tosses — and choosing a point uniformly at random from the interval is exactly that — the fraction of 1s among the first nn digits would concentrate ever more tightly around one half.

Long binary strings are almost all balanced. Three curves showing how the fraction of 1s is distributed among all binary strings of lengths 10, 100 and 1,000; the curves narrow around one half as the length grows.
Fig. 2 Among all strings of n binary digits, how their fractions of 1s are spread, for n = 10, 100 and 1,000, computed exactly from binomial coefficients. The share of strings within 0.05 of one half rises 24.6%, 41.5%, 72.9%, 92.7% and 99.9% at n = 10, 30, 100, 300 and 1,000.

The curves narrow as nn grows. At a thousand digits, all but about a tenth of one per cent of strings have a fraction of 1s within 0.050.05 of a half, and the remaining strings — the unbalanced ones — occupy a correspondingly tiny share of the interval, since each string of nn digits is an interval of length 2n2^{-n}. Push nn further and the unbalanced share goes to zero; do the same for every block length and every tolerance, and the exceptions shrink to a set of length zero. That is Borel’s theorem, and it is the bell curve built out of coin flips read as a statement about points instead of about coins.

Invariant sets are all or nothing

Normality of almost every point is one statement. Ergodicity is a stronger-sounding and in fact equivalent one: every set that the doubling map carries into itself, in both directions, has length zero or length one. There is no way to split the interval into two pieces of positive length that the map keeps apart.

Why this implies the fairness of orbits is Birkhoff’s ergodic theorem of 1931: for a map that preserves length and has no such splitting, the time an orbit spends in a set equals the set’s length, for almost every starting point. The theorem is general and hard. What is specific to the doubling map, and short, is the proof that there is no splitting — and the cleanest version of it runs through Fourier series.

Doubling pushes a function's energy to higher and higher frequencies. Four stacked bar charts of Fourier coefficient sizes by frequency: a step function and the same function composed once, twice and three times with the doubling map. The bars move outward, to frequencies that are multiples of two, four and eight.
Fig. 3 The Fourier coefficients of a step function f, equal to one half on [0, ½) and minus one half on [½, 1), and of f after one, two and three applications of the doubling map. Each application moves every coefficient from frequency m to frequency 2m, so the lowest frequency present doubles — 1, 2, 4, 8 — while the total energy stays a quarter throughout.

Write a function on the interval as a sum of waves, a square wave built out of round ones, with a coefficient cmc_m for the wave of frequency mm. Composing the function with the doubling map replaces xx by 2x2x, which turns the wave of frequency mm into the wave of frequency 2m2m. So the coefficients do not change size; they move, each one from mm to 2m2m. The figure shows the energy of a step function marching outwards: after three doublings nothing is left below frequency eight.

Now suppose a function is unchanged by the doubling map — as the indicator of an invariant set would be. Then its coefficient at frequency mm must equal its coefficient at 2m2m, and at 4m4m, and at 2jm2^j m for every jj. But a function whose square has a finite integral has coefficients whose squares add up to something finite, so the coefficients must shrink to zero at high frequencies. A sequence that is constant along m,2m,4m,m, 2m, 4m, \ldots and tends to zero is zero. So every coefficient except the constant one vanishes, and the function is constant — up to a set of length zero. An invariant set’s indicator is then constantly 00 or constantly 11: the set has length zero or length one.

Mixing: stripes that spread evenly

The Fourier picture says more than ergodicity. Energy does not just fail to stay put; it runs off to infinity, and that is a stronger property called mixing.

The points that doubling sends into the left half, stage by stage. Rows of stripes marking, for each number of doublings, the points of the unit interval that land in its left half; the stripes multiply and thin, and their overlap with a fixed interval settles at a sixth.
Fig. 4 Each row shades the points that kk doublings send into [0,12)[0, \tfrac12): 2k2^k stripes of equal width spread across the interval. The bracket marks A=[0,13)A = [0, \tfrac13). The length of AA that the stripes cover is 0.33330.3333, 0.25000.2500, 0.20830.2083, 0.18750.1875 and 0.17710.1771 for k=0k = 0 to 44, closing on 13×12\tfrac13 \times \tfrac12.

The points sent into the left half by kk doublings are those whose (k+1)(k+1)-th binary digit is 00, and they form 2k2^k stripes of equal width, evenly spaced. However the interval AA is placed, once the stripes are much narrower than AA it is cut into almost equal shares, and the length of AA inside the stripes approaches half the length of AA. In general, the chance of starting in AA and landing in BB after kk steps approaches the product of their lengths: after enough doublings, where the orbit is tells nothing about where it started.

That is the precise sense in which the doubling map forgets. It is also a sharper form of the sensitivity of a difference too small to draw: two points close together separate, but mixing says that sets spread out evenly over the whole interval, not merely that points drift apart.

The exceptions, which are everywhere

The set of numbers that are not normal has length zero, and it is nonetheless large and everywhere. Every rational number is an exception, since its digits eventually repeat a fixed block and so cannot contain every block with the right frequency — 13\tfrac13 is the figure’s example. There are also uncountably many irrational exceptions.

The points with no two 1s together, level by level. Rows of dyadic intervals at successively finer levels, each shaded if its binary address contains no two consecutive 1s. The shaded share shrinks towards zero, following the Fibonacci numbers.
Fig. 5 Level kk shades the intervals of length 1/2k1/2^k whose binary address has no two 1s together: 2, 3, 5, 8, 13, 21, 34 and 55 of them — Fibonacci numbers — covering 100%, 75%, 63%, 50%, 41%, 33%, 27% and 21% of the interval. The set they close down on has length zero, yet the doubling map carries it onto itself.

The numbers whose binary digits never have two 1s together form such a set. Doubling one of them deletes its first digit and leaves the rest, which still has no two 1s together, so the map carries the set onto itself. At level kk the admissible addresses number a Fibonacci number, and their share of the interval falls like (φ/2)k(\varphi/2)^k, so the set has length zero. It is nonetheless uncountable — there are as many ways to choose digits avoiding 1111 as there are infinite paths through the Fibonacci tree — and it has a fractional dimension, logφ/log20.694\log\varphi/\log 2 \approx 0.694, in the sense of a dimension that is not a whole number.

This is the same shape as the middle-thirds Cantor set in almost none of it left, and still uncountably many: a set of length zero, invisible to any statement that holds “almost everywhere”, and yet containing as many points as the whole interval. The doubling map has infinitely many invariant sets of this kind, one for every rule forbidding some blocks of digits, and every one of them is an exception to Borel’s theorem.

Four running averages

Birkhoff’s theorem is about limits, and the limits are approached at very different speeds.

Four running averages of time spent in the bottom quarter. Running averages of how often four doubling-map orbits land in the bottom quarter of the interval, plotted against the number of steps on a logarithmic axis: one settles at a quarter, one approaches it, and two settle elsewhere.
Fig. 6 The fraction of the first n steps spent in [0, ¼) for the four orbits, on a logarithmic count of steps. The random point settles at a quarter; Champernowne’s number approaches it slowly, at 0.203 after 20,000 steps, its digits leaning towards 1 because every block it strings together begins with 1; 1/3 never visits; the point with no 11 settles at 0.429.

The random point’s average wanders early and settles near 14\tfrac14 within a few thousand steps. The orbit of 13\tfrac13 never enters the bottom quarter, so its average is zero throughout: a periodic orbit’s averages are fixed by its period. The point avoiding 1111 also settles, but at 0.4290.429, the frequency of the block 0000 that its own digit rule produces; it is a perfectly regular orbit for a different invariant distribution, one that lives on its set of length zero. And Champernowne’s number, which provably is normal, approaches a quarter so slowly that twenty thousand steps leave it well short, because every numeral it concatenates begins with a 11 and the bias fades only as the numerals grow long.

Being normal is a statement about the limit and says nothing about the rate. Champernowne’s number was constructed to be normal, and is; it is also a poor example of what normal looks like at any length a computer can reach.

From the doubling map to the logistic map

The essay on the orbit’s histogram needed ergodicity for the logistic map at four, not for the doubling map, and the transfer is the point of doing the doubling map first. The same map in different coordinates showed that the logistic map at four and the tent map are one map seen through a change of variable, and the tent map is carried onto the doubling map in the same way, up to a symmetry that folds the interval in half. Changes of coordinates carry invariant sets to invariant sets, and sets of length zero to sets of length zero in the right measure. So a splitting of the logistic map’s interval into two invariant pieces of positive size would give one for the doubling map, and there is none.

What changes under the transfer is the measure. The doubling map preserves length; the logistic map preserves the arcsine density, which piles up at the ends of the interval. Birkhoff’s theorem then says that almost every orbit of the logistic map spends time in each interval in proportion to that density — which is exactly the histogram the earlier essay drew and could not justify. The fairness of doubling orbits, pushed through a sine squared, becomes the U-shaped unfairness of logistic orbits.

Balanced in one base, and not in another

Normality depends on the base. A number can be normal in base two and not in base ten, and Wolfgang Schmidt showed in 1960 that this happens as freely as it can: for any two bases that are not powers of a common whole number — two and three, say, or two and ten — there are numbers normal in one and not in the other. Bases two and four cannot disagree, because a base-four digit is just a pair of binary digits.

Borel’s theorem holds in every base at once, and a countable union of sets of length zero still has length zero, so almost every number is absolutely normal, normal in every base simultaneously. Constructing one explicitly is harder than constructing a number normal in one base. Wacław Sierpiński gave the first explicit absolutely normal number in 1916, by a construction so involved that computing its digits was impractical for most of a century; efficient algorithms came only in the 2010s.

In dynamical terms each base is a different map — x10xmod1x \mapsto 10x \bmod 1 for base ten — and each is ergodic for length, by the same Fourier argument with ten in place of two. Their exceptional sets are all of length zero and all different, and Schmidt’s theorem says the differences are genuine: escaping one map’s exceptions does not mean escaping another’s.

What the digits cannot show

Which numbers are normal. The figures draw orbits of four specific points, three of which were constructed to have known digit patterns. Borel’s theorem says almost every point behaves like the first, and gives no way to recognise one: a point chosen by any explicit rule is a point with a pattern, and the theorem is silent about points with patterns.

The limit itself. Every running average is drawn for twenty thousand steps and every histogram for four thousand. The ergodic theorem is about the limit as the number of steps grows without bound, and no finite run can distinguish a point that is normal from one that behaves normally for a billion steps and then stops.

The set of length zero. The figure of the set avoiding 1111 draws eight levels of a set that is only reached in the limit, and at the last level drawn it still covers a fifth of the interval. The actual set is a dust with no interval in it at all, and no finite level shows that.

Still open: whether the square root of two is normal

Almost every number is normal in base two. Champernowne’s number is, and so are a few other numbers built for the purpose. For no naturally occurring constant — 2\sqrt2, π\pi, ee, log2\log 2 — is it known whether its binary digits are normal, or even whether the digit 11 occurs in them with frequency one half. The digits of 2\sqrt2 have been computed to many billions of places and every block frequency looks exactly as it should; that is evidence and not proof.

The difficulty is the one the ergodic theorem cannot help with. The theorem says the exceptions have length zero; the constants are single points, and a single point is a set of length zero too. Nothing that holds almost everywhere can decide anything about a particular point, and the techniques that do decide things about particular points — the arithmetic of algebraic numbers, the continued fractions of irrationality proofs — have so far said nothing about their digits in any base.

Fair to every interval, and silent about every name

The doubling map shifts binary digits, so the time an orbit spends in an interval is the frequency of a block among the starting point’s digits. For almost every point those frequencies are exactly the interval lengths — Borel’s theorem — and the reason, stated as ergodicity, is that doubling pushes every Fourier coefficient off to higher frequencies, so no function except a constant survives it unchanged. Sets forget where they started and spread evenly.

The exceptions have length zero and are everywhere: every fraction, and uncountable dusts like the numbers with no two 1s together, each carried onto itself by the map. Whether 2\sqrt2 is among them is unknown, because a theorem about almost every point has nothing to say about any point in particular. The typical case is completely understood, and every case anyone can write down is not — the same division that runs through the rest of this subject, from random walks to continued fractions.