Artificial Wasteland, a layer of the ground

Every Pair, Once

combinatorics  ·  fifteen schoolgirls, five rows of three, seven mornings; no two girls walk together twice, no arrangement is wasted, and the reason is a space you can XOR

Fifteen schoolgirls, five rows of three, seven mornings. Arrange them so that no two ever walk together twice. Kirkman asked in 1850 whether it can be done. It can, and the reason is not luck. It is PG(3,2), the finite projective space over the two-element field, which knows the answer before the girls line up.

The problem, as it was posed

In 1850, T. P. Kirkman published a query in the Lady's and Gentleman's Diary. Fifteen young ladies of a school walk out three abreast for seven days in succession; it is required to arrange them daily so that no two shall walk twice abreast. The count you would run first is encouraging: each morning has five rows of three; each girl walks with two others; over seven days, she meets fourteen partners, one for each of the other fourteen girls. The books close. But books that close do not always keep, and Kirkman knew this, because he had already shown it in a related setting three years earlier. The question is whether an arrangement exists at all.

It does. Below, the schedule is not looked up in a table; it is rediscovered in your browser, from nothing, by a backtracking search over the 35 triples every version of it must draw from. When the search finishes, every one of the 105 pairs of girls is used on exactly one day, no more, no less. The counting bound is not merely satisfied. It is saturated. That saturation is the beautiful part, and the reason the whole thing was named a resolvable Steiner system: the resolution wastes nothing.

Instrument I  ·  the seven-day calendar, computed live
Which day do walk together? seed
every day: 5 disjoint triples
every pair: exactly one meeting

The 15 × 15 grid is the meeting record. Cell (row i, column j) is painted with the day on which girls i and j walk together. The seven bands of colour are what saturation looks like: no cell shares a colour with the diagonal, no cell is empty. Type any pair (say AB) and the page finds the exact day and triple. Change the seed and the search finds a different valid resolution. Cole proved in 1922 that there are exactly seven non-isomorphic Kirkman triple systems on fifteen points; the seeded search on this page walks through many labelled resolutions, each of them one of those seven up to a relabelling of the girls.

Why saturation is possible at all

The counting bound reads: C(15, 2) = 105 pairs to cover; each row of three covers three pairs; a day of five rows covers fifteen; seven days cover 7 × 15 = 105. If every pair is to be met at least once, and there are exactly 105 pair-coverings to spend, then every pair must be met exactly once. There is no slack. A single collision (two girls walking together on two days) would leave some other pair with no day of their own; a single unused triple would leave a girl with a missing partner. The problem admits either a perfect answer, or none. Kirkman showed the perfect answer exists.

It exists for a structural reason, and the structure is a finite space.

The same object, seen a second way

Label the fifteen girls not by letters A through O but by the fifteen nonzero four-bit strings: 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111. There is a natural operation on these strings, addition mod 2 bit by bit, which is the same as taking the exclusive-or (XOR). Now define a line as any three of these strings that XOR to 0000. There are exactly 35 such triples, and they are exactly Kirkman's rows.

This is PG(3,2), the projective space of dimension 3 over the two-element field F2. Its points are the 15 nonzero vectors of F24; its lines are the 2-flats through the origin (each containing three nonzero vectors that sum to zero); its planes are the 3-flats, seven-point Fano planes sitting inside it; and its whole four-dimensional linear ambient (the origin plus the 15 points) is the 16 corners of a hypercube. Every fact you can prove about the schoolgirls follows from this labelling. Every count you would want to run reads off the vector space.

Instrument II  ·  the XOR test: pick any three, see if they are a line

Try it. Any three girls whose bit-labels XOR to zero are a line. Any three whose XOR is not zero cannot be a line, and there is a payoff for picking those too: they generate a Fano plane, the smallest projective plane, seven points and seven lines, sitting inside PG(3,2) like a page in a book. There are 15 such Fano planes in all (a Gaussian binomial coefficient, [4;3]2 = 15), and the fifteen of them are counted in the same integer as the fifteen girls themselves. That is not a coincidence; it is PG(3,2)'s self-duality.

The two names of one thing

The seven days below are printed twice: once as Kirkman wrote them, girls A through O grouped three at a time; once as vectors of F24, each row a linear relation with zero on the right. It is the same object, twice.

Instrument III  ·  Day 1, in both languages

The younger sibling: nine girls, four days

Before there were fifteen there were nine. Arrange nine schoolgirls in three groups of three for four days so that no two walk together twice. This is the same shape at half scale, and it also fits perfectly: C(9,2) = 36 pairs to cover, each day covering nine, four days covering thirty-six. And the space that houses it is different: AG(2,3), the affine plane of order 3, whose points are the 9 cells of a 3 × 3 board and whose 12 lines come in four parallel classes: the three rows, the three columns, the three slope-1 diagonals, and the three slope-2 diagonals. The four parallel classes are the four days.

Instrument IV  ·  nine schoolgirls, four days, as the four ways to slice a 3 × 3 board

The fifteen-girl case is not the smaller board's older sister with more cells. It is a different geometry, a projective one; the sibling above is affine. But both share the property that made Kirkman's original count close: the block size, the number of blocks per day, and the number of days are pinned by exactly the arithmetic you would first run, and the arithmetic is exact. There is nowhere for slack to hide.

Where it becomes hard, and stays hard

Kirkman's own generalisation asked: for what v can you resolve v girls into triples over (v − 1)/2 days so that no pair walks twice? The counting bound requires v ≡ 3 (mod 6) (three has to divide v for the rows; two has to divide v − 1 for the days). Ray-Chaudhuri and Wilson proved in 1971 that this necessary condition is also sufficient: every v of the form 3, 9, 15, 21, 27, 33, … admits a resolution. The result closed a problem Kirkman had opened 121 years earlier, and the proof used the sibling AG(2,3), among other constructions, as a building block.

Change the group size and the answer stops being known. The social golfer problem is Kirkman's puzzle with groups of four instead of three: 32 golfers, 8 foursomes per week, and one honest question. How many weeks can they play with no pair sharing a foursome twice? The counting bound gives ten. Nine weeks have been achieved by explicit construction. Whether ten is possible has been an open problem since the puzzle spread across the operations-research community in the 1990s, and to this day nobody knows. The version this page draws lives at the sharp edge of what is settled. Its immediate neighbour lives on the other side.

How this page is checked

Every load-bearing number above is a return value of the same math file the offline verifier calls: research/every-pair-once/verify.mjs runs 29 assertions against public/strata/every-pair-once/engine/kirkman.mjs, and this page imports exactly the same module. If either drifts, the verifier fails. The seven-day calendar is not written down in the HTML; it is rediscovered on load by an exact-cover search whose termination itself demonstrates that a resolution exists. Every pair, once. Every claim, checkable.

Related, on the ground