© J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

19
© J. Christopher Beck 2008 1 Lecture 21: Sports Scheduling 1

Transcript of © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

Page 1: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 1

Lecture 21:Sports Scheduling 1

Page 2: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 2

Outline ACC Basketball Scheduling

HAPs Algorithm Flow Chart

Single Round Robin Scheduling HAPs again Alg 10.2.2 Example 10.2.3

Page 3: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 3

Readings

P Ch 10.6,10.2 Questions

10.1, 10.2, 10.4, 10.5, 10.6, 10.8

Page 4: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 4

ACC Scheduling

Atlantic Coast ConferenceBasketball 9 teams: Clem, Duke, FSU, GT, UMD, NC,

NCSt, UVA, Wake Double Round Robin

Home and Away Total # of games to be played? What is the maximum # of games per

slot? And, therefore the # of slots?

2 slots/week:weekday &

weekend

Page 5: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 5

Constraints & Preferences

No team should play more than two Home or two Away games consecutively A Bye is considered an Away game

No team should play more than two consecutive weekends Away or at Home

Each team must have at least 2 Home or 1 Home, 1 Bye in the first 5 weeks

Page 6: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 6

More Constraints & Preferences

No team can be Away for both slots in the final week

Final weekend is usually reserved for “rival” pairings Duke-UNC, Clem-GT, NCSt-Wake,

UMD-UVA Duke-UNC must appear in slots 9 and

18Even with only 9 teams this is a hard problem.

Try to decompose the solving into sub-problems.

Page 7: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 7

Mirroring

Since it is a double RR, we can halve the problem size by finding a single RR and “mirroring” the second half Perfect mirroring not always possible

Team 1

3 -4 2

Team 2

-4 3 -1

Team 3

-1 -2 4

Team 4

2 1 -3

-3 4 -2

4 -3 1

1 2 -4

-2 -1 3

Page 8: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 8

Home Away Patterns (HAPs)

Each team has a pattern of Home & Away games: HAHAAHHAAH …, AAHHAHHA …, etc.

First (Step 1) find of a set of HAPs Independent of the teams – just find

strings of Hs, As, (and maybe Bs) Then (Step 2) match patterns to

games and finally (Step 3) assign the teams

Page 9: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 9

Of Course it is More Complicated in the Real World

Findfeasiblepatterns

Findpattern

sets

Assigngames

Assignteams topatterns

Choosefinal

schedule

38 patternsof length 18

17 patternsets

826 timetables 17 schedules

Step 1 Step 2 Step 3

Figure 10.3

Page 10: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 10

Something a Bit Easier

Complete the single RR timetable Don’t worry about Home/Away games

slot 1 2 3 4 5

Team a b f c

Team b a f

Team c d e a

Team d c e

Team e f d c

Team f e a b

Does thisremind youof anything?

Page 11: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 11

Home & Away

Now take the full time table and add Home/Away games

slot 1 2 3 4 5

Team a b f c

Team b a f

Team c d e a

Team d c e

Team e f d c

Team f e a b

Minimize breaks Break: two

consecutive Home or two consecutive Away games

Page 12: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 12

Single Round Robin Tournament

Assume n teams and that n is even Every team plays every other team It is possible to construct a

schedule with n-1 slots each with n/2 games

Page 13: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 13

IP for Simple Single RR

1,,1;,...,11)(1

ntnjxxn

ijitijt

jixxn

tjitijt

1

1

1)(

Each team plays exactly once in each slot

Each team plays each other team exactly once

Pure IP model xijt = 1 iff team i plays at home

against team j in slot t

Page 14: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 14

CP for Simple Single RR

xit = team that team i plays in slot t

xit є {1,…,n} xit ≠ i xit = j xjt = i all-different(xi)

slot 1 2 3 4 5

Team a

Team b

Team c

Team d

Team e

Team f

all-different

e

b

Page 15: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 15

Simple RR Model IsToo Simple

No optimization function No balancing of Away/Home games This motivates the introduction of

HAPs and the definition of breaks Recall: a break is two consecutive

games that are both Home or both Away

Page 16: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 16

What if n is Odd?

One team gets a Bye in every slot HAPs get more complex

String of Hs, As, & Bs Breaks need to be redefined

Page 17: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 17

Alg 10.2.2

Step 1: Find a collection of n HAPs Step 2: Assign a game to each

entry in the pattern set Step 3: Assign teams to patterns

Why do we need (at least) n HAPs?

Page 18: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 18

Alg 10.2.2

Step 1: Find a collection of n HAPs Step 2: Assign a game to each entry

in the pattern set Step 3: Assign teams to patterns

Create a 5 team single round robin Minimize breaks (at which step?)

Now create a double RR schedule

Page 19: © J. Christopher Beck 20081 Lecture 21: Sports Scheduling 1.

© J. Christopher Beck 2008 19

Next Week

We start to read some papers These are real papers, published in the

research literature. You should not expect to completely

understand them in the first reading. You should read them (at least once)

before lecture and (at least once) after. 1 next week, 2 week after, 1 more

later