Random permutation
Named by 8 essays across 3 fields — each of them below, with the objects they name alongside it.
The longest climb of a shuffle
Erdős and Szekeres guarantee that any n distinct numbers hold a climb or a fall of √n, and there are orders that allow nothing more. Shuffle a deck at random instead and the longest climb is almost exactly 2√n — with fluctuations of size n to the power one-sixth, distributed exactly as the largest eigenvalue of a large random matrix.
Matching when the arrivals are shuffled
An adversary who chooses the order in which applicants arrive can hold any fixed matching rule to half the best. Take the order away and let it be random, and the plainest rule of all — give each arrival its first free place in a fixed list — rises to 1 − 1/e, because shuffling the arrivals turns out to be exactly the trick RANKING plays with the places, seen from the other side. Shuffle both and the guarantee rises again, to somewhere between 0.696 and 0.727, and where in that interval it lies is not known.
A wait that ends and has no average
Draw a number, then keep drawing until one beats it. Half the time the very next draw does. The wait is certain to end, it is usually short, and its average is infinite — and the chance of still waiting after n draws is exactly 1/(n + 1), whatever the numbers are drawn from, because symmetry is the only thing the calculation uses.
A perfect coin and a biased shuffle
Give a program a perfect source of random numbers and ask it to shuffle a deck by swapping each card with a card chosen from anywhere in the deck. The result is biased, provably and for every deck of three or more cards: there are nⁿ equally likely runs and n! orders, and the first number is never a multiple of the second. In a deck of 52 some card-and-place pairs come up a third more often than they should. Swapping only with cards not yet placed fixes it; swapping only with later cards makes nothing but single cycles.
A seed is a deck
A shuffle that is perfectly correct, driven by a generator that passes every statistical test, can still deal almost none of the possible decks. A shuffle program is a function from the generator's starting state to an ordering of the cards, so it can never produce more orderings than the generator has states: a 32-bit seed reaches one deck in about 10⁵⁸. On nine cards and a 16-bit generator every case can be checked — 62,616 of the 362,880 orders are ever dealt — and on a full deck, six cards on the table are enough to name the seed and every card still to come.
The longest climb in a cube
Among n random points in a square, the longest chain rising to the right has about 2√n points, a fact with a famous proof. Put the points in a cube and ask for a chain rising in all three directions, and its length is about c·n^(1/3) for a constant nobody knows. Béla Bollobás and Peter Winkler proved that the constants for every dimension stay below e and creep up to it. The upper bound is a single count of chains, and simulation shows how far below it the real chains fall.
A hundred prisoners and one shuffle
A hundred prisoners each search fifty of a hundred boxes for their own number, one at a time, with no communication once it starts. If any fails, all are executed. Choosing at random gives them a chance of 8 × 10⁻³¹. There is a rule that gives them 31%, and no rule can do better. Every prisoner's individual chance is still one half: what the rule changes is not how often each succeeds but how those successes line up.
One swap saves every prisoner
A hundred prisoners following the cycles of a shuffle all survive about 31% of the time. Let a helper look into the room first and swap the contents of two boxes, and they survive every time. With fewer boxes each, more swaps are needed — exactly one per cut a long cycle needs — and the number of swaps a random room demands has an exact distribution.
Named alongside it
The objects these essays reach for when they reach for this one.
PermutationCycleExhaustive searchHarmonic seriesLongest increasing subsequenceUniform distributionBipartite graphBirthday problemCompetitive ratioCycle decompositionDivisibilityExpectation