l9 strong duality

71
Math 407A: Linear Optimization Lecture 9 The Fundamental Theorem of Linear Programming The Strong Duality Theorem Complementary Slackness Math Dept, University of Washington

Upload: hector-f-bonilla

Post on 04-Jan-2016

243 views

Category:

Documents


0 download

DESCRIPTION

hhhh

TRANSCRIPT

Page 1: L9 Strong Duality

Math 407A: Linear Optimization

Lecture 9The Fundamental Theorem of Linear Programming

The Strong Duality TheoremComplementary Slackness

Math Dept, University of Washington

Page 2: L9 Strong Duality

The Two Phase Simples Algorithm

The Fundamental Theorem of linear Programming

Duality Theory Revisited

Complementary Slackness

Page 3: L9 Strong Duality

The Two Phase Simplex Algorithm

Phase I Formulate and solve the auxiliary problem. Twooutcomes are possible:

(i) The optimal value in the auxiliary problem ispositive. In this case the original problem isinfeasible.

(ii) The optimal value is zero and an initial feasibletableau for the original problem is obtained.

Phase II If the original problem is feasible, apply the simplexalgorithm to the initial feasible tableau obtained fromPhase I above. Again, two outcomes are possible:

(i) The LP is determined to be unbounded.(ii) An optimal basic feasible solution is obtained.

Page 4: L9 Strong Duality

The Two Phase Simplex Algorithm

Phase I Formulate and solve the auxiliary problem. Twooutcomes are possible:

(i) The optimal value in the auxiliary problem ispositive. In this case the original problem isinfeasible.

(ii) The optimal value is zero and an initial feasibletableau for the original problem is obtained.

Phase II If the original problem is feasible, apply the simplexalgorithm to the initial feasible tableau obtained fromPhase I above. Again, two outcomes are possible:

(i) The LP is determined to be unbounded.(ii) An optimal basic feasible solution is obtained.

Page 5: L9 Strong Duality

The Two Phase Simplex Algorithm

Phase I Formulate and solve the auxiliary problem. Twooutcomes are possible:

(i) The optimal value in the auxiliary problem ispositive. In this case the original problem isinfeasible.

(ii) The optimal value is zero and an initial feasibletableau for the original problem is obtained.

Phase II If the original problem is feasible, apply the simplexalgorithm to the initial feasible tableau obtained fromPhase I above. Again, two outcomes are possible:

(i) The LP is determined to be unbounded.(ii) An optimal basic feasible solution is obtained.

Page 6: L9 Strong Duality

The Two Phase Simplex Algorithm

Phase I Formulate and solve the auxiliary problem. Twooutcomes are possible:

(i) The optimal value in the auxiliary problem ispositive. In this case the original problem isinfeasible.

(ii) The optimal value is zero and an initial feasibletableau for the original problem is obtained.

Phase II If the original problem is feasible, apply the simplexalgorithm to the initial feasible tableau obtained fromPhase I above. Again, two outcomes are possible:

(i) The LP is determined to be unbounded.(ii) An optimal basic feasible solution is obtained.

Page 7: L9 Strong Duality

The Two Phase Simplex Algorithm

Phase I Formulate and solve the auxiliary problem. Twooutcomes are possible:

(i) The optimal value in the auxiliary problem ispositive. In this case the original problem isinfeasible.

(ii) The optimal value is zero and an initial feasibletableau for the original problem is obtained.

Phase II If the original problem is feasible, apply the simplexalgorithm to the initial feasible tableau obtained fromPhase I above. Again, two outcomes are possible:

(i) The LP is determined to be unbounded.

(ii) An optimal basic feasible solution is obtained.

Page 8: L9 Strong Duality

The Two Phase Simplex Algorithm

Phase I Formulate and solve the auxiliary problem. Twooutcomes are possible:

(i) The optimal value in the auxiliary problem ispositive. In this case the original problem isinfeasible.

(ii) The optimal value is zero and an initial feasibletableau for the original problem is obtained.

Phase II If the original problem is feasible, apply the simplexalgorithm to the initial feasible tableau obtained fromPhase I above. Again, two outcomes are possible:

(i) The LP is determined to be unbounded.(ii) An optimal basic feasible solution is obtained.

Page 9: L9 Strong Duality

The Fundamental Theorem of linear Programming

Theorem:Every LP has the following three properties:

(i) If it has no optimal solution, then it is either infeasible orunbounded.

(ii) If it has a feasible solution, then it has a basic feasiblesolution.

(iii) If it is bounded, then it has an optimal basic feasible solution.

Page 10: L9 Strong Duality

The Fundamental Theorem of linear Programming

Theorem:Every LP has the following three properties:

(i) If it has no optimal solution, then it is either infeasible orunbounded.

(ii) If it has a feasible solution, then it has a basic feasiblesolution.

(iii) If it is bounded, then it has an optimal basic feasible solution.

Page 11: L9 Strong Duality

The Fundamental Theorem of linear Programming

Theorem:Every LP has the following three properties:

(i) If it has no optimal solution, then it is either infeasible orunbounded.

(ii) If it has a feasible solution, then it has a basic feasiblesolution.

(iii) If it is bounded, then it has an optimal basic feasible solution.

Page 12: L9 Strong Duality

The Fundamental Theorem of linear Programming

Theorem:Every LP has the following three properties:

(i) If it has no optimal solution, then it is either infeasible orunbounded.

(ii) If it has a feasible solution, then it has a basic feasiblesolution.

(iii) If it is bounded, then it has an optimal basic feasible solution.

Page 13: L9 Strong Duality

Duality Theory

P maximize cT xsubject to Ax ≤ b, 0 ≤ x

D minimize bT ysubject to AT y ≥ c, 0 ≤ y

What is the dual to the dual?

Page 14: L9 Strong Duality

Duality Theory

P maximize cT xsubject to Ax ≤ b, 0 ≤ x

D minimize bT ysubject to AT y ≥ c, 0 ≤ y

What is the dual to the dual?

Page 15: L9 Strong Duality

The Dual of the Dual

minimize bT ysubject to AT y ≥ c ,

0 ≤ y

Standard=⇒form

−maximize (−b)T ysubject to (−AT )y ≤ (−c),

0 ≤ y .

minimize (−c)T xsubject to (−AT )T x ≥ (−b),

0 ≤ x=⇒

maximize cT xsubject to Ax ≤ b,

0 ≤ x .

The dual of the dual is the primal.

Page 16: L9 Strong Duality

The Dual of the Dual

minimize bT ysubject to AT y ≥ c ,

0 ≤ y

Standard=⇒form

−maximize (−b)T ysubject to (−AT )y ≤ (−c),

0 ≤ y .

minimize (−c)T xsubject to (−AT )T x ≥ (−b),

0 ≤ x=⇒

maximize cT xsubject to Ax ≤ b,

0 ≤ x .

The dual of the dual is the primal.

Page 17: L9 Strong Duality

The Dual of the Dual

minimize bT ysubject to AT y ≥ c ,

0 ≤ y

Standard=⇒form

−maximize (−b)T ysubject to (−AT )y ≤ (−c),

0 ≤ y .

minimize (−c)T xsubject to (−AT )T x ≥ (−b),

0 ≤ x=⇒

maximize cT xsubject to Ax ≤ b,

0 ≤ x .

The dual of the dual is the primal.

Page 18: L9 Strong Duality

The Dual of the Dual

minimize bT ysubject to AT y ≥ c ,

0 ≤ y

Standard=⇒form

−maximize (−b)T ysubject to (−AT )y ≤ (−c),

0 ≤ y .

minimize (−c)T xsubject to (−AT )T x ≥ (−b),

0 ≤ x

=⇒maximize cT xsubject to Ax ≤ b,

0 ≤ x .

The dual of the dual is the primal.

Page 19: L9 Strong Duality

The Dual of the Dual

minimize bT ysubject to AT y ≥ c ,

0 ≤ y

Standard=⇒form

−maximize (−b)T ysubject to (−AT )y ≤ (−c),

0 ≤ y .

minimize (−c)T xsubject to (−AT )T x ≥ (−b),

0 ≤ x=⇒

maximize cT xsubject to Ax ≤ b,

0 ≤ x .

The dual of the dual is the primal.

Page 20: L9 Strong Duality

The Dual of the Dual

minimize bT ysubject to AT y ≥ c ,

0 ≤ y

Standard=⇒form

−maximize (−b)T ysubject to (−AT )y ≤ (−c),

0 ≤ y .

minimize (−c)T xsubject to (−AT )T x ≥ (−b),

0 ≤ x=⇒

maximize cT xsubject to Ax ≤ b,

0 ≤ x .

The dual of the dual is the primal.

Page 21: L9 Strong Duality

The Weak Duality Theorem

Theorem:If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

cT x ≤ yTAx ≤ bT y .

Thus, if P is unbounded, then D is necessarily infeasible, and if Dis unbounded, then P is necessarily infeasible. Moreover, if cT x =bT y with x feasible for P and y feasible for D, then x must solveP and y must solve D.

We combine the Weak Duality Theorem with the FundamentalTheorem of Linear Programming to obtain the Strong DualityTheorem.

Page 22: L9 Strong Duality

The Weak Duality Theorem

Theorem:If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

cT x ≤ yTAx ≤ bT y .

Thus, if P is unbounded, then D is necessarily infeasible, and if Dis unbounded, then P is necessarily infeasible. Moreover, if cT x =bT y with x feasible for P and y feasible for D, then x must solveP and y must solve D.

We combine the Weak Duality Theorem with the FundamentalTheorem of Linear Programming to obtain the Strong DualityTheorem.

Page 23: L9 Strong Duality

The Strong Duality Theorem

Theorem:If either P or D has a finite optimal value, then so does the other,the optimal values coincide, and optimal solutions to both P and Dexist.

Remark: In general a finite optimal value does not imply theexistence of a solution.

min f (x) = ex

The optimal value is zero, but no solution exists.

Page 24: L9 Strong Duality

The Strong Duality Theorem

Theorem:If either P or D has a finite optimal value, then so does the other,the optimal values coincide, and optimal solutions to both P and Dexist.

Remark: In general a finite optimal value does not imply theexistence of a solution.

min f (x) = ex

The optimal value is zero, but no solution exists.

Page 25: L9 Strong Duality

The Strong Duality Theorem

Theorem:If either P or D has a finite optimal value, then so does the other,the optimal values coincide, and optimal solutions to both P and Dexist.

Remark: In general a finite optimal value does not imply theexistence of a solution.

min f (x) = ex

The optimal value is zero, but no solution exists.

Page 26: L9 Strong Duality

The Strong Duality Theorem

Proof:Since the dual of the dual is the primal, we may as well assumethat the primal has a finite optimal value.

The Fundamental Theorem of Linear Programming says that anoptimal basic feasible solution exists.

The optimal tableau is RA R Rb

cT − yTA −yT −yTb

,

where we have already seen that y solves D, and the optimalvalues coincide.

This concludes the proof.

Page 27: L9 Strong Duality

The Strong Duality Theorem

Proof:Since the dual of the dual is the primal, we may as well assumethat the primal has a finite optimal value.

The Fundamental Theorem of Linear Programming says that anoptimal basic feasible solution exists.

The optimal tableau is RA R Rb

cT − yTA −yT −yTb

,

where we have already seen that y solves D, and the optimalvalues coincide.

This concludes the proof.

Page 28: L9 Strong Duality

The Strong Duality Theorem

Proof:Since the dual of the dual is the primal, we may as well assumethat the primal has a finite optimal value.

The Fundamental Theorem of Linear Programming says that anoptimal basic feasible solution exists.

The optimal tableau is RA R Rb

cT − yTA −yT −yTb

,

where we have already seen that y solves D, and the optimalvalues coincide.

This concludes the proof.

Page 29: L9 Strong Duality

The Strong Duality Theorem

Proof:Since the dual of the dual is the primal, we may as well assumethat the primal has a finite optimal value.

The Fundamental Theorem of Linear Programming says that anoptimal basic feasible solution exists.

The optimal tableau is RA R Rb

cT − yTA −yT −yTb

,

where we have already seen that y solves D, and the optimalvalues coincide.

This concludes the proof.

Page 30: L9 Strong Duality

Complementary Slackness

Theorem: [WDT]If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

cT x ≤ yTAx ≤ bT y .

Thus, if P is unbounded, then D is necessarily infeasible, and if Dis unbounded, then P is necessarily infeasible. Moreover, if cT x =bT y with x feasible for P and y feasible for D, then x must solveP and y must solve D.

The SDT implies that x solves P and y solves D if and only if(x , y) is a P-D feasible pair and

cT x = yTAx = bT y .

We now examine the consequence of this equivalence.

Page 31: L9 Strong Duality

Complementary Slackness

Theorem: [WDT]If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

cT x ≤ yTAx ≤ bT y .

Thus, if P is unbounded, then D is necessarily infeasible, and if Dis unbounded, then P is necessarily infeasible. Moreover, if cT x =bT y with x feasible for P and y feasible for D, then x must solveP and y must solve D.

The SDT implies that x solves P and y solves D if and only if(x , y) is a P-D feasible pair and

cT x = yTAx = bT y .

We now examine the consequence of this equivalence.

Page 32: L9 Strong Duality

Complementary Slackness

Theorem: [WDT]If x ∈ Rn is feasible for P and y ∈ Rm is feasible for D, then

cT x ≤ yTAx ≤ bT y .

Thus, if P is unbounded, then D is necessarily infeasible, and if Dis unbounded, then P is necessarily infeasible. Moreover, if cT x =bT y with x feasible for P and y feasible for D, then x must solveP and y must solve D.

The SDT implies that x solves P and y solves D if and only if(x , y) is a P-D feasible pair and

cT x = yTAx = bT y .

We now examine the consequence of this equivalence.

Page 33: L9 Strong Duality

Complementary SlacknessThe equation cT x = yTAx implies that

0 = xT (AT y − c) =n∑

j=1

xj(m∑i=1

aijyi − cj). (♣)

P-D feasibility gives

0 ≤ xj and 0 ≤m∑i=1

aijyi − cj for j = 1, . . . , n.

Hence, (♣) can only hold if

xj(m∑i=1

aijyi − cj) = 0 for j = 1, . . . , n, or equivalently,

xj = 0 orm∑i=1

aijyi = cj or both for j = 1, . . . , n.

Page 34: L9 Strong Duality

Complementary SlacknessThe equation cT x = yTAx implies that

0 = xT (AT y − c) =n∑

j=1

xj(m∑i=1

aijyi − cj). (♣)

P-D feasibility gives

0 ≤ xj and 0 ≤m∑i=1

aijyi − cj for j = 1, . . . , n.

Hence, (♣) can only hold if

xj(m∑i=1

aijyi − cj) = 0 for j = 1, . . . , n, or equivalently,

xj = 0 orm∑i=1

aijyi = cj or both for j = 1, . . . , n.

Page 35: L9 Strong Duality

Complementary SlacknessThe equation cT x = yTAx implies that

0 = xT (AT y − c) =n∑

j=1

xj(m∑i=1

aijyi − cj). (♣)

P-D feasibility gives

0 ≤ xj and 0 ≤m∑i=1

aijyi − cj for j = 1, . . . , n.

Hence, (♣) can only hold if

xj(m∑i=1

aijyi − cj) = 0 for j = 1, . . . , n, or equivalently,

xj = 0 orm∑i=1

aijyi = cj or both for j = 1, . . . , n.

Page 36: L9 Strong Duality

Complementary Slackness

Similarly, the equation yTAx = bT y implies that

0 = yT (b−Ax) =m∑i=1

yi (bi−n∑

j=1

aijxj).

(0 ≤ yi

0 ≤ bi −∑n

j=1 aijxj

)

Therefore, yi (bi −∑n

j=1 aijxj) = 0 i = 1, 2, . . . ,m.

Hence,

yi = 0 orn∑

j=1

aijxj = bi or both for i = 1, . . . ,m.

Page 37: L9 Strong Duality

Complementary Slackness

Similarly, the equation yTAx = bT y implies that

0 = yT (b−Ax) =m∑i=1

yi (bi−n∑

j=1

aijxj).

(0 ≤ yi

0 ≤ bi −∑n

j=1 aijxj

)

Therefore, yi (bi −∑n

j=1 aijxj) = 0 i = 1, 2, . . . ,m.

Hence,

yi = 0 orn∑

j=1

aijxj = bi or both for i = 1, . . . ,m.

Page 38: L9 Strong Duality

Complementary Slackness

Similarly, the equation yTAx = bT y implies that

0 = yT (b−Ax) =m∑i=1

yi (bi−n∑

j=1

aijxj).

(0 ≤ yi

0 ≤ bi −∑n

j=1 aijxj

)

Therefore, yi (bi −∑n

j=1 aijxj) = 0 i = 1, 2, . . . ,m.

Hence,

yi = 0 orn∑

j=1

aijxj = bi or both for i = 1, . . . ,m.

Page 39: L9 Strong Duality

Complementary Slackness

Similarly, the equation yTAx = bT y implies that

0 = yT (b−Ax) =m∑i=1

yi (bi−n∑

j=1

aijxj).

(0 ≤ yi

0 ≤ bi −∑n

j=1 aijxj

)

Therefore, yi (bi −∑n

j=1 aijxj) = 0 i = 1, 2, . . . ,m.

Hence,

yi = 0 orn∑

j=1

aijxj = bi or both for i = 1, . . . ,m.

Page 40: L9 Strong Duality

Complementary Slackness

cT x = yTAx = bT y

⇐⇒

I xj = 0 or∑m

i=1 aijyi = cj or both for j = 1, . . . , n.

I yi = 0 or∑n

j=1 aijxj = bi or both for i = 1, . . . ,m.

Page 41: L9 Strong Duality

Complementary Slackness

cT x = yTAx = bT y

⇐⇒

I xj = 0 or∑m

i=1 aijyi = cj or both for j = 1, . . . , n.

I yi = 0 or∑n

j=1 aijxj = bi or both for i = 1, . . . ,m.

Page 42: L9 Strong Duality

Complementary Slackness

cT x = yTAx = bT y

⇐⇒

I xj = 0 or∑m

i=1 aijyi = cj or both for j = 1, . . . , n.

I yi = 0 or∑n

j=1 aijxj = bi or both for i = 1, . . . ,m.

Page 43: L9 Strong Duality

Complementary Slackness Theorem

Theorem:The vector x ∈ Rn solves P and the vector y ∈ Rm solves D if andonly if x is feasible for P and y is feasible for D and

(i) either 0 = xj orm∑i=1

aijyi = cj or both for j = 1, . . . , n, and

(ii) either 0 = yi orn∑

j=1aijxj = bi or both for i = 1, . . . ,m.

Page 44: L9 Strong Duality

Corollary to the Complementary Slackness Theorem

Corollary:The vector x ∈ Rn solves P if and only if x is feasible for P andthere exists a vector y ∈ Rm feasible for D and such that

(i) ifn∑

j=1aijxj < b, then yi = 0, for i = 1, . . . ,m and

(ii) if 0 < xj , thenm∑i=1

aijyi = cj , for j = 1, . . . , n.

Page 45: L9 Strong Duality

Testing Optimality via Complementary Slackness

Does

x = (x1, x2, x3, x4, x5) = (0,4

3,

2

3,

5

3, 0)

solve the LP

maximize 7x1 + 6x2 + 5x3 − 2x4 + 3x5

subject to x1 + 3x2 + 5x3 − 2x4 + 2x5 ≤ 4

: y1

4x1 + 2x2 − 2x3 + x4 + x5 ≤ 3

: y2

2x1 + 4x2 + 4x3 − 2x4 + 5x5 ≤ 5

: y3

3x1 + x2 + 2x3 − x4 − 2x5 ≤ 1

: y4

0 ≤ x1, x2, x3, x4, x5.

Page 46: L9 Strong Duality

Testing Optimality via Complementary Slackness

Does

x = (x1, x2, x3, x4, x5) = (0,4

3,

2

3,

5

3, 0)

solve the LP

maximize 7x1 + 6x2 + 5x3 − 2x4 + 3x5

subject to x1 + 3x2 + 5x3 − 2x4 + 2x5 ≤ 4 : y1

4x1 + 2x2 − 2x3 + x4 + x5 ≤ 3 : y2

2x1 + 4x2 + 4x3 − 2x4 + 5x5 ≤ 5 : y3

3x1 + x2 + 2x3 − x4 − 2x5 ≤ 1 : y40 ≤ x1, x2, x3, x4, x5.

Page 47: L9 Strong Duality

Testing Optimality via Complementary Slackness

The point

x = (x1, x2, x3, x4, x5) = (0,4

3,

2

3,

5

3, 0)

must be feasible for the LP.

Plugging into the constraints we get

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1.

Can we use this information to construct a solution to the dualproblem, (y1, y2, y3, y4)?

Page 48: L9 Strong Duality

Testing Optimality via Complementary Slackness

The point

x = (x1, x2, x3, x4, x5) = (0,4

3,

2

3,

5

3, 0)

must be feasible for the LP.Plugging into the constraints we get

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1.

Can we use this information to construct a solution to the dualproblem, (y1, y2, y3, y4)?

Page 49: L9 Strong Duality

Testing Optimality via Complementary Slackness

The point

x = (x1, x2, x3, x4, x5) = (0,4

3,

2

3,

5

3, 0)

must be feasible for the LP.Plugging into the constraints we get

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1.

Can we use this information to construct a solution to the dualproblem, (y1, y2, y3, y4)?

Page 50: L9 Strong Duality

Testing Optimality via Complementary Slackness

Recall that

ifn∑

j=1aijxj < b, then yi = 0, for i = 1, . . . ,m.

We have just computed that

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4

: y1

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3

: y2

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5

: y3

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1

: y4

So y3 = 0.

Page 51: L9 Strong Duality

Testing Optimality via Complementary Slackness

Recall that

ifn∑

j=1aijxj < b, then yi = 0, for i = 1, . . . ,m.

We have just computed that

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4

: y1

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3

: y2

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5

: y3

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1

: y4

So y3 = 0.

Page 52: L9 Strong Duality

Testing Optimality via Complementary Slackness

Recall that

ifn∑

j=1aijxj < b, then yi = 0, for i = 1, . . . ,m.

We have just computed that

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4 : y1

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3 : y2

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5 : y3

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1 : y4

So y3 = 0.

Page 53: L9 Strong Duality

Testing Optimality via Complementary Slackness

Recall that

ifn∑

j=1aijxj < b, then yi = 0, for i = 1, . . . ,m.

We have just computed that

(0) + 3(43

)+ 5

(23

)− 2

(53

)+ 2(0) = 4 : y1

4(0) + 2(43

)− 2

(23

)+

(53

)+ (0) = 3 : y2

2(0) + 4(43

)+ 4

(23

)− 2

(53

)+ 5(0) < 5 : y3

3(0) +(43

)+ 2

(23

)−

(53

)− 2(0) = 1 : y4

So y3 = 0.

Page 54: L9 Strong Duality

Testing Optimality via Complementary Slackness

Also recall that

if 0 < xj , thenm∑i=1

aijyi = cj , for j = 1, . . . , n.

Hence,

3y1 + 2y2 + 4y3 + y4 = 6 (x2 = 43 > 0)

5y1 − 2y2 + 4y3 + 2y4 = 5 (x3 = 23 > 0)

− 2y1 + y2 − 2y3 − y4 = −2 (x4 = 53 > 0)

Page 55: L9 Strong Duality

Testing Optimality via Complementary Slackness

Also recall that

if 0 < xj , thenm∑i=1

aijyi = cj , for j = 1, . . . , n.

Hence,

3y1 + 2y2 + 4y3 + y4 = 6 (x2 = 43 > 0)

5y1 − 2y2 + 4y3 + 2y4 = 5 (x3 = 23 > 0)

− 2y1 + y2 − 2y3 − y4 = −2 (x4 = 53 > 0)

Page 56: L9 Strong Duality

Testing Optimality via Complementary Slackness

Also recall that

if 0 < xj , thenm∑i=1

aijyi = cj , for j = 1, . . . , n.

Hence,

3y1 + 2y2 + 4y3 + y4 = 6 (x2 = 43 > 0)

5y1 − 2y2 + 4y3 + 2y4 = 5 (x3 = 23 > 0)

− 2y1 + y2 − 2y3 − y4 = −2 (x4 = 53 > 0)

Page 57: L9 Strong Duality

Testing Optimality via Complementary Slackness

Also recall that

if 0 < xj , thenm∑i=1

aijyi = cj , for j = 1, . . . , n.

Hence,

3y1 + 2y2 + 4y3 + y4 = 6 (x2 = 43 > 0)

5y1 − 2y2 + 4y3 + 2y4 = 5 (x3 = 23 > 0)

− 2y1 + y2 − 2y3 − y4 = −2 (x4 = 53 > 0)

Page 58: L9 Strong Duality

Testing Optimality via Complementary Slackness

Also recall that

if 0 < xj , thenm∑i=1

aijyi = cj , for j = 1, . . . , n.

Hence,

3y1 + 2y2 + 4y3 + y4 = 6 (x2 = 43 > 0)

5y1 − 2y2 + 4y3 + 2y4 = 5 (x3 = 23 > 0)

− 2y1 + y2 − 2y3 − y4 = −2 (x4 = 53 > 0)

Page 59: L9 Strong Duality

Testing Optimality via Complementary Slackness

Combining these observations gives the system3 2 4 15 −2 4 2−2 1 −2 −10 0 1 0

y1y2y3y4

=

65−20

,

which any dual solution must satisfy.

This is a square system that we can try to solve for y .

Page 60: L9 Strong Duality

Testing Optimality via Complementary Slackness

Combining these observations gives the system3 2 4 15 −2 4 2−2 1 −2 −10 0 1 0

y1y2y3y4

=

65−20

,

which any dual solution must satisfy.This is a square system that we can try to solve for y .

Page 61: L9 Strong Duality

Testing Optimality via Complementary Slackness

3 2 4 1 65 −2 4 2 5−2 1 −2 −1 −2

0 0 1 0 03 2 0 1 6 r1 − 4r45 −2 0 2 5 r2 − 4r4−2 1 0 −1 −2 r3 + 2r4

0 0 1 0 01 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 0

1 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 00 3 0 0 3 r1 − r21 0 0 0 10 1 0 −1 0 r3 + 2r20 0 1 0 01 0 0 0 1 r20 1 0 0 1 1

3 r10 0 1 0 0 r40 0 0 1 1 −r3 + 1

3 r1

This gives the solution (y1, y2, y3, y4) = (1, 1, 0, 1).

Is this dual feasible?

Page 62: L9 Strong Duality

Testing Optimality via Complementary Slackness

3 2 4 1 65 −2 4 2 5−2 1 −2 −1 −2

0 0 1 0 03 2 0 1 6 r1 − 4r45 −2 0 2 5 r2 − 4r4−2 1 0 −1 −2 r3 + 2r4

0 0 1 0 01 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 0

1 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 00 3 0 0 3 r1 − r21 0 0 0 10 1 0 −1 0 r3 + 2r20 0 1 0 01 0 0 0 1 r20 1 0 0 1 1

3 r10 0 1 0 0 r40 0 0 1 1 −r3 + 1

3 r1

This gives the solution (y1, y2, y3, y4) = (1, 1, 0, 1).

Is this dual feasible?

Page 63: L9 Strong Duality

Testing Optimality via Complementary Slackness

3 2 4 1 65 −2 4 2 5−2 1 −2 −1 −2

0 0 1 0 03 2 0 1 6 r1 − 4r45 −2 0 2 5 r2 − 4r4−2 1 0 −1 −2 r3 + 2r4

0 0 1 0 01 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 0

1 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 00 3 0 0 3 r1 − r21 0 0 0 10 1 0 −1 0 r3 + 2r20 0 1 0 01 0 0 0 1 r20 1 0 0 1 1

3 r10 0 1 0 0 r40 0 0 1 1 −r3 + 1

3 r1

This gives the solution (y1, y2, y3, y4) = (1, 1, 0, 1).

Is this dual feasible?

Page 64: L9 Strong Duality

Testing Optimality via Complementary Slackness

3 2 4 1 65 −2 4 2 5−2 1 −2 −1 −2

0 0 1 0 03 2 0 1 6 r1 − 4r45 −2 0 2 5 r2 − 4r4−2 1 0 −1 −2 r3 + 2r4

0 0 1 0 01 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 0

1 3 0 0 4 r1 + r31 0 0 0 1 r2 + 2r3−2 1 0 −1 −2

0 0 1 0 00 3 0 0 3 r1 − r21 0 0 0 10 1 0 −1 0 r3 + 2r20 0 1 0 01 0 0 0 1 r20 1 0 0 1 1

3 r10 0 1 0 0 r40 0 0 1 1 −r3 + 1

3 r1

This gives the solution (y1, y2, y3, y4) = (1, 1, 0, 1).

Is this dual feasible?

Page 65: L9 Strong Duality

Testing Optimality via Complementary Slackness

y = (y1, y2, y3, y4) = (1, 1, 0, 1)

minimize 4y1 + 3y2 + 5y3 + y4subject to y1 + 4y2 + 2y3 + 3y4 ≥ 7

3y1 + 2y2 + 4y3 + y4 ≥ 65y1 − 2y2 + 4y3 + 2y4 ≥ 5−2y1 + y2 − 2y3 − y4 ≥ −2

2y1 + y2 + 5y3 − 2y4 ≥ 30 ≤ y1, y2, y3, y4.

Clearly, 0 ≤ y and by construction the 2nd, 3rd, and 4th of the linearinequality constraints are satisfied with equality.

We need to check the first and inequalities.

First: 1 + 4 + 0 + 3 = 8 > 7Fifth: 2 + 1 + 0− 2 = 1 6≥ 3, the fifth dual inequality is violated.Hence, x = (0, 43 ,

23 ,

53 , 0) cannot be optimal!

Page 66: L9 Strong Duality

Testing Optimality via Complementary Slackness

y = (y1, y2, y3, y4) = (1, 1, 0, 1)

minimize 4y1 + 3y2 + 5y3 + y4subject to y1 + 4y2 + 2y3 + 3y4 ≥ 7

3y1 + 2y2 + 4y3 + y4 ≥ 65y1 − 2y2 + 4y3 + 2y4 ≥ 5−2y1 + y2 − 2y3 − y4 ≥ −2

2y1 + y2 + 5y3 − 2y4 ≥ 30 ≤ y1, y2, y3, y4.

Clearly, 0 ≤ y and by construction the 2nd, 3rd, and 4th of the linearinequality constraints are satisfied with equality.

We need to check the first and inequalities.

First: 1 + 4 + 0 + 3 = 8 > 7Fifth: 2 + 1 + 0− 2 = 1 6≥ 3, the fifth dual inequality is violated.Hence, x = (0, 43 ,

23 ,

53 , 0) cannot be optimal!

Page 67: L9 Strong Duality

Testing Optimality via Complementary Slackness

y = (y1, y2, y3, y4) = (1, 1, 0, 1)

minimize 4y1 + 3y2 + 5y3 + y4subject to y1 + 4y2 + 2y3 + 3y4 ≥ 7

3y1 + 2y2 + 4y3 + y4 ≥ 65y1 − 2y2 + 4y3 + 2y4 ≥ 5−2y1 + y2 − 2y3 − y4 ≥ −2

2y1 + y2 + 5y3 − 2y4 ≥ 30 ≤ y1, y2, y3, y4.

Clearly, 0 ≤ y and by construction the 2nd, 3rd, and 4th of the linearinequality constraints are satisfied with equality.

We need to check the first and inequalities.

First: 1 + 4 + 0 + 3 = 8 > 7Fifth: 2 + 1 + 0− 2 = 1 6≥ 3, the fifth dual inequality is violated.Hence, x = (0, 43 ,

23 ,

53 , 0) cannot be optimal!

Page 68: L9 Strong Duality

Testing Optimality via Complementary Slackness

y = (y1, y2, y3, y4) = (1, 1, 0, 1)

minimize 4y1 + 3y2 + 5y3 + y4subject to y1 + 4y2 + 2y3 + 3y4 ≥ 7

3y1 + 2y2 + 4y3 + y4 ≥ 65y1 − 2y2 + 4y3 + 2y4 ≥ 5−2y1 + y2 − 2y3 − y4 ≥ −2

2y1 + y2 + 5y3 − 2y4 ≥ 30 ≤ y1, y2, y3, y4.

Clearly, 0 ≤ y and by construction the 2nd, 3rd, and 4th of the linearinequality constraints are satisfied with equality.

We need to check the first and inequalities.

First: 1 + 4 + 0 + 3 = 8 > 7

Fifth: 2 + 1 + 0− 2 = 1 6≥ 3, the fifth dual inequality is violated.Hence, x = (0, 43 ,

23 ,

53 , 0) cannot be optimal!

Page 69: L9 Strong Duality

Testing Optimality via Complementary Slackness

y = (y1, y2, y3, y4) = (1, 1, 0, 1)

minimize 4y1 + 3y2 + 5y3 + y4subject to y1 + 4y2 + 2y3 + 3y4 ≥ 7

3y1 + 2y2 + 4y3 + y4 ≥ 65y1 − 2y2 + 4y3 + 2y4 ≥ 5−2y1 + y2 − 2y3 − y4 ≥ −2

2y1 + y2 + 5y3 − 2y4 ≥ 30 ≤ y1, y2, y3, y4.

Clearly, 0 ≤ y and by construction the 2nd, 3rd, and 4th of the linearinequality constraints are satisfied with equality.

We need to check the first and inequalities.

First: 1 + 4 + 0 + 3 = 8 > 7Fifth: 2 + 1 + 0− 2 = 1 6≥ 3, the fifth dual inequality is violated.

Hence, x = (0, 43 ,23 ,

53 , 0) cannot be optimal!

Page 70: L9 Strong Duality

Testing Optimality via Complementary Slackness

y = (y1, y2, y3, y4) = (1, 1, 0, 1)

minimize 4y1 + 3y2 + 5y3 + y4subject to y1 + 4y2 + 2y3 + 3y4 ≥ 7

3y1 + 2y2 + 4y3 + y4 ≥ 65y1 − 2y2 + 4y3 + 2y4 ≥ 5−2y1 + y2 − 2y3 − y4 ≥ −2

2y1 + y2 + 5y3 − 2y4 ≥ 30 ≤ y1, y2, y3, y4.

Clearly, 0 ≤ y and by construction the 2nd, 3rd, and 4th of the linearinequality constraints are satisfied with equality.

We need to check the first and inequalities.

First: 1 + 4 + 0 + 3 = 8 > 7Fifth: 2 + 1 + 0− 2 = 1 6≥ 3, the fifth dual inequality is violated.Hence, x = (0, 43 ,

23 ,

53 , 0) cannot be optimal!

Page 71: L9 Strong Duality

Example: Testing Optimality via Complementary Slackness

Does the point x = (1, 1, 1, 0) solve the following LP?

maximize 4x1 +2x2 +2x3 +4x4subject to x1 +3x2 +2x3 + x4 ≤ 7

x1 + x2 + x3 +2x4 ≤ 32x1 + x3 + x4 ≤ 3

x1 + x2 +2x4 ≤ 20 ≤ x1, x2, x3, x4