Processing math: 100%
Back

Weak duality revisited

Let (P) and (D) denote a primal-dual pair of linear programming problems in generic form as defined previously. As discussed before, strong duality and weak duality both hold. We now show the latter directly. That is, if x is a feasible solution to (P) and y is a feasible solution to (D), then cTxyTb.

Note that if xj is constrained to be nonnegative, its corresponding dual constraint is yTAjcj. Hence, (cjyTAj)xj0 with equality if and only if xj=0 or yTAj=cj (or both).

If xj is constrained to be nonpositive, its corresponding dual constraint is yTAjcj. Hence, (cjyTAj)xj0 with equality if and only if xj=0 or yTAj=cj (or both).

If xj is free, its corresponding dual constraint is yTAj=cj. Hence, (cjyTAj)xj=0.

We can combine these three cases and obtain that (cTyTA)x=nj=1(cjyTAj)xj0 with equality if and only if for each j=1,,n, xj=0 or yTAj=cj. (Here, the usage of “or” is not exclusive.)

Similary, yT(Axb)=ni=1yi(aiTxbi)0 with equality if and only if for each i=1,,n, yi=0 or aiTx=bi. (Again, the usage of “or” is not exclusive.)

Adding the inequalities (cTyTA)x0 and yT(Axb)0, we obtain cTxyTb0 with equality if and only if the following conditions hold: xj=0 or yTAj=cj   for j=1,,nyi=0 or aiTx=bi   for i=1,,m Hence, we have proved weak duality for the generic form and a bit more.

By strong duality, x feasible for (P) and y feasible for (D) are optimal solutions if and only if cTx=yTb. Hence, we obtain the following result:

Theorem 3.3. (Complementary Slackness Theorem) Let (P) and (D) denote a primal-dual pair of linear programming problems in generic form. Let x be a feasible solution to (P). Let y be a feasible solution to (D). Then x and y are optimal solutions for the corresponding problems if and only if the following conditions, called the complementary slackness conditions, hold: xj=0 or yTAj=cj   for j=1,,nyi=0 or aiTx=bi   for i=1,,m

The complementary slackness conditions give a characterization of optimality which can be useful in solving problems such as the following example.

Example. Let (P) denote the following linear programming problem: min2x1+4x2+2x3s.t.x1+x2+3x31x1+2x2+x313x26x3=0x1,x30x2free. Is x=[02515] an optimal solution to (P)?

One could answer this question by solving (P) and then see if the objective function value of x, assuming that its feasibiilty has already been verified, is equal to the optimal value. However, there is a way to make use of the given information to save some work.

The dual problem of (P) is: maxy1+y2(D)       s.t.y1y22y1+2y2+3y3=43y1+y26y32y10y20y3free. One can check that x is a feasible solution to (P). If x is optimal, then there must exist a feasible solution y to (D) satisfying together with x the complementary slackness conditions: y1=0 or   x1+  x2+3x3=1y2=0 or x1+2x2+  x3=1y3=0 or          3x26x3=0x1=0 or   y1  y2        =2x2=0 or   y1+2y2+3y3=4x3=0 or  3y1+  y26y3=2. As x2,x3>0, satisfying the above conditions require that y1+2y2+3y3=43y1+y26y3=2. Solving for y2 and y3 in terms of y1 gives y2=2y1, y3=13y1. To make y feasible to (D), we can set y1=0 to obtain the feasible solution y1=0,y2=2, y3=0. We can check that this y satisfies the complementary slackness conditions with x. Hence, x is an optimal solution to (P) by the Complementary Slackness Theorem.

Worked examples

  1. Let (P) and (D) denote a primal-dual pair of linear programming problems. Prove that if (P) is not infeasible and (D) is infeasible, then (P) is unbounded.

  2. Let (P) denote the following linear programming problem: min4x2+2x3s.t.x1+x2+3x31x12x2+x31x1+3x26x3=0x1,x30x2free. Determine if [x1x2x3]=[35150] is an optimal solution to (P)

  3. Let (P) denote the following linear programming problem: minx1+2x23x3s.t.x1+2x2+2x3=2x1+x2+x3=1x1+x2x30x1,x2,x30 Determine if [x1x2x3]=[010] is an optimal solution to (P)

.