Computation

Every pair once, at every table

Eight players are to meet in pairs, four pairs a round at four of seven tables, so that every two players are partners exactly once and every player visits every table exactly once. The schedule is a square of seven rows and seven columns with a pair in some cells and nothing in the others, and it exists. With six players it does not, and with four it does not — and from eight players on it always does. The square is two ways of splitting the same pairs into rounds that cut across each other, and the arithmetic of remainders builds it in one line.
19 min read 6 figures Decided by exhaustionSmall cases lie

Worth reading first: The thirty-six officers · A schedule where every pair meets once.

Eight players are to be scheduled in rounds. In each round they split into four pairs, and each pair sits at a table. Over the course of the event every two players must be partners exactly once — 28 pairs in all — and every player must sit at every table exactly once. With seven rounds and seven tables, each round uses four tables and leaves three idle, and the whole schedule fits in a square of seven rows and seven columns, 28 of whose cells hold a pair and 21 of which are empty.

That square is called a Room square, after Thomas Room, who described it in 1955 and noted that it could be built for eight players but not for four or six. The question it raised — for which numbers of players does such a schedule exist? — took twenty years to settle, and the answer has the shape that combinatorial existence questions often have: small cases fail for reasons that are not a pattern, and everything beyond them works. A Room square of side nn exists for every odd nn except 3 and 5.

The square sits in the same family as Euler’s thirty-six officers: an arrangement in a grid with a condition on every row and every column, where the smallest interesting cases are the ones that fail. But a Room square is not a Latin square. Its cells hold pairs rather than single symbols, some cells are empty, and the condition that every pair appears once is a condition on the whole square rather than on its lines. What it shares with Latin squares, and especially with orthogonal pairs of them, is that it is two partitions of one set laid across each other so that they meet as little as possible.

Seven rounds, seven tables, twenty-eight pairs

A Room square of side seven. n=7 from strong starter {1, 3} {2, 6} {4, 5}; 28 pairs, 21 empty cells
Fig. 1 A Room square of side 7: symbols 0 to 6 and ∞, each of the 28 pairs in one cell, each symbol once in every row and every column. Built from the strong starter {1, 3}, {2, 6}, {4, 5} mod 7.

Call the players 0,1,…,60, 1, \ldots, 6 and ∞\infty. The figure’s square has a pair in 28 cells. Read across a row — a round — and every symbol appears exactly once, in four pairs. Read down a column — a table — and every symbol appears exactly once too: over the seven rounds, four pairs sit at that table, and between them they are all eight players. And no pair appears twice, so all 28 pairs of eight players appear exactly once.

The definition has a simple count behind it. A row holds every one of n+1n + 1 symbols once, in pairs, so it holds (n+1)/2(n + 1)/2 pairs and nn must be odd. There are nn rows, so the square holds n(n+1)/2n(n + 1)/2 pairs, which is exactly the number of pairs of n+1n + 1 symbols — so the condition that every pair appear once is the same as the condition that none appear twice. A square of side nn therefore leaves n2−n(n+1)/2=n(n−1)/2n^2 - n(n+1)/2 = n(n-1)/2 cells empty: 21 of 49 at side 7.

The figure’s square was not found by trial. It comes from three pairs, {1,3}\{1, 3\}, {2,6}\{2, 6\} and {4,5}\{4, 5\}, read in the arithmetic of remainders modulo 7. Row ii holds those three pairs with ii added to every entry, together with {∞,i}\{\infty, i\}; and the shifted pair from {x,y}\{x, y\} goes in column i+x+yi + x + y, while {∞,i}\{\infty, i\} goes on the diagonal. The whole square is the cyclic shift of one row, placed by a rule that uses the pair’s sum. Why that rule works is the subject of a later section; the figure’s square is checked cell by cell against the definition.

Two ways to split twenty-eight pairs

A round and a table as two perfect matchings. row 0, column 4: shared 1
Fig. 2 The eight symbols as points, with round 1’s four pairs and table 5’s four pairs. Each is a perfect matching, and a round and a table share exactly the pair in their common cell.

Draw the eight symbols as points. A round’s four pairs are four edges joining all eight points with none shared — a perfect matching. The seven rounds use every one of the 28 possible edges exactly once, so they split the complete graph on eight points into seven perfect matchings, a structure called a one-factorisation. The seven tables do exactly the same: each table’s four pairs are a perfect matching, and the tables together use every edge once. A Room square is two one-factorisations of the same complete graph.

They are not arbitrary. A round and a table share the pair in their common cell, if there is one, and nothing else — because a pair is in exactly one cell, and that cell is in exactly one row and one column. Two one-factorisations with this property, each matching of one meeting each matching of the other in at most one edge, are called orthogonal, and a Room square of side nn is precisely a pair of orthogonal one-factorisations of the complete graph on n+1n + 1 points. The figure draws one round and one table of the side-7 square; they share the edge between 1 and 3 and nothing else.

One-factorisations exist for every complete graph with an even number of points: the standard one fixes one point, arranges the others round a circle, and in round ii pairs the fixed point with ii and every other point with its mirror image across the line through ii. That is the schedule every round-robin sports league uses, and its rounds are the colour classes of an edge colouring with one colour more than the busiest point — except that for a complete graph on an even number of points, no extra colour is needed. A Room square asks for two such schedules at once, cut across each other, and that is where the difficulty enters.

The comparison with Latin squares is exact. In an orthogonal pair of Latin squares the cells holding one symbol of the first square and the cells holding one symbol of the second always meet in exactly one cell — two partitions of a grid laid across each other; a Room square is two ways of partitioning the edges of a complete graph into matchings so that the classes meet in at most one edge. Both are about orthogonal partitions, both fail at small sizes, and in both the failures are found by search rather than by a pattern.

Six players, searched to the end

Side five: thirteen pairs and no further. n=5: 117 nodes, deepest 13/15, none; n=3 deepest 3/6
Fig. 3 Side 5 searched exhaustively, rows fixed and every column tried for every pair: the furthest any attempt gets is 13 of the 15 pairs, with the last two blocked in every free cell of their row.

With six players there would be five rounds and five tables, fifteen pairs, and ten empty cells. The search for such a square is small. Every one-factorisation of the complete graph on six points is a relabelling of every other — there is only one up to renaming the points — so the rows can be fixed as the standard one without losing anything. What remains is to place each of the fifteen pairs in a column of its row, so that every column is a perfect matching.

The figure records the search. Each pair is tried in every column not already used in its row and not already holding one of its two symbols; columns are opened in order, so that two squares differing only by a relabelling of the tables are not both tried. The whole search visits 117 partial squares and completes none. The furthest any attempt gets is the one drawn, with 13 of the 15 pairs placed; the remaining two pairs, both in the last row, find every free cell of that row in a column that already holds one of their symbols. No side-5 square exists. Side 3 is quicker still: with four players and three tables, the search places 3 of the 6 pairs and stops.

Thomas Room’s original note reached the same conclusions by hand. The search here adds only the certainty of having checked everything, and the measurement of how close side 5 comes. It is not close in any sense that matters, since a square is either complete or not, but thirteen of fifteen is a reminder that the obstruction is not a counting argument. Nothing about the numbers 6 and 15 forbids the square; the failure is in how the pairs of six points happen to intersect.

How many ways side seven completes

Every completion of the three smallest sides. n3: 0 of 4 nodes, deep 3; n5: 0 of 117 nodes, deep 13; n7: 2 of 76322 nodes, deep 28
Fig. 4 The whole search for the three smallest odd sides, columns counted up to relabelling: side 3 and side 5 complete nowhere, and side 7’s rows admit exactly 2 column factorisations, found among 76,322 partial squares.

At side 7 the same search succeeds, and run to the end it counts. With the rows fixed as the standard one-factorisation of eight points and the tables counted up to relabelling, the search visits 76,322 partial squares and finds exactly two complete ones. There are, in other words, exactly two ways of grouping the 28 pairs of eight players into seven tables, each table a perfect matching, so that every table meets every round of the standard schedule in at most one pair.

The figure lays the three searches side by side. Side 3 has six pairs and dies after three. Side 5 has fifteen and dies after thirteen. Side 7 has twenty-eight and completes, twice. The jump from impossible to possible is sudden, and there is no intermediate size at which the square nearly exists: between 5 and 7 there is no odd number.

Counting completions for a different fixed set of rounds would give a different answer, since side 7 has more than one one-factorisation of eight points up to relabelling, and a full census of Room squares of side 7 up to every symmetry is a larger computation than the one drawn. What the figure establishes is narrower and exact: the standard round-robin schedule of eight players has precisely two orthogonal partners. A league organiser starting from it has two choices of table assignment and no others.

A row and a rule: strong starters

Strong starters for every odd side to twenty-one. 3:0 5:0 7:2 9:0 11:4 13:8 15:32 17:224 19:800 21:6660
Fig. 5 Strong starters mod n for every odd n to 21: none for 3, 5 and 9, then 4, 8, 32, 224, 800 and 6,660. Each one gives a Room square of side n, and every one found was checked.

The side-7 square at the top was built from three pairs, and the construction generalises. In the remainders modulo nn, a starter is a set of (n−1)/2(n - 1)/2 pairs that between them contain every non-zero remainder exactly once and whose differences, ±(y−x)\pm(y - x) for each pair {x,y}\{x, y\}, are also every non-zero remainder exactly once. For n=7n = 7 the pairs {1,3}\{1, 3\}, {2,6}\{2, 6\}, {4,5}\{4, 5\} have differences ±2\pm 2, ±4≡∓3\pm 4 \equiv \mp 3, and ±1\pm 1: every non-zero remainder once. A starter is strong if, in addition, the sums x+yx + y of its pairs are all different and none is zero; here they are 4, 1 and 2.

Ronald Mullin and Ernst Nemeth showed in 1969 that a strong starter always gives a Room square. The rows are the starter shifted by each ii — every row then holds every symbol, since the starter covers the non-zero remainders and {∞,i}\{\infty, i\} covers the rest — and putting the shifted pair in column ii plus its sum makes every column a perfect matching too: the pairs landing in column cc are {c−y,c−x}\{c - y, c - x\}, one for each starter pair, which again cover every remainder but cc, and {∞,c}\{\infty, c\} on the diagonal supplies the last. The condition on the differences is what makes every pair of symbols appear exactly once. The construction uses each of the three conditions for one of the three requirements.

The figure counts strong starters by exhaustive search for every odd nn up to 21, and checks that every one it finds gives a valid square. There are none modulo 3, 5 and 9. From 11 on there are 4, 8, 32, 224, 800 and then 6,660, growing quickly — so the construction is easy almost everywhere and fails at three small sides. The failures at 3 and 5 are expected, since no square exists there at all. The failure at 9 is a failure of the method, not of the square.

Why differences give every pair exactly once

The condition on differences is the heart of the starter, and it is worth seeing why it delivers exactly the right pairs. A pair of remainders {a,b}\{a, b\} has a difference ±(b−a)\pm(b - a), and shifting both by the same ii leaves the difference unchanged. So the seven shifts of the starter pair {1,3}\{1, 3\} are seven pairs that all have difference ±2\pm 2 — and there are exactly seven pairs of remainders modulo 7 with that difference, namely {0,2},{1,3},…,{6,1}\{0, 2\}, \{1, 3\}, \ldots, \{6, 1\}. The shifts of {1,3}\{1, 3\} are all of them, each once. The same is true of {2,6}\{2, 6\} and difference ±3\pm 3, and of {4,5}\{4, 5\} and difference ±1\pm 1. Since every non-zero remainder is ±1\pm 1, ±2\pm 2 or ±3\pm 3, every pair of remainders has one of the three differences, and so every pair appears exactly once among the shifted starter pairs. The pairs involving ∞\infty are the seven {∞,i}\{\infty, i\} on the diagonal.

This is the same idea as the cyclic constructions elsewhere in combinatorics: a single base block whose internal differences cover a group exactly once generates, by shifting, a design in which everything happens exactly once. Dots that never repeat a step are rulers whose differences are all distinct, and the toroidal queens are placed by a linear rule whose differences avoid every collision on a wrapped board; a starter is the same device with pairs in place of points. What the strong condition adds is a second difference-like constraint, on sums rather than differences, and it is that second constraint which makes the columns work. Two conditions on one small object, each controlling one direction of the square, is the shape of every cyclic orthogonality construction — and orthogonal squares read as a code are another instance, where the two directions are two coordinates of every codeword.

The price of the device is that it can fail for arithmetic reasons that have nothing to do with the square. Modulo 9 the exhaustive search simply finds no set of four pairs meeting all three conditions, and the search is the whole of the argument: it says that the arithmetic of nine defeats the device, not why, and no short reason is known that would predict the failure in advance. The square of side 9 exists, but not in the form the cyclic rule can produce.

Side nine, without a starter

A Room square of side nine, found by search. n=9 by search, 6817896 nodes
Fig. 6 A Room square of side 9, found by searching for columns to fit the standard rows. The pairs containing ∞ are shaded; with no strong starter mod 9 they cannot be placed by the cyclic rule.

No strong starter exists modulo 9, so the cyclic construction cannot produce a square of side 9. The square exists anyway. The figure finds one by the same search that settled side 5: fix the standard one-factorisation of ten points as the rounds, and look for tables. The search passes through some 6.8 million partial squares before the first completion — far more than side 7 needed, which is a measure of how much rarer completions become as the square grows, even as the number of them grows faster.

The square found has none of the regularity of the cyclic one. The pairs containing ∞\infty sit where the search happened to put them, not down a diagonal, and no shift of the rows carries the square to itself. The general existence proof deals with sides like 9 in exactly this spirit: strong starters, and several variants of them over other groups, construct squares for most sides, and a small number of exceptional sides are handled by direct constructions or by computer, just as the officers’ problem’s solution for every order but 2 and 6 handled its stubborn cases separately — a pattern the mates of Latin squares show again from the other side.

Ronald Mullin and Walter Wallis completed the proof in 1975, after more than a decade of partial results: a Room square of side nn exists if and only if nn is odd and n≠3,5n \ne 3, 5. The existence half is constructive throughout, so for any odd side a square can actually be produced; the non-existence half is the two small searches.

What a square of pairs cannot capture

The schedule a Room square describes has more structure than the square shows. A real tournament cares about who plays against whom, not only who partners whom, and about balancing which pairs sit at which table in which order; Room squares are the starting point for bridge “movements” of that richer kind, and the extra conditions turn the existence question into a different and harder one. The figures say nothing about those conditions, and a Room square chosen at random may be a poor movement.

The searches also prove less than they appear to. The side-5 search proves non-existence because every one-factorisation of six points is equivalent to the standard one; that fact was used, not checked, and a search over all rows as well as all columns would be needed to establish it from scratch. At side 7 the count of two completions is for one fixed set of rounds, and the number of essentially different Room squares of side 7 is not what the figure counts. And the census of strong starters stops at 21: it shows the counts growing, it does not show that they keep growing, and it says nothing about nn beyond the range searched.

Finally, the pictures are of particular squares. The existence theorem is about every odd side, and its proof is a patchwork of constructions — starters over different groups, products of smaller squares, direct searches — that no single figure shows. What the figures can show is why the small cases are what they are, and why the general method needs help at 9.

Still open: starters for every side beyond nine

The existence of Room squares is settled; the existence of the neat way to build them is not. It has been conjectured that the remainders modulo nn have a strong starter for every odd nn greater than 9 — the census in the figure is consistent with that up to 21, and computer searches have gone much further — but there is no proof. Strong starters are known to exist for many infinite families, including many primes, where the multiplicative structure of the field gives explicit constructions; for composite nn the question is open in general, and the related question for other groups of odd order, where the analogous exceptions are believed to be exactly the groups of orders 3, 5 and 9, is open too.

The counts themselves are unexplained. How fast the number of strong starters modulo nn grows — whether like a factorial, like an exponential, or somewhere between — is not known, and nor is the number of Room squares of each side up to symmetry beyond small cases. These are the same kind of question as how many Latin squares there are, where exact counts are known only to order eleven and the asymptotic count only to leading order: existence is settled and enumeration is not.

There is a family resemblance, too, with designs that schedule every pair to meet once and with sequences in which every window is a different pair, like a cycle for every pair: in each, a divisibility condition is necessary, small cases fail, and the general existence proof is a construction assembled from pieces. Whether the pieces could be replaced by one argument is, in all three, unknown.

Two schedules that cut across each other

A Room square of side nn puts every pair of n+1n + 1 symbols in one cell of an n×nn \times n array so that every symbol appears once in every row and every column — two orthogonal one-factorisations of the complete graph on n+1n + 1 points, a round-robin schedule of partners and a schedule of tables — and it exists for every odd nn except 3 and 5. Side 7 is built in one line from the strong starter {1,3},{2,6},{4,5}\{1, 3\}, \{2, 6\}, \{4, 5\} modulo 7, whose differences cover every non-zero remainder once and whose sums are distinct; and the standard schedule of eight players has exactly two orthogonal table assignments, found among 76,322 partial squares. Side 5 is searched to the end in 117 partial squares and never places more than 13 of its 15 pairs. Strong starters exist for every odd side checked to 21 except 3, 5 and 9; side 9 has a square anyway, found here by search through 6.8 million partial squares, which is how the general proof treats its exceptions.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Exhaustive searchLatin squareModular arithmeticOrthogonal latin squaresPerfect matchingRound-robin