6
Discrete Optimization 5 (2008) 138–143 www.elsevier.com/locate/disopt Note Solving mirrored traveling tournament problem benchmark instances with eight teams K.K.H. Cheung * School of Mathematics and Statistics, Carleton University, 1125 Colonel By Drive, Ottawa, ON K1S 5B6, Canada Received 9 July 2007; received in revised form 6 November 2007; accepted 17 November 2007 Available online 10 January 2008 Abstract A two-phase method based on generating timetables from one-factorizations and finding optimal home/away assignments solved the mirrored traveling tournament problem benchmark instances NL8 and CIRC8 at the Challenge Traveling Tournament Problems homepage http://mat.gsia.cmu.edu/TOURN/. c 2007 Elsevier B.V. All rights reserved. Keywords: Traveling tournament; Integer programming; One-factorization; Sports scheduling 1. Introduction Easton et al. [5] proposed a class of sports scheduling problem called the Traveling Tournament Problem (TTP) and described two families of benchmark instances. The TTP is the problem of finding a double round-robin tournament on n teams (with n even) satisfying a number of requirements such that the total distance traveled by all the teams is minimized. The TTP abstracts key issues in creating a schedule that combines travel and home/away pattern issues, making it difficult to solve even when the number of teams is small. An extended set of benchmark instances is currently available at the Challenge Traveling Tournament Problems homepage http://mat.gsia.cmu.edu/TOURN/ consisting of the original instances described in [5] and many others. Heuristics and solution methods proposed over the years have produced new best-known solutions to many of the benchmark instances (see for example [1,2,14,6,7,9,10] and the survey [11]). Methods for obtaining lower bounds have also been proposed [5,7,16]. Some benchmark instances belong to a number of special cases. One such special case, introduced in [14], is the TTP with the mirrored requirement that requires the first half of the schedule to be the same as the second half but with the venues reversed. Another special case, introduced in [15], assumes that the travel distance is constant between any pair of cities. Results on exact solutions obtained so far seem to suggest that the special cases are not of the same difficulty as the general problem. Eastman et al. [6] solved the six-team instances and the eight-team Research of this paper supported by a grant of NSERC. * Tel.: +1 613 520 2600. E-mail address: [email protected]. 1572-5286/$ - see front matter c 2007 Elsevier B.V. All rights reserved. doi:10.1016/j.disopt.2007.11.003

Solving mirrored traveling tournament problem benchmark instances with eight teams

Embed Size (px)

Citation preview

Discrete Optimization 5 (2008) 138–143www.elsevier.com/locate/disopt

Note

Solving mirrored traveling tournament problem benchmarkinstances with eight teamsI

K.K.H. Cheung∗

School of Mathematics and Statistics, Carleton University, 1125 Colonel By Drive, Ottawa, ON K1S 5B6, Canada

Received 9 July 2007; received in revised form 6 November 2007; accepted 17 November 2007Available online 10 January 2008

Abstract

A two-phase method based on generating timetables from one-factorizations and finding optimal home/away assignments solvedthe mirrored traveling tournament problem benchmark instances NL8 and CIRC8 at the Challenge Traveling Tournament Problemshomepage http://mat.gsia.cmu.edu/TOURN/.c© 2007 Elsevier B.V. All rights reserved.

Keywords: Traveling tournament; Integer programming; One-factorization; Sports scheduling

1. Introduction

Easton et al. [5] proposed a class of sports scheduling problem called the Traveling Tournament Problem (TTP) anddescribed two families of benchmark instances. The TTP is the problem of finding a double round-robin tournamenton n teams (with n even) satisfying a number of requirements such that the total distance traveled by all the teams isminimized. The TTP abstracts key issues in creating a schedule that combines travel and home/away pattern issues,making it difficult to solve even when the number of teams is small.

An extended set of benchmark instances is currently available at the Challenge Traveling Tournament Problemshomepage http://mat.gsia.cmu.edu/TOURN/ consisting of the original instances described in [5] and many others.Heuristics and solution methods proposed over the years have produced new best-known solutions to many of thebenchmark instances (see for example [1,2,14,6,7,9,10] and the survey [11]). Methods for obtaining lower boundshave also been proposed [5,7,16].

Some benchmark instances belong to a number of special cases. One such special case, introduced in [14], isthe TTP with the mirrored requirement that requires the first half of the schedule to be the same as the second halfbut with the venues reversed. Another special case, introduced in [15], assumes that the travel distance is constantbetween any pair of cities. Results on exact solutions obtained so far seem to suggest that the special cases are notof the same difficulty as the general problem. Eastman et al. [6] solved the six-team instances and the eight-team

I Research of this paper supported by a grant of NSERC.∗ Tel.: +1 613 520 2600.

E-mail address: [email protected].

1572-5286/$ - see front matter c© 2007 Elsevier B.V. All rights reserved.doi:10.1016/j.disopt.2007.11.003

K.K.H. Cheung / Discrete Optimization 5 (2008) 138–143 139

Fig. 1. Schedule for a DRR tournament with 6 teams.

Fig. 2. (a) Timetable, (b) Pattern set.

instance NL8 but allowing consecutive games between two teams. In contrast, Urrutia and Riberio [15] solved theconstant distance instances with the mirrored requirement for 4, 6, 8, 10, 12, and 16 teams. The constructive methodof Fujiwara et al. [7] gave optimal solutions for the constant distance instances for n teams where n ≤ 50 and n ≡ 4(mod 6). Rasmussen and Trick [13] used a Benders approach to solve all constant distance instances for up to 16teams and constant distance instances with the mirrored requirement for up to 18 teams.

In this paper, we describe a two-phase method that can solve mirrored Traveling Tournament Problems with at mosteight teams quite effectively. In particular, our computations show that the best-known solutions for the the NationalLeague Instance NL8 (mirrored) and the Circular Distance Instance CIRC8 (mirrored) are in fact optimal.

2. The mirrored traveling tournament problem

Given n teams with n even, a double round-robin (DRR) tournament is a set of games in which every team playsevery other team exactly once at home and once away in 2(n − 1) prescheduled time slots such that all teams playexactly one game in each slot. For any given team, games played at its home venue are called home games and thoseplayed at the opponent’s venue are called away games. Distances between team venues are given by an n × n distancematrix C . For our purposes, C is assumed to be symmetric. Each team begins at its home venue and travels to playits games at the appropriate venues specified by the schedule and returns (if necessary) to the home venue at the endof the schedule. Easton et al. [5] defined the TTP to be the problem of finding a schedule for a DRR tournament onthe n teams such that every team does not play more than three consecutive home or away games, does not play anopponent in two consecutive games (the no-repeater requirement), and that the total distance traveled by all the teamsis minimized. The mirrored Traveling Tournament Problem (mTTP) has an additional constraint known as the mirrorrequirement: games played in slot s are the same as those played in slot s + (n − 1) for s = 1, . . . , n − 1. Clearly,the no-repeater required is automatically satisfied if the mirror requirement is imposed. Fig. 1 gives an example of aschedule for a DRR tournament satisfying the mirror requirement. (A minus sign indicates an away game.) It is anoptimal schedule for the mTTP benchmark instance NL6.

3. Solution method

A schedule for a round-robin tournament can be separated into two components—a timetable and a pattern set.The timetable gives only the opponent of each team in each slot. The pattern set consists of a pattern for each team,which is a (row) vector of 1’s and 0’s, with 1 representing a home game and 0 representing an away game. Fig. 2shows the timetable and the pattern set for the schedule in Fig. 1.

Note that the first half of a mirrored schedule completely determines the rest of the schedule and is itself a schedulefor a single round-robin tournament in which each team plays every other team exactly once. It is well known thattimetables of a single round-robin tournament of n teams with n even are equivalent to ordered one-factorizations ofKn (the complete graph on n vertices) defined as follows: A one-factor of Kn is a set of n

2 edges of Kn such that no two

140 K.K.H. Cheung / Discrete Optimization 5 (2008) 138–143

Table 1Number of one-factorizations of Kn

n # one-factorizations

4 16 68 [3] 6,240

10 [8] 1,255,566,72012 [4] 252,282,619,805,368,320

edges are incident with the same vertex. A one-factorization of Kn is a set, {F1, . . . , Fn−1}, of n − 1 pairwise disjointone-factors F1, . . . , Fn−1. An ordered one-factorization of Kn is an (n − 1)-tuple of one-factors, (F1, . . . , Fn−1),such that {F1, . . . , Fn−1} is a one-factorization of Kn . Hence, from a given one-factorization of Kn , one can obtain(n − 1)! ordered one-factorizations by taking all orderings of the one-factors. The correspondence between a singleround-robin timetable and an ordered one-factorization (F1, . . . , Fn−1) is given by the following: i1i2 ∈ Fs if andonly if team i1 plays team i2 in slot s. Table 1 lists the total number of one-factorizations for different values of n thathave been obtained by researchers over the years. For n ≥ 14, the exact number of one-factorizations is not known.

The following two-phase method was used to solve the mTTP instances NL8 and CIRC8.

(Phase 1) Generate all the one-factorizations of K8.(Phase 2) For each one-factorization generated in Phase 1, go through each ordering of the one-factors and form atimetable and find a pattern set for the timetable that gives a schedule with minimum travel distance.

Brief implementation details for each phase are given below.

3.1. Phase 1—Generating one-factorizations

We used the fact [3] that every one-factorization of K8 can be obtained from one of the following one-factorizationsby permuting the vertices:

A 15 26 37 48 B 15 26 37 48 C 15 26 37 4816 25 34 78 16 23 45 78 16 23 45 7817 24 35 68 17 28 35 46 17 28 35 4618 23 45 67 18 25 36 47 18 25 36 4712 38 47 56 12 34 58 67 12 34 57 6813 28 46 57 13 24 57 68 13 24 58 6714 27 36 58 14 27 38 56 14 27 38 56

D 15 26 37 48 E 15 26 37 48 F 12 38 47 5616 23 45 78 16 23 45 78 13 24 58 6717 28 35 46 17 24 35 68 14 35 26 7818 25 34 67 18 25 34 67 15 46 37 2812 36 47 58 12 36 47 58 16 57 48 2313 24 57 68 13 28 46 57 17 68 25 3414 27 38 56 14 27 38 56 18 27 36 45

Instead of generating all the one-factorizations of K8, a simple C++ program was written to generate all thepermutations of the vertices that give all the distinct one-factorizations of K8 from the above six. It is known thatdifferent permutations of the vertices do not necessarily result in different one-factorizations. Duplicates are discarded.

3.2. Phase 2—Timetable constrained distance minimization problem

As reversing the slots of a mirrored schedule still gives a mirrored schedule having the same total distance, oneonly needs to go through 7!

2 = 2520 timetables for each one-factorization generated in Phase 1. Therefore, the totalnumber of timetables considered in Phase 2 is 6240×2520 = 15,724,800. Clearly, the success of the method dependsheavily on how quickly a pattern set minimizing the travel distance for a given timetable can be found.

Ramussen and Trick [12] defined the Timetable Constrained Distance Minimization Problem (TCDMP) as theproblem of finding a pattern set that minimizes the distance traveled for given a timetable. Their computational results

K.K.H. Cheung / Discrete Optimization 5 (2008) 138–143 141

Table 2NL8 (mirrored)—Total cpu time: 3.65 days

Type # TCDMPs solved Best cpu time (s)

A 75,600 43,092 1,619B 6,350,400 42,104 124,422C 4,233,600 43,003 87,920D 1,058,400 41,928 21,105E 1,587,600 42,450 31,743F 2,419,200 42,802 48,741

show that the TCDMP for instances with eight teams without the mirror requirement can be solved in a fraction ofa second using a hybrid approach that combines constraint programming and integer programming. The constraintprogramming part generates all possible patterns, called feasible patterns, that a team can have. With the mirrorrequirement, the number of feasible patterns is quite small and the set of feasible patterns is the same for every team.There are 22 feasible patterns satisfying the mirror requirement for n = 6 and 72 for n = 8.

The TCDMP for a given timetable for a DRR tournament satisfying the mirror requirement can be formulated asan integer programming problem as follows: Let T denote the set of teams {1, . . . , n}. Let S denote the set of slotsin the first half of the timetable {1, . . . , n − 1}. Let P denote the set of feasible patterns. For each pattern j ∈ P andeach s ∈ S, h js is defined to be 1 if slot s of pattern j is 1; otherwise, h js is defined to be 0. Let the first half of thetimetable be given by the ordered one-factorization (F1, . . . , Fn−1). For each t ∈ T and each j ∈ P , let dt j denotethe distance team t must travel if pattern j is assigned to team t . Note that the distance dt j can be calculated giventhe timetable and the pattern. Then the TCDMP for the given timetable can be formulated as the following integerprogramming problem:

min∑t∈T

∑j∈P

dt j xt j

s.t.∑j∈P

xt j = 1 ∀ t ∈ T∑t∈{i1,i2}

∑j∈P

h js xt j = 1 ∀ i1, i2 ∈ T, s ∈ S such that i1 < i2 and i1i2 ∈ Fs

xt j ∈ {0, 1} ∀ t ∈ T, j ∈ P.

The above formulation is a specialization of the formulation introduced by Rasmussen and Trick [12] to the mirroredsetting.

A C++ program was written to handle the generation of timetables from one-factorizations and to solve theTCDMP using the ILOG CPLEX 10.0 callable libraries. The program keeps the best distance obtained so far and usesit as an upper bound for cut-off. In other words, not every TCDMP is solved to optimality unless it yields a betterschedule. Observe that the computations in Phase 2 could be parallelized by dividing the one-factorizations amongdifferent processors.

4. Computational results

All computations were performed on a Linux workstation with an Intel Pentium 4 3.00 GHz processor and1.5 GB of RAM. Phase 1 took just a few seconds. The one-factorizations were divided into six types: A Type Tone-factorization where T ∈ {A, B, C, D, E, F} is one that is obtained from the one-factorization T by permutingvertices. (See Section 3.1 for the one-factorizations A, B, C, D, E, F .) Our program was run once for each type ofone-factorization so that the optimal solution for each type could be found. Table 2 shows the Phase 2 results for themTTP instance NL8. The first column gives the type of one-factorization from which timetables were generated. Thesecond column gives the total number of TCDMPs solved for each type. The third column gives the minimum distanceover all the TCDMPs solved for each type. The last column gives the total cpu time required to solve all the TCDMPsfor each type. Table 3 shows the Phase 2 results for the mTTP instance CIRC8, with the column for the number ofTCDMPs solved omitted.

142 K.K.H. Cheung / Discrete Optimization 5 (2008) 138–143

Table 3CIRC8 (mirrored)—Total cpu time: 3.54 days

Type Best cpu time (s)

A 146 1,507B 142 120,929C 148 84,522D 140 21,372E 142 30,591F 150 47,390

The optimal values for NL8 and CIRC8 are 41,928 and 140, respectively, matching the values of the best-knownsolutions obtained by Ribeiro and Urrutia [14]. The total cpu time required for solving each of the instances was lessthan 3.7 days. We mention in passing that our method solved each of the six-team mTTP benchmark instances NL6and CIRC6 in just a few seconds of cpu time.

5. Concluding remarks

The computational results showed that the best-known solutions for the mTTP benchmark instances NL8 andCIRC8 are optimal. The cpu time required to solve each instance was less than 3.7 days, suggesting that the methodcould be viable for solving to optimality other instances of the mTTP with at most eight teams. Two six-team instanceswere each solved in a few seconds. Unfortunately, preliminary computational experiments suggest that the currentmethod will require 784,000 cpu years to solve the mTTP instance NL10 with 10 teams. It is perhaps not at allsurprising that the method does not scale well as it is arguably an exhaustive search whose running time depends onthe number of one-factorizations. Solving exactly the mTTP instances with higher number of teams will probablyrequire ideas that are not based on one-factorizations.

Acknowledgements

The author would like to thank the anonymous referees for their helpful comments.

References

[1] A. Anagnostopoulos, L. Michel, P. Van Hentenryck, Y. Vergados, A simulated annealing approach to the traveling tournament problem,Journal of Scheduling 9 (2006) 177–193.

[2] T. Benoist, F. Laburthe, B. Rottembourg, Lagrange relaxation and constraint programming collaborative schemes for traveling tournamentproblems, in: Proceedings CPAIOR’01, Wye College (Imperial College), Ashford, Kent, UK, 2001, pp. 15–26.

[3] L.E. Dickson, F.H. Safford, Solutions of problems: Group theory: 8, The American Mathematical Monthly 13 (1906) 150–151.[4] J.H. Dinitz, D.K. Garnick, B.D. McKay, There are 526,915,620 non-isomorphic one-factorizations of K12, Journal of Combinatorial Designs

2 (1994) 273–285.[5] K. Easton, G. Nemhauser, M.A. Trick, The traveling tournament problem: Description and benchmarks, in: T. Walsh (Ed.), Principles and

Practice of Constraint Programming — CP 2001, in: Lecture Notes in Computer Science, vol. 2239, Springer, Berline, Heidelberg, 2001,pp. 580–585.

[6] K. Easton, G. Nemhauser, M.A. Trick, Solving the traveling tournament problem: A combined integer programming and constraintprogramming approach, in: E. Burke, P. De Causmaecker (Eds.), Practice and Theory of Autmoated Timetabling IV, in: Lecture Notes inComputer Science, vol. 2740, Springer, Berline, Heidelberg, 2003, pp. 100–109.

[7] N. Fujiwara, S. Imahori, T. Matsui, R. Miyashiro, Constructive algorithms for the constant distance traveling tournament problem, in:Proceedings of The 6th International Conference on the Practice and Theory of Autmomated Timetabling, Brno, Czech Republic, 2006,pp. 402–405.

[8] E.N. Gelling, R.E. Odeh, On 1-factorizations of the complete graph and the relationship to round robin schedules, in: Proceedings of the ThirdManitoba Conference on Numerical Mathematics (Winnipeg, Man., 1973), Utilitas Math., Winnipeg, Man., 1974, pp. 213–221.

[9] P.V. Hentenryck, Y. Vergados, Traveling tournament scheduling: A systematic evaluation of simulated annealing, in: J.C. Beck, B.M. Smith(Eds.), Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, in: Lecture Notes inComputer Science, vol. 3990, Springer, Berlin, Heidelberg, 2006, pp. 228–243.

[10] A. Lim, B. Rodrigues, X. Zhang, A simulated annealing and hill-climbing algorithm for the traveling tournament problem, European Journalof Operational Research 174 (2006) 1459–1478.

[11] R.V. Ramussen, M.A. Trick, Round robin scheduling — A survey, Technical report, Department of Operations Research, University of Aarhus,2006.

K.K.H. Cheung / Discrete Optimization 5 (2008) 138–143 143

[12] R.V. Rasmussen, M.A. Trick, The timetable constrained distance minimization problem, in: J.C. Beck, B.M. Smith (Eds.), Integration ofAI and OR Techniques in Constraint Programming Programming for Combinatorial Optimization Problems, in: Lecture Notes in ComputerScience, vol. 3990, Springer, Berlin, Heidelberg, 2006, pp. 167–181.

[13] R.V. Ramussen, M.A. Trick, A Benders approach for the constrained minimum break problem, European Journal of Operational Research177 (2007) 198–213.

[14] C.C. Ribeiro, S. Urrutia, Heuristics for the mirrored traveling tournament problem, European Journal of Operational Research 179 (2007)775–787.

[15] S. Urrutia, C.C. Ribeiro, Maximizing breaks and bounding solutions to the mirrored traveling tournament problem, Discrete AppliedMathematics 154 (2006) 1932–1938.

[16] S. Urrutia, C.C. Ribeiro, R.A. Melo, A new lower bound to the traveling tournament problem, in: Proceedings of the 2007 IEEE Symposiumon Computational Intelligence in Scheduling, 2007 (CI-Sched 2007 Honolulu), 2007, pp. 15–18.