homework 9 solution

6.1 BJS3 p.315
(P)
Minimize
s.t
c1x1 + c2x2 + c3x3
A11x1 + A12x2 + A13x3 ≥ b1
A21x1 + A22x2 + A13x3 ≤ b2
A31x1 + A32x2 + A33x3 = b3
x1 ≥ 0
x2 ≤ 0
x3 unrestricted (free)
(D)
Maximize
s.t
b1w1 + b2w2 + b3w3
A11w1 + A12w2 + A31w3 ≤ c1
A12w1 + A22w2 + A31w3 ≥ c2
A13w1 + A23w2 + A33w3 = c3
w1 ≥ 0
w2 ≤ 0
w3 unrestricted (free)
6.3 BJS3 p.315
(P')
Maximize
-x1 + 3x2
2x1 + 3x2 ≤ 6
s.t.
x1 - 3x2 ≥ -3
x1, x2 ≥ 0
transform to:
(P)
Maximize
s.t.
Note: from the 2nd structural constraint the optimal objective value is 3.
-x1 + 3x2
2x1 + 3x2 ≤ 6
-x1 + 3x2 ≤ 3
x1, x2 ≥ 0
which puts the problem into the canonical dual format
from which its dual is the canonical primal:
(D)
Minimize
s.t.
6w1 + 3w2
2w1 - w2 ≥ -1
3w1 + 3w2 ≥ 3
w1, w2 ≥ 0
(a) Solve (P) graphically.
Structural constraint (1) equality (boundary) :
2x1 + 3x2 = 6
x1 = 0 → 3x2 = 6
→
x2 = 0 → 2x1 = 6
→
x2 = 2
x1 = 3
test (0,0) : 2(0) + 3(0) = 0 ≤ 6 → (0,0) in feasible region
Structural constraint (2) equality (boundary) :
x1 - 3x2 = -3
x1 = 0 → -3x2 = -3 → x2 = 1
x2 = 0 → x1 = -3
test (0,0) : (0) - 3(0) = 0 ≥ -3
→ (0,0) in feasible region
From the note above the optimal objective level line lies on the boundary of the 2nd structural
constraint. The end points of the optimal solution line segment are apparent from the graph.
Solve:
2x1 + 3x2 = 6
x1 - 3x2 = -3
3x1
=3
(1) - 3x2 = -3
End point 1: (1,4/3)
Solve: x1 - 3x2 = -3
→
x1 = 1
→
3x2 = 4
→
x2 = 4/3
x1 = 0
(0) - 3x2 = -3 → x2 = 1
End point 2: (0,1)
The optimal solution is { (1-λ)(0,1) + λ(1,4/3) : 0 ≤ λ ≤ 1 } with objective value 3.
(b) Solve (D) graphically.
Structural constraint (1) equality (boundary) :
2w1 - w2 = -1
w1 = 0 → -w2 = -1
→
w2 = 0 → 2w1 = -1
→
w2 = 1
w1 = 1/2
test (0,0) : 2(0) - (0) = 0 ≥ -1 → (0,0) in feasible region
Structural constraint (2) equality (boundary) :
3w1 + 3w2 = 3
w1 = 0 → 3w2 = 3
→
w2 = 0 → 3w1 = 3
→
w2 = 1
w1 = 1
test (0,0) : 3(0) + 3(0) = 0 ≤ 3 → (0,0) not in feasible region
From the graph the only feasible point is (0,1) which implies that this is the optimal solution with
objective value 6(0) + 3(1) = 3 , which is consistent with the solution for the primal in (a).
Obtain the values of all the primal variables from the optimal dual solution.
From the complementary slackness conditions at the optimal point
(w1,w2) = (0,1):
w1(2x1 + 3x2 -6 ) = 0
→
(0)(2x1 + 3x2 -6 ) = 0
w2( x1 - 3x2 + 3) = 0
→
(1)( x1 - 3x2 + 3) = 0
So the information we obtain from the CSC is: x1 - 3x2 = -3
The optimal primal variables must also satisfy all the constraints of (P).
Thus the optimal primal variables satisy:
x1 - 3x2 = -3
2x1 + 3x2 ≤ 6
-x1 + 3x2 ≤ 3
x1, x2 ≥ 0
The 1st and 3rd constraints imply that only constraint 1 is needed, so the optimal primal variables satisfy:
x1 - 3x2 = -3
2x1 + 3x2 ≤ 6
x1, x2 ≥ 0
The solution to this system can be identified from the graph used to solve (a) as
{ (1-λ)(0,1) + λ(1,4/3) : 0 ≤ λ ≤ 1 } with objective value 3.
This can also be obtained analytically as follows:
x1 - 3x2 = -3
Now
With
0 ≤ x1 ≤ 1,
So with
→
3x2=x1+3 → 2x1+(x1+3) ≤ 6
→
x1 ≤ 1
→
3x1 ≤ 3
3x2=x1+3 → x2=x1/3 + 1
x2=x1/3 + 1 satisfies
0 ≤ x1 ≤ 1 the optimal solution is:
x2 ≥ 0 .
{ x1 , x1/3 + 1) : 0 ≤ x1 ≤ 1 } .
6.15 BJS3 p.318
Consider the problem:
Minimize cx
s.t.
Ax = b
l ≤ x ≤ u , where l and u are finite.
(a) Give the dual .
Rewrite in the form:
Minimize cx
s.t.
Ax = b
x≥ l
-x ≥ -u
x free
which can also be written as
Minimize cx
s.t.
Ax = b
Ix ≥ l
-Ix ≥ -u
x free
The dual is:
1
2
3
1
2
3
Maximize w b + w l - w u
w A+w I-w I=c
1
2
3
w free, w , w ≥ 0
which can also be written as
1
2
3
Maximize w b + w l - w u
w1A + w2 - w3 = c
1
2
3
w free, w , w ≥ 0
(b) Show that the dual always possesses a feasible solution .
The following will be a feasible solution:
1
Set w = 0 and for each i,
2
3
(i) if ci = 0, set w i = w i = 0 ,
2
3
(ii) if ci > 0, set w i = ci and w i = 0 ,
3
2
(iii) if ci < 0, set w i = -ci and w i = 0 .
(c) If the primal problem possesses a feasible solution, what conclusion would you reach?
If the primal problem possesses a feasible solution, then both the primal and the dual
problem have feasible solutions and by the duality results they must both have
optimal solutions with equal objectives.
6.19 BJS3 p.318
Use the main duality theorem to prove Farkas' Lemma.
From BJS3 p. 231:
(Farkas' Lemma)
One and only one of the following two systems has a solution.
System 1 : Ax ≥ 0
and
cx < 0
System 2 : wA = c
and
w≥0,
where A is a given mxn matrix and c is a given n vector.
Proof
Consider the following pair of primal and dual problems:
(P) minimize c·x
(D) maximize w·0
s.t.
Ax ≥ 0
s.t.
wA = c
x free
w≥0
Note that x = 0 is a feasible solution for (P) with objective value 0.
Case 1 Assume that System 1 has a solution.
Then there is a vector ŷ such that Aŷ ≥ 0 and c·ŷ < 0 so that ŷ is also a feasible solution for (P) .
But then for any λ > 0 , λ(ŷA) = (λŷ)A ≥ 0 and λ(c·ŷ) = c·(λŷ) < 0, so that λŷ is also a solution for (P).
Further, since λ can be made as large as we wish, c·(λŷ) = λ(c·ŷ) can be made as negative as we wish.
Thus (P) is unbounded and our duality results imply that (D) is infeasible, so that System 2 has no solution.
Case 2 Assume that System 1 has no solution.
Since (P) has a feasible solution, any solution x to (P) must have c·x ≥ 0.
Since the solution x = 0 to (P) has objective value 0, the optimal objective is 0 and x = 0 is an optimal
solution to (P). By our duality results, (D) also has an optimal solution with objective value 0 (which is
certainly consistent with the objective function for (D) being w·0 = 0). Thus System 2 has a solution.
□