On the application of graph
colouring techniques in
round-robin sports
scheduling
Rhyd Lewis and Jonathan
Thompson
School of Mathematics,
Cardiff University,
LANCS Initiative
A case study at the Welsh
Rugby Union
Round-robin scheduling: the
basics
R1 = (0,1), (2,6), (3,5), (4,7)
R2 = (0,2), (1,7), (3,6), (4,5)
R3 = (0,3), (1,2), (4,6), (5,7)
R4 = (0,4), (1,3), (2,7), (5,6)
R5 = (0,5), (1,4), (2,3), (6,7)
R6 = (0,6), (1,5), (2,4), (3,7)
R7 = (0,7), (1,6), (2,5), (3,4)
R8 = (1,0), (6,2), (5,3), (7,4)
R9 = (2,0), (7,1), (6,3), (5,4)
R10 = (3,0), (2,1), (6,4), (7,5)
R11 = (4,0), (3,1), (7,2), (6,5)
R12 = (5,0), (4,1), (3,2), (7,6)
R13 = (6,0), (5,1), (4,2), (7,3)
R14 = (7,0), (6,1), (5,2), (4,3)
Mirrored Schedule for
n = 8, m = 2
z
z
z
z
z
We have n teams, and all teams play
all others m times in m(n – 1) rounds
Typically, m = 1 or 2
Linear algorithms exist for producing
such schedules such as the greedy
polygon, and canonical methods
These “standard solutions” are
actually isomorphic
However, additional constraints will
often be imposed that may not fit
with such schedules:
Home/away assignments
Minimisation of “carryover”
Broadcaster demands
Stadium sharing
Mirroring
Minimisation of travelling distances.
Number of RR schedules
z
The number of distinct round robin schedules is linked to the
number of one-factorisations of a complete graph Kn
1
1
4
4
2
3
2
3
2
One-factorisation of K4
K4
R1 = (1,2) (3,4)
R2 = (1,3) (2,4)
R3 = (1,4) (3,2)
Corresponding
round-robin
This figure is thought to increase exponentially with n:
− n=
2,4,6
: 1 one-factorisation
−
−
−
−
z
4
3
2
1
4
3
z
1
8
10
12
14+
:6
``
: 396
``
: 526,915,620 (Dinitz et al. 1994)
: ???
Number of one-factorisations < num round-robins.
Solution methods
z
Some formulations are easy to solve in isolation
− Optimisation of home/away pattern of each team (de
Werra, 1988)
− Maximisation/minimisation of carry-over (for certain n’s)
(Russell, 1980; Anderson 1999)
z
Other formulations (of which there are many) can be
more tricky…
− What about other constraints & combinations of constraints
− What if these constraints conflict?
− ILP and CP techniques have been used in the past (though
they can sometimes show scaling-up issues)
− Metaheuristics also show considerable promise …
Metaheuristics for RR
Scheduling: Basic strategy
Exploration via neighbourhood ops
z
z
Initial solution
Final solution
Space of all valid round robins of a
particular n
• Define cost function and move operators
• Produce initial solution(s)
• while (not stopping criteria)
• Explore search space attempting to
optimise cost
• end while
z
Global optimum not
guaranteed (but run-times can
be)
Adaptable to various
formulations (just change the
cost function)
Issues:
“Standard solutions” often in
particular, disconnected
regions and show difficulties
with existing search operators
What if additional “hard
constraints” are also
considered
Metaheuristics for RR
Scheduling: Basic strategy
optimal
z
z
z
Space of all valid round robins of a
particular n
• Define cost function and move operators
• Produce initial solution(s)
• while (not stopping criteria)
• Explore search space attempting to
optimise cost
• end while
Global optimum not
guaranteed (but run-times can
be)
Adaptable to various
formulations (just change the
cost function)
Issues:
“Standard solutions” often in
particular, disconnected
regions and show difficulties
with existing search operators
What if additional “hard
constraints” are also
considered
Metaheuristics for RR
Scheduling: Basic strategy
optimal
z
(Infeasible)
e.g. match (i,j) cannot
go into round 4
z
z
Space of all valid round robins of a
particular n
• Define cost function and move operators
• Produce initial solution(s)
• while (not stopping criteria)
• Explore search space attempting to
optimise cost
• end while
Global optimum not
guaranteed (but run-times can
be)
Adaptable to various
formulations (just change the
cost function)
Issues:
“Standard solutions” often in
particular, disconnected
regions and show difficulties
with existing search operators
What if additional “hard
constraints” are also
considered
RR scheduling via graph
colouring
z
For a particular n and m:
(3,2)
{0,1}
(3,1)
{2,3}
{0,2}
{1,3}
{0,3}
{1,2}
z
(0,2)
(3,0)
(0,3)
(2,3)
(1,0)
(1,2)
(2,1)
Graphs for n = 4, m = 1, 2
z
(0,1)
(2,0)
(1,3)
• One node for each match
• Edges between nodes
with a common team
• All nodes equal in degree
• Equipartite
• Interconnected cliques
colour the nodes of the graph using k = m(n – 1) colours such that
adjacent nodes have different colours.
Graph colouring methods might be able to produce RR solutions
beyond the “standard” ones
Such graphs are flat: but are they difficult to colour?
Are such graphs “hard” to
colour?
Three different algorithms used to try and solve problems of
various size.
z
Heuristic backtracking approach (BT)
ACO + Local search approach (ACO)
Stochastic Hill Climbing approach (HC)
Success Rate and Solution Times were recorded
The backtracking approach seems the most successful.
z
z
600
0.8
1
600
0.8
400
0.6
400
0.6
ST (HC)
ST (HC)
ST (BT)
ST (BT)
ST (ACO)
0.4
SR (HC)
200
SR (BT)
200
SR (ACO)
0.2
0
0
0
SR (HC)
SR (BT)
SR (ACO)
0.2
ST (ACO)
0.4
10
20
n (with m = 1)
30
40
50
|V| = 1225
0
0
0
10
20
30
n (using m = 2)
40
50
|V| = 2450
Solution Time (ST)
Success rate (SR)
1
Are such graphs “hard” to
colour?
z
We also implemented an IP formulation to run with MP-Xpress:
Given G(V,E), k, and the binary variables:
xvj = 1 if vertex v assigned to colour j
= 0 otherwise
where 1 ≤ j ≤ k and v∈V, find an assignment such that:
xuj + xvj ≤ 1 ∀(u , v) ∈ E , ∀j
∑
k
j =1
xvj = 1 ∀v ∈ V
|V |
∑v∈V xvj = k ∀j
z
Less Successful: No solutions found for n > 22 for m = 1 and n > 14
for m = 2
Incorporating additional hard
constraints
z
A variety of additional hard
constraints can be encoded into the
graph colouring model. E.g.
Match (i, j) cannot occur in round r
(unavailability)
Match (i, j) should occur in round r
(preassignment)
Matches (i, j) and (l, m) cannot occur
simultaneously
Match-vertices
(3,2)
z
z
The model allows us to define
move operators that only explore
the space of feasible RR solutions
An alternative strategy would be to
weight hard constraint violations
and hope that they are all satisfied
during the search process
(0,1)
(3,1)
(0,2)
(3,0)
(0,3)
(2,3)
(1,0)
(1,2)
(2,1)
(2,0)
(1,3)
Match (1,2)
cannot be
scheduled
in round 0
r0
Round-vertices
r5
r1
r4
r2
r3
Are these new graphs “hard”
to colour?
z
A problem generator was designed that
randomly added constraints of the form “match
(i, j) cannot occur in round r”.
z
1
600
400
0.6
ST (HC)
ST (BT)
0.4
ST (ACO)
200
SR (HC)
0.2
SR (BT)
SR (ACO)
0
0
0
0.2
0.4
p
0.6
0.8
Results with n = 16 , m = 2 (|V| = 240)
1
Solution time (sec)
Success rate
0.8
z
z
HC and HCO algorithms
consistently find
solutions for p < 0.6
(where matches are only
feasible in approx. 40%
of rounds)
Beyond this point
solutions may not exist
anyway
Point of “unsolvability”
tends to move left with
larger problems
Are these new graphs “hard”
to colour?
z
A problem generator was designed that
randomly added constraints of the form “match
(i, j) cannot occur in round r”.
z
1
600
400
0.6
ST (HC)
0.4
ST (BT)
200
ST (ACO)
SR (HC)
0.2
SR (BT)
SR (ACO)
0
0
0
0.2
0.4
p
0.6
0.8
1
Results with solvable n = 16, m = 2 (|V| = 240)
Solution time (sec)
Success rate
0.8
z
z
Similar results with
solvable problems, but a
phase transition region is
clearly visible
The phase transition
tends to widen and
deepens with larger
problems
Similar results were also
witnessed with other
types of constraints such
as pre-assignments
Exploring the space of feasible
RR schedules
z
z
z
A suitable candidate is the
Kempe chain neighbourhood
operator.
Moves are guaranteed to
preserve validity and
feasibility
Note that, moves can be of
different sizes and seem to
arise with particular
probabilities
However, this is not the case
if Kempe chains are applied
to the “standard solutions” (in
these cases all moves are of
of size n) [Perfect 1-factorisations]
1
2
1
4
3
6
7
0.8
2
4
3
5
6
8
9
10
11
Select a vertex and colour
randomly (e.g. vertex 1,
black)
relative frequency
z
9
7
0.4
0.2
0
0
0.25
0.5
8
10
11
Identify Kempe chain and
do colour interchange
n = 40
n = 20
n = 10
0.6
5
0.75
vertices moved (x n)
Frequency of move sizes for m = 2
1
Effect of “Move Size” on Cost
“Medium Quality” Solution
z
100
z
0
With a “medium quality”
solution, larger moves result in
a larger variance in cost
Approximately half of moves do
not worsen a solution
-100
-200
“High Quality” Solution
0
2
4
6
8
10
12
14
16
18
200
Move Size
With a “good” solution, larger
moves are associated with larger
increases in cost.
However, larger moves can help to
disrupt a solution, helping to
escape local optima
z
z
Improve | Worsen
Improve | Worsen
200
100
0
-100
-200
0
2
4
6
8
10
Move Size
12
14
16
18
Case Study: The Welsh
Principality Premiership
z
z
Top domestic rugby union league in Wales: 14 teams to
play in a double round-robin tournament
Additional Hard Constraints
− One pair of teams share a stadium
− Three other teams share stadia with teams from different
leagues/sports
− Local derbies take place on Xmas/Easter weekends
Soft constraints
− SC1: Teams to play H-A-H-A… as much as possible
− SC2: Teams cannot play each other twice within 5 rounds, and should
meet in different “halves” of the season.
It was found that hard constraints could be solved quite
easily using the three graph colouring methods (though
not with IP formulation).
A Multiobjective Approach
z
z
z
Cost functions c1 and c2 used
for reflecting level of
compliance with SC1 and SC2
respectively.
c1 and c2 measure different
things: thus a static
aggregate cost function not
satisfactory.
Two methods were applied to
get around this. The best of
these is based on a multiobjective approach of
Petrovic and Bykov (2003)
Initial solution
c2
Reference solution
0
0
c1
A Multiobjective Approach
z
z
z
Cost functions c1 and c2 used
for reflecting level of
compliance with SC1 and SC2
respectively.
c1 and c2 measure different
things: thus a static
aggregate cost function not
satisfactory.
Two methods were applied to
get around this. The best of
these is based on a multiobjective approach of
Petrovic and Bykov (2003)
Idea: Reduce both
costs simultaneously,
but attempt to keep
the search path close
to the reference line
c2
0
0
c1
A Multiobjective Approach
z
z
z
Cost functions c1 and c2 used
for reflecting level of
compliance with SC1 and SC2
respectively.
c1 and c2 measure different
things: thus a static
aggregate cost function not
satisfactory.
Two methods were applied to
get around this. The best of
these is based on a multiobjective approach of
Petrovic and Bykov (2003)
Idea: Reduce both
costs simultaneously,
but attempt to keep
the search path close
to the reference line
c2
0
0
c1
A Multiobjective Approach
z
z
z
Cost functions c1 and c2 used
for reflecting level of
compliance with SC1 and SC2
respectively.
c1 and c2 measure different
things: thus a static
aggregate cost function not
satisfactory.
Two methods were applied to
get around this. The best of
these is based on a multiobjective approach of
Petrovic and Bykov (2003)
Hopefully one or
more solution will
eventually be
established that
dominates the
reference solution
c2
0
0
c1
Example Run with real-world
data
z
Feasible solution found quickly (<10 CPU sec). Approx
10 min granted to soft constraint optimiser
2000
1800
1600
1400
1200
1000
Initial solution
800
600
400
200
0
0
5
10
15
20
25
Example Run with real-world
data
Feasible solution found quickly (<10 CPU sec). Approx
10 min granted to soft constraint optimiser
400
350
2000
1800
300
1600
250
1400
Reference Solution
200
1200
Best Solution (possible???)
150
1000
Zo
om
z
800
100
0
0.5
1
1.5
2
2.5
600
400
200
0
0
5
10
15
20
25
Conclusions
z
Graph colouring methods have the potential to produce feasible
round-robin schedules, often in the presence of a large number of
additional constraints
Generic search operators can also be defined with this model
allowing the exploration of the space of feasible round robins (a
subset of all valid RRs)
Over 98% of solutions produced using our methods dominated
those manually produced by the league administrators.
Methods were also seen to perform well on larger/smaller instances.
z
Ongoing issues:
z
z
z
Are other graph colouring methods more suitable for such
applications?
Deeper understanding of search space connectivity is needed.
Are other neighbourhood operators applicable?
Where else can these solution methods be applied?
© Copyright 2026 Paperzz