44.05.02 · optimization-control / 05-conic-semidefinite

Linear-Programming Duality and the Simplex Method

shipped3 tiersLean: none

Anchor (Master): Bertsimas & Tsitsiklis 1997 Introduction to Linear Optimization (Athena Scientific) Ch. 3-Ch. 5; Schrijver 1986 Theory of Linear and Integer Programming (Wiley) §7-§11; Chvátal 1983 Linear Programming (Freeman); Boyd & Vandenberghe 2004 Convex Optimization (Cambridge) §4.3, §5.2

Intuition Beginner

A linear program is the simplest kind of planning problem with a clean shape. You have some quantities to decide — how many of each product to make, how much of each ingredient to buy. Each decision is a number that cannot go below zero. There are limits: only so much labour, only so much material. Every limit is a straight-line budget, and your goal — total profit, total cost — is also a straight measure. You want the best plan that respects every limit.

The set of all plans that respect the limits is a flat-sided region, like a cut gemstone. Because both the limits and the goal are straight, the best plan never hides in the middle of a face. It always sits at a corner of the gemstone. This is the single most useful fact about linear programs: to find the best plan, you only ever need to look at corners, and there are finitely many of them.

The second idea is that every planning problem has a hidden twin. If your problem is "make the most profit without breaking any limit," the twin asks "what is the cheapest set of prices to attach to each limited resource so that no product looks underpriced?" These two problems, the primal and the dual, always meet in the middle: the best profit you can earn exactly equals the cheapest resource bill the twin can post. Not "less than," not "close to" — exactly equal.

That exact match is no accident. It means the price the twin attaches to a resource is the true marginal worth of one more unit of it. The plan and the prices certify each other: the plan proves the prices are not too high, and the prices prove the plan cannot be beaten.

Visual Beginner

Picture a feasible region as a polygon in the plane. The goal is a direction — "more profit this way." Push a straight ruler across the polygon in that direction; the last point it touches before leaving is the best plan, and that point is always a corner. The simplex method is the strategy of starting at one corner and walking along edges, always to a neighbour that improves the goal, until no neighbouring corner is better.

        goal direction --->
        c2
         \         best corner (optimum)
          \        *
           +-------+
          /         \
   start /  feasible \
   corner   polygon   \
   *----+-------------+
    \   ^ walk along edges, corner to corner,
     \  | each step improving the goal
      \ |
       \+

   At the optimum, no neighbouring corner is better:
   the ruler (goal) cannot be pushed any further.

Worked example Beginner

A workshop makes chairs and tables. Each chair earns and each table earns . A chair needs hour of carpentry; a table needs hours; only carpentry hours are available. A chair needs hours of finishing; a table needs hour; only finishing hours are available. How many of each should we make to earn the most? Let be chairs and tables, both at least .

The limits. Carpentry: . Finishing: . Goal: make as large as possible.

Find the corners. The corners of the feasible region are where limits meet. Setting : carpentry gives , so earns . Setting : finishing gives , so earns . Where both limits bind, solve and : subtract to get , so earns . The origin earns .

Compare the corners. The earnings are , , , and . The largest is , at the corner : make chairs and tables.

What this tells us. Checking every corner found the best plan, . The twin problem attaches prices to the two resources; those prices turn out to be per carpentry hour and per finishing hour, and the resource bill is — the same number, as the twin always promises.

Check your understanding Beginner

Formal definition Intermediate+

Work in . The standard-form linear program is

with (assume ), , , and meaning for every coordinate. The canonical (inequality) form is subject to ; the two are interconvertible by introducing non-negative slack variables () and splitting a free variable as with .

Definition (basic feasible solution). Let with index linearly independent columns of ; write for the resulting invertible submatrix and . The associated basic solution sets and . It is a basic feasible solution (BFS) when additionally . The columns indexed by form the basis; are the basic variables and the nonbasic variables. A BFS is degenerate when some basic variable equals .

The geometric content (cross-ref 44.01.03) is that the feasible polyhedron has the basic feasible solutions as exactly its vertices (extreme points): a feasible is a vertex of if and only if the columns are linearly independent, which is the BFS condition.

Definition (the dual LP). The dual of the standard-form primal is

with free. Equivalently, writing the dual slack , the dual variable is the price (Lagrange multiplier) on the -th primal equality, and is the reduced cost of primal variable .

Definition (reduced costs and optimality test). Given a basis , set (the basis prices) and define the reduced-cost vector , so and . The BFS for is optimal for a minimisation when (no nonbasic variable can be increased to lower the objective).

Counterexamples to common slips

  • Free vs. sign-constrained dual variables track the primal constraint type. A primal equality row yields a free dual variable; a primal inequality with non-negative primal variable yields a non-negative dual variable. Forcing every dual variable to be non-negative for an equality-constrained primal is the most common sign error.
  • A basic solution need not be feasible. Choosing independent columns always gives a basic solution , but it is a basic feasible solution only when . The simplex method moves only among feasible bases; the dual simplex moves among dual-feasible (possibly primal-infeasible) bases.
  • Degeneracy is a vertex with too many active constraints, not a non-vertex. A degenerate BFS (some basic variable zero) is still a genuine vertex; it is the source of cycling because several distinct bases describe the same vertex, and a pivot can change the basis without moving the point.

Key theorem with proof Intermediate+

We prove LP strong duality and complementary slackness, deriving them from Farkas' lemma 44.02.04; weak duality is the elementary half.

Theorem (LP duality and complementary slackness). Consider the primal and dual .

(i) (Weak duality.) If is primal feasible and is dual feasible, then .

(ii) (Strong duality.) If the primal has a finite optimal value , then the dual has an optimal value and , each attained.

(iii) (Complementary slackness.) Feasible are simultaneously optimal if and only if for every .

Proof of (i). Let and . Then

the inequality using coordinatewise against . So every dual-feasible value is a lower bound for every primal-feasible value.

Proof of (ii). Let be the finite primal optimum. For any scalar the system

is infeasible (a solution would beat the optimum). Write this as a single standard-form feasibility by adding a slack to the last row: . Infeasibility of is, by the affine Farkas alternative 44.02.04, the solvability of a dual certificate: there exist and with

Suppose . Then and , which is the Farkas certificate that is itself infeasible — contradicting primal feasibility (the optimum is finite, so a feasible point exists). Hence ; rescale by and rename, setting . The conditions become and . So for every there is a dual-feasible with dual value exceeding . Letting yields dual-feasible points with value approaching from below, so ; weak duality gives . Thus .

Attainment: the dual feasible region is a polyhedron and the objective is bounded above on it by ; by the vertex-attainment principle for polyhedra 44.01.03 the supremum is attained at a vertex (after factoring lineality), and symmetrically the primal optimum is attained at a vertex of .

Proof of (iii). With feasible, the weak-duality computation gives

a sum of products of non-negative terms ( and ). The duality gap is zero — equivalently, by (ii), and are both optimal — exactly when every product vanishes, . This is complementary slackness: a variable is positive only where its reduced cost is zero, and a reduced cost is positive only where the variable is zero.

Bridge. Strong duality builds toward the optimality test of the simplex method and the polynomial-time interior-point analysis, and the complementary-slackness pairing appears again in the Karush-Kuhn-Tucker conditions of nonlinear programming, where reduced costs become Lagrange multipliers. This is exactly the Farkas dichotomy with an objective attached: the alternative "either the value- system is feasible or a separating multiplier exists" becomes "either you can improve or you hold a dual certificate of optimality," so the foundational reason the primal and dual values coincide is the closedness of the finitely generated cone underlying Farkas. The duality pairing is dual to the geometry of 44.01.03: a primal vertex and a dual vertex certify each other, and the central insight is that the reduced-cost vector is simultaneously the simplex optimality test and the dual feasibility residual. Putting these together, LP duality generalises to conic duality over a general closed convex cone (the orthant replaced by , the price vector constrained to the dual cone ), and the bridge is complementary slackness, the exact-equality condition that survives, in a relaxed Slater-regularised form, into the conic and nonlinear theory.

Exercises Intermediate+

Advanced results Master

The simplex method as edge-following and its finiteness

A pivot replaces one basis column by another, moving from a vertex of to an adjacent vertex along an edge while never increasing [Bertsimas-Tsitsiklis Ch. 3]. The entering variable is any nonbasic index with reduced cost ; the ratio test with selects the leaving variable. Each nondegenerate pivot strictly decreases the objective, so with finitely many bases the method terminates — unless degeneracy permits a sequence of zero-step pivots returning to a previous basis. Bland's rule (smallest-index entering and leaving) and the lexicographic perturbation rule both forbid such cycles; Bland's argument [Bland 1977] tracks the largest index participating in a hypothetical cycle and derives a reduced-cost sign contradiction, while the lexicographic rule perturbs to make every BFS nondegenerate. Either way the method is finite.

Klee-Minty: exponential worst case versus practical efficiency

Dantzig's most-negative-reduced-cost pivot rule, and indeed every deterministic pivot rule examined, admits inputs on which the simplex method visits exponentially many vertices. The Klee-Minty cube [Klee-Minty 1972] is a perturbed -dimensional cube with facets whose vertices the largest-coefficient rule traverses all of, in order. Yet in practice the simplex method runs in roughly to pivots; Spielman and Teng's smoothed-analysis theorem (2004) explains this by proving the expected pivot count is polynomial under small random perturbations of the data, reconciling the exponential worst case with decades of empirical efficiency. The worst-case picture motivates the polynomial-time interior-point alternative (44.05.04, catalog stub), which follows the central path through the relative interior of rather than walking its boundary vertices, achieving iterations for the input bit-length.

The dual simplex method and warm starts

The dual simplex maintains dual feasibility () while restoring primal feasibility, the mirror image of the primal simplex [Bertsimas-Tsitsiklis Ch. 4]. It selects a leaving variable with , then a dual ratio test on the reduced costs picks the entering variable preserving . Its decisive use is re-optimisation: after a sensitivity perturbation of , or after adding a cutting-plane constraint that the current optimum violates (the engine of branch-and-cut integer programming), the previous basis is dual-feasible but primal-infeasible, so a few dual-simplex pivots recover optimality without restarting — the algorithmic payoff of complementary slackness, since primal and dual feasibility together with are exactly the optimality certificate the two simplex variants alternately repair.

Strict complementarity, the central path, and degeneracy

Goldman and Tucker's theorem guarantees a primal-dual optimal pair that is strictly complementary: for every exactly one of or holds [Schrijver §7]. Interior-point methods converge to such a strictly complementary pair (the analytic centre of the optimal face), whereas the simplex method returns a vertex that may be degenerate and basis-ambiguous. The partition versus given by strict complementarity is the optimal partition, an invariant of the LP independent of which optimal vertex an algorithm reports, and it is what makes sensitivity analysis well-posed even when the optimal vertex is degenerate and multiple bases describe it.

Synthesis. The simplex method, LP duality, and the vertex theory of 44.01.03 are exactly three readings of one finite-dimensional fact: a polyhedron is a finite list of vertices and recession rays, a linear objective is minimised at a vertex, and the certificate that no better vertex exists is a dual-feasible price vector. The central insight organising the unit is that the reduced-cost vector is the join of the two theories — it is the simplex optimality test, the dual feasibility residual, and the complementary-slackness partner of all at once. The foundational reason strong duality holds with no constraint qualification is that the orthant is a finitely generated cone, so Farkas 44.02.04 applies unconditionally; putting these together, the orthant case generalises to conic duality where the same pairing governs optimality but closedness must be bought with a Slater hypothesis. The Klee-Minty worst case is dual to the practical efficiency that smoothed analysis explains, and the bridge is the central path: interior-point methods trade vertex-walking for a smooth trajectory whose limit is the strictly complementary pair, which appears again in the polynomial-time complexity theory that places LP in while leaving the combinatorial diameter of the vertex graph (the Hirsch-conjecture circle) open.

Full proof set Master

Proposition 1 (BFS ⇔ vertex). For with , a feasible point is a vertex (extreme point) of if and only if the columns are linearly independent — equivalently, is a basic feasible solution.

Proof. Let . () Suppose are independent and with . For , and force . Then with of full column rank, so , giving : is extreme. () Suppose are dependent: there is supported on with . For small , are feasible (they satisfy and stay since the perturbed coordinates are those with ), and is a midpoint of two distinct feasible points, so is not extreme. Independence of columns extends to a basis , exhibiting as the BFS for (with for the padding indices).

Proposition 2 (existence of an optimal vertex). If the standard-form LP has a feasible point and the objective is bounded below on , then the optimum is attained at a vertex of .

Proof. Boundedness below means for every recession direction (otherwise stepping along drives the objective to ). Take any optimal (one exists since the level set is a nonempty polyhedron with recession cone meeting only where , hence at off the objective-flat directions, giving a compact slice by 44.01.03). If the support of is dependent, the Proposition 1 perturbation keeps the objective unchanged on the direction with , or strictly improves it for one sign otherwise — contradicting optimality unless , in which case push until a coordinate hits , reducing the support without changing the value. Iterating reaches an optimal point with independent support, a vertex.

Proposition 3 (strong duality, basis form). If the primal simplex method terminates at a BFS with basis and reduced costs , then is dual optimal and .

Proof. Dual feasibility: , and is precisely . Value equality: , using (since ) and . By weak duality this common value is both the primal minimum and the dual maximum.

Proposition 4 (complementary slackness characterises optimality). Feasible are both optimal if and only if for all .

Proof. The duality gap is , a sum of non-negative terms. By strong duality the gap is zero iff both are optimal, and a sum of non-negative reals is zero iff each term is zero, giving for every .

Proposition 5 (finite termination under Bland's rule). The primal simplex method with Bland's smallest-index rule performs finitely many pivots.

Proof. The objective is non-increasing, so a non-terminating run cycles among finitely many bases sharing one objective value and one degenerate vertex. Let be the largest index moving (entering at some pivot, leaving at another) during the cycle; in the pivot where leaves, the entering index is some ; in a pivot where enters, . Construct from the entering column the direction and pair from the -leaving configuration against the edge direction of the -entering configuration. Bland's smallest-index choices force every index to behave monotonically across the cycle, isolating the coordinate , and the two configurations assign reduced costs of strictly opposite sign while the pivot-column entry forces a sign agreement — the inner product of a non-negative-by-eligibility vector with a non-positive-by-construction vector is shown both and . The contradiction rules out a cycle; finitely many bases then bound the pivot count.

Connections Master

  • LP strong duality is the headline corollary of Farkas' lemma 44.02.04: the infeasibility of the value- system is, through the affine Farkas alternative, the existence of the dual certificate , and the unconditional applicability of Farkas — no constraint qualification needed — is exactly the closedness of the finitely generated orthant cone proved there. Complementary slackness is the equality case of the same one-line pairing that gives weak duality.

  • The geometry rests on the recession-cone and Minkowski-Weyl theory of 44.01.03: basic feasible solutions are the vertices of the feasible polyhedron, an LP with a finite optimum attains it at a vertex because the recession cone forbids improving rays, and the simplex method is the algorithmic traversal of the vertex-edge graph that the polytope-plus-cone decomposition organises. Sensitivity analysis is the statement that the optimal value is the polyhedral support function of the right-hand side.

  • Linear programming is the orthant-cone special case of conic programming over a general closed convex cone (44.05.01, catalog stub for this chapter): replacing by and by recovers semidefinite and second-order-cone programs, where strong duality and complementary slackness survive in a Slater-regularised form because richer cones lack the automatic closedness the orthant enjoys.

  • The interior-point alternative (44.05.04, catalog stub) is the polynomial-time response to the Klee-Minty exponential worst case: rather than walking vertices it follows the central path through the relative interior toward the strictly complementary optimal pair, and the complementary-slackness conditions that the simplex basis satisfies exactly are precisely the conditions the central path satisfies in the limit, tying the combinatorial and the continuous methods to one optimality system.

Historical & philosophical context Master

George Dantzig devised the simplex method in 1947 while working on planning problems for the U.S. Air Force, publishing the systematic account in Linear Programming and Extensions [Dantzig 1963] (Princeton, 1963); the duality theorem of linear programming was identified in the same period, with John von Neumann recognising in 1947 the connection between LP duality and the minimax theorem for two-person zero-sum games he had proved in 1928. Tjalling Koopmans's contemporaneous work on activity analysis in economics — for which he and Leonid Kantorovich shared the 1975 Nobel Memorial Prize in Economics — established the economic reading of dual variables as shadow prices. The exponential worst case for Dantzig's pivot rule was constructed by Victor Klee and George Minty in How good is the simplex algorithm? [Klee-Minty 1972] (1972), sharpening the question of whether linear programming admits a polynomial algorithm.

That question was resolved affirmatively by Leonid Khachiyan's 1979 ellipsoid method and, with practical force, by Narendra Karmarkar's 1984 interior-point algorithm, which reopened the projective-scaling tradition and made interior-point methods the competitive alternative to the simplex method for large instances. Robert Bland's 1977 anti-cycling rule [Bland 1977] gave the simplest finite pivot rule, settling the degeneracy problem that had complicated finiteness arguments since Dantzig's original lexicographic resolution. The combinatorial diameter of polytope graphs, governing the best possible number of simplex pivots, remains open: Warren Hirsch's 1957 conjecture that the diameter is at most was disproved by Francisco Santos in 2011, leaving the polynomial-diameter question — and with it the existence of a strongly polynomial LP algorithm — unresolved.

Bibliography Master

@book{bertsimas1997introduction,
  author    = {Bertsimas, Dimitris and Tsitsiklis, John N.},
  title     = {Introduction to Linear Optimization},
  publisher = {Athena Scientific},
  address   = {Belmont, MA},
  year      = {1997}
}

@book{dantzig1963linear,
  author    = {Dantzig, George B.},
  title     = {Linear Programming and Extensions},
  publisher = {Princeton University Press},
  year      = {1963}
}

@incollection{kleeminty1972howgood,
  author    = {Klee, Victor and Minty, George J.},
  title     = {How good is the simplex algorithm?},
  booktitle = {Inequalities III},
  editor    = {Shisha, Oved},
  publisher = {Academic Press},
  pages     = {159--175},
  year      = {1972}
}

@article{bland1977new,
  author  = {Bland, Robert G.},
  title   = {New finite pivoting rules for the simplex method},
  journal = {Mathematics of Operations Research},
  volume  = {2},
  number  = {2},
  pages   = {103--107},
  year    = {1977}
}

@book{schrijver1986theory,
  author    = {Schrijver, Alexander},
  title     = {Theory of Linear and Integer Programming},
  series    = {Wiley-Interscience Series in Discrete Mathematics},
  publisher = {John Wiley \& Sons},
  year      = {1986}
}

@book{chvatal1983linear,
  author    = {Chv\'atal, Va\v{s}ek},
  title     = {Linear Programming},
  publisher = {W. H. Freeman},
  year      = {1983}
}

@book{boyd2004convex,
  author    = {Boyd, Stephen and Vandenberghe, Lieven},
  title     = {Convex Optimization},
  publisher = {Cambridge University Press},
  year      = {2004}
}

@article{spielman2004smoothed,
  author  = {Spielman, Daniel A. and Teng, Shang-Hua},
  title   = {Smoothed analysis of algorithms: Why the simplex algorithm usually takes polynomial time},
  journal = {Journal of the ACM},
  volume  = {51},
  number  = {3},
  pages   = {385--463},
  year    = {2004}
}