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 o cial 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 R m n, where a ij =1ifdoctorj can perform procedure i and a ij = 0 otherwise. Also, let c j, j =1,...,n be the additional salary that will need to be paid to doctor j for on-call duty. Variables: x j =1ifdoctorj is on call, and 0 otherwise Formulation: min s.t. P n j=1 c jx j (Salaries paid) P n j=1 a ijx j 1, i =1,...,m (At least one doctor must x j 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, M j M, j =1,...,n are n subsets of M, and weights of the subsets, c j, j =1,...,n Set cover: a collection T {1,...,n} such that [ j2t M j = M. In the above example, M is the entire set of the procedures, M j is the set of procedures doctor j can perform, and c j is doctor j s 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: min T 8 9 8 < X = < nx c : j : T is a cover ; =min c : j x j : Ax j2t j=1 9 = e, x 2 {0, 1} n ;, where A is the incidence matrix above, and e is a vector of 1 s. 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, M j M, j =1,...,n are n subsets of M, and weights of the subsets, c j, j =1,...,n Set packing: a collection T {1,...,n} such that M j \ M k = ; for all j, k 2 T, j 6= k. Maximum weight set packing problem: 8 9 8 9 < X = < nx = max c T : j : T is a packing ; =max c : j x j : Ax apple e, x 2 {0, 1} n ; 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, M j M, j =1,...,n, and weights of the subsets, c j, 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 = < nx = max c T : j : T is a partition ; =max c : j x j : Ax = e, x 2 {0, 1} n ; 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 c ij. Find the order in which he should make his tour so as to finish in minimal time. Variables: x ij = 1 if the candidate goes from city i directly to city j; 0 otherwise (x ii are not defined). Objective function: min P n P n i=1 j=1 c ijx ij Constraints: x ij 2 {0, 1} 8i 6= j, X x ij =1, i 2 N (Leaves i exactly once) (1) j:j6=i X x ij =1, j 2 N (Enters j exactly once) (2) i:i6=j Solutions satisfying the above constraints may lead to subtours. IOE 518: Introduction to IP, Winter 2012 TSP Page 21 c 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: X X x ij 1, 8S N, S 6= ; (3) i2s j62s Observation: Let S be a non-empty subset of N with cardinality 2 apple S apple n 1. In any tour, there are no more than S 1 edges connecting nodes of S, andiftherearemorethan S 1 edges connecting nodes of S, there must be a subtour! X X x ij apple S 1forS N, 2 apple S apple 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, a j, c j, 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 s mores, whose utility is s 6= c 1 + c 2 + c 3 Variables: I x j =1ifitemj is packed, 0 otherwise. I New variable: y = 1 if we can make s mores, 0 otherwise Need to add the following logic to the formulation: I If y = 1, then x 1 = x 2 = x 3 =1 I If y = 0, may have x j = 0 for one of more j =1, 2, 3 (why not must have?) Add this constraint to the knapsack model: I x 1 + x 2 + 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: 0 dose delivered to pixel j 2 T D j y j = 1 if 80 D j apple 0, and y j = 0 otherwise. Requirement representation: P j2t y j 0.95 T 80 D j apple M(1 y j ), j 2 T y j 2 {0, 1}, D j 0, j 2 T Here, M > 0isasu ciently large number, so that any dose D j satisfying other constraints of the problem satisfies 80 D j apple 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: h t unit storage cost in period t, d t demand in period t, Production cost in period t, as a function of amount x produced: ( 0 if x =0 Initial inventory is 0. Variables: f t + p t x if x > 0, I x t amount producedin period t I s t total inventory at the end of period t I y t = 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 P n min t=1 p tx t + P n t=1 h ts t + P n t=1 f ty t s.t. s t 1 + x t = d t + s t, t =1,...,n (Inventory balance) x t apple My t, t =1,...,n (Forcing constraints) s t, x t 0, y t 2 {0, 1}, t =1,...,n s 0 =0 I Constraints s t period. 0 ensure the demand is satisfied in each I M > 0, a.k.a., the big M is an a priori upper bound on x t, t =1,...,n. I M needs to be large enough not to impose additional restrictions of x t s I Values that are too big cause numerical di culties 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 c ij of supplying the entire demand of client i from depot j, andf j of building depot j are given. Here, each client s demand can be to satisfied by multiple depots. Variables: y j = 1 if depot j is built, y j = 0 otherwise; x ij fraction of demand of client i supplied by depot j Formulation: min X X c ij x ij + X f j y j i2m P j2n j2n s.t. j2n x ij =18i 2 M (Demand satisfied) x ij apple y j 8i 2 M, j 2 N (Forcing constraints) x ij 0 8i 2 M, j 2 N y j 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: y j = 1 if depot j is built, y j = 0 otherwise; x ij fraction of demand of client i supplied by depot j Alternative formulation: min X X c ij x ij + X f j y j i2m X j2n j2n s.t. x ij =18i 2 M (Demand satisfied) j2n X x ij apple my j 8j 2 N i2m x ij 0 8i 2 M, j 2 N y j 2 {0, 1} 8j 2 N (Combined forcing constraints) 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 R n (that can be) described by a finite set of linear constraints P = {x 2 R n : Ax apple b} is a polyhedron. Formulation for a set A polyhedron P R n+p is a formulation for a set X Z n R p if and only if X = P \ (Z n R p ). 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 : 83x 1 + 61x 2 + 49x 3 + 20x 4 apple 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 : P 1 = {x 2 R 4 :0apple x apple e, 83x 1 + 61x 2 + 49x 3 + 20x 4 apple 100} P 2 = {x 2 R 4 :0apple x apple e, 4x 1 +3x 2 +2x 3 + x 4 apple 4} P 3 ={x 2 R 4 :0apple x apple e, 4x 1 +3x 2 +2x 3 + x 4 apple 4, x 1 + x 2 + x 3 apple 1, x 1 + x 4 apple 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 R n and two formulations, P 1 and P 2,forX, P 1 is a better formulation than P 2 if P 1 P 2. I Note: some formulations cannot be compared. I For the formulations of the knapsack above, P 3 P 2 P 1, and, in fact, P 3 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 R n is a formulation for X Z n. To solve (IP) z IP =max{c T x : x 2 X } =max{c T x : x 2 P \ Z n }, 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, soz IP apple z LP I Suppose P1 P 2 are both formulations for X.Then z IP apple z LP 1 apple z LP 2 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 P 1 = {(x, y) 2 R mn+n : X j2n x ij =18i, x ij apple y j 8i, j x ij 0 8i, j, 0 apple y j apple 1 8j}, P 2 = {(x, y) 2 R mn+n : X j2n x ij =18i, X i2m x ij apple my j 8j x ij 0 8i, j, 0 apple y j apple 1 8j}, I Let (x, y) 2 P 1.Then P i2m x ij apple P i2m y j = my j.hence, P 1 P 2. I Suppose, for simplicity, that m = kn, withk 2 and integer. Let each depot serve k clients, assigning x ij = 1 appropriately, and let y j = k/m 8j. Then(x, y) 2 P 2 \ P 1 Conclusion: formulation P 1 is better than P 2. 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 What d 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 R n,theconvex hull of S, denoted by conv(s), is defined as conv(s) ={x : x = P t i=1 ix i, P t i=1 i =1, i 0 i =1,...,t over all finite subsets {x 1,...,x t } S}. 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 R n a formulation for X Z n, to solve (IP) z IP =max{c T x : x 2 X } =max{c T x : x 2 P \ Z n }, we often begin by solving the linear relaxation of this problem: which is an LP. (LP) z RP =max{c T x : x 2 P}, 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 )lieinx. 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