UniMaths
Free chapterTry everything here: cards, proofs and practice. Sign up free to save your progress and unlock all 4 chapters.Sign up free
OPTIM · 1

Linear programming

12 concepts · 16 questions

Standard form, basic feasible solutions and vertices, the fundamental theorem, the simplex method and its optimality test, duality, and complementary slackness.

Overview 1The plan of this section

Linear programmes model allocation problems (production, transport, diets). Their feasible sets are polyhedra and optima sit at corners, which the simplex method walks between.

  1. Standard form (Def. 1.1), basic feasible solutions = vertices (Prop. 1.2), and the fundamental theorem (Thm 1.3).
  2. The simplex method (Def. 1.4) with its optimality test (Prop. 1.5) and a worked example (Example 1.6).
  3. Duality (Def. 1.7): weak (Thm 1.8) and strong (Thm 1.9) duality, and complementary slackness (Cor. 1.10).

LP optima are at vertices; simplex walks downhill along edges; every LP has a dual with the same optimal value.

Definition 1.1Linear programmes in standard form

A linear programme in standard form is: minimise cTxc^{\mathsf T}x subject to Ax=bAx = b, x≥0x\ge0. Every LP can be put in this form: a constraint aTx≤βa^{\mathsf T}x\le\beta becomes aTx+s=βa^{\mathsf T}x + s = \beta with a slack s≥0s\ge0; a free variable xjx_j becomes xj+−xj−x_j^+ - x_j^-; maximising cTxc^{\mathsf T}x is minimising −cTx-c^{\mathsf T}x. xx is feasible if it satisfies the constraints; the LP is infeasible if none is, and unbounded if the objective is unbounded below on the feasible set.

Standard form: min⁡cTx\min c^{\mathsf T}x, Ax=bAx = b, x≥0x\ge0. Slacks turn ≤\le into ==.

Proposition 1.2Basic feasible solutions are vertices

Choose mm linearly independent columns ABA_B of AA. The basic solution sets xB=AB−1bx_B = A_B^{-1}b and xj=0x_j = 0 for j∉Bj\notin B; it is a basic feasible solution (BFS) if xB≥0x_B\ge0. The BFSs are exactly the vertices (extreme points) of the feasible set {x:Ax=b,x≥0}\{x: Ax = b, x\ge0\}; there are at most (nm)\binom nm of them.

Vertex ⇔ BFS: choose mm independent columns, solve, check non-negativity.

Proof

Theorem 1.3The fundamental theorem of linear programming

For an LP in standard form: if it is feasible, it has a BFS; and if it has an optimal solution, it has an optimal BFS. So an optimum, when it exists, is attained at a vertex.

If there's an optimum, there's one at a vertex (so finitely many candidates).

Proof

Definition 1.4The simplex method

Start at a BFS with basis BB. Compute the reduced costs cˉj=cj−cBTAB−1Aj\bar c_j = c_j - c_B^{\mathsf T}A_B^{-1}A_j for j∉Bj\notin B.

  1. If all cˉj≥0\bar c_j\ge0, stop: the BFS is optimal (see Prop. 1.5).
  2. Otherwise choose jj with cˉj<0\bar c_j < 0 to enter; let d=AB−1Ajd = A_B^{-1}A_j. If d≤0d\le0 the LP is unbounded.
  3. Ratio test: the leaving variable is the basic xix_i minimising (xB)idi\frac{(x_B)_i}{d_i} over di>0d_i > 0. Pivot and repeat. With an anti-cycling rule (e.g. Bland's: smallest index), the method terminates.

Simplex: enter a variable with negative reduced cost, leave by the ratio test, repeat until all reduced costs are ≥0\ge0.

Proposition 1.5The simplex optimality test

If a BFS xx with basis BB has all reduced costs cˉj≥0\bar c_j\ge0, then xx is optimal.

All reduced costs ≥0\ge0 ⇒ optimal: no edge leads downhill.

Proof

Example 1.6The simplex method in action

Maximise 3x+5y3x + 5y subject to x≤4x\le4, 2y≤122y\le12, 3x+2y≤183x + 2y\le18, x,y≥0x, y\ge0.

  • Start at the origin (basis s1,s2,s3s_1, s_2, s_3). yy has the most negative reduced cost (−5-5): it enters. Ratios 122=6\frac{12}2 = 6, 182=9\frac{18}2 = 9: s2s_2 leaves. New vertex (0,6)(0, 6), value 3030.
  • Now xx has reduced cost −3-3 and enters. Ratios: 41=4\frac41 = 4 (row 1) and 18−123=2\frac{18 - 12}3 = 2 (row 3): s3s_3 leaves. New vertex (2,6)(2, 6), value 3636.
  • Reduced costs of s2,s3s_2, s_3 are 32\frac32 and 11, both ≥0\ge0: optimal, (x,y)=(2,6)(x, y) = (2, 6) with value 3636.

Two pivots: (0,0)→(0,6)→(2,6)(0, 0)\to(0, 6)\to(2, 6), value 3636.

Definition 1.7The dual linear programme

The dual of the primal (P) min⁡cTx\min c^{\mathsf T}x, Ax=bAx = b, x≥0x\ge0 is (D) max⁡bTy\max b^{\mathsf T}y subject to ATy≤cA^{\mathsf T}y\le c (yy free). For the inequality form (P) max⁡cTx\max c^{\mathsf T}x, Ax≤bAx\le b, x≥0x\ge0, the dual is (D) min⁡bTy\min b^{\mathsf T}y, ATy≥cA^{\mathsf T}y\ge c, y≥0y\ge0. The dual of the dual is the primal.

Dual: constraints ↔ variables, bb ↔ cc, min ↔ max.

Theorem 1.8Weak duality

If xx is feasible for (P) min⁡cTx\min c^{\mathsf T}x, Ax=bAx = b, x≥0x\ge0 and yy is feasible for (D), then bTy≤cTxb^{\mathsf T}y\le c^{\mathsf T}x. Consequently, if the values are equal, both are optimal; if (P) is unbounded, (D) is infeasible.

Any dual feasible value bounds the primal optimum. Equal values certify optimality.

Proof

Theorem 1.9Strong duality

If (P) has an optimal solution, so does (D), and the optimal values are equal. (So exactly one of: both have optima with equal values; one is unbounded and the other infeasible; both are infeasible.)

Optimal primal ⇒ optimal dual with the same value; yT=cBTAB−1y^{\mathsf T} = c_B^{\mathsf T}A_B^{-1} comes free from the simplex method.

Proof

Corollary 1.10Complementary slackness

Feasible xx for (P) and yy for (D) are both optimal if and only if xj(cj−AjTy)=0x_j(c_j - A_j^{\mathsf T}y) = 0 for every jj: whenever a primal variable is positive, the corresponding dual constraint is tight. (For inequality forms, also: a dual variable is positive only if its primal constraint is tight.)

Positive variable ⇔ tight dual constraint at optimality.

Proof

Check 1.11Check: solving and certifying an LP

  • Convert to standard form; find a starting BFS (slacks, or a phase-one problem).
  • Pivot: enter negative reduced cost, leave by ratio test.
  • Certify: exhibit a dual feasible yy with the same value, or check complementary slackness.
  • Two variables: draw the region and check vertices.

Standard form, pivot, certify with the dual.