Anda di halaman 1dari 11

BIP Examples: Set Covering Problem

A hospital ER needs to keep doctors on call, so that a qualified


individual is available to perform every medical procedure that
might be required (there is an official list of such procedures). For
each of several doctors available for on-call duty, the additional
salary they need to be paid, and which procedures they can
perform, is known. The goal to choose doctors so that each
procedure is covered, at a minimum cost.
Example:
Doc 1 Doc 2 Doc 3 Doc 4 Doc 5 Doc 6
Procedure 1 X X
Procedure 2 X X
Procedure 3 X X
Procedure 4 X X
Procedure 5 X X X
Procedure 6 X

IOE 518: Introduction to IP, Winter 2012 BIP formulations Page 16 c Marina A. Epelman

Set Covering Problem formulation

Data representation: incidence matrix. With m procedures and n


available doctors, the data can be represented as A 2 Rmn , where
aij = 1 if doctor j can perform procedure i and aij = 0 otherwise.
Also, let cj , j = 1, . . . , n be the additional salary that will need to
be paid to doctor j for on-call duty.
Variables: xj = 1 if doctor j is on call, and 0 otherwise
Formulation:
Pn
min c j xj (Salaries paid)
Pj=1
n
s.t. j=1 aij xj 1, i = 1, . . . , m (At least one doctor must
xj 2 {0, 1}, j = 1, . . . , n perform procedure i)

IOE 518: Introduction to IP, Winter 2012 BIP formulations Page 17 c Marina A. Epelman
Set covering problem: formal statement

Suppose we are given a set M, Mj M, j = 1, . . . , n are n subsets


of M, and weights of the subsets, cj , j = 1, . . . , n

Set cover:
a collection T {1, . . . , n} such that [j2T Mj = M.

In the above example, M is the entire set of the procedures, Mj is


the set of procedures doctor j can perform, and cj is doctor js
salary.
T is the set of doctors on call; note that it must be a cover of M.
In this problem we were looking for a minimum weight set cover:
8 9 8 9
<X = <X n =
n
min cj : T is a cover = min cj xj : Ax e, x 2 {0, 1} ,
T : ; : ;
j2T j=1

where A is the incidence matrix above, and e is a vector of 1s.


IOE 518: Introduction to IP, Winter 2012 BIP formulations Page 18 c Marina A. Epelman

Related problem: set packing

Again, we are given a set M, Mj M, j = 1, . . . , n are n subsets


of M, and weights of the subsets, cj , j = 1, . . . , n

Set packing:
a collection T {1, . . . , n} such that Mj \ Mk = ; for all
j, k 2 T , j 6= k.

Maximum weight set packing problem:


8 9 8 9
<X = <Xn =
n
max cj : T is a packing = max cj xj : Ax e, x 2 {0, 1}
T : ; : ;
j2T j=1

IOE 518: Introduction to IP, Winter 2012 BIP formulations Page 19 c Marina A. Epelman
Related problem: set partition

Again, we are given a set M, n subsets of M,


Mj M, j = 1, . . . , n, and weights of the subsets, cj , j = 1, . . . , n

Set partition:
a collection T {1, . . . , n} which is both a cover and a packing.

Maximum (or minimum) weight set partition problem:


8 9 8 9
<X = <X n =
n
max cj : T is a partition = max cj xj : Ax = e, x 2 {0, 1}
T : ; : ;
j2T j=1

IOE 518: Introduction to IP, Winter 2012 BIP formulations Page 20 c Marina A. Epelman

BIP Examples: Traveling Salesman Problem (TSP)


A candidate for the presidential nomination would like to visit the
seat of every county in a state in the days before the caucus,
starting out from, and returning to, the state capital, stopping
exactly once in each county. Let the set of these cities be
N = {1, . . . , n}. The time it takes to travel from city i to city j is
cij . Find the order in which he should make his tour so as to finish
in minimal time.
Variables: xij = 1 if the candidate goes from city i directly to city
j; 0 otherwise (xii are not Pdefined).
P
Objective function: min ni=1 nj=1 cij xij
Constraints: xij 2 {0, 1} 8i 6= j,
X
xij = 1, i 2 N (Leaves i exactly once) (1)
j:j6=i
X
xij = 1, j 2 N (Enters j exactly once) (2)
i:i6=j
Solutions satisfying the above constraints may lead to subtours.
c
IOE 518: Introduction to IP, Winter 2012 TSP Page 21 Marina A. Epelman
Eliminating subtours in TSP
Observation: Let S be a non-empty strict subset of N. Any tour
must leave S at least once:
XX
xij 1, 8S N, S 6= ; (3)
i2S j62S

Observation: Let S be a non-empty subset of N with cardinality


2 |S| n 1. In any tour, there are no more than |S| 1 edges
connecting nodes of S, and if there are more than |S| 1 edges
connecting nodes of S, there must be a subtour!
XX
xij |S| 1 for S N, 2 |S| n 1 (4)
i2S j2S

Constraints (1), (2), (3) (the cut-set formulation) or (1), (2), (4)
(the subtour elimination formulation), together with binary
restrictions on the variables, are valid formulations of the TSP.
How many variables and constraints do these formulations have?
IOE 518: Introduction to IP, Winter 2012 TSP Page 22 c Marina A. Epelman

Logical constraints modeled with binary variables

I Binary knapsack problem data: b, aj , cj , j = 1, . . . , n


I Items 1, 2 and 3 are, respectively, a chocolate bar, a bag of
marshmallows, and a packet of graham crackers if all three
are brought on a trip, we can make smores, whose utility is
s 6= c1 + c2 + c3
Variables:
I xj = 1 if item j is packed, 0 otherwise.
I New variable: y = 1 if we can make smores, 0 otherwise
Need to add the following logic to the formulation:
I If y = 1, then x1 = x2 = x3 = 1
I If y = 0, may have xj = 0 for one of more j = 1, 2, 3 (why not
must have?)
Add this constraint to the knapsack model:
I x1 + x2 + x 3 3y
IOE 518: Introduction to IP, Winter 2012 TSP Page 23 c Marina A. Epelman
MIP Example: Disjunctive constraints
Disjunctive constraints allow us to model, in form of an MIP,
requirements that specify that, out of a collection of constraints,
one (or a pre-specified number) need to be satisfied.
Radiation therapy example: Let T be the set of pixels in a tumor.
At least 95% of these pixels need to receive a dose of 80 Gy or
higher.
Variables:
Dj 0 dose delivered to pixel j 2 T
yj = 1 if 80 Dj 0, and yj = 0 otherwise.
Requirement representation:
P
j2T yj 0.95 |T |
80 Dj M(1 yj ), j 2 T
yj 2 {0, 1}, Dj 0, j 2 T
Here, M > 0 is a sufficiently large number, so that any dose Dj
satisfying other constraints of the problem satisfies 80 Dj M
for all j 2 T .
IOE 518: Introduction to IP, Winter 2012 MIP formulations Page 24 c Marina A. Epelman

MIP Example: uncapacitated lot sizing (ULS)

We need to decide on the production plan for the next n-period


horizon for a single product. Data for the problem is as follows:
ht unit storage cost in period t,
dt demand in period t,
Production cost in period t, as a function of amount x produced:
(
0 if x = 0
ft + pt x if x > 0,

Initial inventory is 0.
Variables:
I xt amount producedin period t
I st total inventory at the end of period t
I yt = 1 if production takes place in period t

IOE 518: Introduction to IP, Winter 2012 MIP formulations Page 25 c Marina A. Epelman
Uncapacitated lot sizing (ULS) continued
Formulation
Pn Pn Pn
min t=1 pt xt + t=1 ht st + t=1 ft yt
s.t. st 1 + xt = dt + st , t = 1, . . . , n (Inventory balance)
xt Myt , t = 1, . . . , n (Forcing constraints)
st , xt 0, yt 2 {0, 1}, t = 1, . . . , n
s0 = 0

I Constraints st 0 ensure the demand is satisfied in each


period.
I M > 0, a.k.a., the big M is an a priori upper bound on
xt , t = 1, . . . , n.
I M needs to be large enough not to impose additional
restrictions of xt s
I Values that are too big cause numerical difficulties when a
problem is solved
I Carefully consider the selection of M in an implementation
IOE 518: Introduction to IP, Winter 2012 MIP formulations Page 26 c Marina A. Epelman

MIP Example: uncapacitated facility location (UFL)


Given a set of potential depots N = {1, . . . , n} and a set
M = {1, . . . , m} of clients, we need to decide which depots to
open, and how to utilize them to serve clients. Costs cij of
supplying the entire demand of client i from depot j, and fj of
building depot j are given.
Here, each clients demand can be to satisfied by multiple depots.
Variables:
yj = 1 if depot j is built, yj = 0 otherwise;
xij fraction of demand of client i supplied by depot j
Formulation:
XX X
min cij xij + f j yj
i2M
P j2N j2N
s.t. xij = 1 8i 2 M
j2N (Demand satisfied)
xij yj 8i 2 M, j 2 N (Forcing constraints)
xij 0 8i 2 M, j 2 N
yj 2 {0, 1} 8j 2 N
IOE 518: Introduction to IP, Winter 2012 MIP formulations Page 27 c Marina A. Epelman
An alternative formulation for UFL

Same variables:
yj = 1 if depot j is built, yj = 0 otherwise;
xij fraction of demand of client i supplied by depot j
Alternative formulation:
XX X
min cij xij + f j yj
i2M
X j2N j2N
s.t. xij = 1 8i 2 M (Demand satisfied)
j2N
X
xij myj 8j 2 N (Combined forcing constraints)
i2M
xij 0 8i 2 M, j 2 N
yj 2 {0, 1} 8j 2 N

IOE 518: Introduction to IP, Winter 2012 MIP formulations Page 28 c Marina A. Epelman

Formulation geometric perspective


Informally, a formulation is a mathematical description of a set of
(feasible) variable values such that
I All values in the feasible set satisfy the mathematical
description; and
I No infeasible values satisfy the mathematical description
(Before, we used the terms model and formulation
interchangeably, but now we should be more careful.)

Polyhedron
A subset of Rn (that can be) described by a finite set of linear
constraints P = {x 2 Rn : Ax b} is a polyhedron.

Formulation for a set


A polyhedron P Rn+p is a formulation for a set X Zn Rp if
and only if X = P \ (Zn Rp ).

IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 29 c Marina A. Epelman
Formulations for a 2D Set

Consider the set

X = {(1, 1), (2, 1), (3, 1), (1, 2), (2, 2), (3, 2), (2, 3)}.

I What are possible formulations for X (in the sense of the


above definition)?
I What if we remove point (2, 2) from the set?
I The feasible region of an IP or a MIP always has a
formulation, in the sense of the above definition

IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 30 c Marina A. Epelman

Formulations for a Knapsack set


Consider the feasible region of the following 0 1 knapsack
problem:
X = {x 2 {0, 1}4 : 83x1 + 61x2 + 49x3 + 20x4 100}

={(0, 0, 0, 0), (1, 0, 0, 0), (0, 1, 0, 0),


(0, 0, 1, 0), (0, 0, 0, 1), (0, 1, 0, 1), (0, 0, 1, 1)}

The following are formulations for X :


P1 = {x 2 R4 : 0 x e, 83x1 + 61x2 + 49x3 + 20x4 100}

P2 = {x 2 R4 : 0 x e, 4x1 + 3x2 + 2x3 + x4 4}

P3 ={x 2 R4 : 0 x e, 4x1 + 3x2 + 2x3 + x4 4,


x1 + x2 + x3 1, x1 + x4 1}
IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 31 c Marina A. Epelman
When is one formulation better than another?

Better formulation definition


Given a set X Rn and two formulations, P1 and P2 , for X , P1 is
a better formulation than P2 if P1 P2 .

I Note: some formulations cannot be compared.


I For the formulations of the knapsack above, P3 P2 P1 ,
and, in fact, P3 P for any formulation P of this set!

IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 32 c Marina A. Epelman

LP relaxations jumping ahead

What is this definition of a better formulation based on?


I Suppose P Rn is a formulation for X Zn . To solve

(IP) z IP = max{c T x : x 2 X } = max{c T x : x 2 P \ Zn },

we often begin by solving the linear relaxation of this problem:

(LP) z RP = max{c T x : x 2 P},

which is an LP.
I Note: X P, so z IP z LP
I Suppose P1 P2 are both formulations for X . Then

z IP z LP1 z LP2

better formulations lead to better bounds on z IP

IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 33 c Marina A. Epelman
Comparing formulations for UFL

X
P1 = {(x, y ) 2 Rmn+n : xij = 1 8i, xij yj 8i, j
j2N

xij 0 8i, j, 0 yj 1 8j},


X X
P2 = {(x, y ) 2 Rmn+n : xij = 1 8i, xij myj 8j
j2N i2M

xij 0 8i, j, 0 yj 1 8j},

P P
I
Let (x, y ) 2 P1 . Then i2M xij i2M yj = myj . Hence,
P1 P2 .
I Suppose, for simplicity, that m = kn, with k 2 and integer.
Let each depot serve k clients, assigning xij = 1 appropriately,
and let yj = k/m 8j. Then (x, y ) 2 P2 \ P1
Conclusion: formulation P1 is better than P2 .
IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 34 c Marina A. Epelman

What would be the best formulation?


I Let X be the set of feasible solutions of some IP (or MIP).
I Whatd be the best formulation for X ? A polyhedron P ? s.t.
I X P ? , i.e., P ? is a formulation for X , and
I For any P which is a formulation for X , P ? P

Convex hull
Given a set S Rn , the convexPhull of S, denoted Pt by conv(S), is
t i
defined as conv(S) = {x : x = i=1 i x , i=1 i = 1, i
0 i = 1, . . . , t over all finite subsets {x , . . . , x t } S}.
1

Proposition 1.1
conv(S) is a polyhedron if S is finite, or if it is the set of
feasible solutions of some MIP (not true for an arbitrary set S!).

Claim: conv(X ) is the best formulation for X :


I conv(X ) is a polyhedron
I For any P which is a formulation for X , X conv(X ) P.
IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 35 c Marina A. Epelman
Additional properties of the ideal formulation
I Recall: given P Rn a formulation for X Zn , to solve

(IP) z IP = max{c T x : x 2 X } = max{c T x : x 2 P \ Zn },

we often begin by solving the linear relaxation of this problem:

(LP) z RP = max{c T x : x 2 P},

which is an LP.
I Solution x LP will be found at an extreme point of P, and if
x LP 2 X , then we found the optimal solution of (IP) just by
solving (RP).

Proposition 1.2
All extreme points of conv(X ) lie in X .

Does this mean we are done with studying integer programming?


IOE 518: Introduction to IP, Winter 2012 Strength of formulations Page 36 c Marina A. Epelman

Anda mungkin juga menyukai