Concept

Randomness

The property of a sequence that no shorter description of it exists, or that no efficient procedure predicts it — two definitions that do not coincide. What a generator provides is neither; it is a short description arranged so that finding it is hard or unnecessary.

Named by 16 essays across 8 fields — each of them below, with the objects they name alongside it.

The same modulus, four multipliers, four qualities. 4 linear generators at modulus 1021, drawn as scatters of consecutive pairs and ranked by the spacing of the lines their points fall on. The spacings differ by more than a factor of two.

The test that ranks the generators

Every linear generator's output lies on a family of parallel planes. Which generator is better is decided by how far apart those planes are, and that distance is the length of the shortest whole-number vector the modulus annihilates — a quantity that can be computed exactly rather than estimated by testing.

computation · Pseudorandomness
Four outputs are enough to find the rule. A row of 12 outputs of a linear generator, with the first 4 marked as given and the rest as predicted. The multiplier and increment recovered from the given ones reproduce every later output exactly.

Four numbers and the rule is yours

A linear generator can be solved. Given a few of its outputs, the multiplier and the increment fall out of two congruences, and every future output is then known exactly — which is a failure of a completely different kind from the lattice defect, and is not detected by any test of how evenly the points are spread.

computation · Pseudorandomness
A scatter with no lines in it. 900 consecutive pairs from a generator that squares modulo a product of two primes. The points show no family of parallel lines, and an exhaustive search for a short relation between consecutive outputs finds none.

Randomness that has to be earned

A generator that resists prediction cannot be built out of a rule anybody can fit. It has to be built out of a computation believed hard to undo, and the belief is the load-bearing part — which makes cryptographic randomness a conditional statement rather than a construction.

computation · Pseudorandomness
Every pattern, exactly as often. A table over 4 window lengths of a shift register's output stream: how many bit patterns are possible, how many actually occur, and the difference between the most and least frequent, which is one in every row.

Nineteen thousand bits of state

The generator most simulations actually use is not clever. It is a linear recurrence over the two-element field with an enormous state, and its virtues are a proved period, a proved equidistribution and speed — none of which is unpredictability, which it does not have and does not claim.

computation · Pseudorandomness
One table of shares, two different lotteries. A doubly stochastic table decomposed into whole assignments twice, by two different orders, giving two mixtures that reconstruct the same shares.

One table, two lotteries

A table of shares says what fraction of each task each person does. It does not say how — the same table is a mixture of whole assignments in many different ways, and the differences are exactly what the people being assigned would care about.

applied · Assignment
Fair bits from a biased coin. 44 flips of a coin biased 0.7 towards 1, read in 22 pairs. Mixed pairs are kept and give their first bit; matched pairs are discarded. Over a long run the output is 50.2% ones, at 0.210 output bits per flip.

Fair bits from an unfair coin

Read a biased coin's flips in pairs, keep 01 as 0 and 10 as 1, and throw away the rest: the output is exactly fair, whatever the bias, and nobody needs to know the bias. The trick wastes most of the coin, the waste can be recycled almost up to the ceiling Shannon's entropy sets — and it fails quietly the moment the flips remember each other.

computation · Pseudorandomness
A random ranking on the triangular graph, 8 a side. A bipartite graph in which arrival t is joined to places t through 8. One random ranking of the places is used to match greedily; 5 of 8 arrivals are matched.

Matching as they arrive

Applicants arrive one at a time, and each must be given a post or turned away on the spot. Any sensible rule matches at least half as many as the best assignment chosen with hindsight, and an adversary arranging the arrivals can hold every fixed rule to exactly half. Shuffle the posts once, at random, and give each arrival its best-ranked free post: the guarantee rises to 1 − 1/e, about 63%, and no rule of any kind can do better.

discrete · Halls theorem
Error against the number of points for three randomised methods. Log-log plot of root-mean-square integration error against N from 16 to 4096 for plain Monte Carlo (slope -0.52), digitally shifted Sobol' points (-1.00) and Owen-scrambled Sobol' points (-1.43).

An error bar for points that are not random

Evenly spread points integrate far better than random ones and give no error bar; random points give an error bar and integrate badly. Randomise the even points themselves — shift a lattice by a random vector, or scramble the digits of a Sobol' sequence — and both are kept: an unbiased estimate, a confidence interval from a handful of repeats, and an error that falls faster than any deterministic set's.

probability · Monte Carlo
Traffic with random dawdling: jams from nowhere at density 0.18. Nagel–Schreckenberg traffic, 29 cars on 160 cells, top speed 5, dawdling probability 0.25; up to 11 cars stopped at once.

A jam that comes from nowhere

Give cars on a ring road a top speed of five cells a step, let each slow to the gap ahead, and add one more rule: now and then, at random, a driver eases off by one. That is the whole of the Nagel–Schreckenberg model, and it produces what the exactly solvable rule 184 could not — jams that form in free traffic with no obstacle, drift backwards against the flow, and cost the road more than a third of its capacity. Set the top speed to one and remove the chance, and it is rule 184 again, cell for cell.

dynamics · Cellular automata
The first 600 terms of the continued fraction of ∛2. Partial quotients of ∛2 computed exactly: 1, 3, 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3 …; the largest in the first 600 is 7451.

A cube root that looks like chance

The continued fraction of √61 repeats after eleven terms, and every square root's must. The cube root of 2 obeys no such law. Computed exactly, by a method of Lagrange's that never leaves the whole numbers, its terms run 1, 3, 1, 5, 1, 1, 4 … and throw up a 534 at the thirty-fifth place and a 7,451 at the 571st — and in every statistic anyone has measured, they look like the terms of a number picked at random.

number · Pell
The roots of random polynomials of degree 30 and 100: few are real. degree 30: 2 real roots at -2.335, -1.074; degree 100: 2 real roots at -0.327, 0.994.

Almost none of the roots are real

Pick the coefficients of a polynomial of degree a thousand at random, each one an independent draw from the bell curve, and ask how many of its thousand roots are real. The answer is about five. Mark Kac found in 1943 that the average grows only like (2/π) ln n, and the reason can be read off the real line itself: the real roots crowd towards +1 and −1 and spread evenly on a logarithmic scale of distance from them.

algebra · Polynomial roots
The roots of every polynomial of degree 11 with coefficients ±1. 22528 roots; radii from 0.500 to 2.000; 42% within 0.1 of the unit circle.

Random roots crowd onto the circle

The roots of a random polynomial are not scattered across the plane. They gather within about 1/n of the unit circle, and their directions spread evenly round it. Paul Erdős and Pál Turán proved in 1950 that this is not a fact about randomness at all: any polynomial whose coefficients are all of roughly one size has roots whose directions are nearly even, and the inequality says exactly how nearly, in terms of nothing but the coefficients.

algebra · Polynomial roots
A random tiling of the Aztec diamond, frozen outside a circle. A uniformly random domino tiling of the order-40 Aztec diamond (1640 dominoes) with the inscribed circle drawn.

The diamond that freezes its corners

A square board's domino tilings grow like 1.3385 choices per square. Arrange the same squares in a staircase-edged diamond and the count is exactly 2 to the n(n+1)/2 — only 1.1892 choices per square, at every size. The boundary has reached into the middle. Pick one of the diamond's tilings at random and the reason is visible: outside the circle inscribed in the diamond the dominoes are frozen into solid brickwork, and only inside it is the tiling free.

discrete · Halls theorem
Two grids of random-looking bits, one of rank thirty-two. 48 by 48 bit matrices: xorshift32 low bits, rank 32; xorshift32 multiplied, rank 47.

A grid of bits whose rank stops at the state

Fill a square grid with a generator's output bits and compute its rank over the field of two elements. Random bits give full rank or one short, in fixed proportions. A generator built from shifts and exclusive-ors gives full rank up to its number of state bits and then never one more — 32 for a 32-bit xorshift, 128 for the lowest bit of xorshift128+ — however large the grid. The test that catches it is decided by a line of linear algebra.

computation · Pseudorandomness
Four generators climbing out of zeroland. Output ones-density from a one-bit start reaches 0.45 after: MT19937 374000, TT800 4500, WELL512 44, xorshift128 37.

Three hundred thousand outputs of nearly nothing

Start the Mersenne twister from a state with a single 1 among its 19,937 bits and it puts out zeros, then sparse ones, and only after about 340,000 outputs anything that looks random. Every linear generator has such a zeroland around the all-zero state; xorshift128 crosses it in 37 outputs, WELL512 in 44, and the twister's three-word twist makes it the slowest of all by four orders of magnitude.

computation · Pseudorandomness
Cells of points scattered at random. Poisson–Voronoi tessellation of 600 points on a torus; mean sides 6.000000000; side counts 3: 9, 4: 56, 5: 165, 6: 167, 7: 131, 8: 49, 9: 18.

The shape of a cell around a random point

Scatter points at random and give each the region nearer to it than to any other. The cells come in every shape from triangles to twelve-sided polygons, and almost nothing about them is fixed by a formula — except one thing: on a closed surface they have exactly six sides on average, every time, because three cells meet at every corner. Two hundred thousand cells measure the rest: 29.5 per cent hexagons, Lewis's law, and small cells surrounded by large ones.

geometry · Voronoi

Named alongside it

The objects these essays reach for when they reach for this one.

PseudorandomnessExpectationFinite fieldModular arithmeticPolynomialAlgorithmBinaryComplex numbersCryptographyLinear recurrenceMatchingRoots

All concepts