rec.puzzles Archive

Schedule a round robin tournament in which there are N teams, each one playing all the others, in the...

combinatorics/round.robin New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

Schedule a round robin tournament in which there are N teams, each one
playing all the others, in the minimum possible number of rounds (N if N
is odd, N-1 if N is even), and home and away games are balanced and
alternate as much as possible.

-- David Grabiner <grabiner@zariski.harvard.edu>
Show solution
If N is odd, number the teams from 1 through N.  In round i, let teams j
and k play each other if j+k is congruent to i, modulo N.  One team will
get scheduled against itself, the team for which 2j=i or 2j=N+i; this
team gets a bye.

If N is even, add an extra team X to the above schedule.  Team X plays
the team that would otherwise get the bye.

To alternate home and away games, let the home team in a match between
teams j and k be the lower-numbered team if j-k is odd, and the
higher-numbered team if j-k is even.  This gives perfect alternation for
odd N.

For N even, with the extra team X, let X play at home in odd-numbered
rounds and away in even-numbered rounds.  Team X and its first-round
opponent have perfect alternation; everyone else plays two consecutive
home or road games only once, one of them against X.

-- David Grabiner <grabiner@zariski.harvard.edu>, May 1994

[ Editor: further material on this puzzle, edited separately from other collected postings (batch 17); it may repeat some of the above. ]

[ Editor: problem as stated there: ]
How do you draw up a round-robin fixture list for 20 teams so that no
team plays at home, or away, three times in a row?

I'm hoping to write a football management simulation, and this
involves writing an algorithm to produce a fixture list, e.g. for four
teams:

1 v 2
3 v 4 ...for week 1

and

1 v 3
2 v 4 ...for week 2

and so on...  All well and good for four teams, but when you increase
the teams to 20, it becomes, well, how shall I put it, "difficult"?!
Ideally, no team should play at home (on the left) or away (on the
right) for three successive matches.


The following table is from the United States Chess Federation's
Official Rules of Chess, 4th edition, p. 240.  It is the Crenshaw-Berger
Round-Robin pairing table for 11 or 12 players, which is the largest I
feel like posting.  Hopefully, an examination of its structure will
help you to find a general algorithm.  In each game, the first listed
is White, the 2nd Black, but this corresponds to 'home' and 'away.'

ROUND            PAIRINGS
 1      6-12    7-5     8-4     9-3     10-2    11-1
 2      12-11   1-10    2-9     3-8     4-7     5-6
 3      5-12    6-4     7-3     8-2     9-1     10-11
 4      12-10   11-9    1-8     2-7     3-6     4-5
 5      4-12    5-3     6-2     7-1     8-11    9-10
 6      12-9    10-8    11-7    1-6     2-5     3-4
 7      3-12    4-2     5-1     6-11    7-10    8-9
 8      12-8    9-7     10-6    11-5    1-4     2-3
 9      2-12    3-1     4-11    5-10    6-9     7-8
10      12-7    8-6     9-5     10-4    11-3    1-2
11      1-12    2-11    3-10    4-9     5-8     6-7

If 11 teams play, player '12' should mean 'this team gets a bye.'

-- David Bush <dbush@csugrad.cs.vt.edu>