18.6  Linear Programming Duality

Chapter 3 ended its traffic example (Example (Traffic in a town center)) by admitting what linear algebra alone cannot do: “Non-negativity and street capacities turn the problem into one about inequalities, which is the subject of linear programming.” This section takes up that subject. A linear program asks for the largest value of a linear function on a region cut out by finitely many linear inequalities. The theory is almost entirely one idea. Every such maximum comes with a companion minimum, the dual program, and the two optimal values are equal. The proof of that equality is Farkas’s lemma of §05, applied to one combined system.

The equality has a practical meaning that goes beyond the theorem. A feasible point proves a lower bound on the maximum, a dual feasible point proves an upper bound, and when the two bounds meet, the answer has been certified: anyone can check it by multiplying out, with no need to trust how it was found.

Throughout, the field is R, vectors are columns, and x≥0, u≤v are the entrywise relations of §05.

18.6.1. Linear programs

Here is a small instance of the kind of question we want to answer. A workshop makes two products. Each unit of the first uses 2 hours of machine time and 1 hour of labor, each unit of the second uses 1 hour of machine time and 3 hours of labor, and at most 3 units of the first can be sold. Machine time is limited to 7 hours, labor to 9, and the profits are 4 and 3 per unit. With x1,x2 units made, the question is: maximize4x1+3x2subject to2x1+x2≤7,x1+3x2≤9,x1≤3,x1≥0,x2≥0. The objective and every constraint are linear, and there are finitely many constraints. In matrix form it reads “maximize c⊤x subject to Ax≤b, x≥0”. That shape deserves a name.

A linear program is the search for the best value of a linear function over a region defined by finitely many linear inequalities.

Definition 18.6.1 (Linear Program)

Let A∈Mm×n(R), b∈Rm and c∈Rn. The linear program with these data, in inequality form, is the problem (P)maximize c⊤xsubject toAx≤b,  x≥0. A vector x∈Rn with Ax≤b and x≥0 is a feasible point, and the set of all of them is the feasible region. The program is feasible if it has a feasible point and infeasible otherwise. It is unbounded if it is feasible and c⊤x takes arbitrarily large values on the feasible region. A feasible x⋆ is an optimal solution if c⊤x⋆≥c⊤x for every feasible x, and then c⊤x⋆ is the optimal value.

Clause by clause. The function x↦c⊤x is the objective. The m rows of Ax≤b are the constraints, and x≥0 adds n more. An optimal solution is a feasible point at which the objective is as large as anywhere on the feasible region, and it need not be unique. The optimal value is unique when it exists. A program can fail to have an optimal solution in two ways: it can have no feasible point, or its objective can be unbounded above. Whether those are the only two ways is the question the section’s second theorem settles.

Examples. The workshop problem is (P) with A=(211310),b=(793),c=(43).

  • One variable. With n=m=1, “maximize x subject to x≤2, x≥0” has the optimal solution x=2. “Maximize x subject to −x≤−1, x≥0” asks for the largest x≥1, and it is unbounded. “Maximize x subject to x≤−1, x≥0” is infeasible.
  • Degenerate case. If c=0, every feasible point is optimal, with value 0. The program then asks only whether the system Ax≤b, x≥0 has a solution. So the feasibility question of Corollary 18.5.7 is itself a linear program, the one with no objective.

Non-example by minimal change. Make one inequality strict: “maximize x subject to x<2, x≥0”. Everything is still linear, but the supremum 2 is not attained, and no feasible point is optimal. The definition allows only non-strict inequalities. They define closed regions, and closedness will again be what the proofs need.

Why this form. Every problem with a linear objective and finitely many linear constraints can be brought to the shape (P). To minimize c⊤x, maximize (−c)⊤x. A constraint a⊤x≥β is (−a)⊤x≤−β. An equation a⊤x=β is the pair a⊤x≤β, −a⊤x≤−β. A variable xj without a sign constraint can be written xj=uj−vj with uj,vj≥0. Exercise (C2: Free variables) carries out the last conversion. The form (P), with its sign constraints on x, is chosen because its dual, below, has the same shape, which makes the theory symmetric.

Example (The workshop problem, drawn)

Find the optimal solution of the workshop problem, and explain why it is optimal.

Solution. The feasible region is the pentagon with corners (0,0), (3,0), (3,1), (125,115) and (0,3). For example, (3,1) is where x1=3 meets 2x1+x2=7, and (125,115) solves 2x1+x2=7, x1+3x2=9: subtracting twice the second equation from the first gives −5x2=−11.

Diagram. Labels: x_1, x_2, x_1 + 3x_2 = 9, mathbf c, 2x_1 + x_2 = 7, x_1 = 3, mathbf x^star, The feasible region (shaded). The dashed line is the level set\\ 4x_1 + 3x_2 = 81/5. Moving it in the direction mathbf c = (4, 3)\\ leaves the region, which it last touches at mathbf x^star = (12/5, 11/5)

The level sets 4x1+3x2=const are parallel lines, and the value grows in the direction c=(4,3). Sliding the line in that direction, the last point of the region it meets appears to be x⋆=(125,115), with value 4⋅125+3⋅115=48+335=815. Comparing the corners supports this: they give 0, 12, 15, 815=16.2 and 9.

A picture is not a proof, and neither is a list of five corners, since we have not proved that an optimum sits at a corner. Here is a proof. Multiply the first constraint by 95 and the second by 25, both non-negative, and add: 95(2x1+x2)+25(x1+3x2)≤95⋅7+25⋅9=815. The left side is (185+25)x1+(95+65)x2=4x1+3x2. So every feasible point has 4x1+3x2≤815, and x⋆, which is feasible (125≤3 as well), reaches this bound. It is optimal, and the optimal value is 815.

The multipliers 95 and 25 are the heart of the matter. They were chosen so that the combined constraint had exactly the objective as its left side. The best upper bound obtainable this way is itself the answer to a linear program.

18.6.2. The dual program

Multiply the i-th constraint of (P) by a number yi≥0 and add. For every feasible x this gives y⊤Ax≤y⊤b. If the combination dominates the objective coefficient by coefficient, A⊤y≥c, then, since x≥0, c⊤x≤(A⊤y)⊤x=y⊤Ax≤y⊤b. Each such y proves an upper bound b⊤y on the objective, and the natural question is how small that bound can be made.

The dual program searches for the best upper bound that non-negative combinations of the constraints can prove.

Definition 18.6.2 (Dual Program)

The dual of the linear program (P) of Definition 18.6.1 is the problem (D)minimize b⊤ysubject toA⊤y≥c,  y≥0, with y∈Rm. The words feasible, infeasible and optimal are used as for (P). (D) is unbounded if it is feasible and b⊤y takes arbitrarily negative values on its feasible region. In this context (P) is called the primal program.

The dual has one variable for each constraint of the primal and one constraint for each variable of the primal. The matrix is transposed, the roles of b and c are exchanged, and maximization becomes minimization. The dual of (D), written back in inequality form, is (P) again. Exercise (C1: The dual of the dual) checks this, and it explains why a statement about (P) always has a mirror statement about (D).

For the workshop problem the dual is minimize7y1+9y2+3y3subject to2y1+y2+y3≥4,y1+3y2≥3,y1,y2,y3≥0, and the multipliers of Example (The workshop problem, drawn) form the dual feasible point y⋆=(95,25,0), with b⊤y⋆=815. The dual has an economic reading too. yi is a price for one unit of the i-th resource, and the constraints say that at these prices the resources used by one unit of each product are worth at least the profit it brings.

18.6.3. Weak duality

The computation that motivated (D) is the first theorem, and it is one line long.

Theorem 18.6.1 (Weak Duality)

If x is feasible for (P) and y is feasible for (D), then c⊤x≤b⊤y.

Proof. Since A⊤y−c≥0 and x≥0, the number (A⊤y−c)⊤x is a sum of products of non-negative numbers, so c⊤x≤(A⊤y)⊤x=y⊤(Ax). Since b−Ax≥0 and y≥0, in the same way y⊤(Ax)≤y⊤b=b⊤y. Chaining the two inequalities proves the theorem.

Corollary 18.6.2 (Certificates from Weak Duality)
  • (a) If x is feasible for (P), y is feasible for (D), and c⊤x=b⊤y, then x is optimal for (P) and y is optimal for (D).
  • (b) If (P) is unbounded, then (D) is infeasible. If (D) is unbounded, then (P) is infeasible.

Idea. Weak duality makes every dual value an upper bound for every primal value. A primal value that meets one of these bounds cannot be beaten, and neither can the bound; an unbounded program leaves no room for any bound at all.

Proof.

  • (a) For every feasible x′, Theorem 18.6.1 gives c⊤x′≤b⊤y=c⊤x, so x is optimal. For every dual feasible y′, it gives b⊤y′≥c⊤x=b⊤y, so y is optimal.

  • (b) If (D) had a feasible point y, Theorem 18.6.1 would bound c⊤x above by b⊤y for every feasible x, so (P) would not be unbounded. The second statement is the same argument with the roles exchanged.

Part (a) is exactly what Example (The workshop problem, drawn) did: c⊤x⋆=815=b⊤y⋆, so both points are optimal. It gives a certificate of optimality that can be checked by arithmetic alone. The question is whether such a certificate always exists. Weak duality allows the best lower bound to stay strictly below the best upper bound.

Quick check. Without solving anything, give an upper bound for 4x1+3x2 on the workshop’s feasible region using only the second constraint x1+3x2≤9 and x≥0. Which dual feasible point is that?

Solution. We need y2≥0 with y2≥4 and 3y2≥3, so y2=4. Then 4x1+3x2≤4x1+12x2=4(x1+3x2)≤36, using x2≥0. This is the dual feasible point y=(0,4,0), with b⊤y=36. It is a valid bound, but a poor one compared with the optimal 815.

18.6.4. Strong duality

The main theorem says that the gap allowed by weak duality never occurs, and it gives the complete list of what can happen.

Theorem 18.6.3 (Strong Duality for Linear Programs)

Let A∈Mm×n(R), b∈Rm and c∈Rn, and let (P) and (D) be as in Definition 18.6.1 and Definition 18.6.2.

  • (a) If (P) and (D) are both feasible, then both have optimal solutions, and their optimal values are equal: there are feasible x⋆ and y⋆ with c⊤x⋆=b⊤y⋆.
  • (b) If (P) is feasible and (D) is infeasible, then (P) is unbounded.
  • (c) If (D) is feasible and (P) is infeasible, then (D) is unbounded.

Idea. Parts (b) and (c) are each one application of Corollary 18.5.7. The infeasibility of one program yields a vector that the other program can move along forever, with its objective improving without bound.

For (a) we want a single pair (x,y) that is feasible for both programs and has c⊤x≥b⊤y. Weak duality then forces equality, and Corollary 18.6.2 forces optimality. The pair is a solution of one big system of inequalities in (x,y), so we ask Farkas whether it has one. If it had none, Farkas would hand us a certificate (u,v,t). The number t is the multiplier on the row b⊤y≤c⊤x. If t>0, rescaling the certificate by 1/t produces a primal and a dual feasible point that violate weak duality. If t=0, the certificate is a pair of directions along which one of the two programs is unbounded, which contradicts weak duality against a feasible point of the other.

Proof. (b) Let x0 be feasible for (P). That (D) is infeasible says that the system (−A⊤)y≤−c, y≥0 has no solution. By Corollary 18.5.7, applied with M=−A⊤ and d=−c, there is w∈Rn with w≥0, (−A⊤)⊤w=−Aw≥0 and −c⊤w<0. That is, Aw≤0 and c⊤w>0. For every s≥0 the point x0+sw is feasible, since A(x0+sw)=Ax0+sAw≤b and x0+sw≥0. Its objective value is c⊤x0+sc⊤w, which is larger than any given number once s is large enough, because c⊤w>0. So (P) is unbounded.

(c) Let y0 be feasible for (D). That (P) is infeasible says that Ax≤b, x≥0 has no solution. By Corollary 18.5.7 with M=A and d=b, there is w∈Rm with w≥0, A⊤w≥0 and b⊤w<0. For s≥0 the point y0+sw is feasible for (D), since A⊤(y0+sw)≥A⊤y0≥c and y0+sw≥0. Its value b⊤y0+sb⊤w is below any given number for large s. So (D) is unbounded.

(a) Let x0 be feasible for (P) and y0 feasible for (D). Consider the (m+n+1)×(n+m) matrix and the vector M=(A00−A⊤−c⊤b⊤),d=(b−c0). For z=(x,y) with x∈Rn and y∈Rm, the system Mz≤d, z≥0 says exactly that

Ax≤b,A⊤y≥c,b⊤y≤c⊤x,x≥0,y≥0.
(18.6.1)

Suppose Eq. 18.6.1 has a solution (x⋆,y⋆). Then x⋆ is feasible for (P) and y⋆ is feasible for (D), so Theorem 18.6.1 gives c⊤x⋆≤b⊤y⋆. Together with b⊤y⋆≤c⊤x⋆, this gives equality, and by Corollary 18.6.2 (a) both points are optimal. That is (a).

It remains to show that Eq. 18.6.1 has a solution. Suppose not. By Corollary 18.5.7 there is w≥0 with M⊤w≥0 and d⊤w<0. Write w=(u,v,t) with u∈Rm, v∈Rn and t∈R, all ≥0. Since M⊤=(A⊤0−c0−Ab), the conditions read

A⊤u≥tc,Av≤tb,b⊤u<c⊤v.
(18.6.2)

Case 1: t>0. Dividing Eq. 18.6.2 by t shows that v/t≥0 is feasible for (P), that u/t≥0 is feasible for (D), and that b⊤(u/t)<c⊤(v/t). This contradicts Theorem 18.6.1.

Case 2: t=0. Now A⊤u≥0, Av≤0 and b⊤u<c⊤v, with u,v≥0. The strict inequality forces c⊤v>0 or b⊤u<0, since otherwise b⊤u≥0≥c⊤v. If c⊤v>0, then, exactly as in the proof of (b), the points x0+sv with s≥0 are feasible for (P) with objective values tending to +∞. That contradicts the bound c⊤x≤b⊤y0 that Theorem 18.6.1 gives for every feasible x. If b⊤u<0, then, as in the proof of (c), the points y0+su are feasible for (D) with values tending to −∞, which contradicts b⊤y≥c⊤x0.

Both cases are impossible, so Eq. 18.6.1 has a solution, and (a) is proved. This proves the theorem.

Together with Corollary 18.6.2 (b), the theorem sorts every pair (P), (D) into exactly one of four cases:

(P) (D) what happens
feasible feasible both optimal, equal values (a)
feasible infeasible (P) unbounded (b)
infeasible feasible (D) unbounded (c)
infeasible infeasible nothing more to say

All four occur. The workshop problem is the first. The one-variable program “maximize x subject to −x≤−1, x≥0” is the second: its dual, “minimize −y subject to −y≥1, y≥0”, is infeasible. “Maximize 0⋅x subject to x≤−1, x≥0” is the third: its dual, “minimize −y subject to y≥0”, is unbounded. For the fourth, take A=(1−1−11),b=(−1−1),c=(11). Adding the two primal constraints gives 0≤−2, and adding the two dual constraints gives 0≥2, so neither program is feasible.

The table has a consequence that is easy to state and not at all obvious.

Corollary 18.6.4 (Bounded Linear Programs Attain Their Optimum)

If (P) is feasible and its objective is bounded above on the feasible region, that is, c⊤x≤N for some N and every feasible x, then (P) has an optimal solution. The same holds for (D) with “bounded below”.

Proof. Since (P) is feasible and not unbounded, part (b) of Theorem 18.6.3 shows that (D) is not infeasible. So both programs are feasible, and part (a) gives an optimal solution of (P). The statement for (D) follows in the same way from part (c).

Why is this not obvious? The feasible region is closed, but it may be unbounded, so the extreme value theorem (A4) of Chapter 16’s introduction does not apply to it. And a linear function that is bounded above on a closed convex set need not attain its supremum. On the region R={(x1,x2):x1>0, x1x2≥1}, bounded by a branch of a hyperbola, the linear function −x2 is negative everywhere, and it takes values arbitrarily close to 0 at the points (k,1/k), so its supremum is 0. That supremum is never reached. The region R is the set A of Example (A hyperbola and its asymptote), since x1>0 and x1x2≥1 force x2>0, and that example shows it is closed and convex. But it is not cut out by finitely many linear inequalities. That finiteness is what made the cones in the proof finitely generated, and hence closed, by Theorem 18.5.4. The corollary is where finite generation pays off.

Warning. Strong duality is a theorem about linear programs, not about optimization in general. For programs whose objective or constraints are convex but not linear, one can still write down a dual problem, and weak duality still holds, but the two optimal values may differ: a duality gap. Extra hypotheses are needed to close it, of which the best known is a strictly feasible point (Slater’s condition). That theory belongs to convex optimization and is not developed in this book. For linear programs no hypothesis beyond feasibility is needed, as Theorem 18.6.3 shows.

18.6.5. Complementary slackness

Strong duality says that at the optimum the two chains of inequalities in the proof of Theorem 18.6.1 are equalities. Reading that off term by term gives a test that locates the dual solution once the primal one is known.

Theorem 18.6.5 (Complementary Slackness)

Let x be feasible for (P) and y feasible for (D). Then x and y are both optimal if and only if

  • (i) for every i, yi>0 implies (Ax)i=bi; and
  • (ii) for every j, xj>0 implies (A⊤y)j=cj.

Idea. The gap b⊤y−c⊤x is a sum of products of non-negative numbers, one product for each constraint of either program. Optimality means the gap is zero, which means every product is zero.

Proof. Expanding and using y⊤Ax=x⊤A⊤y,

b⊤y−c⊤x=y⊤(b−Ax)+x⊤(A⊤y−c).
(18.6.3)

The first term on the right is ∑iyi(b−Ax)i, a sum of products of non-negative numbers, and so is the second. Condition (i) says that every product in the first sum is zero, and (ii) says the same for the second. So (i) and (ii) together hold exactly when the right side of Eq. 18.6.3 is 0, because a sum of non-negative numbers is zero only when every term is.

(⇐) If (i) and (ii) hold, then c⊤x=b⊤y, and both points are optimal by Corollary 18.6.2 (a).

(⇒) If both are optimal, then both programs are feasible, and by Theorem 18.6.3 (a) their optimal values are equal. So c⊤x=b⊤y, the right side of Eq. 18.6.3 is 0, and (i) and (ii) hold.

In words: a constraint with a positive price must be tight, and a product that is actually made must exactly pay for its resources. For the workshop problem, x⋆=(125,115) has both entries positive, so (ii) requires both dual constraints to be tight: 2y1+y2+y3=4,y1+3y2=3. The third primal constraint is slack at x⋆, since 125<3, so (i) forces y3=0. The two equations then give y1=95 and y2=25, both ≥0, which recovers the multipliers of Example (The workshop problem, drawn). So the multipliers were not a lucky guess: complementary slackness finds them from the primal solution.

18.6.6. Traffic, with inequalities

We return to Chapter 3’s town center, to answer the remark made there. Recall from Example (Traffic in a town center) the four intersections, the five one-way streets 1→2, 2→3, 3→4, 4→1, 1→3 with flows f1,…,f5, and the incidence matrix N. Conservation of cars is Nf=s with s=(40,20,−35,−25), and the flows that conserve cars are f=(40−β+α, 60−β+α, 25+α, α, β),α,β∈R. Chapter 3 asked, with street 4→1 closed, for the largest possible flow on the diagonal 1→3, and found 40 by inspecting the one remaining parameter. That was already a linear program: maximize f5 subject to Nf=s, f≥0, f4=0. Its answer has a one-line certificate. The first row of Nf=s, the balance at intersection 1, reads f1−f4+f5=40, so f5=40−f1+f4=40−f1≤40 because f1≥0.

Example (Capacities on every street)

Suppose street 4→1 is open again, but every street can carry at most 35 cars per minute. What is the smallest flow the diagonal street 1→3 can carry, and how would you convince someone that it cannot be smaller?

Solution. The linear program is: minimize f5 subject to Nf=s and 0≤f≤35⋅1. In the parameters, the capacity of street 2→3 reads 60−β+α≤35, so β≥25+α≥25, since α=f4≥0. The value β=25 is achieved: with α=0 the flow is f=(15,35,25,0,25), every entry of which lies between 0 and 35. So the minimum is 25.

The certificate, in the spirit of the dual, is a non-negative combination of the constraints. Add the balance equations at intersections 1 and 2, f1−f4+f5=40 and −f1+f2=20: f2−f4+f5=60,sof5=60−f2+f4 ≥ 60−35+0=25, using the capacity f2≤35 and the sign constraint f4≥0. In words: at least sixty cars per minute arrive at the pair of intersections {1,2} (sixty from outside, plus whatever street 4→1 brings), and only two streets leave that pair, 2→3 and the diagonal. The first can take at most 35, so the diagonal must take at least 25. This is a cut argument, and it is exactly what the dual program of a flow problem computes. The balance equations carry multipliers of either sign, the “potentials” of the intersections, and here they are 1 at intersections 1 and 2 and 0 at the others.

This is the answer to Chapter 3’s remark. Linear algebra describes the conserving flows as a coset of the null space of N. Linear programming chooses among them, and duality explains each choice with a certificate that can be read as a statement about the network.

Remark. Computing optimal solutions of large linear programs is a subject in its own right. The best known method, the simplex method, moves from corner to corner of the feasible region, each time improving the objective. This book does not develop algorithms for linear programming. Section 9 returns to the corners themselves, as the vertices of a polyhedron.

18.6.7. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Write down the dual of: maximize 2x1+x2 subject to x1+x2≤3, x1−x2≤1, x≥0.
  • (b) State weak duality and strong duality.
  • (c) Determine whether the following is correct, and justify your answer: if (P) is infeasible, then (D) is unbounded.
  • (d) Determine whether the following is correct, and justify your answer: if (P) is feasible and c⊤x≤100 for every feasible x, then (P) has an optimal solution.
  • (e) At an optimal pair x,y, suppose x2>0. What does complementary slackness say about the second constraint of (D)?

Solution.

  • (a) Minimize 3y1+y2 subject to y1+y2≥2, y1−y2≥1, y≥0. The columns of A become the rows of A⊤, and b=(3,1) and c=(2,1) exchange roles.

  • (b) Weak duality (Theorem 18.6.1): if x is feasible for (P) and y for (D), then c⊤x≤b⊤y. Strong duality (Theorem 18.6.3): if both are feasible, both have optimal solutions with equal values. If exactly one is feasible, that one is unbounded.

  • (c) Incorrect. Both programs can be infeasible, as for A=(1−1−11), b=(−1,−1), c=(1,1) in this section. What is true, by Theorem 18.6.3 (c), is that if (P) is infeasible and (D) is feasible, then (D) is unbounded.

  • (d) Correct, by Corollary 18.6.4. The bound shows that (P) is not unbounded, so by Theorem 18.6.3 (b) the dual is feasible, and then (a) gives an optimal solution.

  • (e) By Theorem 18.6.5 (ii), the second dual constraint is tight: (A⊤y)2=c2.

B. Practice

Exercise (B1: Solve and certify)

Consider: maximize x1+2x2 subject to x1+x2≤5,−x1+x2≤1,2x1−x2≤4,x≥0.

  • (a) Sketch the feasible region and guess an optimal solution.
  • (b) Write down the dual, and use complementary slackness to find a candidate dual solution.
  • (c) Prove that both candidates are optimal, and state the optimal value.

Solution.

  • (a) The region is the pentagon with corners (0,0), (2,0), (3,2), (2,3) and (0,1), where the objective takes the values 0,2,7,8,2. The guess is x⋆=(2,3), where x1+x2=5 meets −x1+x2=1.

  • (b) The dual is: minimize 5y1+y2+4y3 subject to y1−y2+2y3≥1, y1+y2−y3≥2, y≥0. At x⋆ the third constraint is slack, since 2⋅2−3=1<4, so (i) of Theorem 18.6.5 requires y3=0. Both xj⋆>0, so (ii) requires both dual constraints to be tight: y1−y2=1 and y1+y2=2. Hence y⋆=(32,12,0).

  • (c) x⋆ is feasible: 5≤5, 1≤1, 1≤4, and x⋆≥0. y⋆ is feasible: y⋆≥0, 32−12=1≥1 and 32+12=2≥2. The objective values are c⊤x⋆=2+6=8 and b⊤y⋆=152+12=8. They are equal, so both points are optimal by Corollary 18.6.2 (a), and the optimal value is 8.

Exercise (B2: Which case?)

For each program, write down its dual, and determine which of the four cases of Theorem 18.6.3 occurs. Justify your answer, giving the optimal values where they exist.

  • (a) Maximize x1+x2 subject to x1−x2≤1, x≥0.
  • (b) Maximize −x1 subject to x1≤2, −x1≤−1, x1≥0.
  • (c) Maximize x1 subject to x1+x2≤−1, x≥0.

Solution.

  • (a) The dual is: minimize y subject to y≥1, −y≥1, y≥0. The last two constraints conflict, so the dual is infeasible. The primal is feasible, with 0 a feasible point, so by Theorem 18.6.3 (b) it is unbounded. Directly, (0,s) is feasible for every s≥0, with value s.

  • (b) The dual is: minimize 2y1−y2 subject to y1−y2≥−1, y≥0. Both programs are feasible: x1=1 and y=(0,1). Their values are −1 and 2⋅0−1=−1, which are equal, so both are optimal by Corollary 18.6.2 (a), with optimal value −1. This is the first case.

  • (c) The primal is infeasible, since x1+x2≥0>−1 for x≥0. The dual is: minimize −y subject to y≥1, y≥0, y≥0. It is feasible, and −y takes arbitrarily negative values, so it is unbounded, as Theorem 18.6.3 (c) predicts.

Exercise (B3: A network with one flow)

In the traffic network of this section, close street 4→1 and give every other street a capacity of 30 cars per minute. Show that there is exactly one feasible flow. For its diagonal flow f5=30, give a certificate, in the style of Example (Capacities on every street), that f5≥30 for every feasible flow, and one that f5≤30.

Solution. With f4=α=0 the conserving flows are f=(40−β,60−β,25,0,β). The capacity of street 2→3 gives 60−β≤30, so β≥30. The capacity of the diagonal gives β≤30. So β=30, and the only candidate is f=(10,30,25,0,30), which satisfies 0≤fi≤30 for every street. It is the unique feasible flow.

Lower bound: adding the balance equations at intersections 1 and 2 gives f2−f4+f5=60, so f5=60−f2+f4=60−f2≥30 by the capacity f2≤30, using f4=0. Upper bound: f5≤30 is itself a capacity constraint. Each certificate is a non-negative combination of constraints, with free multipliers on the balance equations, as in the example.

C. Going deeper

Exercise (C1: The dual of the dual)
  • (a) Rewrite (D) as a program in the inequality form of Definition 18.6.1, with data (−A⊤,−c,−b). Show that the dual of that program, rewritten as a maximization, is (P).
  • (b) Deduce part (c) of Theorem 18.6.3 from part (b).

Solution.

  • (a) Minimizing b⊤y is maximizing (−b)⊤y, and A⊤y≥c is (−A⊤)y≤−c. So (D) is the inequality-form program (D′): maximize (−b)⊤y subject to (−A⊤)y≤−c, y≥0, whose data are A′=−A⊤, b′=−c, c′=−b. By Definition 18.6.2 its dual is: minimize b′⊤x=(−c)⊤x subject to A′⊤x=−Ax≥c′=−b, x≥0. That is: maximize c⊤x subject to Ax≤b, x≥0, which is (P). Its optimal value is the negative of the minimum above.

  • (b) Suppose (D) is feasible and (P) is infeasible. Then (D′) is feasible, with the same feasible points, and its dual, which by (a) has the same feasible points as (P), is infeasible. By Theorem 18.6.3 (b) applied to (D′), the objective (−b)⊤y takes arbitrarily large values on the feasible region. So b⊤y takes arbitrarily negative values, and (D) is unbounded.

Exercise (C2: Free variables)

Let A∈Mm×n(R), b∈Rm, c∈Rn, and consider the program with no sign constraint on x: (Pfree)maximize c⊤x  subject to  Ax≤b.

  • (a) Prove weak duality between (Pfree) and (Deq): minimize b⊤y subject to A⊤y=c, y≥0.
  • (b) Writing x=u−v with u,v≥0, show that (Pfree) has the same values as an inequality-form program whose dual is (Deq). Deduce that if both are feasible, both have optimal solutions with equal values.

Solution.

  • (a) If Ax≤b and A⊤y=c with y≥0, then c⊤x=(A⊤y)⊤x=y⊤Ax≤y⊤b, the last step because y≥0 and b−Ax≥0. No sign condition on x is needed, because the first step is an equality.

  • (b) Every x∈Rn can be written as u−v with u,v≥0: take uj=max(xj,0) and vj=max(−xj,0). So (Pfree) has the same feasible objective values as the inequality-form program maximize (c−c)⊤(uv)  subject to  (A−A)(uv)≤b,(uv)≥0, with an optimal (u,v) giving an optimal x=u−v, and conversely. By Definition 18.6.2 its dual is: minimize b⊤y subject to (A−A)⊤y≥(c,−c), y≥0. The constraint reads A⊤y≥c and −A⊤y≥−c, that is, A⊤y=c. So the dual is (Deq). If both programs are feasible, Theorem 18.6.3 (a) gives optimal (u⋆,v⋆) and y⋆ with equal values, and x⋆=u⋆−v⋆ is optimal for (Pfree).

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.