Theme

The same thing twice — page 18

Two constructions that look unrelated and turn out to be the same object wearing different clothes.
Scrambled in three steps, restored in thirty. Cat map on 61×61: period 30; frames at steps 0, 1, 2, 3, 7, 22, 30; lit pixels 693. Dynamics

A chaotic map that always comes back

Arnold's cat map stretches a square by the golden ratio squared and wraps it round, and any two nearby points fly apart: a difference of a million-millionth fills the square in twenty-seven steps. Apply the same map to a picture made of pixels and it dissolves into noise within a few steps — and then, after exactly thirty steps on a 61 × 61 grid, every pixel is back where it started. Chaos and exact return are both true, and the Fibonacci numbers decide how long the return takes.

Where charges settle on a sphere. N=4: E=3.674234614, distinct minima from 8 starts: 1; N=6: E=9.985281374, distinct minima from 8 starts: 1; N=8: E=19.675287861, distinct minima from 8 starts: 1; N=12: E=49.165253058, distinct minima from 8 starts: 1; N=20: E=150.881568334, distinct minima from 8 starts: 1; five charges: bipyramid 6.474691, best square pyramid 6.483661. Geometry

Where charges settle on a sphere

Put equal electric charges on a sphere and let them push each other apart until nothing moves. Four settle at the corners of a tetrahedron, six of an octahedron, twelve of an icosahedron — but eight do not make a cube, and twenty do not make a dodecahedron. The cube loses to two squares turned half a corner apart, because charges on a sphere prefer triangles; and however many charges there are, exactly twelve more of them have five neighbours than have seven.

The largest prime factor, as a power of the number. Share of n with log P(n)/log n ≤ s: at s=0.5, n≤10⁴ 0.268, n≤10⁷ 0.272, Dickman 0.307; median e^(−1/2) = 0.6065; largest gap at 10⁷ 0.061. Number

The largest prime in a typical number

Count a number's prime factors and the answer is about log log n. Ask instead how big the largest one is, and the answer is a power of n with a law of its own: half of all large numbers have a prime factor above n^0.6065, and the share whose primes all stay below n^(1/u) is Dickman's ρ(u), a function defined by its own past. The same law governs the longest cycle of a random shuffle, and there it arrives at once; for the numbers themselves, at ten million, it is still visibly on its way.

Three ways to pick a rotation at random. Mean rotation angle: uniform 126.70° (exact 126.48°), uniform Euler angles 127.91°, uniform axis and angle 90.18°. Densities by 5° bin, uniform: 0.00, 0.00, 0.01, 0.01, 0.03, 0.04, 0.04, 0.06, 0.09, 0.09, 0.13, 0.15, 0.16, 0.20, 0.23, 0.25, 0.28, 0.29, 0.34, 0.36, 0.38, 0.41, 0.44, 0.46, 0.47, 0.52, 0.54, 0.55, 0.57, 0.61, 0.60, 0.64, 0.62, 0.61, 0.64, 0.64. Algebra

A rotation chosen at random

Turn a solid body to an orientation chosen at random and it has usually been turned a long way: on average 126.5 degrees, and by less than ten degrees only three times in ten thousand. Unit quaternions make the right meaning of 'at random' a picture, and two recipes that look fair fail it in opposite directions.

Two waves through the same samples. A sine of 9 cycles per unit sampled 10 times per unit coincides at every sample with minus a sine of 1 cycle per unit. Samples: 0.000, -0.588, -0.951, -0.951, -0.588, 0.000, 0.588, 0.951, 0.951, 0.588, -0.000. Analysis

A wave known only at its ticks

Read a sine wave nine cycles a second at ten instants a second and the readings describe a wave of one cycle a second instead. Read a wave with nothing faster than 3.7 cycles a second at more than 7.4 instants a second and the readings determine it exactly. Both facts are the same fold of the frequency axis, and it is why wagon wheels turn backwards on film.

Haggling that ends at the largest product. δ=0.3: player 1 proposes 0.7194, player 2 offers 0.0647; δ=0.6: player 1 proposes 0.5102, player 2 offers 0.1837; δ=0.85: player 1 proposes 0.3887, player 2 offers 0.2809; δ=0.97: player 1 proposes 0.3435, player 2 offers 0.3232; Nash split 0.3333. Applied

Haggling that ends at the largest product

Two people split a sum by making offers in turn, each refusal costing both of them a little time. Rubinstein proved in 1982 that the game has exactly one sensible outcome, reached at once — and as the delay between offers shrinks, it is the split that maximises the product of what each gets, the rule Nash had laid down as an axiom thirty years before.

Everyone points at the house they want. Favourite owners: A→F, B→G, C→H, D→F, E→B, F→G, G→B, H→H, I→G. Cycles: GB; H. Final allocation: A gets F's, B gets G's, C gets A's, D gets I's, E gets D's, F gets C's, G gets B's, H gets H's, I gets E's. Applied

Houses traded in cycles

Everyone owns a house and would rather have someone else's. Let each point at the owner of the house they want most, follow the arrows into a cycle, and trade around it; repeat. The result is the only allocation no group can improve with its own houses, and nobody can gain by lying about what they want — the two guarantees stable matching could not give together.

Fourteen truth functions of three letters. table 00000000: 2; table 01101001: 2; table 00001111: 6; table 00111100: 6; table 00010111: 8; table 00011000: 8; table 00000001: 16; table 00010110: 16; table 00000011: 24; table 00000110: 24; table 00011011: 24; table 00011110: 24; table 00000111: 48; table 00011001: 48. Logic

Truth tables up to renaming

There are 256 truth functions of three letters, but many differ only in which letter is called what, or whether a letter or the answer is negated. Counted up to such renamings there are fourteen. For four letters there are 222, for five 616,126 — and almost every function of many letters is changed by every renaming, so the count settles into a simple division.

Four fractions staked on one run of tosses. p=0.6, 1000 tosses, 604 heads; final log10 wealth: Kelly 9.449, half Kelly 6.881, twice Kelly 0.409, everything ruined at toss 10. Probability

The best average is the worst bet

A coin lands heads six times in ten and pays even money. Stake everything on every toss and the expected wealth grows by a fifth a toss — and the bettor is ruined at the first tail, which is certain to come. Stake a fifth of wealth each time instead and the average grows far more slowly, while the typical bettor grows faster than with any other fraction. The expectation is maximised by the strategy almost nobody should use.

How many times the tangent turns. circle: 1; figure-eight: 0; limaçon with a loop: 2; two inner loops: 3; three inner loops: 4; three-lobed star: -2. Topology

The turns a tangent makes

Drive once round a closed track and count how many full turns the steering has made. A circle is one turn, a figure-eight is nought, and every loop adds one. Whitney and Graustein proved that this one number decides when one track can be bent into another without ever stopping — and it can be read off the crossings of a drawing without following the curve at all.

Knowing the coin, learning it, and guessing it once. p=0.6, 2000 tosses; final log10 wealth: hindsight 19.30, knew p 19.25, learned 17.73, plug-in from 20 tosses (15 heads, f=0.50) -25.88. Probability

What not knowing the coin costs

Kelly's rule stakes the edge, and the edge is the one thing a bettor never has. Estimate it from twenty tosses and stake the estimate, and a lucky start can turn a favourable coin into certain ruin. Learn it toss by toss instead, with Laplace's rule, and the cost of ignorance shrinks to a factor of about the square root of the number of tosses — because a bettor who learns is exactly a bettor who split the money among every fixed fraction at once.

Twelve studies of one coin, three ways of adding them up. theta=0.6, 12 studies of 40: heads 26,21,25,25,25,22,25,20,23,34,22,27; log10 learned product 0.06,-0.33,0.10,0.56,1.05,1.00,1.49,1.13,1.30,3.42,3.35,4.27; fresh 0.06,-0.63,-0.80,-0.98,-1.16,-1.78,-1.96,-2.67,-3.19,0.66,0.03,0.38; Fisher p 8.07e-2,2.58e-1,1.71e-1,1.19e-1,8.54e-2,1.34e-1,9.71e-2,1.72e-1,1.96e-1,7.44e-4,1.40e-3,4.71e-4; cross at 7 (learned e) and 10 (p). Probability

Evidence that can be multiplied

A p-value from one study and a p-value from the next cannot simply be multiplied, and a researcher who decides whether to run the next study by looking at the last one quietly breaks the rule that combines them. An e-value — a number whose average under the null is at most one — can be multiplied, study after study, under any rule for continuing, and never passes twenty to one more than one time in twenty. What it costs is tosses, and what it demands is a decision about which alternatives to be good at finding.

Ramanujan's tau, scaled by the power it grows like. τ(n)/n^5.5 for n ≤ 400; τ(1..8) = 1, -24, 252, -1472, 4830, -6048, -16744, 84480; largest |τ(n)|/n^5.5 for n ≤ 10000: 3.2796 at 4841. Number

The product raised to the twenty-fourth power

Euler's product (1 − q)(1 − q²)(1 − q³)… has the partition numbers for its reciprocal. Raise it to the twenty-fourth power and multiply by q, and the coefficients that come out — 1, −24, 252, −1472, 4830, −6048 — multiply like the primes they are indexed by, stay inside a bound Ramanujan guessed and Deligne proved fifty-eight years later, agree with a divisor sum modulo 691, and know, modulo 23, how a cubic equation factors.

One number, fair in base 2 and gappy in base 6. α binary: 000010101011100011100011100011110110100001001011…; base 6: 013014043000333425113050213000000124355504543223…; zero runs after 3^k: 81:16, 243:42, 729:121. Dynamics

Fair in base two and not in base six

Almost every number has digits that look like fair coin tosses in every base, and almost no number anyone can name is known to. Stoneham's number, 1/(3·2³) + 1/(9·2⁹) + 1/(27·2²⁷) + …, is one of the few: its binary digits are provably fair. Written in base 6 the same number has a run of 121 zeros starting at the 730th digit, and a longer one at every power of three after — because in base 6 each of its terms is a terminating fraction, and the gaps between them never fill.

A dust plus itself is a line. C level 6: 64 intervals, length 0.0878; C+C: 1 interval(s) [0, 2]. Dynamics

Two dusts that add up to a line

The middle-thirds Cantor set has no length at all, and yet adding it to itself — every sum x + y of two of its points — fills the whole interval from 0 to 2 without a gap. The reason is a single number, the thickness, and it is exactly 1 for this set. Make the dust a little thinner and its sum with itself collapses to a dust again; make two different dusts and whether they add to a line depends on their dimensions, unless arithmetic gets in the way.

Ackermann's function as one polymorphic term. A : N → N → N; A(0,0)=1 in 6 steps, A(0,1)=2 in 6 steps, A(0,2)=3 in 6 steps, A(0,3)=4 in 6 steps, A(0,4)=5 in 6 steps, A(0,5)=6 in 6 steps, A(1,0)=2 in 10 steps, A(1,1)=3 in 13 steps, A(1,2)=4 in 16 steps, A(1,3)=5 in 19 steps, A(1,4)=6 in 22 steps, A(1,5)=7 in 25 steps, A(2,0)=3 in 17 steps, A(2,1)=5 in 33 steps, A(2,2)=7 in 55 steps, A(2,3)=9 in 83 steps, A(2,4)=11 in 117 steps, A(2,5)=13 in 157 steps, A(3,0)=5 in 37 steps, A(3,1)=13 in 191 steps, A(3,2)=29 in 881 steps, A(3,3)=61 in 3795 steps, A(3,4)=125 in 15765 steps. Logic

One type for every use

In the simply typed calculus a numeral must be told in advance what kind of thing it will iterate, and with input and output of one type it computes only polynomials with tests. Let a single type stand for every type — a numeral is then a term of type ∀X. (X → X) → X → X, used at whatever type each occasion needs — and the same few symbols compute subtraction, exponentials and Ackermann's function, which grows faster than anything built from primitive recursion. Every run still finishes, and the proof that it does lies just beyond the reach of second-order arithmetic.

The correlations that reverse a coefficient. rho = 0.6: wedge shares 0.2051 and 0.2051 of the ellipse; arcsin(0.6)/pi = 0.2048. Algebra

Holding one still turns the other over

A quantity can rise with an outcome and still predict it downwards once a second quantity is held fixed. Completing the square in two predictors says exactly when: the pair of correlations has to fall in a wedge whose angle is arcsin of the predictors' own correlation. Averaged over every possible correlation matrix the chance is exactly 1/4 − 1/π², about one coefficient in seven; two coefficients never reverse together, and with two dozen predictors almost two in five do.

The copies each grid makes of the disc. W = 6, 113 frequencies: square grid 13x13 = 169 samples; best lattice basis (11,4), (9,-8), 124 samples. Analysis

A grid that packs the copies

Sampling a pattern on a grid makes copies of its frequencies, one for every point of a lattice, and the pattern can be read back from the samples only if the copies do not collide. For a pattern whose frequencies fill a disc the square grid wastes room between its copies. Searching every lattice of samples for the fewest that work finds a nearly hexagonal one every time — 124 samples where the square grid needs 169 — and the saving is the hexagonal packing's over the square, 13.4% in the limit. In three dimensions it is 29%, and in twenty-four the cubic grid needs 16,777,216 times as many samples as the best.

Three values of j and the cubic they share. D=−23: forms (1,1,6) (2,-1,3) (2,1,3); j = -3493225.699970, 737.849985−1764.018939i, 737.849985+1764.018939i; H = X³ + 3,491,750X² − 5,151,296,875X + 12,771,880,859,375; worst distance 10^-113.9. Algebra

The class number is a degree

The integers of ℚ(√−23) fall into three classes of ideals, and that 3 can be found by counting forms. It is also the degree of a single number: the modular function j, evaluated at the three forms' points, gives three values that are not whole but are the roots of one cubic with whole-number coefficients. When there is only one class, the value is a whole number outright — and that is why e^(π√163) misses being whole by less than a trillionth.

Four ways to a slope, and the one that subtracts. f'(1.5)=4.053427893898620; forward best 2.60e-9 at h=1.0e-8; central best 6.41e-12 at h=3.2e-6; complex step at 1e-200: 1.00e-17; dual: 1.00e-17. Analysis

A slope without a subtraction

The definition of a slope subtracts two nearly equal numbers and divides by a tiny one, and a computer that follows it loses half its digits however carefully the step is chosen. Two pieces of arithmetic avoid the subtraction altogether. Step sideways into the complex numbers by 10⁻²⁰⁰ and read off the imaginary part; or calculate with numbers a + bε in which ε² = 0, and the slope rides along exactly. Run backwards, the second gives all thousand slopes of a function of a thousand variables for under five times the cost of the function.

Zeros of the exponential's partial sums. n=10: 10 zeros, balance range 2.1289–2.1339; n=20: 20 zeros, balance range 2.4462–2.4516; n=40: 40 zeros, balance range 2.7760–2.7827; n=80: 80 zeros, balance range 3.1127–3.1207; tip -0.278465. Analysis

The zeros a partial sum cannot avoid

The exponential is never zero, and every partial sum 1 + z + z²/2! + … + zⁿ/n! of its series is zero n times. Divide those zeros by n and they line up on a single egg-shaped curve, |z e^(1−z)| = 1, found by Szegő in 1924. The curve is where two sizes tie — the exponential the series is reaching for, and the terms it has not yet reached — and the same tie, carried one step further, places every zero to within a few hundredths.

A relaxation that answers in halves. x = ½,½,½,½,½,1,0,0,½,½,½; LP 5; whole cover 6. Applied

A relaxation that answers in halves

The cheapest set of points touching every edge of a graph is hard to find. Allow each point to be taken fractionally and the problem becomes a linear programme — and its best answers are never messier than halves. Every point gets 0, ½ or 1, the 0s and 1s can always be trusted, and the proof is a picture: double the graph into a bipartite one, where a matching decides everything exactly.

A block of shares in an ocean of small holders. a=0.02: exact 0.0249, limit 0.0204; a=0.06: exact 0.0647, limit 0.0638; a=0.1: exact 0.1144, limit 0.1111; a=0.14: exact 0.1642, limit 0.1628; a=0.18: exact 0.2139, limit 0.2195; a=0.22: exact 0.2836, limit 0.2821; a=0.26: exact 0.3532, limit 0.3514; a=0.3: exact 0.4229, limit 0.4286; a=0.34: exact 0.5124, limit 0.5152; a=0.38: exact 0.6119, limit 0.6129; a=0.42: exact 0.7214, limit 0.7241; a=0.46: exact 0.8507, limit 0.8519; a=0.5: exact 0.9950, limit 1.0000; a=0.54: exact 1.0000, limit 1.0000; a=0.58: exact 1.0000, limit 1.0000 Applied

A block in an ocean of small holders

A shareholder with 30% of a company whose other shares are scattered among thousands of small holders has, by the average over every order of arrival, 43% of the power to decide — 3/7 exactly, in the limit. The reason is a window of moments: if everyone arrives at a random time, the dispersed shares trickle in at a steady rate, and the block decides every vote in which it turns up while the trickle sits within 30% of the quota. The same picture, run along a diagonal, turns the average over orders into an integral and puts the two classic power indices on one curve.

Two arrows in and two out at every point. 9×9 patch from a random height function, seed 3; heights range 1..6. Discrete

Two arrows in and two out

An Eulerian circuit enters every point as often as it leaves, so it hands every edge an arrow with the arrows balanced at each point. Count those balanced orientations instead of the circuits and the question turns into the ice in a freezer: on the square grid, where every point has two arrows in and two out, there are about 1.5396 of them per point — Lieb's (4/3)^(3/2), against Pauling's guess of 1.5. Fix the walls of a square of ice and the count becomes 1, 2, 7, 42, 429, 7436: the alternating-sign matrices.

All themes