When a shared birthday becomes likely
birthday is one function. Everything below came out of it during this
build, at parameters taken from the essays rather than invented for this page — so a figure
here is the same figure a reader meets in an essay, and if the generator changes, this page
changes with it.
With nothing chosen
The walk x² + 1 modulo 337, drawn as the letter ρ
How long x² + 1 runs before repeating, over 400 primes
Pollard's method splitting 8051
What Pollard's method costs, against the smaller prime
A restaurant with room for one parameter
What it checks while it draws
Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.
- the near-birthday chance at k = 0 is a distinct-birthday chance on a shorter year ×7
- 4 lists find solutions at 12 bits in most runs ×4
- at the predicted sample size the measured typical error is near a tenth for 1000 ×3
- 22 is still under a half ×1
- 23 is over it ×1
- a block is between 2 and 365 days ×1
- a few thousand draws pin ten thousand kinds to within several per cent ×1
- a group smaller than the calendar ×1
- a larger first sample lets the smoothed sum reach further ×1
- a match within a day needs 14 ×1
- a run with a solution is found among the first fifty ×1
- a seasonal swing is between nothing and the whole mean ×1
- a spike holds more than its fair share and less than everything ×1
- a tail and a cycle short enough to draw ×1
- a weekend day is thinned, not removed or boosted ×1
- an exact match needs 23 people ×1
- an uneven calendar has at most as many effective days as it has days ×1
- and its mean length is within ten per cent of √(πp/2) ×1
- and no calendar needs a bigger room than the even year ×1
- and the four cancel ×1
- and the threshold only falls ×1
- and where it misses, the calendar needs one MORE person than its effective days predict, never one fewer ×1
- at 512 strings a list, four lists nearly always succeed and two nearly never do ×1
- at t = 1 the plain estimate is within ten per cent ×1
- at t = 1.5 the spread is more than ten billion times the answer ×1
- at t = 2 the smoothed mean is within ten per cent ×1
- at t = 6 the smoothed sum falls short of the truth ×1
- at the last step the two agree modulo the factor found ×1
- averaged over two hundred samples the sum is within two per cent of the truth for t ≤ 1 ×1
- before the last step they agree modulo neither prime ×1
- between 4 and 24 slots, every one possible ×1
- c = 0 and c = −2 run far longer ×1
- c = 1 and c = 3 average √(πp/2) ×1
- Chapman's form of the estimate is nearly unbiased ×1
- doubling the sample shrinks the typical error ×1
- each merge keeps the list size near 2^(n/4) ×1
- early repeats come at the rate a random function gives ×1
- evening the two days raises the chance that nobody matches ×1
- every product was split ×1
- every solution XORs to zero ×1
- for c = 0 every tail is a vanishing share of √p ×1
- n is a product of two primes ×1
- n is a whole number below a trillion ×1
- nobody is alone at 3,064 ×1
- nobody is alone in a room of 3,064, more likely than not ×1
- one person shares with nobody ×1
- somebody shares at 23 ×1
- T(T − 1)/2 is right on average ×1
- the chance of a match only rises as the calendar grows more uneven ×1
- the curve bends downward ×1
- the curve is symmetric about the even split ×1
- the cycle length is the order of 2 modulo the odd part of the start's order, every time ×1
- the day-probabilities add to one ×1
- the effective number is far below the true count ×1
- the effective number of days places the threshold within one person ×1
- the even year's threshold is 23 ×1
- the expected number of cancelling quadruples ×1
- the expected number of loners peaks when the room is as large as the year ×1
- the first pair agrees on the low bits ×1
- the half-way point is 23 people ×1
- the highest point is the even split ×1
- the largest share at theta one is near the Golomb–Dickman constant ×1
- the last new value leads back into the cycle ×1
- the mean length is √(πn/2) divided by the spread of the number of preimages ×1
- the modulus is a prime of at most 5000 ×1
- the option is one this view reads ×1
- the pair count is k choose 2 ×1
- the pair-count estimate settles on the effective number, not the count ×1
- the plain estimate is off by more than the whole answer soon after t = 1 ×1
- the sample holds the primes asked for ×1
- the search ends with a proper factor within forty steps ×1
- the second differences are constant, so the curve is a parabola ×1
- the second pair agrees on the low bits ×1
- the simulation agrees with the exact walk ×1
- the simulation agrees with the formula ×1
- the steps grow as roughly the square root of the smaller prime ×1
- the sweep is seasonal or weekly ×1
- the sweep starts at the even year ×1
- the symmetric-polynomial count agrees with the product on an even year ×1
- the three thresholds come in this order ×1
- the threshold follows the square-root estimate to within a couple of people ×1
- the two pointers meet within tail plus cycle steps ×1
- the uneven calendar is never less likely to produce a match ×1
- the view is one of pairs, uneven, merge, sweep, effective, rho, rholength, pollard, cost, near, circle, spacing, nearscale, strong, loners, thresholds, smallyear, rhoc, tailcycle, squaring, rtoone, early, wagnertree, wagnersuccess, wagnerwork, wagnercount, estfirst, estpairs, estcapture, estuneven, wagnersolution, wagnerlevels, estcost ×1
- the walk's survival stays within ten points of the birthday curve everywhere ×1
- they meet at a multiple of the cycle length, once both are on the cycle ×1
- two different slots ×1
- two lists grow like a half power and four like a third ×1
- what it returns divides n ×1
- with only rare kinds the plain sum is within eight per cent at t = 3 ×1
Where it is called
Every figure on this list is drawn by the same rule, so a change to the rule changes all of them at once. That is why the list is published.
A collision that finds a factor
A walk through the remainders modulo a number must eventually repeat, and it repeats modulo each hidden prime factor long before it repeats modulo the number. Pollard saw that the earlier repeat can be detected without knowing the prime — and that its timing is the birthday problem, so the cost is the square root of the factor.
ProbabilityA restaurant and a shuffled deck
Each new customer sits at a table with chance proportional to the people there, or starts a new one with weight θ. That one rule gives the kinds of species in a catch and the alleles at a gene. At θ = 1 it is exactly the cycles of a shuffled deck, 62.4% of which lie in the longest, and the same shares describe the largest prime factors of a random number.
ProbabilityA 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.
ProbabilityAny unevenness brings the match sooner
Real birthdays are not spread evenly across the year, and every such departure pushes the famous twenty-three down rather than up. The proof is one move on two days at a time, and what it leaves behind is a single number — the one ecologists use to count species.
ProbabilityCounting 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.
ProbabilityFour 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.
ProbabilityFourteen 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.
ProbabilityHow long until every one turns up
Draw at random from six equally likely kinds until all six have appeared. The wait is not six draws, and it is not sixty; it is fourteen point seven, and the number is a harmonic sum wearing a hat.
ProbabilityHow many new kinds the next sample will show
Count how many kinds were seen once, twice, three times. Good and Toulmin's alternating sum f₁t − f₂t² + f₃t³ − … then predicts, with no bias at all, how many new kinds a further sample t times as large will reveal. It works perfectly up to t = 1 and is worthless just beyond: past that point the kinds seen most often are multiplied by t to a high power, and the spread of the estimate passes 10⁴⁰ by t = 1.5. Truncating the sum at a random point rescues it, and each fourfold increase in the first sample buys about half a unit more of future.
ProbabilityNobody gets their own hat
Hand back a pile of hats at random and ask for the chance that not one person gets their own. The answer barely moves as the crowd grows — it is a third and a bit at four people, and a third and a bit at four thousand.
ProbabilityTwenty-three people
A room needs 253 people before someone probably shares a birthday with you. It needs 23 before two of them probably share one with each other. The gap between those numbers is the whole problem.
ProbabilityTwo constants that do not walk at random
Pollard's factoring method trusts x² + c modulo a prime to repeat as soon as a random function would, after about √p steps. For c = 1 and c = 3 it does. For c = 0 and c = −2 it runs twelve to eighteen times longer on average, with almost no tail and enormous cycles, because those two maps are multiplication in disguise and their cycles are set by the order of 2 rather than by chance. Every other constant walks at random — including in the one respect in which x² + c is plainly not random, that it is two-to-one.