TBA
3 Sample Integer Linear Programs 2
3.1 SampleConstraints ..................................... 3
3.2 Modelling Practice ..................................... 4
A mathematical program is an optimization problem of the form:
min f (x)
x∈Rn
subject to
Ax ≤ b
where
If f islinear,thentheprogramis called a linear program(LP). If f is linear, and for all i, xi ∈ Z, then the program is called an integer linear program(ILP). If f is linear, and for some i, xi ∈ R, while for other i, xi ∈ Z, then the program is called a mixed integer linear program. If f is linear, and for all i, xi ∈{0, 1}, then the program is called a binary integer linear program.
The Diet Problem Consider a set of m vitamins contained in a set of n foods. The minimum daily requirement of vitamin i is bi, for all 1 ≤ i ≤ m. The cost(indollars or calories) per unit of food j is cj , for all 1 ≤ j ≤ n. The number of units of vitamin i contained in each unit of food j is aij . How much of each food should be consumed so as to minimize cost without failing to satisfy the minimum daily requirements?
LP If xj is the number of units of food j that one consumes daily, then the objective is to
T
minimize cx. But at the same time, one must satisfy the minimum daily requirement. The term aij xj denotes the number of units of vitamin i that are consumed in xj units of food j. Summing over all foods j yields the constraint Aix ≥ bi, for all vitamins i. The linear program that solves the diet problem can be stated as follows:
n
min
xj
cj xj
j=1
n
aij xj ≥ bi, ∀i
s.t.
j=1
xj ≥ 0, ∀j
The Production Problem A company manufactures n products using m resources. The companyhasinitsinventorybi units of resource i,for all1 ≤ i ≤ m, andit earns cj profitsbyproducing one unit of product j, for all 1 ≤ j ≤ n. The number of units of resource i required to produce one unit ofproduct j is aij . How much of each product should be manufactured so as to maximize total profits, given the stated resource constraints?
LP If xj is the number of units of product j that is produced, then the objective is to maximize
T
cx. But the company’s resources are limited. The term aij xj denotes the number of units of resource i that is necessary to manufacture xj units of product j Summing over all products j yields the constraint Aix ≤ bi, for all resources i. The linear program that solves the production problem can be stated as follows:
n
max
xj
cj xj
j=1
n
aij xj ≤ bi, ∀i
s.t.
j=1
xj ≥ 0, ∀j
Thecapitalbudgetingproblemisthebinary version of theproductionproblem: thatis, xj ∈{0, 1} indicates whether or not product j isproduced(or the jth investment opportunity is selected). The knapsack problem is the special case of capital budgeting where m =1.
Knapsack Problem Given n objects s.t. object i has value vi but weighs wi. Find an optimal set of objects to pack in a knapsack of capacity k.
LP Let xi ∈ R denote the quantity of object i that is packed in the knapsack.
max
xi
vixi
i
2
wixi ≤ k
i
and xi ≥ 0, ∀i
ILP Define integer variable xi that indicates whether or not object i is packed in the knapsack. Add the constaint:
xi ∈ Z, ∀i
Binary ILP Define binary variable xi that indicates whether or not object i is packed in the knapsack. Replace the constraint xi ∈ Z with the constraint xi ∈{0, 1}.
Assignment Problem Given n jobs andn machines. The cost of machine i servingjob j is cij . Each machine can execute exactly onejob. Alljobs mustbe completed. Assignjobsto machines so as to minimize cost.
Binary ILP Define binary variables xij ∈{0, 1} that indicates whether or not machine i serves jobj.
nn
min
xij
cij xij
i=1 j=1
subject to
n
xij =1, ∀j
i=1 n
xij =1, ∀i
j=1
xij ∈{0, 1}
The first set of constraints states that every job is served by some machine. The second set of constraints statesthat every machine serves somejob.
Set Covering Constraints
xj ≥ 1
j
Set Packing Constraints
xj ≤ 1
j
3
xj =1
j
Assume: xi ∈{0, 1}. We can carry at most k items:
xi ≤ k
i
A → B If we take item i, we must also take item j: xi ≤ xj
¬(A ∧B) We can take at most one of itemi and item j: xi + xj ≤ 1
A ∨B We must take at least one of item i and item j: xi + xj ≥ 1
A “exclusive or” B We must take exactly one of item i and item j: xi + xj =1
4