Richard Hoshino Post-Doctoral Fellow National Institute of ...rhoshino/talks/rikadai.pdf ·...
Transcript of Richard Hoshino Post-Doctoral Fellow National Institute of ...rhoshino/talks/rikadai.pdf ·...
Richard Hoshino 星野リチャ‒ドPost-Doctoral Fellow, National Institute of Informatics
Joint work with Ken-ichi Kawarabayashi
Outline of Presentation
Context and Motivation
Intra-league Scheduling for NPB Multi-Round Balanced Traveling Tournament Problem Can cut 60,000 km of travel from NPB intra-league schedule
Inter-league Scheduling for NPB Bipartite Traveling Tournament Problem Can cut 8,000km of travel from NPB inter-league schedule
Implementation Please give us advice and ideas!
Context and Motivation
Life in Makuhari (幕張)
Our Apartment
Kanda University
Chiba Marine Stadium Kaihin-Makuhari Station
Chiba Marines Schedule (2010)
1 2 3 4 5
Saitama Hokkaido Tohoku Orix Fukuoka
6 7 8 9 10
Saitama Hokkaido Orix Tohoku Fukuoka
11 12 13 14 15
Saitama Fukuoka Hokkaido Orix Tohoku
16 17 18 19 20
Orix Hokkaido Fukuoka Saitama Tohoku
23,266 kilometres in total travel.
(HOME sets are marked in red.)
Chiba Marines Schedule (2010)
21 22 23 24 25
Fukuoka Orix Saitama Hokkaido Saitama
26 27 28 29 30
Fukuoka Tohoku Orix Hokkaido Tohoku
31 32 33 34 35
Hokkaido Orix Saitama Fukuoka Tohoku
36 37 38 39 40
Hokkaido Orix Saitama Fukuoka Tohoku
23,266 kilometres in total travel.
(HOME sets are marked in red.)
PL Intra-League TravelTeam Name Distance
(2010)
Chiba 23,266
Tohoku 23,710
Hokkaido 28,599
Orix 24,128
Fukuoka 33,352
Saitama 20,885
TOTAL 153,940
Team Name Trips(2010)
Chiba 36
Tohoku 37
Hokkaido 32
Orix 34
Fukuoka 35
Saitama 34
TOTAL 208
Reducing Travel DistanceTeam Name Distance
(2010)
Chiba 23,266
Tohoku 23,710
Hokkaido 28,599
Orix 24,128
Fukuoka 33,352
Saitama 20,885
TOTAL 153,940
Distance(RH+KK)
Reductionin Travel
16,606 28.6%
17,975 24.2%
20,234 29.2%
18,713 22.4%
21,143 36.6%
19,498 6.6%
114,169 25.8%
Reducing Total TripsTeam Name Trips
(2010)
Chiba 36
Tohoku 37
Hokkaido 32
Orix 34
Fukuoka 35
Saitama 34
TOTAL 208
Trips(RH+KK)
Reductionin Trips
29 19.4%
29 21.6%
27 15.6%
29 14.7%
27 22.9%
28 17.6%
169 18.8%
Nippon Series Champions!
Interview in NII Today
Ken-ichi Kawarabayashi National Institute of Informatics
Mariko TakahashiAsahi Shimbun
Intra-League Scheduling
Intra-League Scheduling
Defining the Traveling Tournament Problem (TTP)
Defining the Multi-Round Balanced TTP (mb-TTP)
Specific to the scheduling requirements of the NPB League.
Reformulation as a Shortest Path Problem
Optimal Solution for Pacific and Central Leagues
~40,000 km reduction for PL (153,940 km to 114,169 km)
~20,000 km reduction for CL (79,067 km to 57,836 km)
Nippon Pro Baseball Schedules
1 2 3 4 5
Saitama Hokkaido Tohoku Orix Fukuoka
6 7 8 9 10
Saitama Hokkaido Orix Tohoku Fukuoka
11 12 13 14 15
Saitama Fukuoka Hokkaido Orix Tohoku
16 17 18 19 20
Orix Hokkaido Fukuoka Saitama Tohoku
At-Most-Three Condition: Home stands and road trips last at most 3 sets.
No-Repeat Condition: No team can play against the same opponent in consecutive sets.
Home-Away Condition: In every ten-set block, each pair of teams plays twice, with one set played at each team’s home stadium.
Each-Round Condition: In each five-set round, a team plays against all five opponents once.
Diff-Two Condition:The value |H−R| never exceeds 2.
Traveling Tournament Problem
Given an n × n distance matrix, determine the double round-robin tournament schedule that
satisfies At-Most-Three, No-Repeat, and Home-Away.
minimizes the total distance traveled by the n teams.
For example, A-B-C-B-A – C-D-E-D-E is a valid team schedule under the Traveling Tournament Problem (TTP) but would not be for Nippon Pro Baseball as the Each-Round and Diff-Two conditions are not satisfied.
History of the TTP
Proposed by Easton-Nemhauser-Trick (2001) in the context of scheduling for Major League Baseball.
The TTP is NP-complete (2010). To date, only a few benchmark cases have been solved to optimality: NL4(1999), NL6 (1999), NL8 (2008), NL10 (2009).
TTP-solving algorithms are a complex hybrid of integer programming and constraint programming.
Multi-Round Balanced TTP
Motivated by the actual league structure of Nippon Pro Baseball (NPB), we propose the mb-TTP, with multiple rounds and additional balancing constraints.
Given an n × n distance matrix, determine the distance-optimal tournament schedule that lasts 2krounds (k blocks) and satisfies all five conditions: At-Most-Three, No-Repeat, Home-Away, Each-Round, Diff-Two.
We solve this problem by reformulating the mb-TTP as a shortest-path problem on a directed graph.
Concatenating Two Blocks
How do we check whether two 10-set blocks can be concatenated to form a 20-set tournament schedule?
Team
Chiba (C)
Tohoku (T)
Hokkaido (H)
Orix (O)
Fukuoka (F)
Saitama (S)
R1 R2
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
R3 R4
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
Concatenating Two Blocks
The conditions Home-Away, Each-Round, Diff-Twoare automatically satisfied, since each block is feasible.
Team
Chiba (C)
Tohoku (T)
Hokkaido (H)
Orix (O)
Fukuoka (F)
Saitama (S)
R1 R2
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
R3 R4
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
Concatenating Two Blocks
To check No-Repeat, just look at the last column in Block #1 and the first column in Block #2.
Team
Chiba (C)
Tohoku (T)
Hokkaido (H)
Orix (O)
Fukuoka (F)
Saitama (S)
R1 R2
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
R3 R4
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
Concatenating Two Blocks
To check At-Most-Three, look at the last two columns in Block #1 and the first two columns in Block #2.
Team
Chiba (C)
Tohoku (T)
Hokkaido (H)
Orix (O)
Fukuoka (F)
Saitama (S)
R1 R2
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
R3 R4
S H T F O T F O S H
H F C O S C O S H F
T C O S F O S F T C
F S H T C H T C F S
O T S C H S C H O T
C O F H T F H T C O
Graph-Theoretic Reformulation
Each team starts and ends the season at home (vstart, vend)
Each vertex xt,u with 1 ≤ u ≤ m, represents the first two columns of the tth block (matches = 1st, home teams = 2nd)
Each vertex yt,u with 1 ≤ u ≤ m, represents the last two columns of the tth block (home teams = 9th, matches = 10th)
Explanation of the variable m1 2
D 1
E 1
F 1
A 0
B 0
C 0
Team
A
B
C
D
E
F
x1,u
For n = 6, m = 20 × 120 = 2400. In general,
203
6
2/
n
n
120!33
6!2/
2/
n
n
n
There are
ways to select the home teams of any column.
So there are
ways to select the three matchesof any column.
!2/2/
2
nn
nm
Construction of Edge yt,v→ xt+1,uTeam
A
B
C
D
E
F
9 10
1 F
0 E
1 D
1 C
0 B
0 A
11 12
B 0
A 0
F 0
E 1
D 1
C 1
y1,v x2,u
yt,v→ xt+1,u is an edge iff the n × 4 concatenation matrix does not violate the at-most-three or no-repeat conditions.
The weight of edge yt,v→ xt+1,u is the distance traveled by the n teams moving from set 2t(n-1) to 2t(n-1)+1.
Construction of Edge xt,u→ yt,v1 2
B 0
A 0
F 0
E 1
D 1
C 1
Team
A
B
C
D
E
F
9 10
1 F
0 E
1 D
1 C
0 B
0 A
x1,u y1,v
xt,u→ yt,v is an edge iff there exists a (feasible) block satisfying the five mb-TTP conditions.
The weight of edge xt,u→ yt,v is the minimum possible total distance traveled by the n teams within that block.
3 4 5 6 7 8
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
? ? ? ? ? ?
Dijkstra’s Algorithm
The directed graph has 2mk+2 vertices and at most 2m+(2k-1)m2 edges. Each edge has a weight.
Now apply Dijkstra’s Algorithm to find the shortest path vstart → x1,u1→ y1,v1 → … → xk,uk → yk,vk→ vend
which produces the optimal solution of the mb-TTP.
Optimal Intra-League Schedule
In the NPB, each team plays 120 intra-league games (40 sets of 3 games), with eight sets (24 games) against each of the other 5 teams. Thus, there are 8 rounds.
Team R1 R2 R3 R4 R5 R6 R7 R8
Chiba SHTFO TFOSH TFOSH OSHTF HOFST FSTHO TSHOF HOFTS
Tohoku HFCOS COSHF CHSFO SFOCH SHOFC OFCSH CHOFS OFSCH
Hokkaido TCOSF OSFTC STFOC FOCST CTSOF SOFCT FTCSO CSOFT
Orix FSHTC HTCFS FSCHT CHTFS FCTHS THSFC SFTCH TCHSF
Fukuoka OTSCH SCHOT OCHTS HTSOC OSCTH CTHOS HOSTC STCHO
Saitama COFHT FHTCO HOTCF TCFHO TFHCO HCOTF OCFHT FHTOC
Chiba Marines Schedule (2012?)
1 2 3 4 5
Saitama Hokkaido Tohoku Fukuoka Orix
6 7 8 9 10
Tohoku Fukuoka Orix Saitama Hokkaido
11 12 13 14 15
Tohoku Fukuoka Orix Saitama Hokkaido
16 17 18 19 20
Orix Saitama Hokkaido Tohoku Fukuoka
16,606 kilometres in total travel by this team, a 28.6% reduction.
(HOME sets are marked in red.)
Chiba Marines Schedule (2012?)
21 22 23 24 25
Hokkaido Orix Fukuoka Saitama Tohoku
26 27 28 29 30
Fukuoka Saitama Tohoku Hokkaido Orix
31 32 33 34 35
Tohoku Saitama Hokkaido Orix Fukuoka
36 37 38 39 40
Hokkaido Orix Fukuoka Tohoku Saitama
16,606 kilometres in total travel by this team, a 28.6% reduction.
(HOME sets are marked in red.)
Results for NPB Central LeagueTeam Name Distance
(2010)Distance
(New)Reduction in Travel
Trips(2010)
Trips (New)
Reduction in Trips
Hiroshima 17,850 11,741 34.2% 33 27 18.2%
Hanshin 14,304 8,712 39.1% 33 29 12.1%
Chunichi 11,790 11,665 1.1% 33 28 15.2%
Yokohama 13,104 8,929 31.9% 34 29 14.7%
Yomiuri 11,469 9,020 21.4% 33 28 15.2%
Yakult 10,550 7,769 26.4% 33 29 12.1%
TOTAL 79,067 57,836 26.8% 199 170 14.6%
For the two leagues, we can reduce total intra-league travel by 60,000 km and eliminate 68 trips!
Inter-League Scheduling
2010 Inter-League Schedule
In the NPB, each team plays 24 inter-league games (12 sets of 2 games), against each of the 6 teams from the other league. The home game slots are uniform.
Team R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12
Fukuoka (P1) C3 C6 C2 C1 C4 C5 C3 C6 C1 C2 C4 C5
Orix (P2) C6 C3 C1 C2 C5 C4 C6 C3 C2 C1 C5 C4
Saitama (P3) C4 C5 C6 C3 C1 C2 C4 C5 C6 C3 C2 C1
Chiba (P4) C5 C4 C3 C6 C2 C1 C5 C4 C3 C6 C1 C2
Tohoku (P5) C1 C2 C4 C5 C3 C6 C1 C2 C4 C5 C3 C6
Hokkaido (P6) C2 C1 C5 C4 C6 C3 C2 C1 C5 C4 C6 C3
2010 Inter-League Schedule
In the NPB, each team plays 24 inter-league games (12 sets of 2 games), against each of the 6 teams from the other league. The home game slots are uniform.
Team R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12
Hiroshima (C1) P5 P6 P2 P1 P3 P4 P5 P6 P1 P2 P4 P3
Hanshin (C2) P6 P5 P1 P2 P4 P3 P6 P5 P2 P1 P3 P4
Chunichi (C3) P1 P2 P4 P3 P5 P6 P1 P2 P4 P3 P5 P6
Yokohama (C4) P3 P4 P5 P6 P1 P2 P3 P4 P5 P6 P1 P2
Yomiuri (C5) P4 P3 P6 P5 P2 P1 P4 P3 P6 P5 P2 P1
Yakult (C6) P2 P1 P3 P4 P6 P5 P2 P1 P3 P4 P6 P5
Minimum-Weight Perfect Matching
Triangle Cover
Inter-League Scheduling
Defining the 2n-team Bipartite TTP (BTTP)
Replacing At-Most-Two with At-Most-Three.
Retaining the Home-Away and No-Repeat conditions.
Considering both uniform and non-uniform schedules .
NP-completeness of both BTTP variants.
Optimal Solution for NPB Inter-League Play (n=6)
Uniform: ~7,700 km reduction (51,134 km to 43,285 km)
Non-Uniform: ~8,000 km reduction (51,134 km to 42,950 km)
Simple Illustration for n=3
Here are two feasible bipartite tournament schedules with teams X = (X1, X2, X3) and Y = (Y1, Y2, Y3). Which schedule has lower total travel distance?
Team R1 R2 R3 R4 R5 R6
X1 Y1 Y2 Y3 Y1 Y2 Y3
X2 Y2 Y3 Y1 Y2 Y3 Y1
X3 Y3 Y1 Y2 Y3 Y1 Y2
Y1 X1 X3 X2 X1 X3 X2
Y2 X2 X1 X3 X2 X1 X3
Y3 X3 X2 X1 X3 X2 X1
Team R1 R2 R3 R4 R5 R6
X1 Y3 Y2 Y1 Y3 Y1 Y2
X2 Y1 Y3 Y2 Y1 Y2 Y3
X3 Y2 Y1 Y3 Y2 Y3 Y1
Y1 X2 X3 X1 X2 X1 X3
Y2 X3 X1 X2 X3 X2 X1
Y3 X1 X2 X3 X1 X3 X2
Trips = 4+4+4+4+4+4 = 24 Trips = 5+5+5+6+6+5 = 32
Simple Illustration for n=3
It all depends on where the teams are located!
Locate X1, X3, Y1, Y2 at (0,0) and X2, Y3 at (1,0). Then we get a counter-intuitive result!
Team R1 R2 R3 R4 R5 R6
X1 Y1 Y2 Y3 Y1 Y2 Y3
X2 Y2 Y3 Y1 Y2 Y3 Y1
X3 Y3 Y1 Y2 Y3 Y1 Y2
Y1 X1 X3 X2 X1 X3 X2
Y2 X2 X1 X3 X2 X1 X3
Y3 X3 X2 X1 X3 X2 X1
Team R1 R2 R3 R4 R5 R6
X1 Y3 Y2 Y1 Y3 Y1 Y2
X2 Y1 Y3 Y2 Y1 Y2 Y3
X3 Y2 Y1 Y3 Y2 Y3 Y1
Y1 X2 X3 X1 X2 X1 X3
Y2 X3 X1 X2 X3 X2 X1
Y3 X1 X2 X3 X1 X3 X2
Distance = 2+4+2+2+2+4=16 Distance = 2+2+2+2+2+2=12
NP-completeness of BTTP
We prove that BTTP is NP-complete, even when the restricted to the set of uniform schedules!
We accomplish this by reducing from 3-SAT, using a special “gadget” and carefully defining edge weights.
Rooted 4-cycle-covers For each team, find a minimum weight 4-cycle-cover
rooted at that vertex.
Individual Team Lower Bound
The minimum-weight rooted 4-cycle-cover determines each team’s individual lower bound. We use this to build a feasible uniform bipartite tournament.
Team R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12
Fukuoka (P1) C2 C3 C1 C2 C3 C6 C4 C5 C6 C1 C4 C5
Orix (P2) C4 C6 C5 C3 C6 C1 C2 C3 C1 C2 C5 C4
Saitama (P3) C3 C1 C2 C6 C4 C2 C5 C6 C4 C5 C3 C1
Chiba (P4) C5 C4 C6 C5 C2 C4 C3 C1 C2 C6 C1 C3
Tohoku (P5) C1 C2 C3 C4 C1 C5 C6 C4 C5 C3 C2 C6
Hokkaido (P6) C6 C5 C4 C1 C5 C3 C1 C2 C3 C4 C6 C2
Best Uniform Tournament
The optimal uniform inter-league tournament for NPB has total distance just 12 + 510 = 522 km more than the
theoretical trivial lower bound.
Team ILB Optimal Diff.
Fukuoka 3401 3401 0
Orix 2178 2178 0
Saitama 1939 1940 1
Chiba 1895 1906 11
Tohoku 2660 2660 0
Hokkaido 4613 4613 0
TOTAL 16686 16698 12
Team ILB Optimal Diff.
Hiroshima 5027 5027 0
Hanshin 4549 4550 1
Chunichi 4459 4612 153
Yokohama 4023 4362 339
Yomiuri 4008 4019 11
Yakult 4011 4017 6
TOTAL 26077 26587 510
Best Non-Uniform Tournament
The optimal non-uniform inter-league tournament for NPB has total distance just 6 + 181 = 187 km more than
the theoretical trivial lower bound.
Team ILB Optimal Diff.
Fukuoka 3401 3401 0
Orix 2178 2182 4
Saitama 1939 1939 0
Chiba 1895 1895 0
Tohoku 2660 2661 1
Hokkaido 4613 4614 1
TOTAL 16686 16692 6
Team ILB Optimal Diff.
Hiroshima 5027 5078 51
Hanshin 4549 4558 9
Chunichi 4459 4490 31
Yokohama 4023 4081 58
Yomiuri 4008 4027 19
Yakult 4011 4024 13
TOTAL 26077 26258 181
Implementation
Implementation
Additional scheduling constraints (e.g. certain stadiums are unavailable on various days).
Minimizing carry-over effects for competitive balance.
Rivalry matches that must be scheduled on specific dates (e.g. holidays, end-of-season).
How do we make this happen? Your ideas and advice would be very much appreciated!