Counting the same thing twice — page 11
Every function is a tree with two marks
There are n to the n functions from n points to themselves, and n to the n − 2 trees on those points. André Joyal noticed in 1981 that the missing factor of n² is a choice of two points — a head and a tail — and that a function, read the right way, simply is a tree with a head and a tail. The reading turns Cayley's formula into one line and hands over a fact about random trees from the birthday problem.
Almost every tree can be turned over
Cayley's n^(n−2) counts trees with labels on their points. Take the labels off and the count has no formula, because a symmetric shape absorbs labellings: the star on seven points can be labelled only seven ways, the one asymmetric shape 5,040. The bookkeeping that reconciles the two counts says something unexpected — almost every tree, labelled or not, can be turned over onto itself, where almost every graph cannot.
A total hung in a temple
Put a polygon's corners on a circle, cut it into triangles, and add up the radii of the circles inscribed in the triangles. Cut it a different way and the total is the same — for all fourteen ways of cutting a hexagon, to every digit. The fact was painted on a wooden tablet in a Japanese temple around 1800, and the reason for it is a theorem about one triangle and the distances from its circumcentre to its sides.
Four lists find a collision sooner
Two lists of random 24-bit strings need about four thousand entries each before some string appears in both — the birthday bound. Ask instead for one string from each of four lists whose exclusive-or is zero, and lists of a few hundred suffice, because merging the lists in pairs manufactures the near-misses a direct search would have to find by luck. David Wagner's algorithm turns the square root into a cube root, and more lists into smaller roots.
Counting a population by its repeats
The birthday problem runs forwards from a known year to the chance of a match. Run it backwards and the matches measure the year: count how many pairs among the draws came out the same, and the number of kinds is about the number of pairs divided by that. It costs the square root of the population rather than a census of it — and when the kinds are unevenly common, what the repeats measure is not how many kinds there are but how many they behave like.
What homology forgets about a loop
Let the letters of a loop commute and the loop group of a space becomes its first homology group: a loop now records only how often it went round each hole. What is thrown away is exactly the loops that bound a surface. On the figure eight that is nearly everything — of the loops of sixty letters that homology calls nought, about one in 6,700 is a loop that actually shrinks.
The room a projective space needs, read off Pascal's triangle
The projective plane cannot sit in three-dimensional space without crossing itself, and the reason can be written as arithmetic: a polynomial that records how a shape twists, which a room must cancel. For the n-dimensional projective space that polynomial is a row of Pascal's triangle read mod 2, its inverse is another row, and the inverse's last term says how many extra dimensions the room must have — exactly enough, at every power of two.