The idea of three fields View publication
In the late 1970s, Graham et al. (1979) introduced a now widely used three-field notation to distinguish between different machine scheduling problems, in which a set of tasks has to be sequenced and assigned to one or more machines. As in several other disciplines, we use the idea of ‘three-fields’ \((α|β|γ)\) to provide a detailed description of a sports timetabling problem. The first field, \(\alpha\), determines the competition format, the compactness of the timetable, and the required symmetry. The second field, \(\beta\), lists around 20 constraint types partitioned into five classes that are able to model the vast majority of the constraints in the literature. Lastly, the \(\gamma\)-field refers to the objective in use.
Why?
Understanding how the three-field notation of RobinX works results in several powerfull tools. First, our query tool uses the three fields to filter all related sports timetabling applications that have appeared in the literature. Second, RobinX uses the three-field notation to encode problem instances and solutions and provides a data instance repository (see tab repository) containing hundreds of problem instances proposed in the literature. Moreover, RobinX provides a tool to automatically validate solutions for problem instances in this XML format.
Terminology and notation

Terminology

Home stand
A team has a home stand when it plays multiple home games in a row, no matter the number of byes in between. The start and the end of the home stand are defined by the first and last home game in the sequence. For example, assume that a team plays 'Away Bye Home Bye Home Bye Away', then the home stand of the team starts in time slot 3 (first home game), and ends in time slot 5 (last home game).
Away trip
A team is on an away trip (also called road trip) when it plays multiple away games in a row, no matter the number of byes in between. The start and the end of the road trip are defined by the first and last away game in the sequence. For example, assume that a team plays 'Home Bye Away Bye Away Bye Home', then the road trip of the team starts in time slot 3 (first away game), and ends in time slot 5 (last away game).
Break
If a team plays a game with the same home-away status as its previous game we say it has a break during the time slot of the second game.
Carryover effect
When a team plays consecutively against team \(i\) and team \(j\), we say that team \(i\) gives a carryover effect (coe) to team \(j\).

Notation

For a given timetable, we define the following parameters. Please note that these parameters are solely used to describe how constraint violations for a given timetable should be evaluated; we do not intend to use them as decision variables in a mathematical model.
\(U\)
Set of all teams.
\(T\)
Subset \(T\subseteq U\) of teams. A subset of teams \(T\) may for example be used to group the strongest teams in the competition.
\(P\)
Set of all time slots. A team plays at most one game per time slot, and has a bye on a time slot if it does not play any game on that time slot.
\(S\)
Subset \(S\subseteq P\) of time slots. A subset of (possibly discontinuous) time slots \(S\) may for example be used to group all weekend time slots into a single set.
\(G\)
Multiset of ordered pairs \((i,j)\) in which \(i\in U\) is the home team providing the venue where the game is played, and \(j\in U\) is the away team.
\(x_{i,j,s}\)
1 if team \(i\) and \(j\) meet in the venue of \(i\) on time slot \(s\in P\), and 0 otherwise.
\(o_{i,j,k}\)
1 if the \(k\)-th opponent of team \(i\) is team \(j\), and 0 otherwise.
\(h_{i,j,k}\)
1 if \(i\) and \(j\) meet for the \(k\)-th time in the venue of \(i\), and 0 otherwise.
\(y_{i,j,s_1,s_2}\)
1 if team \(i\) and \(j\) meet each other during time slots \(s_1\in P\) and \(s_2\in P, s_1 < s_2\), without meeting in between, and 0 otherwise.
\(h_{i,s}\)
1 if team \(i\) plays a home game on time slot \(s\), and 0 otherwise.
\(q_{i,k}\)
1 if team \(i\) plays its \(k\)-th game at home, and 0 otherwise.
\(b_{i,s}\)
1 if team \(i\) has a break on time slot \(s\), and 0 otherwise. Unlike away trips and home stands which are defined relative to a subset of time slots, breaks are defined relative to P, i.e. the set of all time slots.
\(v_{i,s}\)
In the weighted break minimization problem, break \(b_{i,s}\) is additionally multiplied with weight \(v_{i,s}\).
\(a_{i,s_1,s_2}\)
1 if team \(i\) starts a road trip on \(s_1\) and ends the trip on \(s_2\), and 0 otherwise. Unlike breaks which are defined relative to P, i.e. the set of all time slots, road trips are defined relative to a time group S and should be maximal in S.
\(e_{i,s}\)
Equal to the distance travelled by \(i\) from the venue of its previous game to the venue of its current game if \(i\) plays a game on time slot \(s\), and 0 otherwise. We assume that each team is located at its home venue before the season starts, and needs to return back home immediately after playing its last game. Therefore, \(e_{i,s}\) also contains the cost of returning back home if team \(i\) plays its last game on time slot \(s\).
\(coe_{i,j}\)
Number of carryover effects that team \(i\) gives to team \(j\) over the entire tournament.
Alpha: competition format
The input of a sports timetabling problem consists of a set of teams \(U\), a set of time slots \(P\), and a multiset of games \(G\). Based on this input, the \(\alpha\)-field features three parameters to represent the tournament format \(\alpha_1\), the compactness \(\alpha_2\), and the symmetry properties of the timetable \(\alpha_3\).

Tournament format (\(\alpha_1\))

Team group \(T\) organizes a:
  • \(k\) round-robin tournament (kRR) if \(g_{i,j} + g_{j,i}\) equals a constant \(k\) for each \(i, j\in T\) with \(i \neq j\) and the difference between \(g_i, j\) and \(g_{j,i}\) is at most one,
  • \(k\) bipartite round-robin tournament (kBRR) if the teams in \(T\) can be partitioned into two disjoint sets \(V_1\) and \(V_2\) in such a way that \(g_{i,j} + g_{j,i}\) equals a constant \(k\) if \(i \in V_1\) and \(j \in V_2\) and the difference between \(g_{i,j}\) and \(g_{j,i}\) is at most one, and 0 otherwise, and
  • non round-robin tournament (NRR) in any other case.

Compactness (\(\alpha_2\))

A timetable is
  • time-constrained (compact, C) if the number of time slots in \(P\) is no more than the minimal number required to play all games in \(G\), and is
  • time-relaxed (R) otherwise.

Symmetry properties (\(\alpha_3\))

In a kRR with \(k > 1\), the season is often split into \(k\) intervals, i.e., a series of consecutive time slots of length \(|P|/k\) that each contain a 1RR. We call a timetable that follows this format phased and consider the following additional symmetry structures.
  • In the mirrored timetable format, the opponents in each interval are identical to the opponents of the previous interval.
  • In the inverted timetable format, intervals are played in the reversed order of the previous interval.
  • In the English timetable format, the opponents in the first time slot of an interval are the same as in the last time slot of the previous interval, and the opponents of the \(l\)-th time slot of the interval correspond with opponents of the \((l − 1)\)-th time slot of the previous interval.
  • Finally, in the French timetable format, the opponents in the last time slot of an interval correspond with the opponents in the first time slot of the previous interval. For all other time slots, the opponents of the \(l\)-th time slot in in an interval correspond with the opponents in the \((l + 1)\)-th time slot of the previous interval.

The table below gives an example of a time-constrained double round-robin tournament.

\(s_1\) \(s_2\) \(s_3\) \(s_4\) \(s_5\) \(s_6\) \(s_7\) \(s_8\) \(s_9\) \(s_{10}\)
\((1,2)\) \((2,5)\) \((2,4)\) \((2,3)\) \((6,2)\) \((2,1)\) \((5,2)\) \((4,2)\) \((3,2)\) \((2,6)\)
\((3,4)\) \((4,1)\) \((1,6)\) \((5,1)\) \((4,5)\) \((4,3)\) \((1,4)\) \((6,1)\) \((1,5)\) \((5,4)\)
\((5,6)\) \((6,3)\) \((5,3)\) \((6,4)\) \((1,3)\) \((6,5)\) \((3,6)\) \((3,5)\) \((4,6)\) \((3,1)\)
The resulting classification via the alpha-part is: $$2\textrm{RR}, \textrm{C}, \textrm{M}$$

Beta: constraints in use
Sports timetables need to satisfy a usually large set of constraints \(C\), which is partitioned into hard constraints \(C_{\text{hard}}\) and soft constraints \(C_\text{soft}\).
  • Hard constraints represent fundamental properties of the timetable that can never be violated.
  • Soft constraints, in contrast, rather represent preferences that should be satisfied whenever possible.
The validation of each constraint \(c\in C\) results in a vector \(D_c\) of \(n_c\) integral numbers, called the deviation vector \(D_c=[d_1 d_2 {\dots} d_{n_c}]\). If a constraint is satisfied, all elements of its deviation vector are equal to zero. Contrarily, the deviation vector of a violated constraint contains one or more strictly positive elements. Apart from a description of how to calculate the deviation vector, each constraint features a cost function \(f_c\) and weight \(w_c\). If constraint \(c\) is hard, i.e. under no conditions the constraint can be violated, a penalty \(p_c\) is added to the infeasibility value of the schedule. If the constraint is soft, i.e. the constraint is desirable but not strictly necessarily, a penalty \(p_c\) is added to the objective value of the schedule.

Each constraint \(c\in C\) with weight \(w_c\) and penalty function \(f_c\) results in a penalty: $$p_c=w_c\cdot f_c(D_c)$$

The software currently allows to specify the following five cost functions:

Function Return value Description
Sum Sum of all deviations \(f_c^\mathrm{sum}(D_c) = \sum_{1\leq i \leq n_c} d_i\)
Sum-square Sum of all squared deviations \(f_c^\mathrm{sq-sum}(D_c) = (\sum_{1\leq i \leq n_c} d_i)^2\)
Square-sum Squared sum of all deviations \(f_c^\mathrm{sum-sq}(D_c) = \sum_{1\leq i \leq n_c} d_i^2\)
Minimum Minimum deviation \(f_c^\mathrm{min}(D_c) = \min_{1\leq i \leq n_c} d_i\)
Maximum Maximum deviation \(f_c^\mathrm{max}(D_c) = \max_{1\leq i \leq n_c} d_i\)

The β-field lists around 20 constraints partitioned into five constraint groups that classify the vast majority of the constraints from the literature.

Base constraints (BA) are implicitly hard and always present and are therefore not mentioned in the beta field unless they are soft.
BA1
All specified games must be scheduled.
Each pair of teams \((i,j)\) triggers a deviation equal to the absolute difference of the number of required games \(g_{i,j}\) minus the number of scheduled games.
\(∀ i\in U, j\in U\setminus{\{i\}}: d_{i,j}= |g_{i,j}-\sum_{s\in P}x_{i,j,s}|\)
BA2
A team should play at most one game per time slot.
Each team triggers a deviation for every time slot equal to the number of games it plays more than one.
\(∀ i\in U, s\in P: d_{i,s} = max(0,\sum_{j\in U\setminus{\{i\}}}(x_{i,j,s}+x_{j,i,s})-1)\)
Capacity constraints (CA) force a team to play home or away and regulate the total number of games played by a team or team group.
CA1
Each team in team group \(T\) plays at least \(k_{min}\) and at most \(k_{max}\) {home games, away games, games} in time group \(S\).
Each team in \(T\) triggers a deviation equal to the number of home games in \(S\) less than \(k_{min}\) or more than \(k_{max}\).
\(∀ i\in T: d_i = \max (k_{\min}-\sum\limits_{j\in U}\sum\limits_{s\in S} x_{i,j,s}; \sum\limits_{j\in U}\sum\limits_{s\in S} x_{i,j,s} - k_{\max};0)\)
CA2
Each team in team group \(T_1\) plays at least \(k_{min}\) and at most \(k_{max}\) {home games, away games, games} against {teams, each team} in team group \(T_2\) in time group \(S\).
Each team in \(T_1\) triggers a deviation equal to the number of home games against teams in \(T_2\) in \(S\) less than \(k_{min}\) or more than \(k_{max}\).
\(∀ i\in T_1: d_i = \max (k_{\min}-\sum\limits_{j\in T_2}\sum\limits_{s\in S} x_{i,j,s}; \sum\limits_{j\in T_2}\sum\limits_{s\in S} x_{i,j,s} - k_{\max};0)\)
CA3
Each team in team group \(T_1\) plays at least \(k_{min}\) and at most \(k_{max}\) {home games, away games, games} against teams in team group \(T_2\) in each sequence of \(k\) {time slots, games}.
Each team in \(T_1\) triggers a deviation equal to the sum of the number of home games against teams in \(T_2\) less than \(k_{min}\) or more than \(k_{max}\) for each sequence of \(k\) time slots.
\(∀ i\in T_1: d_i =\sum\limits_{l=1}^{|P|-k+1}(\max(k_{\min}-\sum\limits_{j\in T_2}\sum\limits_{s=l}^{l+k-1}x_{i,j,s};\sum\limits_{j\in T_2}\sum\limits_{s=l}^{l+k-1}x_{i,j,s}-k_{\max};0))\)
CA4
Teams in team group \(T_1\) play at least \(k_{min}\) and at most \(k_{max}\) {home games, away games, games} against teams in team group \(T_2\) in {time group, each time slot of time group} \(S\).
Time group \(S\) triggers a deviation equal to the number of games with a home team in \(T_1\) and a team in \(T_2\) less than \(k_{min}\) or more than \(k_{max}\).
\(d=\max(k_{\min}-\sum\limits_{i\in T_1}\sum\limits_{j\in T_2}\sum\limits_{s\in S} x_{i,j,s}; \sum\limits_{i\in T_1}\sum\limits_{j\in T_2}\sum\limits_{s\in S} x_{i,j,s}-k_{\max};0)\)
CA5
Each team in team group \(T_1\) plays at least \(k_{min}\) and at most \(k_{max}\) away games against a team in team group \(T_2\) when it consecutively plays away during time group \(S\).
Each team in \(T_1\) triggers a deviation equal to the sum of the number of away games against teams in \(T_2\) less than \(k_{min}\) or more than \(k_{max}\) for each sequence of away games in \(S\).
\(∀ i\in T_1: d_i= \sum\limits_{s_1\in S}\sum\limits_{s_2\in S:s_2>s_1} a_{i,s_1,s_2}\max(k_{min}-\sum\limits_{j\in T_2}\sum\limits_{s_3=s_1}^{s_2}x_{j,i,s_3}; \sum\limits_{j\in T_2}\sum\limits_{s_3=s_1}^{s_2}x_{j,i,s_3}-k_{max};0)\)
Game constraints (GA) enforce or forbid specific assignments of a game to time slots.
GA1
At least \(k_{min}\) and at most \(k_{max}\) games from \(G = {(i_1, j_1), (i_2, j_2),\dots}\) take place in time group \(S\).
Time group \(S\) triggers a deviation equal to the number of games in \(G\) less than \(k_{\min}\) or more than \(k_{\max}\).
\(d=\max(k_{\min}-\sum\limits_{(i,j)\in G}\sum\limits_{s\in S}x_{i,j,s};\sum\limits_{(i,j)\in G}\sum\limits_{s\in S}x_{i,j,s}-k_{\max};0)\)
GA2
If a team from team group \(T_1\) plays a {home game, away game, game} against a team from team group \(T_2\) in time group \(S_1\) , then a team from team group \(T_3\) {plays, does not play} a {home game, away game, game} against a team from team group \(T_4\) in time group \(S_2\) .
Time group \(S_2\) triggers a deviation of 1 if a team in \(T_1\) plays a home game against a team in \(T_2\) in \(S_1\) but no team in \(T_3\) plays a home game against a team in \(T_4\) in \(S_2\), and 0 otherwise.
\(d=\max(\min(\sum\limits_{i\in T_1}\sum\limits_{j\in T_2}\sum\limits_{s\in S_1}x_{i,j,s},1)-\min(\sum\limits_{k\in T_3}\sum\limits_{l\in T_4}\sum\limits_{s\in S_2}x_{k,l,s}; 1);0)\)
Break constraints (BR) regulate the frequency and timing of breaks in a competition. Team \(i\) has a home break (resp. away) at time slot \(s\) if it plays home (resp. away) on time slot \(s\) and if \(i\)'s last game before \(s\) was also a home game (resp. away game), irrespective of the number of byes since its last game. A team has a home stand in time group \(S\) if it plays multiple home games in a row and is on a road trip in \(S\) when it plays multiple away games in a row. Unlike road trips and home stands, which are defined relative to \(S\), breaks are defined relative only to \(P\), the set of all time slots.
BR1
Each team in team group \(T\) has {exactly, no more than} \(k\) {home breaks, away breaks, breaks} in time group \(S\).
Each team in \(T\) triggers a deviation equal to the difference in the sum of home breaks in \(S\) and \(k\).
\(∀ i\in T: d_i= | k - \sum\limits_{s\in S} b_{i,s}h_{i,s}|\)
BR2
The sum over all {home, away, home or away} breaks of teams in team group \(T\) is {exactly, no more than} \(k\) in time group \(S\).
Team group \(T\) triggers a deviation equal to the difference in the sum of home breaks in \(S\) and \(k\).
\(d=|k-\sum\limits_{i\in T}\sum\limits_{s\in S} b_{i,s}h_{i,s}|\)
BR3
Each pair of teams in team group \(T\) has a difference in {home breaks, away breaks, breaks} that is not larger than \(k\).
Each pair of teams in \(T\) triggers a deviation equal to the difference in the number of home breaks more than \(k\).
\(∀ i,j\in T, i < j: d_{i,j}= \max(|\sum\limits_{s\in P}b_{i,s}h_{i,s} - \sum\limits_{s\in P}b_{j,s}h_{j,s}|-k,0)\)
BR4
Each team in team group \(T\) has at least \(k\) road trips in time group \(S\).
Each team in \(T\) triggers a deviation equal to the number of road trips in \(S\) less than \(k\).
\(∀ i\in T: d_i=\max(k-\sum\limits_{s_1\in S}\sum\limits_{\substack{s_2\in S: s_2>s_1}} a_{i,s_1,s_2};0)\)
The following constraints increase the fairness or attractiveness (FA) of competitions.
FA1
Each team in team group \(T\) has a difference in played home and away games that is not larger than \(k\) after each time slot in \(S\).
Each team in \(T\) triggers a deviation equal to the largest difference in played home and away games more than \(k\) over all time slots in \(S\).\
\(∀ i\in T: d_i = \max\limits_{s\in S}(|\sum\limits_{j\in T}\sum\limits_{1\leq p\leq s}(x_{i,j,p}-x_{j,i,p})|-k;0)\)
FA2
Each pair of teams in team group \(T\) has a difference in played {home games, away games, games} that is not larger than \(k\) after each time slot in \(S\).
Each pair of teams in \(T\) triggers a deviation equal to the largest difference in played home games more than \(k\) over all time slots in \(S\).
\(∀ i,j\in T, i < j: d_{i,j} = \max\limits_{s\in S}(|\sum\limits_{t\in T}\sum\limits_{1\leq p \leq s}(x_{i,t,p}-x_{j,t,p})|-k;0)\)
FA3
Each pair of teams in team group \(T\) plays each other at home and in turn away.
Each pair of teams in team group \(T\) triggers a deviation equal to the total number of times the two teams play consecutively with the same home-away assignment.
\(∀ i,j\in T, i < j: d_{i,j} = \sum\limits_{k=1}^{g_{i,j}+g_{j,i}-1} (1-|h_{i,j,k}-h_{i,j,k+1}|)\)
FA4
Team group \(T\) has a {weighted coe, coe} value of at most \(k\).
Team group \(T\) triggers a deviation equal to the weighted coe-value more than \(k\).
\(d = \max(\sum\limits_{i\in T}\sum\limits_{j\in T} w_{i,j}\, c_{i,j}^2 - k;0)\)
FA5
The total distance traveled by all teams in team group \(T\) during time group \(S\) is at most \(k\).
Team group \(T\) triggers a penalty equal to the total distance traveled more than \(k\).
\(d = \max(\sum\limits_{i\in T}\sum\limits_{s\in S}e_{i,s}-k;0)\)
FA6
The total cost associated with all games played during time group \(S\) is at most \(k\).
Time group \(S\) triggers a penalty equal to the total cost more than \(k\).
\(d = \max(\sum\limits_{i\in T}\sum\limits_{j\in T}\sum\limits_{s\in S}c_{i,j,s}x_{i,j,s}-k;0)\)
Finally, separation constraints regulate the number of time slots between consecutive games involving the same teams and regulate the symmetry of the timetable.
SE1
Each pair of teams in team group \(T\) has at least \(m_{min}\) and at most \(m_{max}\) {time slots, games} between two consecutive mutual games.
Time slot mode: Each pair of teams in \(T\) triggers a deviation equal to the sum of the number of time slots less than \(k\) for all consecutive mutual games. Game mode: Each pair of teams in \(T\) triggers a deviation equal to the sum of the number of games that team \(i\) has less than \(k\) for all consecutive mutual games and the sum of the number of games that team \(j\) has less than \(k\) for all consecutive mutual games.
Time slot mode: \(∀ i,j\in T, i < j: d_{i,j} = \sum\limits_{s_1\in P}\sum\limits_{s_1+1\leq s_2 \leq |P|} y_{i,j,s_1,s_2}\max(k-(s_2-s_1);0)\) Game mode: \(∀ i,j\in T, i < j: d_{i,j} = \sum_{s_1\in P} \sum_{s_1+1<= s_2 <= |P|} y_{i,j,s_1,s_2}(max(k-m_{i,s_1,s_2}; 0) + max(k-m_{j,s_1,s_2}; 0))\), with \(m_{i,s_1,s_2}=\sum_{j\in U\setminus{\{i\}}}\sum_{s3=s_1+1}^{s2-1}(x_{i,j,s_3}+x_{j,i,s_3})\).
SE2
If a pair of teams in team group \(T\) meets in one time slot of a pair of time slots in \(Q=\{\{s_1, s_2\}, \{s_3, s_4\}, \dots\}\), it also meets in the other time slot.
Each pair of time slots in \(Q\) triggers a deviation equal to the number of pairs of teams that play in one time slot but not in the other time slot.
\(∀ \{s_1,s_2\}\in Q: d_{\{s_1,s_2\}} = \sum\limits_{\{i,j\}\in T} |(x_{i,j,s_1}+x_{j,i,s_1})-(x_{i,j,s_2}+x_{j,i,s_2})|\)
Gamma: objective function
Every timetable has an infeasibility value and an objective value. Where the infeasibility value of a timetable is completely determined by the sum of the penalty values of violated hard constraints, the \(\gamma\)-field describes how to calculate the objective value. If no objective is provided (`\(\emptyset\)'), the problem reduces to a constraint satisfaction problem in which the sole purpose is to find a timetable respecting all hard constraints. In the case an objective is provided, we consider the following cases.
BR
Construct a (weighted) break-minimal timetable.
\(\sum_{i\in U}\sum_{s\in P}v_{i,s}b_{i,s}\)
TR
Construct a travel distance minimal timetable.
\(\sum_{i\in U}\sum_{s\in P} e_{i,s}\)
CR
Construct a cost-minimal timetable given some estimated costs or revenues.
\(\sum_{i\in U}\sum_{j\in U\setminus{\{i\}}} \sum_{s\in P} x_{i,j,s}c_{i,j,s}\)
CO
Construct a carry-over effects minimal timetable.
\(\sum_{i\in U}\sum_{j\in U} w_{i,j}coe_{i,j}^2\)
SC
Construct a timetable which minimizes the total soft constraints penalty.
\(\sum_{c\in C_{soft}} p_c\)
Delimiters to combine the three fields
In order to combine the different field parameters into one single meaningful string, we annotate the three-field notation with the following delimiters and superscripts.
Delimiter Function Example
\(|\) Field delimiter \(\alpha|\beta|\gamma\)
, Parameter delimiter \(2\text{RR,C,M}|\beta|\gamma\)
\(\text{CA1}^{H,S}\) Hard versus Soft constraint \(\alpha|\text{CA1}^{H,S},\text{CA2}^{H},\text{CA3}^{S}|\text{SC}\)
\(()^l\) Delimiter to group the problem notation for \(l\) coherent leagues \((\alpha|\beta|\gamma)^l\)
+ Delimiter to concatenate the notation of different coherent leagues \((\alpha|\beta|\gamma)^{l_1}+(\alpha|\beta|\gamma)^{l_2}\)
Integrated example

Below is given the three-field classification for a time-constrained double round-robin tournament in which the second half is organized according to the English format. The objective is to minize the travel distance and there are capacity constraints, and break constraints.

\(2\textrm{RR}, \textrm{C}, \textrm{E}\, |\, \textrm{CA1}, \textrm{CA3}, \textrm{BR1}\, |\, \textrm{TR}\)