Would it be possible to make a round robin algorithm with an unbounded number of resting players? For example this would work but it can only manage one resting player/team.
An actual scenario would be 24 players, 16 players playing each round and 8 players waiting out each round. Ideally they would all have played each other in 23 rounds and double rests would be avoided as much as possible.
I've been stuck on this problem for quite a while now so I would really appreciate your help!
CodePudding user response:
As long as the total number of matches is divisible by the number of matches per day, that's possible. In your scenario, there are 8 matches per day and (12*23) total matches, so it's not possible, but having 12, 8, 6, 4, or 2 players in each round would work.
You can modify the circle method of scheduling. If you have 2N players, the scheduling algorithm normally generates blocks of N pairs in columns:
Day 1:
1 2 3 4 5 6 7 8
16 15 14 13 12 11 10 9
Day 2:
1 16 2 3 4 5 6 7
15 14 13 12 11 10 9 8
...
One useful property of this schedule is that if player P is scheduled in column k
on one day, P will be scheduled into one of k-1
, k
, or k 1
the next day. Thus, if you concatenate the columns of each day, there are at least N-2 columns (i.e., matches) strictly between each player's number. If you then schedule matches from left to right, cutting off enough rounds for each day, then any valid number of players sitting out will work (each player is guaranteed to play at most once each round). For example, if you wanted 4 resting players above:
Day 1:
1 2 3 4 5 6
16 15 14 13 12 11
Day 2:
7 8 1 16 2 3
10 9 15 14 13 12
...
It's hard to see a way of spacing out double-rests much better than this, since the 'distance' between playing time for each player is as even as possible. With an odd number of players, you can use the normal adjustment of adding a dummy-player for the circle method.