0% found this document useful (0 votes)
1K views

Assignment 1 Solutions

The document provides instructions for Assignment 1 of a linear optimization course. It instructs undergraduate and graduate students to complete different exercises marked [U] and [G]. It encourages students to work in groups of two and provides steps for submitting group assignments. It states that solutions cannot be copied and improper collaboration will result in a zero. The document then provides three sample exercises involving proving convexity, formulating a linear program, and rewriting a problem in standard form.

Uploaded by

Nengke Lin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Assignment 1 Solutions

The document provides instructions for Assignment 1 of a linear optimization course. It instructs undergraduate and graduate students to complete different exercises marked [U] and [G]. It encourages students to work in groups of two and provides steps for submitting group assignments. It states that solutions cannot be copied and improper collaboration will result in a zero. The document then provides three sample exercises involving proving convexity, formulating a linear program, and rewriting a problem in standard form.

Uploaded by

Nengke Lin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

ISyE/Math/CS/Stat 525 – Linear Optimization

Assignment 1 – Chapter 1

Instructions and policy: Undergraduate students should handle in the five exercises that are marked
with [U]. Graduate students should handle in the five exercises that are marked with [G]. All other exercises
are optional for keen students and should not be handled in. The assignment should be submitted
electronically in Canvas. Late submission policy: 20% of total points will be deducted per hour. Each student is
encouraged to solve all the exercises in the assignment to practice for the exams.
Students are strongly encouraged to work in groups of two on homework assignments. To find a partner
you can post on the “Discussions” section in Canvas. Only one file should be submitted for both group
members. In order to submit the assignment for your group please follow these steps in Canvas: Step 1. Click
on the “People” tab, then on “Groups”, and join one of the available groups named “Assignments Group 1”,
“Assignments Group 2”, . . . ; Step 2. When also your partner has joined the same group, one of the two can
submit the assignment by clicking on the “Assignments” tab, then on the assignment to be submitted, and
finally on “Submit assignment”. The submission will count for everyone in your group.
Groups must work independently of each other, may not share answers with each other, and solutions
must not be copied from the internet or other sources. If improper collaboration is detected, all groups
involved will automatically receive a 0. Students must properly give credit to any outside resources they use
(such as books, papers, etc.). In doing these exercises, you must justify all of your answers and cite every
result that you use. You are not allowed to share any content of this assignment.

Exercise 1 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


A function f : Rn → R is called convex if for every x, y ∈ Rn , and every λ ∈ [0, 1], we have
f (λx + (1 − λ)y) ≤ λf (x) + (1 − λ)f (y).
Pm
Let f : Rn → R be defined as f (x) = i=1 fi (x) for x ∈ Rn , where fi : Rn → R is a convex function for
each i = 1, . . . , m. Show that f is convex.

Solution: To prove the result, we show that f satisfies the definition of convex function. For any
two x, y ∈ Rn and λ ∈ [0, 1]:
m
X
f (λx + (1 − λ)y) = fi (λx + (1 − λ)y)
i=1
Xm
(convexity of fi ) ≤ (λfi (x) + (1 − λ)fi (y))
i=1
m
X m
X
=λ fi (x) + (1 − λ) fi (y)
i=1 i=1
= λf (x) + (1 − λ)f (y).

Exercise 2 [U] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Consider the problem of minimizing a cost function of the form c0 x + f (d0 x), subject to the linear
constraints Ax ≥ b. Here, d is a given vector and the function f : R 7→ R is described in the picture
below.

Page 1 of 16
Provide a linear programming formulation of this problem.

Solution: The piecewise linear function f is



−x + 1,
 x≤1
f (x) = 0, 1≤x≤2

2x − 4, x≥2

or equivalently,
f (x) = max{−x + 1, 0, 2x − 4}.
x∈R

As seen in class, it is possible to model this kind of functions introducing a new variable and three
constraints. Therefore an equivalent linear programming formulation of this problem is:

minimize c0 x + z
subject to Ax ≥ b
z ≥ −d0 x + 1
z≥0
z ≥ 2d0 x − 4,

that can be rewritten as

minimize c0 x + z
subject to Ax ≥ b
d0 x + z ≥ 1
− 2d0 x + z ≥ −4
z ≥ 0.

Exercise 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
Consider the following Linear Program:

min 3x1 + 2x2 + x3


s.t. x1 + x2 − x3 = 2
x1 + 2x2 ≤ 5
2x1 − x3 ≥ 4
x1 ≥ 0, x2 ≥ 0.

Page 2 of 16
(a) Determine a matrix A and vectors b, c such that the problem can be written in the form:
min c0 x
s.t. Ax ≥ b.

Solution: The problem can be rewritten as

min 3x1 + 2x2 + x3


s.t. x1 + x2 − x3 ≥ 2
− x1 − x2 + x3 ≥ −2
− x1 − 2x2 ≥ −5
2x1 − x3 ≥ 4
x1 ≥ 0, x2 ≥ 0,

thus we have    
1 1 −1 2
 −1 −1 1   −2 
   
 −1 −2 0   −5 
A=  b= 
 2
 0 −1 


 4 

 1 0 0   0 
0 1 0 0
c= 3 2 1

(b) Rewrite the problem in standard form.

Solution: We start from the problem given initially. To put the problem in standard form,
we have to transform 2 inequalities into equality constraints, and we have to transform the free
variable x3 . We get:

min 3x1 + 2x2 + x+
3 − x3

s.t. x1 + x2 − x+
3 + x3 = 2
x1 + 2x2 + x4 = 5

2x1 − x+
3 + x3 − x5 = 4

x1 ≥ 0, x2 ≥ 0, x+
3 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0.

Alternatively, we could eliminate x3 by exploiting the equality constraint: x3 = x1 + x2 − 2.


We obtain:
min 3x1 + 2x2 + (x1 + x2 − 2)
s.t. x1 + 2x2 + x4 = 5
2x1 − (x1 + x2 − 2) − x5 = 4
x1 ≥ 0, x2 ≥ 0, x4 ≥ 0, x5 ≥ 0,
that can be rewritten as
−2 + min 4x1 + 3x2
s.t. x1 + 2x2 + x4 = 5
x1 − x2 − x5 = 2
x1 ≥ 0, x2 ≥ 0, x4 ≥ 0, x5 ≥ 0.

Page 3 of 16
Exercise 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
A farmer needs to buy five kinds of fertilizer for each of which he requires 185, 50, 50, 200, and 185 tons,
respectively. The fertilizers can be purchased from four distinct dealers that can each provide at most
350, 225, 195, and 275 tons of fertilizer in total. The prices (in USD) per ton of fertilizer of each dealer
are depicted in the subsequent table:

Fert. 1 Fert. 2 Fert. 3 Fert. 4 Fert. 5


Dealer 1 45.0 13.9 29.9 31.9 9.9
Dealer 2 42.5 17.8 31.0 35.0 12.3
Dealer 3 47.5 19.9 24.0 32.5 12.4
Dealer 4 41.3 12.5 31.2 29.8 11.0

The farmer seeks to minimize his expenses. Formulate this problem as a Linear Program.

Solution:

i. Decision variables: for each dealer i = 1, . . . 4 and fertilizer j = 1, . . . , 5, we define xij ≥ 0 as


the amount of fertilizer j (in tons) that is purchased from dealer i.
ii. Objective function: We denote the matrix in the table by C and its i-th row/j-th column entry
as cij .
4 X
X 5
min cij xij (Minimize costs)
i=1 j=1

iii. Constraints:

(Demand of fertilizers) (Capacity constraint of the dealers)


P4 P5
x = 185 x1j ≤ 350
P4i=1 i1 Pj=1
5
xi2 = 50 x2j ≤ 225
Pi=1
4 Pj=1
5
xi3 = 50 x3j ≤ 195
Pi=1
4 Pj=1
5
xi4 = 200 j=1 x4j ≤ 275
Pi=1
4
i=1 xi5 = 185 xij ≥ 0 ∀i, j. (nonnegativity constraints)

Exercise 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
An oil company buys fuels from large producers and sells fuels and gasolines (gasolines are mixtures
of fuels) to smaller companies. The fuels properties, availability, cost and resale price are given in the
following table:

fuel type octane number available amount price/barrel resale price/barrel


in barrels/day
1 68 4000 $ 31.02 $ 36.85
2 86 5050 $ 33.15 $ 40.99
3 91 7100 $ 36.35 $ 42.95
4 99 4300 $ 38.75 $ 45.15

Three types of gasoline A, B and C are produced, with a required octane number of at least 95 (A), 90
(B) and 85 (C). Note that the octane number of a mixture is simply the weighted average over the fuels
contained. The gasolines will be sold at a price of $ 45.15 (A), $ 42.95 (B) and $ 40.99 (C) per barrel.
Fuels that are not used to produce gasoline will be directly sold at the resale price.

Page 4 of 16
(a) Formulate a linear program for the problem of maximizing the daily profit of the oil company.
Declare your variables and briefly describe your constraints.

Solution:

1. Decision variables:
• xj ≥ 0 – daily amount of gasoline j ∈ {A, B, C} produced
• yi ≥ 0 – daily amount of fuel i ∈ {1, 2, 3, 4} that is purchased and used to produce
gasoline
• zi,j ≥ 0 – daily amount of fuel i ∈ {1, 2, 3, 4} used to produce gasoline j ∈
{A, B, C}
• wi ≥ 0 – daily amount of fuel i ∈ {1, 2, 3, 4} purchased but not used to produce
gasoline
2. objective function:

max 45.15xA + 42.95xB + 40.99xC − 31.02y1 − 33.15y2 − 36.35y3 − 38.75y4 +


5.83w1 + 7.84w2 + 6.60w3 + 6.40w4

3. constraints:

• Composition of gasoline j ∈ {A, B, C}:

xA − z1,A − z2,A − z3,A − z4,A = 0,


xB − z1,B − z2,B − z3,B − z4,B = 0,
xC − z1,C − z2,C − z3,C − z4,C = 0.
P4
More compactly: xj − i=1 zij = 0 for j = A, B, C.
• Distribution of fuels i ∈ {1, 2, 3, 4} used to produce gasoline:

y1 − z1,A − z1,B − z1,C = 0,


y2 − z2,A − z2,B − z2,C = 0,
y3 − z3,A − z3,B − z3,C = 0,
y4 − z4,A − z4,B − z4,C = 0.
P
More compactly: yi − j∈{A,B,C} zij = 0 for i = 1, 2, 3, 4.
• For gasoline j ∈ {A, B, C} the octane number must be at least oj :

68z1,j + 86z2,j + 91z3,j + 99z4,j


≥ oj ,
z1,j + z2,j + z3,j + z4,j

where (oA , oB , oC ) = (95, 90, 85).


Thus, we obtain

95xA − 68z1,A − 86z2,A − 91z3,A − 99z4,A ≤ 0,


90xB − 68z1,B − 86z2,B − 91z3,B − 99z4,B ≤ 0,
85xC − 68z1,C − 86z2,C − 91z3,C − 99z4,C ≤ 0,

Page 5 of 16
• Availability constraints:

y1 + w1 ≤ 4000, y2 + w2 ≤ 5050, y3 + w3 ≤ 7100, y4 + w4 ≤ 4300.

We can eliminate xA , xB , xC and y1 , y2 , y3 , y4 . This yields:

1. Objective function:

max 14.13z1,A + 11.93z1,B + 9.97z1,C + 12.00z2,A + 9.80z2,B + 7.84z2,C +


8.80z3,A + 6.60z3,B + 4.64z3,C + 6.40z4,A + 4.20z4,B + 2.24z4,C +
5.83w1 + 7.84w2 + 6.60w3 + 6.40w4

2. Constraints:
• Octane number:

27z1,A + 9z2,A + 4z3,A − 4z4,A ≤ 0,


22z1,B + 4z2,B − z3,B − 9z4,B ≤ 0,
17z1,C − z2,C − 6z3,C − 14z4,C ≤ 0.

• Availability constraints:

z1,A + z1,B + z1,C + w1 ≤ 4000,


z2,A + z2,B + z2,C + w2 ≤ 5050,
z3,A + z3,B + z3,C + w3 ≤ 7100,
z4,A + z4,B + z4,C + w4 ≤ 4300.

• Non-negativity of the variables

wi , zi,j ≥ 0, i ∈ {1, 2, 3, 4}, j ∈ {A, B, C}.

(b) Without solving the linear program that you derived in (a), can you say how many barrels per day
will be bought of each fuel type?

Solution: Each fuel type will be used at maximal availability since the resale price is higher
than the purchase price.

Exercise 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
A paper manufacturer produces paper rolls of a standard width of 105 cm and length L cm. However,
the customers demand rolls of length L cm but of a smaller width. The manufacturer is faced with the
following orders.

# rolls width (cm)


100 25
125 30
80 35

To meet the demand, rolls of standard width are cut into rolls of smaller width. One roll can, for
instance, be cut into two rolls of width 35 cm and one roll of width 30 cm. This cutting pattern yields
a loss of 5 L cm2 of paper. The goal of the manufacturer is to minimize the loss of paper for the above

Page 6 of 16
demand. Formulate this problem as an Integer Linear Program (An Integer Linear Program is a linear
program where each variables is required to be integer).

Solution: We consider all the possible patterns in which we can cut a roll. Thus, we introduce the
following notation. We denote every pattern by a triple (a1 , a2 , a3 ) ∈ Z3≥0 , where the first, the second
and the third component represent how many rolls of width 25 cm, 30 cm and 35 cm, respectively,
we cut from the original roll. In our set-up, a pattern is feasible when (a1 , a2 , a3 )0 (25, 30, 35) ≤ 105.
A feasible pattern is maximal if it is not possible to cut any more rolls from it, i.e. if we increase
any of a1 , a2 or a3 by one unit, the resulting pattern is no longer feasible. For example, (4, 0, 0) is
feasible and maximal, (3, 0, 0) is feasible but not maximal, (5, 0, 0) is not feasible.
Since our goal is to minimize the loss of paper, we consider only the maximal feasible patterns and
we take into account the excess of production. For example, if we cut too many rolls of width 25
cm, we count the excess rolls as paper loss.
We have 10 maximal patterns in total. For each maximal pattern i = 1, . . . , 10, we define variable
xi as the number of original rolls to be cut with pattern i. Moreover, for each maximal pattern
i = 1, . . . , 10, we compute the corresponding paper loss ci .

variable pattern loss (cm)


x1 (4, 0, 0) 5
x2 (3, 1, 0) 0
x3 (2, 0, 1) 20
x4 (1, 2, 0) 20
x5 (1, 1, 1) 15
x6 (1, 0, 2) 10
x7 (0, 3, 0) 15
x8 (0, 2, 1) 10
x9 (0, 1, 2) 5
x10 (0, 0, 3) 0

In this way, we define the matrix A, the demand b and the vector of costs c.
   
4 3 2 1 1 1 0 0 0 0 100
A= 0 1 0 2 1 0 3 2 1 0 , b =  125 , c = (5, 0, 20, 20, 15, 10, 15, 10, 5, 0).
0 0 1 0 1 2 0 1 2 3 80

The vector y = Ax − b counts the number of rolls of each type that are produced but not sold. For
example, if we set x5 = 125 and xi = 0 for i 6= 5, we produce exactly 125 rolls of each type, and
we end up with 25 extra rolls of width 25 cm and 45 extra rolls of width 35 cm. Thus, besides the
paper loss of 15 cm for each original roll, we also have an additional loss of 25 and 35 cm for each
extra roll of width 25 and 35 cm, respectively. Formally, let w = (25, 30, 35). A formulation of the
problem as an Integer Linear Program is:

min c0 x + w0 y
s.t. A x − y = b,
x ∈ Z10
≥0 ,
y ∈ Z3≥0 .

Exercise 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
Consider the following optimization problems involving absolute values. For each one, give an equivalent
linear program using similar ideas to the ones seen in class, and prove the equivalence.

Page 7 of 16
(a)

min − 2x1 + 3|x2 − 10|


s.t. |x1 + 2| + |x2 | ≤ 5

Solution: We can reformulate this problem as the following equivalent linear program:

min − 2x1 + 3z1 (1)


s.t. z1 ≥ x2 − 10 (2)
z1 ≥ −x2 + 10 (3)
z2 + z3 ≤ 5 (4)
z2 ≥ x1 + 2 (5)
z2 ≥ −x1 − 2 (6)
z3 ≥ x2 (7)
z3 ≥ −x2 , (8)

in the variables (x1 , x2 , z1 , z2 , z3 ), that can be rewritten as

min − 2x1 + 3z1


s.t. − x2 + z1 ≥ −10
x2 + z1 ≥ 10
z2 + z3 ≤ 5
− x1 + z2 ≥ 2
x1 + z2 ≥ −2
− x2 + z3 ≥ 0
x2 + z3 ≥ 0.

Let (P ) be the original problem and let (P 0 ) be our reformulation. To show equivalence we show
that (i) for each feasible solution (x1 , x2 ) to (P ) with cost w, we can construct a feasible solution
(x1 , x2 , z1 , z2 , z3 ) to (P 0 ) with cost at most w; and (ii) for each feasible solution (x1 , x2 , z1 , z2 , z3 )
to (P 0 ) with cost w0 , we can construct a feasible solution (x1 , x2 ) to (P ) with cost at most w0 .
To prove (i), we map a feasible solution (x̄1 , x̄2 ) to (P ) to

(x1 , x2 , z1 , z2 , z3 ) = (x̄1 , x̄2 , |x̄2 − 10|, |x̄1 + 2|, |x̄2 |).

To show that this is a feasible solution to (P 0 ) we check that all of the constraints in (P 0 ) are
satisfied. Constraints (2), (3), (5), (6), (7), (8) are satisfied since |α| ≥ α and |α| ≥ −α for any
α ∈ R. Constraint (4) is satisfied because (x̄1 , x̄2 ) is feasible to (P ), thus |x̄1 + 2| + |x̄2 | ≤ 5.
To show that the cost of (x̄1 , x̄2 , |x̄2 − 10|, |x̄1 + 2|, |x̄2 |) is at most w, we observe that the cost
of (x̄1 , x̄2 , |x̄2 − 10|, |x̄1 + 2|, |x̄2 |) in (P 0 ) is −2x̄1 + 3|x̄2 − 10|, which is exactly w.
Conversely, to prove (ii), we map a feasible solution (x̄1 , x̄2 , z̄1 , z̄2 , z̄3 ) to (P 0 ) to

(x̄1 , x̄2 ).

To show that this is a feasible solution to (P ) we check that all of the constraints in (P ) are
satisfied. This is true since, by (4) we have:

z̄2 + z̄3 ≤ 5,

Page 8 of 16
and by constraints (5), (6), (7), (8) we have:

z̄2 ≥ |x̄1 + 2|
z̄3 ≥ |x̄2 |.

Thus we obtain
|x̄1 + 2| + |x̄2 | ≤ z̄2 + z̄3 ≤ 5.
To show that the cost of (x̄1 , x̄2 ) is at most w0 , we observe that the cost of (x̄1 , x̄2 ) in (P ) is
−2x̄1 + 3|x̄2 − 10|, which is at most −2x̄1 + 3z̄1 , since by (2) and (3) we have z̄1 ≥ |x̄2 − 10|.

(b)
max x1 − |x2 + 3|
s.t. |x1 | + x2 ≤ 3
x2 ≥ 0

Solution: We can reformulate the problem as the equivalent linear program:

max x1 − z1 (9)
s.t. z2 + x2 ≤ 3 (10)
z1 ≥ x2 + 3 (11)
z1 ≥ −x2 − 3 (12)
z2 ≥ x1 (13)
z2 ≥ −x1 (14)
x2 ≥ 0. (15)

Let (P ) be the original problem and let (P 0 ) be our reformulation. To show equivalence we show
that (i) for each feasible solution (x1 , x2 ) to (P ) with cost w, we can construct a feasible solution
(x1 , x2 , z1 , z2 ) to (P 0 ) with cost at least w; and (ii) for each feasible solution (x1 , x2 , z1 , z2 ) to
(P 0 ) with cost w0 , we can construct a feasible solution (x1 , x2 ) to (P ) with cost at least w0 .
(Note that this is a maximization problem, thus we have “at least” instead of “at most”).
To prove (i), we map a feasible solution (x̄1 , x̄2 ) to (P ) to

(x1 , x2 , z1 , z2 ) = (x̄1 , x̄2 , |x̄2 + 3|, |x̄1 |).

To show that this is a feasible solution to (P 0 ) we check that all of the constraints in (P 0 )
are satisfied. Constraints (11), (12), (13), (14) are satisfied since |α| ≥ α and |α| ≥ −α for
any α ∈ R. Constraint (10) is satisfied because (x̄1 , x̄2 ) is feasible to (P ), thus |x̄1 | + x̄2 ≤ 3.
Finally, Constraint (15) is satisfied because (x̄1 , x̄2 ) is feasible to (P ), thus x̄2 ≥ 0.
To show that the cost of (x̄1 , x̄2 , |x̄2 + 3|, |x̄1 |) is at least w, we observe that the cost of
(x̄1 , x̄2 , |x̄2 + 3|, |x̄1 |) in (P 0 ) is x̄1 − |x̄2 + 3|, which is exactly w.
Conversely, to prove (ii), we map a feasible solution (x̄1 , x̄2 , z̄1 , z̄2 ) to (P 0 ) to

(x̄1 , x̄2 ).

To show that this is a feasible solution to (P ) we check that all of the constraints in (P ) are
satisfied. This is true since, by (10) we have:

z̄2 + x̄2 ≤ 3,

Page 9 of 16
and by constraints (13), (14) we have:

z̄2 ≥ |x̄1 |.

Thus we obtain
|x̄1 | + x̄2 ≤ z̄2 + x̄2 ≤ 3.
Moreover, since (x̄1 , x̄2 , z̄1 , z̄2 ) is feasible to (P 0 ) we have that, by (15), x̄2 ≥ 0.
To show that the cost of (x̄1 , x̄2 ) is at least w0 , we observe that the cost of (x̄1 , x̄2 ) in (P ) is
x̄1 − |x̄2 + 3|, which is at least x̄1 − z̄1 , since by (11) and (12) we have z̄1 ≥ |x̄2 + 3|.

(c)
min |x1 | − |x2 − 1|
s.t. 3x1 + 2x2 ≥ 1
x2 ≥ 1

Solution: At first sight, we might think that the given problem does not admit an equivalent
linear programming reformulation, because we are minimizing and the term |x2 − 1| in the
objective function, that has a negative coefficient. However, the constraint x2 ≥ 1 implies that
the objective function can be rewritten as |x1 | − x2 + 1. Thus, we have the following equivalent
reformulation as a linear program:

1 + min z1 − x2 (16)
s.t. 3x1 + 2x2 ≥ 1 (17)
x2 ≥ 1 (18)
z1 ≥ x1 (19)
z1 ≥ −x1 . (20)

Let (P ) be the original problem and let (P 0 ) be our reformulation. To show equivalence we
show that (i) for each feasible solution (x1 , x2 ) to (P ) with cost w, we can construct a feasible
solution (x1 , x2 , z1 ) to (P 0 ) with cost at most z; and (ii) for each feasible solution (x1 , x2 , z1 )
to (P 0 ) with cost w0 , we can construct a feasible solution (x1 , x2 ) to (P ) with cost at most w0 .
To prove (i), we map a feasible solution (x̄1 , x̄2 ) to (P ) to

(x1 , x2 , z1 ) = (x̄1 , x̄2 , |x̄1 |).

To show that this is a feasible solution to (P 0 ) we check that all of the constraints in (P 0 )
are satisfied. Constraints (19), (20) are satisfied since |α| ≥ α and |α| ≥ −α for any α ∈ R.
Constraint (17) is satisfied because (x̄1 , x̄2 ) is feasible to (P ), thus 3x̄1 + 2x̄2 ≥ 1. Finally,
Constraint (18) is satisfied because (x̄1 , x̄2 ) is feasible to (P ), thus x̄2 ≥ 1.
To show that the cost of (x̄1 , x̄2 , |x̄1 |) is at most w, we observe that the cost of (x̄1 , x̄2 , |x̄1 |) in
(P 0 ) is 1 + |x̄1 | − x̄2 , which is exactly w, since |x2 − 1| = x2 − 1 for any x2 ≥ 1.
Conversely, to prove (ii), we map a feasible solution (x̄1 , x̄2 , z̄1 ) to (P 0 ) to

(x̄1 , x̄2 ).

To show that this is a feasible solution to (P ) we check that all of the constraints in (P ) are
satisfied. This is true since (x̄1 , x̄2 , z̄1 ) is feasible to (P 0 ), thus we have that, by (17) and (18),
3x̄1 + 2x̄2 ≥ 1 and x̄2 ≥ 1.

Page 10 of 16
To show that the cost of (x̄1 , x̄2 ) is at most w0 , we observe that the cost of (x̄1 , x̄2 ) in (P ) is
|x̄1 | − |x̄2 − 1| = |x̄1 | − x̄2 + 1, since we have x̄2 ≥ 1. Since by (19) and (20) we have z̄1 ≥ |x̄1 |,
we conclude that
|x̄1 | − |x̄2 − 1| = |x̄1 | − x̄2 + 1 ≤ z̄1 − x̄2 + 1 = w0 .

Exercise 8 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Consider an optimization problem (P ) with absolute values in the following form:

min c0 x + d0 y
s.t. Ax + By ≤ b
yi = |xi | ∀ i,

and assume that all entries of B and d are nonnegative.


(a) (3 points) Provide a linear programming reformulation of the above problem, using ideas similar
to the ones discussed in class.

Solution: The reformulation (R1) as a linear program is:

min c0 x + d0 z
s.t. Ax + Bz ≤ b
zi ≥ xi ∀i
zi ≥ −xi ∀ i.

(b) (4 points) Show that the original problem and the reformulation are equivalent.

Solution: In the following, for x ∈ Rn we denote by |x| the vector (|x1 |, . . . , |xn |).
We show that (P ) and (R1) are equivalent.

1. We first show that, for every feasible solution of (P ), we can construct a feasible solution
of (R1) with objective value equal or lower. Let (x, y) be a feasible solution of (P ), with
objective value c0 x + d0 y. We prove that (x, z) = (x, |x|) is feasible for (R1). Since (x, y)
is a feasible solution of (P ), y = |x| in (P ), and we have that Ax + Bz = Ax + B|x| =
Ax + By ≤ b, so the first set of constraints of (R1) are satisfied by (x, z). Moreover,
z = |x| ≥ x and z = |x| ≥ −x. This proves that (x, z) is feasible for (R1). The objective
value of (x, z) is c0 x + d0 z = c0 x + d0 |x| = c0 x + d0 y. This proves that objective value of
(x, z) in (R1) equals the objective value of (x, y) in (P ). Note that we have not exploited
that B and d are nonnegative.

2. We now show that, for every feasible solution of (R1), we can construct a feasible solution
of (P ) with objective value equal or lower. Let (x, z) be a feasible solution of (R1), with
objective value c0 x + d0 z. We define (x, y) as (x, |x|).
We first show that (x, y) is feasible for (P ). By construction, we have y = |x|. We need
to prove that Ax + B|x| ≤ b. This is true since (x, z) is feasible in (R1), thus z ≥ |x| and
Ax + B|x| ≤ Ax + Bz ≤ b. Note that the last inequality holds since B is assumed to have
nonnegative entries. Moreover the objective value of (x, |x|) in (P ) is
n
X n
X
c0 x + d0 |x| = c0 x + di |xi | ≤ c0 x + di zi ,
i=1 i=1

Page 11 of 16
where the last inequality follows from the fact that z ≥ |x| and d ≥ 0. Hence the objective
value of (x, |x|) in (P ) is at most the objective value of (x, z) in (R1).

(c) (3 points) Provide an example to show that if B has negative entries, the problem may have a local
minimum that is not a global minimum.

Solution: An example is

min x
s.t. |x| ≥ 1
− 2 ≤ x ≤ 2.

In this case B = −1, and a local optimum that is not a global optimum is in x = 1. The unique
global optimum is instead in x = −2. Note that the feasible set is not convex.
Another example is

min 1/2x + |x|


s.t. |x| ≥ 1
− 2 ≤ x ≤ 2.

In this case B = −1, and a local optimum that is not a global optimum is in x = 1. The unique
global optimum is instead in x = −1. Note that the feasible set is not convex and the objective
function is nonlinear.

Exercise 9 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Consider a road divided into n segments that is illuminated by m lamps. Pm Let pj be the power of the
jth lamp. The illumination Ii of the ith segment is assumed to be j=1 aij pj , where aij are known
coefficients. Let Ii∗ be the desired illumination of segment i.
We are interested in choosing the lamp powers pj so that the illuminations Ii are close to the desired
illuminations Ii∗ . Provide a reasonable linear programming formulation of this problem. Note that the
wording of the problem is loose and there is more than one possible formulation.

Solution: A possible way to formulate this problem is minimizing


n
X m
∗ X
Ii − aij pj

i=1 j=1

under the constraint that the power of every lamp must be nonnegative: pj ≥ 0 for every j ∈
{1, . . . , m}.
Clearly this is not a linear program, but introducing n variables zi it is possible to write this problem

Page 12 of 16
as a linear program like shown below.
n
X
minimize zi
i=1
m
X
subject to zi + aij pj ≥ Ii∗ i = 1, . . . , n
j=1
Xm
zi − aij pj ≥ −Ii∗ i = 1, . . . , n
j=1

pj ≥ 0 j = 1, . . . , m

Exercise 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
Consider a school district with I neighborhood, J schools, and G grades at each school. Each school j
has a capacity of Cjg for grade g. In each neighborhood i, the student populations of grade g is Sig .
Finally, the distance of school j from neighborhood i is dij . Formulate a linear programming problem
whose objective is to assign all students to schools, while minimizing the total distance traveled by all
students. (You may ignore the fact that the numbers of students must be integer.)

Solution: Our decision variables are of the form xijg , and express the number of grade g students
in neighborhood i that are assigned to school j. The formulation is:
 
|I| |J| |G|
X X X
minimize dij  xijg 
i=1 j=1 g=1

|I|
X
subject to xijg ≤ Cjg ∀j = 1, . . . , |J|, g = 1, . . . , |G|
i=1
|J|
X
xijg = Sig ∀i = 1, . . . , |I|, g = 1, . . . , |G|
j=1

xijg ≥ 0 ∀i = 1, . . . , |I|, j = 1, . . . , |J|, g = 1, . . . , |G|.

Exercise 11 [G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Consider a set P described by linear inequalities constraints, that is, P = {x ∈ Rn | a0i x ≤ bi , i =
1, . . . , m}. A ball with center y and radius r is defined as the set of all points within (Euclidean)
distance r from y. We are interested in finding a ball with largest possible radius, which is entirely
contained within the set P . Provide a linear programming formulation of the problem.

Solution: We give two solutions.


Solution 1. Finding a ball with largest possible radius is equivalent to looking for the maximum
0
distance between y and the hyperplanes ai x = bi , i = 1, . . . , m. So we need linear constraints that
represent these distances.
0 0
a
Consider a hyperplane a x = b, let r be the distance between y and a x = b. Then the point y + r kak
0 0
a
belongs to the hyperplane, hence a (y + r kak ) = b which is equivalent to a y + kakr = b.

Page 13 of 16
Since we are looking for the maximum radius r that minimizes the distance between the center of
0
the ball y and the hyperplanes ai x = bi , i = 1, . . . , m, we must require that the distance between
0
y and each hyperplane is at least r. Therefore we must write the constraints ai y + kai kr ≤ bi , for
every i ∈ {1, . . . , m}. A linear programming formulation of this problem is the one below.

maximize r
0
subject to ai y + kai kr ≤ bi i = 1, . . . , m

Solution 2. Let B(y, r) denote a ball with center y and radius r, i.e., B(y, r) = {x ∈ Rn | kx − yk ≤
r}. Our problem is

maximize r
subject to B(y, r) ⊆ P.

B(y, r) can equivalently be defined as B(y, r) = {y + rv ∈ Rn | v ∈ Rn , kvk ≤ 1}. Thus, the


constraint B(y, r) ⊆ P can be expressed as

a0i (y + rv) ≤ bi ∀v ∈ Rn with kvk ≤ 1, i = 1, . . . , m.


ai
The choice of v ∈ Rn , kvk ≤ 1 that maximizes a0i v is v = kai k , i.e., then unit vector pointing in the
same direction as ai ; for this choice of v, we have

a0i ai kai k2
a0i v = = = kai k.
kai k kai k

Thus, given a single constraint a0i (y + rv) ≤ bi ∀v ∈ Rn with kvk ≤ 1, for fixed y and r the maximum
value the lefthand side can take is
 
0 0 0
max
n
ai (y + rv) = a i y + max
n
(a i v) r = a0i y + kai kr,
v∈R ,kvk≤1 v∈R ,kvk≤1

hence the constraint can be replaced by the inequality a0i y + rkai k ≤ bi . Thus, a linear programming
formulation of this problem is the one below.

maximize r
0
subject to ai y + kai kr ≤ bi i = 1, . . . , m

Exercise 12 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


A company produces and sells two different products. The demand for each product is unlimited, but
the company is constrained by cash availability and machine capacity.
Each unit of the first and second product requires 3 and 4 machine hours, respectively. There are 20,000
machine hours available in the current production period. The production costs are $3 and $2 per unit
of the first and second product, respectively. The selling prices of the first and the second product are
$6 and $5.40 per unit, respectively. The available cash is $4,000; furthermore, 45% of the sales revenues
from the first product and 30% of the sales revenues from the second product will be made available to
finance operations during the current period.
(a) (4 points) Formulate a linear programming problem that aims at maximizing net income subject
to the cash availability and machine capacity limitations. Recall that the net income is the sales
revenue minus the production cost.

Page 14 of 16
Solution: Let x1 and x2 be the amount produced of product 1 and 2, respectively. Clearly
x1 , x2 must be nonnegative. The constraint to impose regarding the machine capacity limita-
tions is straightforward: 3x1 + 4x2 ≤ 20000.
The one about cash availability is slightly more complicated. In fact we have that the production
cost 3x1 + 2x2 must be less or equal than 4000 plus 45% of the sales revenues from the first
45 3
product ( 100 6x1 ) and 30% of the sales revenues from the second product ( 10 5.40x2 ). Therefore
this constraint is:

3x1 + 2x2 ≤ 4000 + 2.7x1 + 1.62x2 ⇐⇒ 0.3x1 + 0.38x2 ≤ 4000.

The objective function to maximize is (6 − 3)x1 + (5.40 − 2)x2 = 3x1 + 3.4x2 . Hence the linear
program is:

maximize 3x1 + 3.4x2


subject to 3x1 + 4x2 ≤ 20000
0.3x1 + 0.38x2 ≤ 4000
x1 , x2 ≥ 0.

(b) (3 points) Solve the problem graphically to obtain an optimal solution.

Solution: In the figure below the feasible region of the problem is the yellow polyhedron P .
The black line represents the machine capacity constraint, the teal line is the cash availability
constraint (which is never active), and the red line represents the objective function. The
optimal value is 20000 and the optimal solution is ( 20000
3 , 0).
x2

3x
1
+
3.
8x
2
=
(0, 5000) 3x1 + 4x2 = 20000 40
00
0

P
( 20000
3
, 0)
0 x1
3x1 + 3.4x2 = 20000

(c) (3 points) Suppose that the company could increase its available machine hours by 2,000, after
spending $400 for certain repairs. Should the investment be made?

Solution: If the company increases the machine hours by 2000, the corresponding constraint
becomes 3x1 + 4x2 ≤ 22000. The cash availability constraint becomes 3x1 + 3.8x2 = 36000.
The feasible region becomes:

Page 15 of 16
x2

3x
1
+
3x1 + 4x2 = 22000 3.
8x
(0, 5000) 2
=
36
00
0

P
( 22000
3
, 0)
0 x1
3x1 + 3.4x2 = 22000

The cash availability constraint is still not active, so the optimal solution is given again by the
intersection between machine capacity constraint and x2 = 0. Therefore the optimal solution is
( 22000
3 , 0), which provides 22000 as optimal objective value. The difference between the current
optimal objective value and the previous one (20000) is 2000, which is greater than the cost of
the repairs. Hence the investment should be made.

Page 16 of 16

You might also like