Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial on Scheduling Sports Tournaments Michael Trick Tepper School of Business Carnegie Mellon University CORS/INFORMS Banff May, 2004.

Similar presentations


Presentation on theme: "Tutorial on Scheduling Sports Tournaments Michael Trick Tepper School of Business Carnegie Mellon University CORS/INFORMS Banff May, 2004."— Presentation transcript:

1 Tutorial on Scheduling Sports Tournaments Michael Trick Tepper School of Business Carnegie Mellon University CORS/INFORMS Banff May, 2004

2 Goals Outline main approaches to creating tournament schedules Combinatorial Design Integer Programming Constraint Programming Give a selection of open problems Identify promising new research directions Primarily based on survey paper by Kelly Easton, George Nemhauser and me.

3 Outline Round robin scheduling Combinatorial Design Integer and Constraint Programming Round robin schedule with venues (home/away) Multiphase Approach Schedule then Break Traveling Tournament Problem Sample Leagues

4 Why Sports Scheduling??? Big Business! US National TV pays $500 million / year for baseball College basketball conferences get up to $30 million Manchester United has (had) a market cap of £400 million No rights holder wants to pay those sums and then get a “bad” schedule. Huge variety of problem types Small instances are difficult Strong break between easy/hard (for all algorithms) Significant theoretical background CP and IP differ in modeling CP has clean models with [1..n] variables IP uses 0-1 variables reasonably naturally Practical interest in instances at the easy/hard interface

5 Sample Problem 10 teams: 1..10, play each other once; 5 games per time slot (all teams play every slot), 9 slots How hard can this be? Slot 1: 1 vs 2, 3 vs 4, 5 vs 6, 7 vs 8, 9 vs 10 Slot 2: 1 vs 4, 2 vs 3, 5 vs 8, 6 vs 9, 7 vs 10 Slot 3: 1 vs 6, 2 vs 5, 3 vs 10, 4 vs 7, 9 vs 8 Slot 4: 1 vs 8, 2 vs 7, 3 vs 6, 4 vs 9, 5 vs 10 Slot 5: 1 vs 10, 2 vs 9, 3 vs 8, 4 vs 5, 6 vs 7 Uh oh! Stuck with 4 slots to go! Slot 6: 1 vs 3, 2 vs 4, 5 vs 7, 6 vs 8, …

6 Not convinced? 9 1 7 5 3 6 2 410 8 Graph of remaining games Every slot is perfect matching (or 1-factor) No perfect matching in graph of remaining games

7 Premature Sets Example of premature set (Rosa and Wallis): set of scheduled slots that cannot be completed to round robin schedule Exist for n (or more) slots; do not exist for ≤ 3 slots (for 2n>6) Open Problem: What is size of minimum premature set?

8 Round Robin Tournaments 2n teams 2n-1 time slots Every team plays one other team in every time slot Every team plays every other team exactly once during tournament

9 Existence Is there a round-robin schedule for every 2n teams? Yes [Kirkman 1847 or earlier] Two constructions Circle method Greedy algorithm

10 Circle Method Number teams 1..2n In slot i have i vs 2n a vs b for a+b ≡ 2i (mod 2n-1)

11 Sample (2n=10) Slot 1:10 vs 12 vs 93 vs 84 vs 75 vs 6 Slot 2:10 vs 23 vs 14 vs 9 5 vs 86 vs 7 Slot 3:10 vs 34 vs 25 vs 16 vs 97 vs 8 Slot 4:10 vs 45 vs 36 vs 27 vs 18 vs 9 Slot 5:10 vs 56 vs 47 vs 38 vs 29 vs 1 Slot 6:10 vs 67 vs 58 vs 49 vs 31 vs 2 Slot 7:10 vs 78 vs 69 vs 51 vs 42 vs 3 Slot 8:10 vs 8 9 vs 71 vs 62 vs 53 vs 4 Slot 9:10 vs 91 vs 82 vs 73 vs 64 vs 5

12 Why Circle Method? 10 1 5 3 7 8 9 6 4 2 Slot 1 Slot 2 Continue rotating to get all the slots. Key is initial set of games have all differences

13 Greedy Method Order matches (i,j) in lexicographic order (i,j) before (i,k) if j<k (i,j before (k,l) if i<k Order slots in cyclic order Assign (1,2) to slot 1 Repeatedly assign each game to either current slot or next slot it can feasibly go into

14 Example (n=10) 1 vs 23 vs 94 vs 8 1 vs 32 vs 104 vs 9 1 vs 42 vs 3 1 vs 52 vs 43 vs 10 1 vs 62 vs 53 vs 4 1 vs 72 vs 63 vs 54 vs 10 1 vs 82 vs 73 vs 64 vs 5etc. 1 vs 92 vs 83 vs 74 vs 6 1 vs 102 vs 93 vs 84 vs 7

15 Equivalence Anderson (1991) showed equivalence (rounds in different order) Other non-equivalent schedules possible Lots of choices even among one of these: permute slots, team numbers

16 Adding Requirements Generally lots of other things you would like in a schedule Carry-over effects Venues Fixed/prohibited games Objective function Some of this can still be done directly

17 Carry Over Effects Slot 1:10 vs 12 vs 93 vs 84 vs 75 vs 6 Slot 2:10 vs 23 vs 14 vs 9 5 vs 86 vs 7 Slot 3:10 vs 34 vs 25 vs 16 vs 97 vs 8 Slot 4:10 vs 45 vs 36 vs 27 vs 18 vs 9 Slot 5:10 vs 56 vs 47 vs 38 vs 29 vs 1 Slot 6:10 vs 67 vs 58 vs 49 vs 31 vs 2 Slot 7:10 vs 78 vs 69 vs 51 vs 42 vs 3 Slot 8:10 vs 8 9 vs 71 vs 62 vs 53 vs 4 Slot 9:10 vs 91 vs 82 vs 73 vs 64 vs 5 4 almost always plays against team who just played 2

18 Balancing Carryover In example: 4 has carry over effect from 2 almost exclusively Possible to “spread” carryover effect out (no more than 1 time from any other team)?

19 Solution Yes, Russell (1980), if 2n = 2 n Slot 1: 1 vs 4 2 vs 53 vs 86 vs 7 Slot 2: 1 vs 52 vs 4 3 vs 67 vs 8 Slot 3: 1 vs 62 vs 83 vs 5 4 vs 7 Slot 4: 1 vs 72 vs 34 vs 6 5 vs 8 Slot 5: 1 vs 82 vs 6 3 vs 45 vs 7 Slot 6: 1 vs 23 vs 7 4 vs 56 vs 8 Slot 7: 1 vs 32 vs 74 vs 85 vs 6

20 What about for other 2n? Combinatorial design does not (seem to) help Construction of Russell involves Galois Fields (finite fields): might be generalized (though GF(n) does not exist for all n) Seems unlikely that balanced schedule exists, but “best” balance is unknown (measured by sum of squared carryover values)

21 Current State 2nValue 660 (optimal Henz, Mueller, Thiel) 8 56 (optimal Russell) 10 122 (Trick) 12 188 (HMT and van Brandenburg) 14260 (Russell) 16240 (optimal, Russell) 18428 (Russell) 20 520 (Russell) Open Problem: Improve on the carryover values

22 Additional/Alternative Requirements Gets messier and messier as more requirements get added. Quickly get into NP-hard problems Example: Fix all but 3 slots. Completion problem is NP-complete (Easton, 2003) Need to use algorithms like integer programming/constraint programming Studied in HMT (2004) and Trick (2003)

23 Basic Formulation Two fundamental constraints: In every time slot, the games correspond to a one- factor (or matching) For every team, its opponents over all slots are all- different ATL NYM PHI MON --- --- --- --- PHI MON ATL NYM NYM ATL MON PHI MON PHI NYM ATL atlphi nym mon All-different

24 One Slide on Formulating in IP Variables can be either continuous or integer valued (often 0-1 variables) Constraints are linear inequalities of these variables 3x 1 +2x 2 +12x 3 ≤ 13 x 2 -x 3 ≤ 0 etc. Objective is linear function of the variables 12x 1 +2x 2 -3x 3 …

25 Integer Program Int n= … Range Teams [0..n-1]; Range Slots [1..n-1]; Range Binary 0..1; Var Binary plays[Teams, Teams, Slots]; // plays[i,j,t] is 1 if // i plays j in slot t Solve { forall (i in Teams, t in Slots) plays[i,i,t] = 0; //one-factor forall (ordered i,j in Teams, t in Slots) plays[i,j,t] = plays[j,i,t]; forall (i in Teams, t in Slots) sum (j in Teams) plays[i,j,t] = 1; // all-different forall (i,j in Teams: i<>j) sum(t in Slots) plays[i,j,t] = 1;

26 Two Slide Introduction to Constraint Programming Variables begin with a feasible domain (generally not 0,1) Constraints reduce the feasible domains through domain reduction Much cleverness in defining interesting constraints and doing domain reduction After domain reduction If domain becomes empty: infeasible If domains are singletons: solution Otherwise, branch

27 Two Slide Example of Constraint Programming Variables x,y,z. D(x) = {1,2}, D(y)={2,3}, D(z) = {3}. Constraint: all-different(x,y,z) Effects: D(y) becomes {2} which forces D(x)={1} This domain reduction gives unique values to all variables

28 Constraint Program Int n = …; Range Teams [0..n-1]; Range Slots [1..n-1]; Var Teams opponent[Teams,Slots]; Solve { forall (i in Teams, t in Slots) opponent[i,t]<>i; //one-factor forall (t in Slots) one-factor(all (i in Teams) opponent[i,t]); //all-different forall (i in Teams) all-different(all (t in Slots) opponent[i,t]);

29 Constraint Program (cont) But how to implement one-factor and all-different ? all-different is a well studied constraint with multiple propagation algorithms HMT show that all-different propagation should be as strong as possible (expending extra work to reduce domains is worth it) Work done by Régin on how to do propagation for this.

30 Three Models for 1-Factor opponent[opponent[i,t],t] = i Forall (t in Slots) alldifferent(all i in Teams) opponent[i,t] Full propagation (uses nonbipartite matching theorems)

31 Illustration of Propagation Given domains D(1)={2,4} D(2)={1,3} D(3)={2} D(4)={1,3} can represent as a graph opponent[opponent[i,t],t] = i removes any arc without corresponding reverse arc All-different removes any arc not part of any union of node-disjoint cycles that covers all nodes One-factor removes any arc not part of any union of node-disjoint even cycles that covers all nodes i j j is in i‘s domain 1 4 2 3

32 Propagation Original One-factor i j j is in i‘s domain opponent[ opponent[i,t],t] = i All-different

33 Strength of Propagations HMT showed increasing strength and proposed algorithm for one-factor Not stronger, though, if domains are bipartite: partition nodes into X and Y such that domain of anything in X is in Y and anyting in Y is in X. Bipartite domains occur in Bipartite tournaments If home/away pattern is fixed.

34 Improving IP Formulation Possible to add “odd-cut” constraints. forall (t in Slots, S  Teams: |S| odd) sum (i in S, j notin S) plays[i,j,t] >= 1 Used to remove linear relaxations like: Can be found by minimum cut calculation (Gomory-Hu) Value.5 on every edge Satisfies linear relax. S

35 Interesting Parallels Odd-cuts are useful exactly when the HMT method is useful: nonbipartite domains. Use same underlying theory: nonbipartite matching theory of Edmonds, etc.

36 Comparing IP and CP Decision on IP vs CP is primarily computational What instances to solve? Just finding unconstrained Round Robin is not interesting Possible changes Fixed/Prohibited games Objective function

37 Test 1: Prohibited games Series of prohibitions of the form (k,i,j): in slot k, i cannot be at j Now problem is NP-complete (Schaerf) Easy to add to both CP and IP HMT: give test instances (divide their time by 4.5 to normalize machine speeds)

38 Test 1: Prohibited Games: Results ProblemSizeAll-differentBasic-IPHMT FTNTFT S_10_no10230.0240.1060.01 S_12_no12240.0700.14250.17 S_14_no141350.23501.02690.56 S_16_no16790.3000.39861.19 S_18_no18430.3200.42300.50 S_20_no206965.4700.782545.11

39 Test 2: Recognizing Premature Sets Take n=10, 14, 18 etc. Divide into 2 divisions (0..4 and 5..9). Play between divisions for n/2-1 slots. Note since odd number of teams in division, divisions cannot play solely within themselves Slot 0 1 2 3 4 5 --- ------------------ 1 3 4 5 0 1 2 2 4 5 3 2 0 1 3 5 3 4 1 2 0 4 5 6 INFEASIBLE! Why?

40 Test 2: Premature Sets Only fix 2 games in slot n/2: result still infeasible but hard to prove: SizeAll_differen t Basic-IPStrong-IP FTNTNT 101160.203930.1900.20 14--- 00.34 18--- 00.32 22--- 00.38

41 Test 2: Premature Sets Not unfair test: realistic set of requirements on a schedule Points to possibility of improved cuts/ constraints

42 Test 3: Maximum Value Schedules There may be a value for having i play at j in slot k: predicted ratings, attendance, team preferences, etc. Objective could be to maximize total value (other possibilities: maximize minimum value, etc.) Easy to modify CP and IP

43 Test 3: Maximum Value Schedules: Results Results are clear (despite efforts to find good search strategy for CP): SizeAll_differentBasic_IP FTNT 8849625.3300.03 10--- 660.29 12--- 4023.59 14--- 7263133.03

44 IP vs CP IP and CP are competitive Neither are truly satisfying at this stage Open Problem: Fully test Strong IP formulation Open Problem: Devise constraints/cuts that go beyond the one-factor and all-different individual constraints

45 Venues Key issue in many leagues: Every team has a home stadium (court, arena, etc.). Each game is either a “home” game or an “away” game for a team Issues with Consecutive home/away Subgroup counts (so many home in first half, so many home on weekends, etc.)

46 Handling venues Combinatorial Approaches Direct addition to integer program and/or constraint program Multiple phase approaches Home/away pattern generation Schedule then break approaches

47 Combinatorial Approaches De Werra did much work on this in 1980s Generally concerned with minimizing breaks Ideal home/away pattern in HAHAH.. (or reverse) HH or AA is called a break

48 Basic insights Teams need breaks! No more than 1 each of HAHAHAH… AHAHAHA… So, for round robin of 2n teams, there are at least 2n-2 breaks

49 Minimum Break Schedule De Werra (1981) suggests following for canonical schedule: In slot i, i plays 2n, other games are of form i+k vs i-k for all values of k Let i+k play at i-k if k is odd Let i-k play at i+k if k is even Let i play at 2n if i is even Let 2n play at i if i is odd

50 Sample 123456 165@43@2@1 2@3@61@542 35@462@1@3 4@12@5@634 54@32@16@5 4 breaks: minimal

51 Facts about breaks Occur in pairs Each team has at most one 2 teams with 0 Pattern: (0,2,0,2) (d i = #breaks after slot i) In general, (…2,2,2…) not possible (…2,2,0,2,2,…) Miyashiro, Iwasaki, and Matsui have necessary condition Open Problem: Characterize feasible break patterns for min-break schedules

52 Other way Given a round robin schedule, assign home/away so as to minimize breaks 1 2 3 4 5 6 1 6 5 4 3 2 1 2 3 6 1 5 4 2 3 5 4 6 2 1 3 4 1 2 5 6 3 4 5 4 3 2 1 6 5 1 2 3 4 5 6 1 6 5 4@3@2@1 2@3 6 1 5@4@2 3@5@4@6 2 1 3 4 1@2 5 6@3@4 5 4 3@2@1@6 5 9 breaks (but there are better solutions!)

53 Schedule then break Given a round-robin schedule, assign home/away so as to minimize breaks Régin: Constraint Program (up to 20) Trick: Integer Program (up to 22) Elf, Juenger, Rinaldi: Maximum Cut (up to 26) Miyashiro and Matsui: polynomial if 2n-2 breaks suffice Open Problem: Is the Minimum Break problem NP-complete?

54 More general venue constraints Min-break is not always appropriate College basketball plays twice per week, so something like HHAAHH… is best Major League Baseball likes things like HHHAAAHHH… Additional restrictions like weekend counts, alternations, etc.

55 Add to IP and CP Can modify previous IP and CP formulations to include home/away aspects Add variables to home[i,t] which equals 1 if i home in time t (and constraints of the form “if i plays j, exactly 1 is at home”).

56 Limits on Consecutive Home/Away Constraint Program clear winner: NKInteger Program Constraint Program NTFT 141259.713121.21 142970.10110.20 1431182.3430.18 14420169.4 2 20.19

57 No Singletons More interesting to prohibit singletons (Single home surrounded by Aways or vice-versa) Easy to add such constraints: home[i,t]<= home[i,t-1]+home[i,t+1];

58 Test 5: No Singletons: Results IP is now much better: NKInteger Program Constraint Program NTFT 83151622.73--- 84770.92--- 103--- 10415268594.70---

59 Other approaches Note problem size, however: even small problems are getting hard to solve Alternative is to have multiple phase approach

60 Phase 1: Find HAPs Find Home/Away pattern, one sequence per team 1: HAHAH 2: AHAHA 3: HHAAH 4: HAHHA 5: AAHHA 6: AHAAH Open Problem: Characterize feasible H/A patterns

61 Phase 2. Assign Games Assign games consistent with HAP (+ denotes home; - is away) 1: +2 -3 +6 -4 +5 2: -1 +4 -5 +6 -3 3: +6 +1 -4 -5 +2 4: +5 -2 +3 +1 -6 5: -4 -6 +2 +3 -1 6: -3 +5 -1 -2 +4

62 Phase 3. Assign Teams Assign teams to entries F: +E -A +B -D +C E: -F +D -C +B -A A: +B +F -D -C +E D: +C -E +A +F -B C: -D -B +E +A -F B: -A +C -F -E +D

63 Solving Subproblems Nemhauser and Trick (1998, Scheduling ACC): IP for phase 1 and 2, complete enumeration for 3 Henz (2001): CP for all phases: much faster, particularly relative to complete enumeration Lots of other papers in same vein (often in different orders: Cain, Schreuder, Russell and Leung, etc.) Very robust and flexible approach

64 Final Problem Combine issues of venue with travel distance Traveling Tournament Challenge Problem

65 Traveling Tournament Problem Given an n by n distance matrix D= [d(i,j)] and an integer k find a double round robin (every team plays at every other team) schedule such that: The total distance traveled by the teams is minimized (teams are assumed to start at home and must return home at the end of the tournament), and No team is away more than k consecutive games, or home more than k consecutive games. (For the instances that follow, an additional constraint that if i is at j in slot t, then j is not at i in t+1.)

66 Sample Instance NL6: Six teams from the National League of (American) Major League Baseball. Distances: 0 745 665 929 605 521 745 0 80 337 1090 315 665 80 0 380 1020 257 929 337 380 0 1380 408 605 1090 1020 1380 0 1010 521 315 257 408 1010 0 k is 3

67 Sample Solution Distance: 23916 (Easton May 7, 1999) Slot ATL NYM PHI MON FLA PIT 0 FLA @PIT @MON PHI @ATL NYM 1 NYM @ATL FLA @PIT @PHI MON 2 PIT @FLA MON @PHI NYM @ATL 3 @PHI MON ATL @NYM PIT @FLA 4 @MON FLA @PIT ATL @NYM PHI 5 @PIT @PHI NYM FLA @MON ATL 6 PHI @MON @ATL NYM @PIT FLA 7 MON PIT @FLA @ATL PHI @NYM 8 @NYM ATL PIT @FLA MON @PHI 9 @FLA PHI @NYM PIT ATL @MON

68 Simple Problem, yes? NL12. 12 teams Feasible Solution: 143655 (Rottembourg and Laburthe May 2001), 138850 (Larichi, Lapierre, and Laporte July 8 2002), 125803 (Cardemil, July 2 2002), 119990 (Dorrepaal July 16, 2002), 119012 (Zhang, August 19 2002), 118955 (Cardemil, November 1 2002), 114153 (Van Hentenryck January 14, 2003), 113090 (Van Hentenryck February 26, 2003), 112800 (Van Hentenryck June 26, 2003), 112684 (Langford February 16, 2004), 112549 (Langford February 27, 2004), 112298 (Langford March 12, 2004), 111248 (Van Hentenryck May 13, 2004). Lower Bound: 107483 (Waalewign August 2001)

69 Successful Approaches: Feasible Solutions Anagnostopolous, Michel, Van Hentenryck, and Vergados use simulated annealing Hard part is determining neighborhood structure

70 Neighborhood No completely natural neighborhood: most swapping does not lead to feasible double round robin schedule Swap venues for a pair of games Swap 2 slots of games Swap schedule of 2 teams Partially swap 2 slots (swap 1 game then minimum number to keep feasible) Partially swap 2 teams (swap games in single slot then minimum number to keep feasible)

71 Successful Approaches: Lower Bound Not much better than sum of minimum travel for each team (solvable by series of small IPs or CPs)

72 Successful Approaches: Optimality Easton uses parallel implementations with CP generating good schedules for teams and IPs putting schedules together (parallel branch and price) Able to prove optimality of 8 teams Open Problem: Find optimal solutions to the Traveling Tournament Problem for 2n=10

73 Practical Implementations Trick and Nemhauser, then Easton, Nemhauser and Trick on scheduling ACC Basketball Scheuder and Dutch Football Trick then Easton, Nemhauser, and Trick on MLB Baseball Lustig and the NFL Lots of others (and would be even more if people would listen more to us!)

74 What is size of minimum premature set? Improve on the carryover values Fully test Strong IP formulation Devise constraints/cuts that go beyond the one-factor and all-different individual constraints Characterize feasible break patterns for min-break schedules Open Problem: Is the Minimum Break problem NP-complete? Open Problem: Characterize feasible H/A patterns Open Problem: Find optimal solutions to the Traveling Tournament Problem for 2n=10 Solve Real Scheduling Problems!

75 Further Information Easton, Nemhauser and Trick survey in Handbook of Scheduling http://mat.gsia.cmu.edu/TOURN This talk (or corrected version!) at http://mat.gsia.cmu.edu/sports after conference http://mat.gsia.cmu.edu/sports


Download ppt "Tutorial on Scheduling Sports Tournaments Michael Trick Tepper School of Business Carnegie Mellon University CORS/INFORMS Banff May, 2004."

Similar presentations


Ads by Google