Card Tournament Seed Guide

Every reference tournament starts from one short list of numbers, the seed row. This page explains what that list means, the single rule that makes it work, how the generator turns it into a full schedule, and how new seeds are found. The table shuffling that happens afterwards is covered in the overview. All numbers and diagrams below are calculated live from the real seeds.

The short version

Seeds are Z-cyclic whist tournament starting rounds. The ideas below come from Durango Bill and JDAWiseman.

1A seed row is one round: every player sits at a table with a partner and two opponents.
2Every other round is the same round with everyone's number moved up by one.
3If the seed passes a simple "gap" check, the whole tournament is guaranteed fair.
Part 1 · What a seed is

1 What a seed row is

Take a tournament with P players (always a multiple of 4). Set one player aside as a special "anchor" called ∞ (infinity). Number the rest 0, 1, 2, … M−1, where M = P − 1.

The seed files write ∞ as the number M (the largest number in the row), so it looks like an ordinary player. In the 20-player example below, M = , so ∞ is written as .

The seed row lists all P players once. Read it four at a time: each group of four is one table, written [a, b | c, e].

  • a & b are partners (North/South),
  • c & e are partners (East/West),
  • so each player has one partner and two opponents.
20-player seed, exactly as stored in the generator:
The same numbers split into tables:
Round 0 of the 20-player tournament. Green seats are one partnership, blue seats the other.

2 The rule that makes a seed valid

Place players 0 to M−1 around a clock with M positions, and put ∞ in the middle. The gap between two players is how many steps apart they are on that clock, going the shorter way round.

So on a clock of M = , gaps run from 1 to . A seed is valid when:

AEvery gap 1… appears exactly once between partners.
BEvery gap 1… appears exactly twice between opponents.

Pairs that include ∞ have no gap and are not counted; ∞ is handled automatically because it sits in the middle and is the same distance from everyone.

Tap a row in the tally to light up the pairs with that gap.

partners (badge = gap) opponents partner of ∞
The 20-player seed on a clock of .
GapPartner pairsAs partnersOpponent pairsAs opponentsOK?

Part 2 · From seed to schedule

3 Why that rule works

To get round 1, add 1 to every number (and wrap M−1 back round to 0, like a clock). ∞ never moves. Do it again for round 2, and so on: M rounds in total ( for 20 players).

On the clock this just turns the whole picture one notch. The chords keep their length, so every pair keeps its gap.

The same is true for every gap: a gap that appears once between partners gives each of the M pairs with that gap exactly one partnership over the tournament. A gap that appears twice between opponents gives each pair exactly two meetings as opponents. Player ∞ sits in the middle and partners each of the others once, because the player opposite it walks all the way round the clock.

Rounds are numbered from 0 here to match the maths. The generator's first round is this round 0.

Step through the rounds. The gap-3 partnership is outlined in yellow.
Proof from the full schedule

The grid on the right is built by actually playing all rounds and counting. Each square is one pair of players. Above the diagonal: how many times they were partners. Below the diagonal: how many times they were opponents.

Every pair, counted over the whole tournament (players 0–18 and ∞).

4 How the generator expands a seed

The Run seeder button in the generator (its runSeeder function) does three things. Here they are for the first three rounds of the 20-player seed. Colours mark the five tables of the seed so you can follow them.

4a Step 1: add the round number

For round r, every value becomes (value + r) mod M. The generator finds ∞ as the largest number in the seed and leaves that one slot unchanged in every round (outlined in purple).

4b Step 2: switch to player numbers

Add 1 to everything so players are numbered from 1 like a printed sheet. ∞ (written M = ) becomes player P = 20.

4c Step 3: slide whole tables along, then pair up

Each row is rotated left by whole tables: shift = ((r mod tables) + 1) × 4 seats, with tables = P/4 = . Rotating by whole tables never splits a table, so nobody's partner or opponents change; only which table number they play at changes.

Finally each row is cut into pairs. Two pairs in a row make one table, which is exactly how the tournament creator reads the file:

What happens next. This raw schedule is pasted into the optimizer, which shuffles tables within each round and reorders the rounds so nobody is stuck at the same table (see overview phase 2). The optimized result is saved as seeds/cardsN.txt (for example seeds/cards20.txt), and that file is what the tournament creator loads. Shuffling tables and rounds never changes who partners or opposes whom, so the guarantees from step 3 survive.
Part 3 · Finding seeds

5a Small sizes: search until the score hits zero

For small tournaments a computer simply hunts for a valid seed. Seeds up to 100 players trace back to published cyclic solutions found this way. The method is easy to picture:

1Start random. Shuffle the numbers 0…M into a row.
2Score it. For each gap, count how far it is from "once as partners, twice as opponents" and add it all up. Zero means valid.
3Try every swap of two players at different tables and make the one that lowers the score most.
4Don't undo yourself. Players you just moved are "tabu" for a few turns. That forces the search out of dead ends, which is why the score sometimes goes up before it drops to 0. This is called tabu search.

The chart is a real search running in your browser right now. Press the button to start again from a new random row.

The search gets much harder as tournaments grow: there are far more rows to try and far more ways to be almost right. Past about 100 players it stalls, which is why the larger sizes need the shortcuts below.

score at each step best so far
Score (rule violations) at each swap of a live tabu search.

5b Shortcut 1: mirror tables

For big tournaments, instead of searching blindly we build seeds out of tables with a built-in symmetry. A mirror table seats a number and its mirror image across 0 as partners:

[ x, −x | y, −y ] (−x means M − x)

Such a table does half the work on its own:

  • Partner gaps are 2x and 2y.
  • x faces y and −x faces −y: both gap y − x.
  • x faces −y and −x faces y: both gap x + y.

So the opponent gaps automatically come in twos, which is exactly what rule B asks for. All that's left is choosing the x, y values so that every gap is used once. That is a far smaller puzzle.

5c Shortcut 2: build a big seed from a small one

When M splits as M = q × p, where p is a prime of the form 4k+1 (5, 13, 17, 37, …), a big seed can be put together in two parts:

1The small seed. The players that are multiples of p (0, p, 2p, …) plus ∞ form a mini-tournament of q+1 players. Seat them with an existing small seed, scaled up by p.
2Mirror tables for everyone else, chosen so they cover every gap that is not a multiple of p.

Why 4k+1? The players outside the small seed number q × (p−1), and mirror tables use them four at a time. So q × (p−1) must divide by 4. Since q is odd, p−1 itself must be a multiple of 4.

The table on the right takes each big seed apart: it finds the small-seed tables, divides them by p to recover the small seed, checks that small seed against the rule, and checks that all remaining tables are mirror tables.

Each square is one table of the real seed: ■ small-seed tables, ■ mirror tables.
PlayersM = q × pSmall seed recovered (÷ p)Small seed valid?Mirror tablesWhole seed valid?

5d Shortcut 3: multiply instead of add (124 players)

124 players gives M = 123 = 3 × 41. 3 isn't of the form 4k+1, so shortcut 2 doesn't apply. This seed uses a different trick, in the style of E. H. Moore's classic constructions: multiplying every number by a fixed multiplier.

Multiplying all numbers by m multiplies every gap by m. With m = 10, multiplying five times brings you back where you started: . So one "base" table spawns a family of 5 tables, and their gaps are d, 10d, 100d, … of the base gaps.

The 124 seed is built as:

  • one fixed table , which multiplying by 10 leaves unchanged, plus
  • base tables, each multiplied by 1, 10, 100, 1000, 10000 to give tables.

A computer only has to choose the 6 base tables (24 numbers) rather than all 124, a much smaller search.

One base table and the family it spawns (all values mod 123):
All 31 tables of the real 124 seed, coloured by family:
The 124-player seed: 1 fixed table and 6 families of 5.
Part 4 · Where things stand

6 Which sizes have seeds

Read live from the generator's seed list, the seeds/ folder and the size buttons in the tournament creator. Every seed row is checked against the rule as the page loads.

playable seed found, schedule file not built yet no seed yet
PlayersM = P−1How the seed was madeSeed checkSchedule fileCreator button
Why the missing sizes are hard

Try it

Expand a seed yourself, see how the tables are balanced afterwards, or load a finished tournament.

References

Sources for the seeds and constructions, and where to look for the missing sizes (104, 108, 128, 132, 140).

Best place to look for the missing sizes
  • C.J. Colbourn and J.H. Dinitz (eds.), Handbook of Combinatorial Designs, 2nd ed., Chapman & Hall/CRC, 2007, “Whist Tournaments” chapter. Summarises which cyclic whist sizes are known and cites the papers that give them.
  • C.J. Colbourn and J.H. Dinitz (eds.), The CRC Handbook of Combinatorial Designs, 1st ed., CRC Press, 1996, ch. IV.53 “Whist Tournaments” (I. Anderson). Checked: Theorem 53.8 lists the cyclic sizes known in 1996, and 104, 108, 128, 132 and 140 are not among them. Seeds are printed only up to 48 players.
Cyclic whist papers
  • I. Anderson, “A hundred years of whist tournaments”, JCMCC 19 (1995), 129–150. Link. Survey; lists cyclic seeds up to 40 players and the primes known in 1995 (7, 11, 19, 23, 31, 43, 47, 59).
  • I. Anderson and N.J. Finizio, “Mann’s lemma and Z-cyclic whist tournaments”, Ars Combinatoria 37 (1994), 141–148. Link. Builds q·pn+1 sizes from smaller seeds; does not cover prime M.
  • I. Anderson and N.J. Finizio, “Cyclic whist tournaments”, Discrete Mathematics 125 (1994), 5–10. doi:10.1016/0012-365X(94)90138-4
  • N.J. Finizio and P.A. Leonard, “Inductive extensions of some Z-cyclic whist tournaments”, Discrete Mathematics 197–198 (1999), 299–307. doi:10.1016/S0012-365X(99)90077-8
  • N.J. Finizio and A.J. Merritt, “Some new Z-cyclic whist tournaments”, Discrete Applied Mathematics 101 (2000), 115–130. doi:10.1016/S0166-218X(99)00186-9
  • P.A. Leonard, “Some new Z-cyclic whist tournaments”, Utilitas Mathematica (listed as “to appear” in the 1996 Handbook). May add new prime sizes.
  • G. Ge and A.C.H. Ling, “A new construction for Z-cyclic whist tournaments”, Discrete Applied Mathematics 131 (2003), 643–650. doi:10.1016/S0166-218X(03)00381-0
Background and history
  • E.H. Moore, “Tactical memoranda I–III”, American Journal of Mathematics 18 (1896), 264–303. The 3p+1 construction used for 124 players.
  • R.D. Baker, “Whist tournaments”, Congressus Numerantium 14 (1975), 89–100. With Wilson and Hanani, proves whist tournaments exist for every size, using recursive (not cyclic) constructions.
  • R.M. Wilson, “An existence theory for pairwise balanced designs III”, Journal of Combinatorial Theory A 18 (1975), 71–79.
  • I. Anderson, Combinatorial Designs and Tournaments, Oxford University Press, 1997. Book-length treatment; similar ground to the 1995 survey.
  • Durango Bill’s cyclic solutions, the source of many of the generator’s seed rows.