Theme

Counting the same thing twice — page 7

One collection, counted by two different methods, and an identity that falls out because both answers have to agree. The proof is the pair of counts.
One experiment, measured by runs and by awakenings. Two unit squares for the same coin and the same schedule: the same experiment weighed two ways: by runs, heads keeps half the square; by awakenings, heads is one of 3 equal slices. Probability

One coin, counted by runs and by wakings

Beauty is put to sleep and a fair coin is tossed. Heads, she is woken once; tails, twice, with the first waking erased from her memory. Each time she wakes she is asked how likely heads is. One half, say some; one third, say others; and unlike every earlier puzzle of this kind, stating the protocol exactly does not end the argument.

Every way to pair the edges of a hexagon. Chord diagrams of all 15 pairings of a 6-gon's edges, shaded by the surface each gluing makes: 5 spheres, 10 tori. Topology

Every way to pair a polygon's edges

A hexagon's six edges can be paired in fifteen ways. Glue each pair head to tail and five of the fifteen give a sphere and ten give a torus; an octagon's 105 pairings give 14 spheres, 70 tori and 21 surfaces with two handles. The spheres are exactly the pairings whose chords never cross, and the whole table obeys one recurrence found in 1986.

A random pairing of 24 edges. Chord diagram of one uniformly random pairing of a 24-gon's edges, corners coloured by the vertex they become. a 24-gon with its edges paired at random and glued head to tail: the 24 corners fall into 3 vertices, so the surface has genus 5, against a most possible of 6. Topology

The surface a random gluing makes

Pair the edges of a large polygon at random and glue each pair head to tail. The surface almost always has nearly as many handles as the polygon allows: a thousand edges leave about seven and a half vertices, and the genus is within four of its ceiling of 250. The vertices behave like the cycles of a random permutation, and their average is a harmonic number.

The powers of 4 roots, added: 1, −1, 4, −5. For k from 1 to 4, the k-th powers of the roots of a degree-4 polynomial drawn as arrows placed tip to tail. Each walk ends on the real axis at a whole number, the k-th power sum, which the coefficients determine. Algebra

Every power sum, from the coefficients alone

Raise the roots of a polynomial to the k-th power and add them. However the roots turn, the total is a whole number when the coefficients are, and Newton's identities produce it from the coefficients one step at a time — no root is ever found. Run the rule on x³ − x − 1 and out comes Perrin's sequence, whose terms know which numbers are prime, nearly.

The postman's route: 24 blocks of street, walked in 28. A street network with its odd-degree vertices marked and the streets a shortest closed route must walk twice drawn doubled, dashed in a second colour, pairing up the odd vertices. Discrete

The streets a postman walks twice

A postman must walk every street of a district and come back. If every corner has an even number of streets, no street needs walking twice. If not, some must — and the ones repeated always join the odd corners in pairs. Pricing every way of pairing them finds the shortest round; pairing the nearest corners first does not.

Permutations that avoid 8 forbidden cells. A 5 by 5 grid with 8 forbidden cells shaded and one permutation that avoids them marked, beside the numbers of ways to place non-attacking rooks on the forbidden cells and the count of avoiding permutations they give. Probability

The cells a permutation must miss

A derangement is a permutation that misses the diagonal of a square grid. Forbid any other set of cells instead and inclusion–exclusion still counts what is left — driven entirely by one list of numbers, the ways to place non-attacking rooks on the forbidden cells. Boards that look nothing alike can share that list, and rooks on a staircase turn out to count the ways to split a set.

5 couples seated so that no one sits beside a partner. A round table with 10 seats alternating women and men, labelled by couple, arranged so that no man sits next to his partner, with the number of such arrangements. Probability

A round table with no couple together

Seat n couples round a table, men and women alternating, so that nobody sits beside their partner. Once the women are placed the men face a board of forbidden cells that bends round a corner — and that corner is the whole difficulty. The forbidden cells form a cycle, a count of non-adjacent points on a cycle finishes the problem, and the chance of a good seating creeps towards e^(−2) far more slowly than the hat problem reaches 1/e.

A labelled square and the edges that join opposite labels. A square grid of 121 vertices, each coloured by one of four labels, with opposite boundary vertices carrying opposite labels, and 3 edges drawn thick where a label meets its negative. Topology

Opposite labels that have to meet

Cut a square into triangles, label every corner +1, −1, +2 or −2, and insist only that opposite points of the edge get opposite labels. Somewhere inside, an edge must join a label to its negative. The proof counts quarter-turns round a diamond — an odd number on the boundary, zero in any triangle that avoids opposites — and making the triangles smaller turns the count back into the theorem about opposite points on the Earth.

Orbit times stabiliser is 8, on every row. A table of 5 things the 8 symmetries of a 4-gon can move. Each row draws every position the thing can be carried to and lists the motions that leave it where it is; the two counts multiply to 8 on every row. Algebra

Twenty-four ways to set a cube down

Count the rotations of a cube from its corners and the answer is eight times three. Count from its edges and it is twelve times two; from its faces, six times four. Three different pictures give one number because each count is the same theorem — the places a thing can go, times the motions that leave it where it is — and the same theorem splits Cayley's sixteen trees into twelve and four and proves that a group of eight has a centre.

36 3-tuples with product e, and the 3 that no turn moves. Every ordered choice of 3 elements of the 6 symmetries of a 3-gon whose product is the identity, in cards grouped by cyclic turning. 3 cards hold a single tuple repeating one element; the other 11 hold 3 each. Algebra

Necklaces made of symmetries

Lagrange's theorem says a subgroup's size divides the group's, and the converse is false. One piece of the converse is true: every prime that divides the size is the order of some element. The proof threads the group's own elements onto a necklace whose product is nothing, turns it, and counts — the argument that proved Fermat's little theorem with beads, with the beads replaced by motions.

Channel capacity 1 − H(p), and three codes at p = 0.1. The capacity of the binary symmetric channel plotted against its flip probability, with the rates of repetition, the Hamming code and no coding marked at one flip probability. Computation

The rate a noisy channel allows

A channel that flips one bit in ten can still carry messages with as few errors as anyone likes — at up to 0.531 message bits per transmitted bit, and at no rate above that. The number is Shannon's capacity, 1 − H(p). Repetition reaches reliability only by sending nothing; a code chosen at random gets there at any rate below the limit; and the reason there is a limit at all is a count of how many flip patterns a block of noise can hold.

Decoding from 20 + m random combinations: the chance it works. Bars for the exact probability that 20 plus m random binary combinations of 20 message bits have full rank, with simulated frequencies as dots, for m from zero upwards. Computation

Erasures a code can see

If a channel loses bits instead of flipping them, and says which ones it lost, its limit rises from 1 − H(p) to 1 − p — and reaching it needs nothing cleverer than a random matrix and the solution of simultaneous equations. A random code needs, on average, 1.607 symbols more than the message it carries, whatever the message's length, and that number is a constant Erdős proved irrational.

The 1,344 tours of the 4-cube, by how often each place changes. A bar for each pattern of change counts among all closed walks through the 4-cube, with the number of tours having it; the reflected code's pattern and the perfectly even one are marked. Discrete

Every place changes back

A closed walk through every corner of a cube changes one place at each step, and each place, having changed, must change back before the walk returns home. So every place changes an even number of times — which is why no walk on three places can share the work evenly, why perfect sharing is possible only when the number of places is a power of two, and what sorts the 1,344 walks on the 4-cube into exactly four kinds.

9 corners of the 4-cube: some corner always has 2 chosen neighbours. The 4-dimensional cube with 9 of its corners chosen so that no chosen corner has more than 2 chosen neighbours, the fewest possible, with the edges between chosen corners drawn heavy. Logic

Half the cube and √n neighbours

Choose more than half the corners of an n-dimensional cube, any way at all, and some chosen corner has at least √n chosen neighbours. That statement about a cube settled a thirty-year question about how sensitive a truth function must be to its inputs, and its proof is a matrix of plus and minus ones whose square is n times the identity. A search over every choice for the 4-cube finds the bound exactly: nine corners, and some corner always has two chosen neighbours.

A witness that 97 is prime: 5 has order 96. A table of the checks Lucas's test makes on 97 with base 5: the power (n − 1)/q for each prime q dividing n − 1, none of which is 1. Number

An order that proves a prime

Fermat's little theorem is a test that primes pass and composites mostly fail, and it can be fooled. Run backwards, it cannot. If some number a has order exactly n − 1 modulo n, then n is prime — because only a prime has n − 1 numbers to cycle through. Checking that takes the prime factors of n − 1, which need proofs of their own, and the proofs nest into a tree that anyone can check: Pratt's certificate, which shows every prime has a short proof of being one.

Birthdays within k days: a half at 23, 14, 9, 7 people. Curves of the probability that two of m people have birthdays within k days, for k = 0, 1, 3, 6, with the group size at which each passes one half marked. Probability

Fourteen people within a day

Twenty-three people probably include two with the same birthday. Fourteen probably include two whose birthdays are at most a day apart, and seven, two within a week. The near miss has an exact formula, found by a trick that takes k days away after every birthday and turns the question back into the plain one on a shorter year, and the pattern behind every threshold is a single square root: a window of k days either side makes each pair 2k + 1 times as likely to collide.

Nobody alone: a half at 3,064 people. The probability that no person in a room has a birthday unshared by anyone else, against the number of people, exactly and by a Poisson estimate. Probability

A room where nobody is alone

Twenty-three people probably include two who share a birthday. How many are needed before every single person shares a birthday with somebody else in the room? The answer is 3,064 — more than it takes for every day of the year to be somebody's birthday — and the reason is a count of loners, which rises as the room fills, peaks at 134 when the room is the size of the year, and then falls so slowly that the last loner lingers for thousands of arrivals.

Twelve units of shortfall, on every solid with three faces at a corner. A bar for each of 8 polyhedra with three faces at every vertex, divided into each face's shortfall from six sides; every bar has total length twelve, and the hexagons contribute nothing. Topology

Twelve pentagons, whatever the hexagons

A football has twelve pentagons and twenty hexagons. A molecule of sixty carbon atoms has the same pattern, a molecule of seventy has twelve pentagons and twenty-five hexagons, and a geodesic dome of any size has twelve places where the pattern of six breaks. None of this is a coincidence of design: Euler's formula, rearranged, says that faces meeting three at a corner must fall short of hexagons by exactly twelve in total, and the hexagons are free.

The six regular 4-polytopes, and an alternating sum of 0. A table of the six regular polytopes in four dimensions with their numbers of vertices, edges, faces and cells and the alternating sum, which is zero for each. Topology

Zero in four dimensions

Corners minus edges plus faces is two for every solid. One dimension up, corners minus edges plus faces minus cells is zero for every one of the six regular four-dimensional solids, from the five-cell to the six-hundred-cell, and for every other convex solid in four dimensions. The alternating sum does not break when the dimension rises: it alternates, two in odd dimensions and zero in even ones, because it is measuring a sphere and not a solid.

The solutions of x² − 2y² = N, class by class. Rows for several right-hand sides N, each marking the solutions of x² − 2y² = N at the logarithm of x + y√2, coloured by class, over alternately shaded windows one unit-step wide. Number

Two families of solutions, and a box that holds both

Replace the 1 in Pell's equation by 7 and x² − 2y² = 7 still has infinitely many solutions — but they fall into exactly two families, each one an orbit of the same multiplication, and every family has a member inside a box whose size is fixed in advance. How many families there are is then a count of factors, and 3 has none.

How many digits Pell's first solution has, for D up to 1000. A scatter of the digit count of the smallest solution of Pell's equation against D, with the record-setting values ringed and labelled. Number

Sixty needs two digits and sixty-one needs ten

The smallest solution of x² − 60y² = 1 is x = 31. For x² − 61y² = 1 it is x = 1,766,319,049. The jump is not an accident of 61: the solution is exactly the product of one period's complete quotients, so its size is set by how long the continued fraction takes to come home — and for the cattle problem Archimedes is said to have posed, that product has 103,273 digits.

Six thirtieths of a turn that add to nothing. On the left a unit circle with the roots of unity in a vanishing sum marked and coloured by origin; on the right the same unit vectors placed head to tail, returning to their start. Algebra

The sums of roots of unity that add to nothing

All n of the n-th roots of unity add to zero, and so does any regular polygon among them, turned. Those are not the only vanishing sums: six thirtieths of a turn close into a loop with no polygon in them. Which counts of roots can close at all is decided by the prime factors of n — no seven fifteenths ever add to zero — and the same question counts where the diagonals of a regular polygon cross.

The three pairings of the roots of x⁴ + x + 1. Three panels each showing the same four roots of a quartic in the complex plane, joined in a different way into two pairs, with the value of the sum of the pair products beneath. Algebra

Three ways to pair four roots

Four roots can be split into two pairs in exactly three ways, and the three numbers r·r′ + r″·r‴ those pairings give are the roots of a cubic whose coefficients can be read straight off the quartic. That cubic is where Ferrari's formula gets its cube roots, and it is also a verdict: whether its roots are rational decides which of the twenty-four symmetries the quartic's roots actually have.

Pollak's circle: one rotation in every n + 1 parks on the line. Several circles of numbered spots, each showing where cars park when every preference in a list is rotated by a fixed amount, with the one rotation that leaves the last spot empty highlighted. Discrete

Cars that park, and trees that grow

Three cars arrive at a one-way street with three spaces; each has a favourite space, drives to it, and takes the first free one from there on. Of the 27 lists of favourites, exactly 16 let every car park — the same 16 as the labelled trees on four points. The reason is a circular street with one extra space, on which every list parks and exactly one rotation of it leaves the extra space empty.

All themes