You are on page 1of 8

MS&E 211 Fall 2006

Linear and Nonlinear Optimization Oct 24, 2006


Prof. Yinyu Ye

Homework Assignment 2: Sample Solution

Problem 1.

Assume producing x1 poster frames, x2 deluxe poster frames, x3 wood picture frames and
x4 metal picture frames will maximize the profit of Oasis. The problem can be formulated
as follows:

1.

Maximize 2x1 + 4x2 + x3 + x4


subject to x1 + 3x2 + x4 ≤ 4000
2x1 + x2 ≤ 3000
x2 + 4x3 + x4 ≤ 3000
xi ≥ 0 i = 1, 2, 3, 4

2. Solve it by the simplex method. First write it as the standard form:

Minimize −2x1 − 4x2 − x3 − x4


subject to x1 + 3x2 + x4 + x5 = 4000
2x1 + x2 + x6 = 3000
x2 + 4x3 + x4 + x7 = 3000
xi ≥ 0 i = 1, . . . , 7

We use (4 3 3) to represent (4000 3000 3000) temporally in iterations for the simplicity,
and choose the highlighted numbers as the pivot elements in iterations. Its initial
simplex tableau is:

x1 x2 x3 x4 x5 x6 x7
B -2 -4 -1 -1 0 0 0 0
5 1 3 0 1 1 0 0 4
6 2 1 0 0 0 1 0 3
7 0 1 4 1 0 0 1 3
Iteration 1:

x1 x2 x3 x4 x5 x6 x7
B − 32 0 -1 1
3
4
3
0 0 16
3
1 1 1 4
2 3
1 0 3 3
0 0 3
5
6 3
0 0 − 13 − 13 1 0 5
3
7 − 31 0 4 2
3
− 13 0 1 5
3

Iteration 2:

x1 x2 x3 x4 x5 x6 x7
B − 34 0 0 1
2
5
4
0 1
4
23
4
1 1 1 4
2 3
1 0 3 3
0 0 3
5
6 3
0 0 − 13 − 13 1 0 5
3
1 1 1 1 5
3 − 12 0 1 6
− 12 0 4 12

Iteration 3:

x1 x2 x3 x4 x5 x6 x7
7 11 9 1 13
B 0 0 0 20 10 20 4 2
2 2
2 0 1 0 5 5
− 15 0 1
1 1 0 0 − 15 − 15 3
5
0 1
3 1 1 1 1
3 0 0 1 20
− 10 20 4 2

The optimal solution: (x1 , x2 , x3 , x4 ) = 1000 ∗ (1, 1, 12 , 0) = (1000, 1000, 500, 0). The
13
optimal value is 1000 ∗ 2
= 6500.

3. The dual optimal solution(shadow prices) is y = ( 11 , 9 , 1 ), which can be read directly


10 20 4
from the final table.

4. In the optimal solution not any metal picture frame is produced. Assume now we
increase its price to p. In our simplex tableau we use p to replace the original price
1. The order that we conduct the operations of the simplex method doesn’t matter
so we can just focus on the last step. Force x4 to enter the basis, which requires
4 1 3
−p + 3
+ 6
− 20
< 0, i.e.,p > 27/20. (p = 27/20 would be fine too. In that case two
vertices are optimal. Think why?)

Problem 2.
1. First formulate the Phase-I problem for it:

Minimize y1 + y2
subject to x1 + 2x2 + x3 + 3x4 + y1 = 3
x1 + x2 + 2x3 + 4x4 + y2 = 5
x, y ≥ 0.

Then apply the simplex method to it. The initial simplex tableau for this phase-I
problem is:

0 0 0 0 1 1 0
y1 1 2 1 3 1 0 3
y2 1 1 2 4 0 1 5

Its canonical form is:

-2 -3 -3 -7 0 0 -8
y1 1 2 1 3 1 0 3
y2 1 1 2 4 0 1 5

We choose x4 as the entering basic variable. Pivoting on element 3 in column x4 , we


get:
1 5
3 3
− 32 0 7
3
0 -1
1 2 1 1
x4 3 3 3
1 3
0 1
y2 − 13 − 35 2
3
0 − 34 1 1
2
Pivoting on 3
in column x3 , we get:

0 0 0 0 1 1 0
1 3
x4 2 2
0 1 1 − 12 1
2
x3 − 12 − 52 1 0 -2 3
2
3
2

From this tableau, we get a feasible solution (0, 0, 23 , 12 , 0, 0). The reduced cost vector
(0, 0, 0, 0, 1, 1) ≥ 0 means this solution is optimal. And the optimal value is 0. So
Phase-I procedure terminates here with a BFS to the original problem.
Phase-II:
 
3 1
First we check r = c − AT (A−1 T
B ) cB . Here c = (2, 3, 2, 2), AB =
 , thus we find
4 2
r = (2, 5, 0, 0). It’s canonical simplex tableau is:
2 5 0 0 -4
1 3 1
x4 2 2
0 1 2
x3 − 21 − 52 1 0 3
2

The reduced cost (2, 5, 0, 0) ≥ 0 implies this basic feasible solution is already optimal.
So, we get the final solution for the original problem is (0, 0, 23 , 12 ). And the optimal
value is 4.
   
3 11
2. Change b from   to  . Then apply the simplex method to Phase-I, we get
5 5
the initial tableau:

-2 -3 -3 -7 0 0 -16
y1 1 2 1 3 1 0 11
y2 1 1 2 4 0 1 5

After 2 iterations, we get the final tableau for the Phase-I problem:

1 0 3 5 0 3 -1
y1 -1 0 -3 -5 1 -2 1
x2 1 1 2 4 0 1 5

The optimal value is positive, so the original problem is infeasible and the algorithm
terminates. The shadow price vector to this problem, i.e. an infeasibility certificate
for the original feasible set is
 −1 T    
 1 2    1  1
  = .
0 1 0 −2

Remark: The original system doesn’t have a feasible solution. This system has a form
{x : Ax = b, x ≥ 0}. For this type of system, Farkas’ Lemma (Lecture03, Page 6) has
the following equivalent version:
Let A ∈ Rm×n , b ∈ Rm . The system {x : Ax = b, x ≥ 0} has a feasible solution if and
only if that AT y ≤ 0, bT y > 0 has no solution.
A vector y, with AT y ≤ 0, bT y > 0, is called an infeasible certificate for the system. So
the infeasible certificate (1, −2) for this system is given as above.
Problem 3 The LP model can be written as:

Maximize π T x − w · v T s
subject to Ax − s = 0
x≤q
x≥0

where decision variables x ∈ Rn and s ∈ Rm , and q is the given quantity limit.

The dual of the problem is

Minimize qT y
subject to AT p + y ≥ π
p=w·v
y≥0

By complementary slackness conditions:

xi (aTi p + yi − πi ) = 0
yj (qj − xj ) = 0

Case 1) 0 < xj < qj :

xj < qj , yj (qj − xj ) = 0 ⇒ yj = 0
xj > 0, xj (aTj p + yj − πj ) = 0 ⇒ aTj p + yj − πj = 0
⇒ aTj p = πj

Case 2) xj = 0 :

xj < qj , yj (qj − xj ) = 0 ⇒ yj = 0
⇒ aTj p ≥ πj

Case 3) xj = qj :

xj > 0, xj (aTj p + yj − πj ) = 0 ⇒ aTj p + yj − πj = 0


⇒ yj = πj − aTj p ≥ 0
In summary:

0 < xj < qj , =⇒ aTj p = πj


xj = 0, =⇒ aTj p ≥ πj
xj = q j , =⇒ aTj p ≤ πj

Where p is the dual variable vector associated with constraints Ax − s = 0 and y is the dual
vector associated with constraints x ≤ q. p ≥ 0 is implied by v ≥ 0. We can see from above
that the prices are fair.

The interpretation of the dual is to find state prices p and slacks y between the parimutuel
prices AT p and price limit π such that the total difference q T y = q T π − q T AT p is minimized.
The complementary conditions imply the relationships of primal and dual. Most of these
conditions are the same as those in our robust model.

2) Orders honored: (100, 50, 100, a, 50). 0 ≤ a ≤ 100 The expected profit: 22.5. The actual
profit: −30 − 0.05a. (The company lost money!)

Problem 4

1. The linear program actually describes the min-cut problem. Suppose ui (i = A, B)


is meant to be 1 if i is in the cut with S and 0 otherwise. Each of the y variables is
meant to be 1 if the corresponding edge contributes to the cut capacity. Then these
constraints guarantee these variables behave exactly as they should. For example, the
first constraint forces SA to be in the cut if A is not with S. The third constraint
implies that AB contributes to the cut capacity only if A is with S and B is with T.
Note here we assume uA (or uB ) is either 0 or 1 for the simplicity of the discussion.
Their ranges can actually be extended to any real value.

2. The dual is:

Maximize fSA + fSB


subject to fSA ≤ 3
fSB ≤ 2
fAB ≤ 1
fBA ≤ 1
fAT ≤ 1
fBT ≤ 3
fSA + fBA − fAB − fAT = 0
fSB + fAB − fBA − fBT = 0
f ≥0

let fij be the flow through edge (i, j). The constraints describe all edge capacity
constraints and flow conservations. The objective function is the total flow through
the network. So it is a max-flow problem.

3. Any feasible (s, t)−cut is a feasible solution to the min-cut formulation, so its capacity
is an upper bound of the value of the min-cut LP formulation. Similarly the value of
any feasible flow pattern is a lower bound of the value of the max-flow LP formulation.
By weak duality, the former is always no less than the latter.

Problem 5

According to the definition of the concavity, we need to prove for any b11 , b21 ∈ [10, 30],
0 ≤ α ≤ 1, we always have:

z(αb11 + (1 − α)b21 ) ≥ αz(b11 ) + (1 − α)z(b21 )

Suppose an optimal feasible solution to the original linear program with parameter b1 = b11 is
x = (x1 , x2 , x3 ). Similarly suppose an optimal feasible solution to the original linear program
with parameter b1 = b21 is y = (y1 , y2 , y3 ).

Let w = αx + (1 − α)y. Then

w1 + 3w2 + 6w3 = α(x1 + 3x2 + 6x3 ) + (1 − α)(y1 + 3y2 + 6y3 ) ≤ αb11 + (1 − α)b21 .

Similarly, it is easy to check:

2w1 + 15w3 ≤ 30
8w2 + 9w3 ≤ 30
w1 , w 2 , w 3 ≥ 0

Therefore, w is a feasible solution to the linear program:


Maximize 5x1 + 15x2 + 30x3
subject to x1 + 3x2 + 6x3 ≤ αb11 + (1 − α)b21
2x1 + 15x3 ≤ 30
8x2 + 9x3 ≤ 30
x1 , x 2 , x 3 ≥ 0

So, by the definition of z(b1 ), we know:

5w1 + 15w2 + 30w3 ≤ z(αb11 + (1 − α)b21 ).

And

5w1 + 15w2 + 30w3 = α(5x1 + 15x2 + 30x3 ) + (1 − α)(5y1 + 15y2 + 30y3 ) = αz(b11 ) + (1 − α)z(b21 )

Thus, according to the definition, we know z(b1 ) is concave.

Remark: This proof can be generalized: z(b) is concave for b if z(b) is defined as follows:

z(b) := Maximize cT x
subject to Ax = b
x≥0

You might also like