Skip to content

← Math Further 9–12

How Do You Schedule a League So Everyone Plays Everyone?

Topic 28 · Grades 9–12 · Round robins and coloring

What this builds on from class
In this unit 9 sections
  1. Try it: small leagues
  2. The trap
  3. What’s going on: coloring the lines
  4. The circle method
  5. A twist: home and away
  6. A story from maths
  7. Where this is used
  8. Questions
  9. Where to go next

Ten schools have entered the municipality’s football cup, and Sushma Miss, the sports teacher who agreed to organize it, has a problem on her desk. The rules say every school plays every other school once. The ground is free on Saturdays, it has room for five matches a day, and the exams start in nine Saturdays’ time. On a Saturday each school can play only one match: nobody’s players can run two games in a morning.

So she needs a timetable: a list for each Saturday of which school plays which, so that by the ninth Saturday every pair has met exactly once. She starts writing pairs on a sheet, Saturday by Saturday, taking any match whose two schools are still free. By Saturday 6 something has gone wrong.

Guess first. Ten teams, every pair plays once, nobody plays twice on the same Saturday. What is the fewest Saturdays that can do it?

Pick an answer to see why.

Try it with a smaller league first. Six teams, five Saturdays: tap two teams to make them play, and press Next round when a Saturday is done.

Try it

Make the timetable

Each thick line is a match on this round’s Saturday; the dashed lines are the matches still to play. Start with 6 teams. Can you finish in 5 rounds? Then try 8 and 10, and try Fill at random a few times.

123456dashed: still to playthick: this round
Teams:
Round
1
Matches played
0 of 15
Fewest rounds possible
5

Tap a team, then another: they play each other in this round. When the round is done, press Next round.

Three rounds are played. The dashed lines are the six matches left. Can you finish in two more rounds?

Now tap the team that Team 1 plays.

A team can’t play itself. Tap two different teams.

Team 1 already plays in this round. Pick a team without a thick line.

Teams 1 and 2 already played each other, in round 1.

Round 1: 0 matches so far.

Round 1 is full: every team plays. Press Next round.

No match left fits in round 1. Teams must sit out. Press Next round.

Round 1 begins. 15 matches still to play.

All 15 matches, in 0 rounds. The fewest possible is 5: can you find a timetable that needs only 5?

All 15 matches in 0 rounds: the fewest possible. Every team played in every round.

All 15 matches, in 0 rounds. After these first three rounds, nobody could finish in 5: the two triangles need 3 more rounds.

Try it: small leagues

Start with the number of matches. With 6 teams, team 1 has 5 opponents, team 2 has 4 more (it has already been counted against team 1), team 3 has 3 more, and so on:

5+4+3+2+1=15 matches. 5 + 4 + 3 + 2 + 1 = 15 \text{ matches.}

That is an arithmetic series, so Grade 10’s formula for its sum works: with n teams there are 1+2+⋯+(n−1)=n(n−1)2 1 + 2 + \cdots + (n - 1) = \frac{n(n-1)}{2} matches. It is the same count as the handshakes at a party: each team has n − 1 opponents, and n(n − 1) counts every match twice, once from each side.

Teams Matches Matches in a full round Fewest rounds
4 6 2 3
6 15 3 5
8 28 4 7
10 45 5 9
20 190 10 19

The last column comes from one team’s point of view. Team 1 has n − 1 opponents and meets at most one a round, so no timetable can be shorter than n − 1 rounds. And n − 1 rounds is exactly enough room: n − 1 rounds of n2 \frac{n}{2} matches hold n(n−1)2 \frac{n(n-1)}{2} , every match. So a perfect timetable has no spare room at all: every team plays in every round.

A league of 12 teams wants every pair to play once, everyone playing in every round. How many matches, and how many rounds at least?

Pick an answer to see why.

An odd number of teams

With 5 teams, somebody is always left over: a round has room for only 2 matches, with one team resting. There are 5×42=10 \frac{5 \times 4}{2} = 10 matches, and 10 ÷ 2 = 5, so 5 rounds at least, one more than the 4 opponents each team has. Every team gets exactly one rest. The same holds for any odd number: n teams need at least n rounds, because a round holds at most n−12 \frac{n - 1}{2} matches.

There is an old trick for this. Invent an extra team, a ghost, and make a timetable for n + 1 teams. Whoever is drawn against the ghost in a round rests (a bye, in sports words). So the odd case is the even case with one team that never turns up, and from here on we can think about an even number of teams.

The trap

Here is how Sushma Miss’s sheet goes wrong, made small. Six teams. The first three rounds look perfectly sensible:

Round 1 Round 2 Round 3
1–4, 2–5, 3–6 1–5, 2–6, 3–4 1–6, 2–4, 3–5

No team plays twice in a round, no pair plays twice. Two rounds left. Try to finish.

Try it

The trap

These three rounds are already played. The dashed lines are the six matches left. Make round 4.

123456dashed: still to playthick: this round
Round
4
Matches played
9 of 15
Fewest rounds possible
5

Tap a team, then another: they play each other in this round. When the round is done, press Next round.

Three rounds are played. The dashed lines are the six matches left. Can you finish in two more rounds?

Now tap the team that Team 1 plays.

A team can’t play itself. Tap two different teams.

Team 1 already plays in this round. Pick a team without a thick line.

Teams 1 and 2 already played each other, in round 1.

Round 4: 0 matches so far.

Round 4 is full: every team plays. Press Next round.

No match left fits in round 4. Teams must sit out. Press Next round.

Round 4 begins. 6 matches still to play.

All 15 matches, in 3 rounds. The fewest possible is 5: can you find a timetable that needs only 5?

All 15 matches in 3 rounds: the fewest possible. Every team played in every round.

All 15 matches, in 3 rounds. After these first three rounds, nobody could finish in 5: the two triangles need 3 more rounds.

Hint
Answer

Nothing in the first three rounds broke a rule. But they used up every match between {1, 2, 3} and {4, 5, 6}, leaving only matches inside the groups, which can never fill a round. A good timetable plans the end from the start.

How easy is it to fall in? There are 480 ways to choose rounds 1, 2 and 3 for six teams, in that order, each a full round and no pair twice. Our script tried them all: 120, one in four, end in this trap. It then filled whole timetables the way a hurried person would, as the Fill at random button does, a round at a time: go through the matches still to play in a random order, put each in this round if both teams are still free, and start the next round when nothing more fits. Out of 100,000 tries each:

Teams Fewest rounds Random filling gets the fewest Usually needs
4 3 100% 3
6 5 26.7% 6
8 7 10.2% 8
10 9 1.4% 11

So for ten teams, filling in pairs as they come almost never fits nine Saturdays.

Why can four teams never fall into the trap?

Pick an answer to see why.

What’s going on: coloring the lines

Draw each team as a dot and each match as a line between two dots. With every pair joined, the picture is called the complete graph on n dots, written Kn K_n . (A graph here is any set of dots and lines, the same idea as the bridges of Königsberg.)

Now give each round a color, and paint each line in the color of the round it is played in. The rule “no team plays twice in a round” becomes:

the lines meeting at any dot all have different colors.

That is called an edge coloring of the graph (mathematicians call the lines edges and the dots vertices). A set of lines with no dot in common, one round, is called a matching, and a matching that touches every dot, a round where everyone plays, is a perfect matching. The fewest colors that can paint a graph this way is its chromatic index.

So the puzzle, in these words: what is the chromatic index of Kn K_n ? We have already shown it is at least n − 1 for even n (one dot has n − 1 lines, all different colors) and at least n for odd n. The trap shows that a careless coloring can need more. What we need is a coloring that always works.

The circle method

Here is a timetable that never gets stuck. For ten teams, put teams 1 to 9 at the corners of a regular nine-sided shape and team 10 in the middle.

  • In round 1, team 1 plays the middle team, 10.
  • Every other team plays its mirror image in the line through team 1 and the middle: 2 plays 9, 3 plays 8, 4 plays 7, 5 plays 6. Their lines are all parallel.
  • In round 2, turn the mirror line on to team 2, and so on.

Try it

Turn the circle

Step through the rounds. The red dashed line is the mirror; the thick lines are this round’s matches, and earlier rounds stay faint. Try 6 and 8 teams, then an odd number.

10123456789
Teams:
Round 1 of 9
Pairs that have met
5 of 45

Round 1: 1–10, 2–9, 3–8, 4–7, 5–6

After 9 rounds the faint lines join every pair, each exactly once. Why does it always work?

Why every pair meets exactly once

Take any two corner teams, say 2 and 7. Going round the shape from 2 to 7 one way takes 5 steps (2, 3, 4, 5, 6, 7); the other way takes 4 (7, 8, 9, 1, 2). The two ways add up to 9, an odd number, so exactly one of them is even. Halfway along the even way, 2 steps from each, is a corner: 9. The mirror line through 9 and the middle swaps 2 and 7, since they are the same number of steps from 9, one each way. That is the only line that swaps them (it must cross the line from 2 to 7 at right angles, through its midpoint), and halfway along the odd way is the middle of a side, not a corner. So in round 9, 2 plays 7, and in no other round. The same works for any two corners.

And each round is a full round: the mirror turns the shape onto itself, so it pairs every corner with another corner; the corner on the line plays the middle, and no other corner lies on the line: its far end is 4½ steps round from its corner either way, the middle of a side. Every corner team plays the middle once, in its own round. That is all 45 matches, in 9 rounds of 5.

The same argument works for any even number of teams: n − 1 is odd, so there is always an odd number of corners. So:

For an even number of teams n, a round robin needs exactly n − 1 rounds; for an odd number, exactly n rounds (use the circle method with the ghost in the middle: the team on the mirror line rests). In the language of graphs, Kn K_n has chromatic index n − 1 when n is even and n when n is odd, and splitting its lines into perfect matchings is called a one-factorization.

The same thing in numbers

Number the corners 1 to 9 round the shape. A corner and its mirror image are the same number of steps from the mirror’s corner r, one each way: r + k and r − k. Their sum is 2r. Going round past 9 wraps back to 1, so the sums are counted by their remainders on dividing by 9 (as in the egg basket puzzle):

teams i and j meet in round r when i+j and 2r leave the same remainder on division by 9. \text{teams } i \text{ and } j \text{ meet in round } r \text{ when } i + j \text{ and } 2r \text{ leave the same remainder on division by } 9.

And in round r, team r itself plays team 10, in the middle.

So you can find any match’s round without drawing anything. When do 2 and 7 meet? 2 + 7 = 9, remainder 0, and 2r = 18 leaves 0 when r = 9: round 9. Since 2 and 9 share no factor, exactly one r from 1 to 9 works for each pair: that is the picture’s “exactly one corner” in numbers.

Chess organizers have used this timetable for well over a century. Their printed versions are called Berger tables, after the Austrian chess master Johann Berger, who published them crediting Richard Schurig’s tables of 1886.

In the circle method for 8 teams (1 to 7 round the shape, 8 in the middle), who plays team 3 in round 1?

Pick an answer to see why.

A twist: home and away

Real leagues add a rule the circle can’t see. One team of each pair plays at home. Leagues try to avoid two home games in a row, or two away games, for fairness: a long run of either helps or hurts a team. Two such rounds in a row are called a break. The Premier League’s fixture list, for example, aims for “a team will never have more than two home or away matches in a row”.

Can a round robin have no breaks at all? Each team would then alternate: HAHAH… or AHAHA…. Try it with 6 teams in your head before reading on.

Here is the argument that it can’t, for any league with an even number of teams, everyone playing every round. Suppose two teams both follow HAHAH…. They are at home in exactly the same rounds, including the round in which they play each other, and one of them must be away then. So at most one team can follow HAHAH…, and likewise at most one AHAHA…. Every other team has at least one break, so

breaks≥n−2. \text{breaks} \ge n - 2.

The circle method meets this bound, if home and away are chosen well. The middle team is away in odd rounds and at home in even ones. In each mirror pair, one team is k steps past the mirror’s corner, counting up, and the other k steps before it: the one past is at home when k is odd, the one before when k is even. Our script did this for 6 teams:

Team Rounds 1 to 5 Breaks
1 H A H A H 0
2 H A A H A 1
3 A H H A H 1
4 H A H A A 1
5 A H A H H 1
6 A H A H A 0

Four breaks for six teams: the fewest possible. For ten teams it gives eight, and for every even number checked, up to 22, exactly n − 2. The bound is Dominique de Werra’s, from 1980, and papers on sports scheduling call it a well-known fact.

A league of 16 teams plays a single round robin with home and away. What is the fewest breaks any timetable can have?

Pick an answer to see why.

When not everyone plays everyone

Many real schedules aren’t complete round robins: teams play only some of the others. Each is still an edge-coloring puzzle, on a graph with some lines missing. If the busiest team has d matches, at least d rounds are needed. In 1964 Vadim Vizing proved that d + 1 rounds are always enough, whatever the graph. Sometimes d is enough (any league split into two groups where every match is between the groups), sometimes it isn’t (an odd round robin needs d + 1); deciding which is one of the problems computer scientists call NP-complete: no quick method is known for big graphs (Ian Holyer, 1981).

A story from maths

Where this is used

Questions

a.★

A school has 8 houses for an inter-house volleyball tournament, every pair to play once. How many matches, and how many days at least, if each house plays at most one match a day?

Answer
b.★

Seven teams play a round robin. How many rounds are needed, how many matches are in each round, and how many times does each team rest?

Answer

c. ★ A football league of 20 clubs plays every other club twice, home and away. How many matches are there in the season, and how many rounds at least?

Pick an answer to see why.

d.★★

Write out the whole circle-method timetable for 6 teams (1 to 5 round a pentagon, 6 in the middle). Then check that teams 2 and 4 meet exactly once.

Hint
Answer
e.★★

In the ten-team circle timetable, who plays team 5 in each of the nine rounds? Explain why the list contains every other team exactly once.

Answer
f.★★

Explain why an odd number of teams, n, can never finish a round robin in fewer than n rounds, even though each team has only n − 1 opponents.

Answer
g.★★★

Eight teams start a round robin. The first four rounds use every match between the group {1, 2, 3, 4} and the group {5, 6, 7, 8}. How many rounds does the whole tournament need now? Is that a trap?

Hint
Answer
h.★★★

Use the breaks argument to show that in a round robin of 10 teams with home and away, at most two teams can avoid breaks. Then explain why the two that do must follow opposite patterns.

Answer

Where to go next

Where these facts come from
  • Round robins: the number of rounds and matches for even and odd numbers, the dummy competitor and the bye, the circle method of fixing one team and rotating the others, Berger tables named after Johann Berger crediting Richard Schurig’s tables in Deutsche Schachzeitung (1886), Lucas’s Récréations mathématiques crediting Felix Walecki, single round robins in the Cricket World Cup and FIFA groups: Wikipedia, “Round-robin tournament”, read October 2026.
  • Edge coloring: the chromatic index of Kn K_n (n − 1 for even n, n for odd), round-robin scheduling and the NFL, Vizing’s theorem (1964), Kőnig’s theorem for two-group graphs (1916), Holyer (1981) on deciding the class being NP-complete, fiber-optic networks: Wikipedia, “Edge coloring”, read October 2026.
  • Graph coloring for exam timetables and other scheduling: Wikipedia, “Graph coloring”, read October 2026.
  • Breaks: de Werra’s theorem that 2n teams have at least 2n − 2 breaks, “a well-known fact in sports scheduling”, with his paper “Geography, games and graphs”, Discrete Applied Mathematics 2 (1980), 327–337 (not opened itself): R. Miyashiro and T. Matsui, “A polynomial-time algorithm to find an equitable home–away assignment”, METR 2003-29, University of Tokyo, read October 2026.
  • The Premier League’s 380 fixtures, its home-and-away rules, the paired clubs and Atos: Premier League, “How is the 2026/27 Premier League fixture list compiled?”, read October 2026.
  • Major League Baseball’s 2005 schedule by The Sports Scheduling Group (Michael Trick, Doug Bureman, George Nemhauser), its 2,430 games and constraints: Carnegie Mellon University, “Trick and Colleagues Produce Master Schedule For Major League Baseball’s 2005 Season”, read October 2026.
  • The 2023 Cricket World Cup’s 10-team round robin of 45 matches, the same format as 2019: Wikipedia, “2023 Cricket World Cup”, read October 2026.
  • Kirkman’s problem (1850, The Lady’s and Gentleman’s Diary), Cole’s seven solutions (1922), Lu Jiaxi (1965), Ray-Chaudhuri and Wilson (1968): Wikipedia, “Kirkman’s schoolgirl problem”; Kirkman as rector of Croft with Southworth: Wikipedia, “Thomas Kirkman”; Ray-Chaudhuri’s studies at the University of Calcutta and his doctorate under R. C. Bose at Chapel Hill: Wikipedia, “Dijen K. Ray-Chaudhuri”; Bose’s studies and teaching in Calcutta: Wikipedia, “Raj Chandra Bose”, read October 2026.
  • Every number on this page (the matches and rounds for each league, the circle-method timetables checked for every even number of teams from 4 to 22, the trap and its 6 rounds, the 120 of 480 ways into it, the random-filling percentages from 100,000 tries each, the home-and-away patterns and their breaks, the least breaks for 4 teams checked over every timetable, and the answers to the questions) was computed by a script, checks/textbooks/math-further-9-12/28/tmp/answers.py.