Upload
laurel-mcgee
View
233
Download
5
Embed Size (px)
Citation preview
1
Lecture 5 Lecture 5 Set Packing ProblemsSet Packing Problems
Set Partitioning ProblemsSet Partitioning Problems
2
OutlineOutline
set packing problems set packing problems
set partitioning problemsset partitioning problems
3
Set Packing ProblemsSet Packing Problems
4
ContextContext
a set a set S S = {1, 2…, = {1, 2…, mm} }
a collection of subsets of a collection of subsets of SS,, , such that , such that
each subset carry a value each subset carry a value problem: to maximize the total value of problem: to maximize the total value of
subsets selected such that no element is subsets selected such that no element is
selected more than onceselected more than once
5
Set Packing ProblemsSet Packing Problems
S S = {1, 2, 3, 4, 5, 6} = {1, 2, 3, 4, 5, 6}
= {{1, 2, 5}, {1, 3}, {2, 4}, {3, 6}, {2, 3, 6}}= {{1, 2, 5}, {1, 3}, {2, 4}, {3, 6}, {2, 3, 6}} examples examples
{1, 2, 5}, {3, 6}: a pack{1, 2, 5}, {3, 6}: a pack
{1, 3}, {2, 4}: a pack{1, 3}, {2, 4}: a pack
{1, 2, 5}, {2, 3, 6}: not a pack{1, 2, 5}, {2, 3, 6}: not a pack
{2, 3, 6}: a pack{2, 3, 6}: a pack
assumption: every subset of value = 1assumption: every subset of value = 1
6
Set Packing ProblemsSet Packing Problems
S S = {1, 2, 3, 4, 5, 6} = {1, 2, 3, 4, 5, 6}
= {{1, 2, 5}, {1, 3}, {2, 4}, {3, 6}, {2, 3, 6}}= {{1, 2, 5}, {1, 3}, {2, 4}, {3, 6}, {2, 3, 6}}
: element 1
: element 2
: element 3
: element 4
: element 5
: element 6
1 2 3 4 5
1 2
1 3 5
2 4 5
3
1
2 4 5
max ,
. . 1,
1,
1,
1,
1,
1,
s t
i {0, 1}
set
1: set
2: set
3: set
4: set
5:
Property 9.4: maximization
with all constraints
Property 9.5: all RHS
coefficients = 1
Property 9.6: all matrix
coefficients = 0 or 1
1, if the th member of is in the pack,
0, otherwise.ii
7
Primal-Dual PairPrimal-Dual Pair
“An interesting observation is that the LP problem associated with a set packing problem with objective coefficients of 1 is the dual of the LP problem associated with a set covering problem with objective coefficients of 1.” (pp 192 of [7])
8
Primal-Dual PairPrimal-Dual Pair
special properties between the primal-dual pairspecial properties between the primal-dual pair
obj function of min obj function of min obj function of max obj function of max
unbounded primal unbounded primal infeasible dual infeasible dual
optimal primal optimal primal optimal dual optimal dual
same objective function valuesame objective function value
easy to deduce the optimal of one from the other easy to deduce the optimal of one from the other
possible to have infeasible primal and infeasible dualpossible to have infeasible primal and infeasible dual
1 1 2 2
11 1 12 2 1 1
1 1 2 2
max ... ,
. .
... ,
... ,
0.
n n
n n
m m mn n m
i
c x c x c x
s t
a x a x a x b
a x a x a x b
x
M M M M M
Primal (Dual)
1 1 2 2
11 1 21 2 1 1
1 1 2 2
min ... ,
. .
... ,
... ,
0.
m m
m n
n n mn n n
j
b y b y b y
s t
a y a y a y c
a y a y a y c
y
M M M M M
Dual (Primal)
9
Comments on Comments on Set Packing ProblemsSet Packing Problems
1 2 3 4 5
1 2
1 3 5
2 4 5
3
1
2 4 5
max ,
. . 1,
1,
1,
1,
1,
1,
s t
i 0
set packing problem with objective coefficients = 1
1 2 3 4 5 6
1 2 5
1 3
2 4
3 6
2 3 6
min ,
. .
1,
1,
1,
1,
1,
s t
i 0
set covering problem with objective coefficients = 1
dual of each other
The two LPs are dual of each other, though the S and in one problem are different from those of the other
problem.
10
Comments on Comments on Set Packing ProblemsSet Packing Problems
similar generalization as in set covering similar generalization as in set covering
problemsproblems weighted set packing problems: RHS weighted set packing problems: RHS
positive integers > 1positive integers > 1
generalized set packing problems: matrix generalized set packing problems: matrix
coefficients = 0 or coefficients = 0 or 1 1
11
Matching Problem: Matching Problem: A Special Type of Set Packing ProblemA Special Type of Set Packing Problem
matching: select the maximum numbers matching: select the maximum numbers
of arcs such that there is no overlapping of arcs such that there is no overlapping
of nodes involved of nodes involved (1, 2), (3, 6), (4, 5)(1, 2), (3, 6), (4, 5)
2
3
15
4
6
12
ExerciseExercise
formulate the matching formulate the matching
problem of the RHS problem of the RHS
network as a set packing network as a set packing
problem problem
2
3
15
4
6
13
Set Partitioning ProblemsSet Partitioning Problems
14
Set Partitioning ProblemsSet Partitioning Problems
to cover all the members of to cover all the members of SS by elements of by elements of
without overlapping without overlapping
S S = {1, 2, 3, 4, 5} = {1, 2, 3, 4, 5}
= {{1, 2}, {1, 3, 5}, {2, 4, 5}, {3}, {1}, {4, 5}} = {{1, 2}, {1, 3, 5}, {2, 4, 5}, {3}, {1}, {4, 5}}
e.g., {1, 2}, {3}, and {4, 5} form a partitione.g., {1, 2}, {3}, and {4, 5} form a partition
15
Set Partitioning ProblemsSet Partitioning Problems
1, if the th member of is in the partition,
0, otherwise.ii
1 2 5
1 3
2 4
3 6
2 3 6
1,
1,
1,
1,
1.
i {0, 1}
either maximization or minimization is all right
S S = {1, 2, 3, 4, 5} = {1, 2, 3, 4, 5}
= {{1, 2}, {1, 3, 5}, {2, 4, 5}, {3}, {1}, {4, 5}} = {{1, 2}, {1, 3, 5}, {2, 4, 5}, {3}, {1}, {4, 5}}
16
Equivalence Between Set Packing Problem Equivalence Between Set Packing Problem and Set Partitioning Problemand Set Partitioning Problem
1 2 3 4 5
1 2
1 3 5
2 4 5
3
1
2 4 5
max ,
. . 1,
1,
1,
1,
1,
1,
s t
i {0, 1}
Set Packing Problem
1 2 3 4 5
1 2 6
1 3 5 7
2 4 5 8
3 9
1 10
2 4 5 11
max ,
. . 1,
1,
1,
1,
1,
1,
s t
i {0, 1}, 1 to 11
Set Partitioning Problem
17
Equivalence Between Set Packing Problem Equivalence Between Set Packing Problem and Set Partitioning Problemand Set Partitioning Problem
illustrate the transformation of the first illustrate the transformation of the first
equality constraint into an equality constraint into an -constraint-constraint
introduce a dummy variable introduce a dummy variable to the first to the first
constraintconstraint
i {0, 1}
Set Partitioning Problem
1 2 5
1 3
2 4
3 6
2 3 6
1,
1,
1,
1,
1.
max 1 + 2 + 3 + 4 + 5 + 6,
18
Equivalence Between Set Packing Problem Equivalence Between Set Packing Problem and Set Partitioning Problemand Set Partitioning Problem
i {0, 1}
Set Partitioning Problem
1 2 5
1 3
2 4
3 6
2 3 6
1,
1,
1,
1,
1.
max 1 + 2 + 3 + 4 + 5 + 6,
i, {0, 1}
1 2 5
1 3
2 4
3 6
2 3 6
1,
1,
1,
1,
1.
max 1 + 2 + 3 + 4 + 5 + 6 M,
i, {0, 1}
1 2 5
1 3
2 4
3 6
2 3 6
1,
1,
1,
1,
1.
max (M+1)1 + (M+1)2 + 3 + 4 + (M+1) 5 + 6 M,
i, {0, 1}
1 2 5
1 3
2 4
3 6
2 3 6
1,
1,
1,
1,
1.
max (M+1)1 + (M+1)2 + 3 + 4 + (M+1) 5 + 6 M,
19
Further CommentsFurther Comments
set covering problems different from set set covering problems different from set packing problems and set partitioning packing problems and set partitioning problemsproblems
possible to transform a set packing problem possible to transform a set packing problem into a set covering problem, but in general into a set covering problem, but in general not the other way aroundnot the other way around
set covering problem more difficult to solve set covering problem more difficult to solve than the other two problemsthan the other two problems
20
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
21
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
six flights every day, for cities six flights every day, for cities AA, , BB, and , and
C, C, where where AA is the base is the base8 10 12 181614 2220
A
B
C
leg 1 leg 2leg 3
leg 4
leg 5 leg 6
22
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
pairings of legs for air crew: pairings of legs for air crew: rules from rules from regulation bodies and unionregulation bodies and union
simplified rules in the examplesimplified rules in the example at most eight hours flying time in a pairingat most eight hours flying time in a pairing
flying time in a pairing = sum of flying times in all legs of the flying time in a pairing = sum of flying times in all legs of the pairingpairing
at most two duties in a pairingat most two duties in a pairing at least nine hours for overnight rest (OR) between at least nine hours for overnight rest (OR) between
dutiesduties
23
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
cost of a pairing = time away from the cost of a pairing = time away from the
base base flying time of the pairing flying time of the pairing cost of pairing 1 = 36cost of pairing 1 = 3610 = 2610 = 26
24
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
suppose only considering covering the 6 suppose only considering covering the 6
legs in a day legs in a day
let let xxjj = 1 if the = 1 if the jjth pairing is used, and th pairing is used, and xxjj = =
0 otherwise0 otherwise
25
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
a set partitioning problema set partitioning problem min 26min 26xx11 + 20 + 20xx22 + 2 + 2xx33 + 26 + 26xx44 + 20 + 20xx55 + 26 + 26xx66, , ss..tt..
xx11 + + xx22 = 1, = 1,
xx11 + + xx66 = 1, = 1,
xx33 + + xx44 + + xx55 + + xx66 = 1, = 1,
xx22 + + xx33 + + xx44 + + xx55 = 1, = 1,
xx22 + + xx55 = 1, = 1,
xx55 + + xx66 = 1, = 1,
xxii {0, 1} {0, 1}
26
A Simplified A Simplified Air Crew Scheduling ProblemAir Crew Scheduling Problem
The dual of the partitioning problemThe dual of the partitioning problem min min 11 + + 22 + + 33 + + 44 + + 55 + 26 + 2666,,
ss..tt..
11 + + 22 ≤ 26 ≤ 26
11 + + 44 + + 55 ≤ 20 ≤ 20
33 + + 44 ≤ 2≤ 2
33 + + 44 ≤ 26≤ 26
33 + + 44 + + 55 + + 66 ≤ 20≤ 20
22 + + 33 + + 66 ≤ 26≤ 26
27
To Construct a SimplifiedTo Construct a SimplifiedAir Crew Scheduling ProblemAir Crew Scheduling Problem
Bangkok
Singapore
Hong Kong
Taipei
Seoul
3 hr 40min
2 hr 15 min3 hr 45 min
1 hr 30 min
3 hr 10 min2 hr 20 min
28
Six Cities Six Cities
1
4
3
0
2
5
2 hrTokyo
8 am 012 0 flight 9 am 034 5 0 flight
It takes 90 minutes to load supply and passengers It takes 90 minutes to load supply and passengers
before departure (including unloading passengers for before departure (including unloading passengers for
the previous flight leg, if applicable).the previous flight leg, if applicable).
All flights are on exact time.All flights are on exact time.
It takes 30 minutes for a plane to reach the terminal It takes 30 minutes for a plane to reach the terminal
after arrival.after arrival.
It takes 30 minutes to unload passengers and clean up It takes 30 minutes to unload passengers and clean up
a plane at the end of its service. a plane at the end of its service.
29
Assumptions for PlanesAssumptions for Planes
30
Itinerary of Itinerary of the Plane for 0-1-2-0 Tourthe Plane for 0-1-2-0 Tour
Time Activities
7:30 Loading
9:00 Leaving Taipei
11:20 Arriving Seoul
11:50 Parked at Terminal; unloading and re-loading passengers; loading suppliers
13:20 Leaving Seoul
15:20 Arriving Tokyo
15:50 Parked at Terminal; unloading and re-loading passengers; loading suppliers
17:20 Leaving Tokyo
20:30 Arriving Taipei
21:00 Parked at Terminal; unloading passengers
21:30 Parking overnight
31
ExerciseExercise
give the itinerary of the plane for 0-3-give the itinerary of the plane for 0-3-4-5-0 tour4-5-0 tour
based on the itineraries of the planes based on the itineraries of the planes for the 0-1-2-0 and 0-3-4-5-0 tours, for the 0-1-2-0 and 0-3-4-5-0 tours, construct the requirements for air construct the requirements for air stewards and for pilots stewards and for pilots put down all assumptions madeput down all assumptions made