From supporting hyperplanes and Fenchel conjugation to Lagrange multipliers, bounty-pricing algorithms, Kantorovich transport, and Gibbs variational duality
Chihao Zhang · Fall 2026
Across the first five chapters of this course, we kept encountering pairs of optimization problems that looked like mirror images of each other—and each time, the mirror unlocked the theorem:
In Chapter 2, total variation distance between two distributions μ and ν was the minimum disagreement probability min(X,Y)∈Π(μ,ν)P[X=Y] over couplings; in Chapter 5, the exact same quantity reappeared as the maximum distinguishing power supZ:Ω→[0,1](Eμ[Z]−Eν[Z]) over bounded test functions. Why do two opposite optimizations—a minimization over joint probability tables and a maximization over test functions—compute the same number?
In Chapter 4, the Plotkin–Shmoys–Tardos method collapsed a linear feasibility problem Ax≥b against a constraint weighting p∈Δm, while no-regret self-play equated minimax and maximin game values in von Neumann’s theorem.
Also in Chapter 4, shifting from Euclidean Online Gradient Descent to negative-entropy Online Mirror Descent replaced 21∥x∥22 with ψ(q)=∑iqilnqi, turning dual gradient sums into Boltzmann weights qt(i)∝e−ηLt−1(i)—the same exponential tilt that drove Chernoff bounds in Chapter 1 and logarithmic Sobolev inequalities in Chapter 3.
Finally, as we prepare to design approximation algorithms in Chapter 7, we face a basic algorithmic dilemma: if computing the true optimum OPT of a combinatorial problem is NP-hard, how can a polynomial-time algorithm prove that its output costs at most 2⋅OPT or Hk⋅OPT without ever knowing OPT?
All four phenomena grow from a single geometric operation: Fenchel–Legendre conjugation—encoding a function from below by its supporting hyperplanes and reading off their vertical-axis intercepts. Applying that single operation to a perturbed constrained problem automatically creates Lagrange multipliers, forces λ≥0 from monotonicity, explains duality gaps as nonconvex indentations, specializes at zero curvature to LP duality and the algorithmic engines of dual fitting and primal–dual, lifts cleanly to infinite-dimensional optimal transport, and turns curvature back on to produce the Gibbs variational principle across the entire course.
Reading guide. Course Content is designed for a single 120-minute session (Session 9):
Act I — Supporting hyperplanes, perturbation conjugacy, and linear duality (§§1.1–1.3, ~45 minutes): Builds Fenchel–Legendre conjugation f∗(y) from the geometry of supporting hyperplanes and vertical intercepts, connecting Young–Fenchel gaps to Chapter 4’s Bregman divergence and weak/strong duality to f∗∗=f (§1.1); applies f∗ to the constraint-perturbation function p(u,v) to derive Lagrange multipliers, forced sign rules (λ≥0 vs. μ∈R), Weak/Strong Duality (d∗=p∗∗(0,0)), Complementary Slackness, and the penalty-game intuition (§1.2); then specializes to covering linear programs via matrix transpose adjoints and a hand-solved 4-vertex paw graph (§1.3).
Act II — Dual prices as algorithmic engines (§§1.4–1.5, ~42 minutes): Reframes LP dual variables as element bounties subject to a no-arbitrage cap, proving the Hk-approximation of Greedy Set Cover via dual fitting (§1.4) and the 2-approximation of Weighted Vertex Cover via the primal–dual schema and relaxed complementary slackness (§1.5)—neither of which needs to solve an LP.
Act III — Changing the stage: infinite dimensions and curvature (§§1.6–1.7, ~33 minutes): Lifts the same constrained-duality recipe to joint probability measures to derive Kantorovich optimal transport duality, uniting Chapter 2’s Coupling Lemma and Chapter 5’s test-function characterization of dTV (§1.6); then closes the loop back to §1.1 by computing the Fenchel conjugate of negative Shannon entropy via a pointwise Lagrange multiplier, proving the Gibbs variational principle and unifying all five prior chapters in one duality map (§1.7).
Reading Contents (§§2.1–2.5) provides self-contained proofs for the surrounding foundations: paired vector spaces (V,V∗), Fenchel–Rockafellar composite duality, and Slater’s continuity condition (§2.1), separating hyperplanes, Farkas’ lemma, and Strong LP Duality (§2.2), metric d-transforms and the Kantorovich–Rubinstein W1 theorem (§2.3), the Donsker–Varadhan variational formula (recovering Chapter 3’s entropy tensorization) together with Cramér rate functions (§2.4), and the three-rung kernel-transform genealogy connecting Hilbert-space Fourier characters, Gibbs free energy, and Fenchel conjugation alongside infimal convolution (§2.5). Further Topics (§§3.1–3.4) surveys Yao’s minimax principle as LP duality, conic/SDP duality (previewing Chapter 7), Prokhorov compactness versus Monge maps, and variational inference in counting and sampling.
I. Course Content
1.1 Supporting hyperplanes and Fenchel–Legendre conjugation
Recall from Chapter 4 (§1.8 and Reading §2.2) that each step of Online Mirror Descent walked in two spaces at once: primal iterates xt lived inside a feasible set V, while gradients accumulated in a dual space V∗ accessed through ∇ψ and inverted through ∇ψ∗, leaving a mismatch measured by the Bregman divergence Bψ(x,z). What isψ∗, and why does a single convex transformation generate every notion of duality we will meet today?
Instead of describing a function f:Rn→R∪{+∞} pointwise by listing its height f(x) above every point x∈Rn, suppose we describe f from below by supporting hyperplanes. Fix any slope covector y∈Rn, and ask for the highest affine function x↦⟨y,x⟩−c that lies everywhere on or below the graph of f: ⟨y,x⟩−c≤f(x)∀x∈Rn⟺c≥x∈Rnsup{⟨y,x⟩−f(x)}. Look at where that tightest supporting hyperplane x↦⟨y,x⟩−c∗ intersects the vertical axis (x=0): it hits height −c∗. That threshold c∗—viewed as a function of the slope y—is literally the Fenchel–Legendre conjugate f∗(y)!
Definition 1 (Fenchel–Legendre conjugate) Let (V,V∗,⟨⋅,⋅⟩) be a paired vector space—in our primary finite-dimensional classroom setting V=V∗=Rn with ⟨y,x⟩=y⊤x, before lifting to function and measure pairings in §§1.6–1.7 and Reading §2.1. Given an extended-real function f:V→[−∞,+∞], its Fenchel conjugatef∗:V∗→[−∞,+∞] is f∗(y):=x∈Vsup{⟨y,x⟩−f(x)},y∈V∗, with the standard extended-real conventions a−(+∞)=−∞ and a−(−∞)=+∞ for a∈R. (Domain restrictions to a subset D⊆V are encoded cleanly by setting f(x):=+∞ for x∈/D, dropping those points from the supremum automatically; whenever f is proper, meaning f>−∞ everywhere and dom(f):={x∈V:f(x)<+∞}=∅, its conjugate f∗ takes values in (−∞,+∞].)
The tangent line ⟨y,x⟩−f∗(y) touches f at z (y=∇f(z)), cuts the vertical axis at −f∗(y), and leaves a vertical Young–Fenchel gap equal to Chapter 4’s Bregman divergence Bf(x,z).
The margin figure encodes every duality theorem we need. Because the supporting line x↦⟨y,x⟩−f∗(y) sits everywhere below f(x), we immediately get f(x)≥⟨y,x⟩−f∗(y) (weak duality), and the vertical gap between f(x) and that tangent line at any point x is the Bregman divergenceBf(x,z). Conversely, taking the upper envelope f∗∗(x):=supy{⟨y,x⟩−f∗(y)} reconstructs f verbatim whenever f is closed and convex (strong duality)—and leaves a gap wherever nonconvex pockets prevent supporting lines from reaching up to f(x).
Proposition 1 (Convexity, Young–Fenchel gap, and the Biconjugate Theorem) For any proper function f:Rn→R∪{+∞}:
Always convex and lower semicontinuous: The Fenchel conjugate f∗ is convex and lower semicontinuous on Rn, even if f itself is nonconvex.
Young–Fenchel inequality (= Weak Duality) & Bregman identity: For every x,y∈Rn, f(x)+f∗(y)≥⟨y,x⟩. Moreover, if f is convex and differentiable at z with y=∇f(z), then equality holds at x=z (so f(z)+f∗(∇f(z))=⟨∇f(z),z⟩), and the Young–Fenchel excess for arbitrary x is precisely the Bregman divergence of Chapter 4: f(x)+f∗(∇f(z))−⟨∇f(z),x⟩=f(x)−f(z)−⟨∇f(z),x−z⟩=Bf(x,z)≥0.
Fenchel–Moreau Biconjugate Theorem (= Strong Duality): Defining the biconjugate f∗∗(x):=supy∈Rn{⟨y,x⟩−f∗(y)}, we always have f∗∗≤f, and f∗∗=f⟺f is convex and lower semicontinuous. More generally, for any proper f whose conjugate f∗ is also proper, f∗∗=clconv(f) is the closed convex envelope of f—the highest closed convex lower bound sitting beneath f.
Legendre inversion: When f is convex and lower semicontinuous, y∈∂f(x)⟺x∈∂f∗(y)⟺f(x)+f∗(y)=⟨y,x⟩; for smooth strictly convex Legendre functions, ∇f∗=(∇f)−1.
Proof: separating hyperplanes on epi(f) establish Fenchel–Moreau biconjugation
Parts (1), (2), and the easy inequality f∗∗≤f follow straight from Definition 1:
(1) Each y↦⟨y,x⟩−f(x) with f(x)<+∞ is affine, hence convex and continuous; a pointwise supremum of convex continuous functions is convex and lower semicontinuous (its epigraph is an intersection of closed half-spaces).
(2) From f∗(y)=supx~{⟨y,x~⟩−f(x~)}≥⟨y,x⟩−f(x) comes f(x)+f∗(y)≥⟨y,x⟩. If f is convex and differentiable at z, then f(x)≥f(z)+⟨∇f(z),x−z⟩ for all x, i.e., ⟨∇f(z),x⟩−f(x)≤⟨∇f(z),z⟩−f(z) with equality at x=z, so f∗(∇f(z))=⟨∇f(z),z⟩−f(z) and substituting gives Bf(x,z).
(3, easy half and envelope) Rewriting Young–Fenchel as ⟨y,x⟩−f∗(y)≤f(x) and taking supy proves f∗∗(x)≤f(x) always. Conversely, if f=f∗∗, then f is convex and lower semicontinuous by (1) applied to f∗. Moreover, any closed convex function h≤f satisfies h∗≥f∗⟹h=h∗∗≤f∗∗≤f, so f∗∗ (being closed and convex by (1)) is the closed convex envelope clconv(f) whenever f∗ is proper.
Now prove the heart of (3): if f is proper, convex, and lower semicontinuous on Rn, then f∗∗(x0)≥f(x0) for every x0∈Rn. Note that epi(f):={(x,t)∈Rn×R:t≥f(x)} is a nonempty closed convex subset of Rn+1. Fix x0∈Rn and any strict lower target t0<f(x0). Because (x0,t0)∈/epi(f), applying the strict Euclidean hyperplane separation theorem (proved in §2.2 via closest-point projection onto a closed convex set) produces (v,α)∈Rn×R and ε>0 such that ⟨v,x0⟩+αt0+ε≤⟨v,x⟩+αtfor all (x,t)∈epi(f).
Case 1 (α>0): Since (x,t)∈epi(f) allows arbitrarily large t→+∞, α can never be negative. When α>0, divide by α and set y:=−v/α: for all x with f(x)<+∞ (taking t=f(x)), ⟨y,x⟩−f(x)≤⟨y,x0⟩−t0−αε, so f∗(y)≤⟨y,x0⟩−t0−αε<+∞, giving f∗∗(x0)≥⟨y,x0⟩−f∗(y)≥t0.
Case 2 (α=0, vertical separator when f(x0)=+∞ or boundary drop): Here ⟨v,x0⟩+ε≤⟨v,x⟩ for all x∈dom(f). First find any affine lower bound for f: pick x1∈dom(f) (f(x1)∈R); strictly separating (x1,f(x1)−1)∈/epi(f) from epi(f) cannot yield a vertical hyperplane α′=0 (which would force ⟨v′,x1⟩+ε′≤⟨v′,x1⟩, impossible because (x1,f(x1))∈epi(f)). Thus Case 1 guarantees at least one y1∈Rn with f∗(y1)<+∞, i.e., ⟨y1,x⟩−f∗(y1)≤f(x) everywhere. Now tilt yρ:=y1−ρv for ρ>0: ⟨yρ,x⟩−f(x)=(⟨y1,x⟩−f(x))−ρ⟨v,x⟩≤f∗(y1)−ρ(⟨v,x0⟩+ε), so f∗(yρ)≤f∗(y1)−ρ(⟨v,x0⟩+ε) and ⟨yρ,x0⟩−f∗(yρ)≥⟨y1,x0⟩−f∗(y1)+ρε. Sending ρ→+∞ forces f∗∗(x0)=+∞≥t0 (which rules out Case 2 altogether if f(x0)<+∞, and proves f∗∗(x0)=+∞=f(x0) if f(x0)=+∞).
Since f∗∗(x0)≥t0 for every t0<f(x0), taking t0↑f(x0) yields f∗∗(x0)≥f(x0), completing (3).
Finally, for (4), the subgradient definition y∈∂f(x) says f(x′)−f(x)≥⟨y,x′−x⟩ for all x′∈Rn, i.e., ⟨y,x⟩−f(x)≥supx′{⟨y,x′⟩−f(x′)}=f∗(y); combining this with Young–Fenchel gives y∈∂f(x)⟺f(x)+f∗(y)=⟨y,x⟩. When f is convex and lower semicontinuous, (3) gives f∗∗=f, so applying the same equivalence to the proper convex function f∗ yields x∈∂f∗(y)⟺f∗(y)+f∗∗(x)=⟨y,x⟩⟺f(x)+f∗(y)=⟨y,x⟩. In particular, for smooth strictly convex Legendre functions where subdifferentials are singletons, ∇f∗=(∇f)−1.
Historical arc of convex duality. Adrien-Marie Legendre (1787) introduced slope-conjugate transformations in celestial mechanics and differential equations, Hermann Minkowski (1911) laid the geometric theory of convex bodies and support functions, and Werner Fenchel (On conjugate convex functions, 1949) together with Jean-Jacques Moreau (1962) unified them into the general Fenchel–Moreau conjugation theorem f∗∗=f over paired topological vector spaces.
Before deploying Fenchel conjugation on constrained optimization, compute two fundamental conjugate pairs that will power both our linear programs and our nonlinear mirror maps:
Example 1 (Two workhorse Fenchel conjugates (and why linear duality sits inside Fenchel duality))
Conjugate norms: Fix p,q∈(1,∞) with p1+q1=1 and any norm ∥⋅∥ on Rn with dual norm ∥y∥∗=sup∥x∥≤1⟨y,x⟩. Maximizing ⟨y,x⟩−p1∥x∥p≤∥y∥∗∥x∥−p1∥x∥p over r=∥x∥≥0 attains r=∥y∥∗q−1 and yields (p1∥⋅∥p)∗(y)=q1∥y∥∗q. At p=q=2 with the Euclidean norm, f(x)=21∥x∥22 is self-conjugate: f∗(y)=21∥y∥22.
Indicators and support functions (convexity without curvature): For any closed convex set C⊆Rn, define its convex indicatorδC(x)=0 for x∈C and +∞ outside. Its conjugate is the support functionδC∗(y)=supx∈C⟨y,x⟩. In particular, taking a singleton C={x0} turns points into linear functions δ{x0}∗(y)=⟨y,x0⟩, showing that linear duality is simply the zero-curvature degenerate limit of Fenchel conjugation.
Visualizing y in high dimensions: tangency rays and contour spacing in V
Adding a vertical height axis (x,f(x))∈Rn+1 gives the sharpest proof picture in 1D, because a line hitting a parabola is concrete. Once n≥3, however, (n+1)-dimensional graphs vanish from geometric intuition—and picturing y as a “normal vector” pointing perpendicular to a hyperplane secretly smuggles in a Euclidean inner product that does not exist in spaces like (L1,L∞) or (M(Ω),Cb(Ω)).
In the base space V (drawing both families at the same height step Δ), every contour f=mΔ has a tangent point along the ray ∇f=αy (α>0, non-orthogonal to the planes!). Tangency fixes that ray; matching f’s tightening contour spacing to y’s uniform plane spacing (α=1) singles out the optimal level x∗ (here two y-steps minus one f-step gives f∗(y)=Δ). For f=δC, ∂C is the sole contour so tangency alone suffices.
Instead, throw away the extra height axis altogether and look directly inside the n-dimensional base space V as a topographic map with a common height step Δ>0 (assuming f(0)=0 for convenience; otherwise f∗(y) simply gains an offset −f(0)):
Topographic cost contours in V: Draw f by equal-height level sets{x∈V:f(x)=mΔ} (m=1,2,3,…). For a smooth convex bowl such as 21∥x∥22, the contour radii scale like mΔ, so contours start wide apart near the minimum and crowd progressively closer together as f steepens. (For the indicator f=δC in Example 1 (2), the entire map collapses to the single boundary ∂C.)
Uniform covector stacks in V: Without choosing any inner product, a linear functional y∈V∗ acts as a covector stack of parallel, equally spaced hyperplanes {x∈V:⟨y,x⟩=kΔ} (k∈Z): the stack orientation marks the uphill direction of y, tighter spacing means a steeper covector, and ⟨y,x⟩/Δ counts how many hyperplane layers the state arrow x∈V pierces from 0.
Step 1 — Contour tangency fixes the ray (∇f(x)=αy): Maximizing ⟨y,x⟩ on any single contour {f(x)=c} selects the tangent point where a hyperplane of the y-stack touches that contour from outside. Crucially, every smooth contour possesses such a tangent point, so tangency alone does not identify which contour wins—instead, it eliminates n−1 tangential directions and collapses V onto a 1D curve (or ray) of tangent points satisfying ∇f(x)=αy (α>0). (When f=δC, ∂C is the sole boundary contour, so Step 1 already locks onto x∗.)
Step 2 — Matching contour spacing pins down the level (x∗): Walk outward along that tangency ray and compare the two Δ-rulers. Inside the optimum (α<1), the f-contours sit farther apart than the uniform y-planes, so moving outward pierces more y-layers than f-contours and increases ⟨y,x⟩−f(x). Beyond the optimum (α>1), the f-contours crowd closer together than the y-planes, so cost grows faster than ⟨y,x⟩. The maximizer x∗ sits at the exact contour where f’s local contour spacing catches up to y’s uniform hyperplane spacing (α=1⟺∇f(x∗)=y), and f∗(y) reads straight off the map as Δ times (number of y-planes crossed minus number of f-contours crossed from 0 to x∗)!
Whenever we prove theorems about weak duality, biconjugation gaps, or Bregman remainders, slicing V along a 1D ray t↦tx0 recovers the 2D parabola-and-intercept figure with zero loss of generality; meanwhile, in infinite-dimensional probability and function spaces (§§1.6–1.7), reading y∈V∗ as an external linear price or potential probe carries the exact same pairing ⟨y,x⟩ without ever needing to draw high-dimensional axes.
1.2 Constraints via perturbation: deriving Lagrange multipliers
Now take any general constrained minimization problem over an arbitrary nonempty domain X=∅ (which may be Rn, a discrete set {0,1}n, or an infinite-dimensional space of probability distributions): (P)p∗:=x∈Xinfsubject tof(x)gi(x)≤0,i=1,…,m,hj(x)=0,j=1,…,k, where f,g1,…,gm,h1,…,hk:X→R are arbitrary real-valued functions, with the convention p∗:=+∞ if no x∈X is feasible.
Can §1.1’s Fenchel conjugate generate the entire theory of Lagrange multipliers in one stroke? Wait: p∗ is just a single number, not a function we can place supporting hyperplanes beneath! To bring Fenchel conjugation to life, perturb the right-hand sides of all constraints and watch how the optimal value responds: p(u,v):=inf{f(x):x∈X,g(x)≤u,h(x)=v},u∈Rm,v∈Rk. This perturbation value functionp:Rm×Rk→[−∞,+∞] embeds the original optimum right on the vertical axis: p(0,0)=p∗ (and picking any x0∈X gives p(g(x0),h(x0))≤f(x0)<+∞, so p is never identically +∞). Moreover, notice a crucial structural asymmetry: - Increasing ui from 0 to ui>0relaxes the i-th inequality gi(x)≤ui, expanding the feasible set and lowering (or keeping equal) the infimum—so p(u,v) is coordinatewise nonincreasing in u (u≤u′⟹p(u,v)≥p(u′,v)). - Perturbing an equality hj(x)=vj in either direction shifts to a disjoint slice, so p has no monotonicity in v.
Now let us slide supporting hyperplanes (u,v)↦ξ⊤u+η⊤v−p∗(ξ,η) beneath p(u,v)—and watch every Lagrange multiplier, sign restriction, and duality theorem fall straight out of vertical-axis intercepts −p∗(ξ,η)!
Compute the Fenchel conjugate p∗(ξ,η)=supu,v{ξ⊤u+η⊤v−p(u,v)} by replacing −inf over feasible x with sup over all (x,u,v) satisfying x∈X, g(x)≤u, and h(x)=v. Writing u=g(x)+s with slack vector s∈R≥0m and v=h(x) separates x from s: p∗(ξ,η)=x∈X,s∈R≥0msup{ξ⊤(g(x)+s)+η⊤h(x)−f(x)}=x∈Xsup{ξ⊤g(x)+η⊤h(x)−f(x)}+s∈R≥0msupξ⊤s. Because X=∅ and f,g,h are real-valued, fixing any x0∈X keeps the first supremum strictly above −∞, so adding sups≥0ξ⊤s∈{0,+∞} never hits (−∞)+(+∞). Read off both outcomes:
Why inequality multipliers must satisfy λ≥0 (forced by monotonicity, not convention): If ξi>0 for even a single i∈[m], sending s=tei (t→+∞) drives sups≥0ξ⊤s=+∞ and forces p∗(ξ,η)=+∞. Geometrically, an uphill slope (ξi>0) chases the nonincreasing landscape p(u,v) as ui→+∞ without ever supporting it from below! Finite vertical intercepts exist only on downhill inequality slopes ξ=−λ with λ∈R≥0m, whereas equality slopes η=−μ∈Rk face no sign restriction.
Vertical intercept = Lagrange dual function: For every λ∈R≥0m and μ∈Rk, we have sups≥0(−λ⊤s)=0 (attained at s=0). Negating p∗(−λ,−μ) turns −supx into infx: −p∗(−λ,−μ)=x∈Xinf{f(x)+λ⊤g(x)+μ⊤h(x)}.
That expression inside the infimum is the Lagrangian; its infimum is the Lagrange dual function, literally the vertical-axis intercept of a downhill supporting hyperplane beneath p(u,v)!
Definition 2 (Lagrangian and Lagrange dual problem) For the constrained optimization problem (P), call λ∈R≥0m and μ∈RkLagrange multipliers (the negated supporting slopes ξ=−λ, η=−μ of p(u,v)). The Lagrangian is L:X×R≥0m×Rk→R, L(x,λ,μ):=f(x)+i=1∑mλigi(x)+j=1∑kμjhj(x). The height at (u,v)=(0,0) of the hyperplane with slope (−λ,−μ) is the Lagrange dual functionq:R≥0m×Rk→[−∞,+∞), q(λ,μ):=x∈XinfL(x,λ,μ)=−p∗(−λ,−μ), and maximizing this vertical intercept gives the Lagrange dual problem: (D)d∗:=λ∈R≥0m,μ∈Rksupq(λ,μ)=λ∈R≥0m,μ∈Rksupx∈XinfL(x,λ,μ).
Two practical clarifications make this formula effortless to use on the blackboard:
You never need to compute p(u,v) first. Substituting u=g(x)+s already eliminated (u,v) once and for all. To dualize any problem in practice, you go straight to supλ≥0,μinfx∈XL(x,λ,μ)—never solving for p(u,v) explicitly!
Equivalent zero-sum penalty game interpretation. Fixing any x∈X and letting a penalty adversary choose (λ,μ) gives supλ≥0,μL(x,λ,μ)=f(x) when x is feasible (g(x)≤0,h(x)=0) and +∞ when x violates any constraint (because λi≥0 punishes gi(x)>0 to +∞ while helping gi(x)<0 is avoided by λi=0). Hence (P) itself equals the minimax game p∗=infx∈Xsupλ≥0,μL(x,λ,μ), and swapping infxsupλ,μ to supλ,μinfx moves us from p(0,0) to its Fenchel biconjugate envelope p∗∗(0,0).
Everything classical in Lagrangian duality now compresses into one proposition:
Theorem 1 (Perturbation Duality, Concavity, Weak Duality, and Complementary Slackness) For any optimization problem (P) (convex or nonconvex, feasible or infeasible) with perturbation function p(u,v) and Lagrangian L(x,λ,μ):
Dual concavity & Biconjugate identity: The dual function q(λ,μ)=infx∈XL(x,λ,μ) is concave on R≥0m×Rk, and the dual optimum equals the Fenchel biconjugate of p at the origin: d∗=λ∈R≥0m,μ∈Rksupq(λ,μ)=(ξ,η)∈Rm×Rksup{−p∗(ξ,η)}=p∗∗(0,0).
Weak Duality & Strong Duality criterion: Universally, d∗=p∗∗(0,0)≤p(0,0)=p∗. Strong Duality (d∗=p∗) holds if and only ifp(0,0)=p∗∗(0,0)—in particular, when p and its conjugate p∗ are proper, iff the closed convex envelope clconv(p) meets p at (0,0). (In Reading §2.1, strict inequality-only Slater guarantees continuity of convex p at 0, and the refined Slater theorem also closes the gap whenever p∗>−∞.)
Complementary Slackness: Suppose x∗∈X is primal feasible and (λ∗,μ∗)∈R≥0m×Rk achieve zero gap f(x∗)=q(λ∗,μ∗)∈R. Then x∗ minimizes L(⋅,λ∗,μ∗) over X, and for every inequality constraint i∈[m], λi∗gi(x∗)=0.
Proof. For (1), fix each x∈X; the map (λ,μ)↦L(x,λ,μ) is affine, hence concave, and a pointwise infimum of concave functions is always concave. Moreover, because p∗(ξ,η)=+∞ whenever any ξi>0, the supremum in p∗∗(0,0)=supξ,η{⟨(ξ,η),(0,0)⟩−p∗(ξ,η)}=supξ,η{−p∗(ξ,η)} restricts automatically to ξ=−λ≤0 and η=−μ, leaving supλ≥0,μ{−p∗(−λ,−μ)}=supλ≥0,μq(λ,μ)=d∗.
For (2), check p∗∗(0,0)≤p(0,0) in all cases: if p(0,0)=+∞, the inequality holds trivially; if p(0,0)=−∞, then p∗(ξ,η)≥⟨(ξ,η),(0,0)⟩−(−∞)=+∞ everywhere, so p∗∗(0,0)=−∞=p(0,0); and if p(0,0)∈R, then for every (ξ,η), ⟨(ξ,η),(0,0)⟩−p∗(ξ,η)≤p(0,0) directly from Definition 1, and taking supξ,η gives p∗∗(0,0)≤p(0,0). The Strong Duality characterization d∗=p∗⟺p(0,0)=p∗∗(0,0) is immediate from (1).
For (3), note directly for any primal-feasible x∗ and any λ∗≥0, μ∗ that q(λ∗,μ∗)≤L(x∗,λ∗,μ∗)=f(x∗)+∑i=1mλi∗gi(x∗)+∑j=1kμj∗hj(x∗)≤f(x∗) since λi∗gi(x∗)≤0 and hj(x∗)=0. Because the left and right endpoints both equal f(x∗), both inequalities must hold with equality: x∗ minimizes L(⋅,λ∗,μ∗) over X, and ∑i=1mλi∗gi(x∗)=0. Since every term satisfies λi∗gi(x∗)≤0, every term vanishes individually.
Now watch the perturbation geometry expose nonconvex duality gaps in full daylight.
Caution (When nonconvexity leaves a gap: the perturbation staircase on {0,1}).
Consider the two-point discrete domain X={0,1}, linear objective f(x)=x, and single constraint g(x)=21−x≤0 (requiring x≥21). Embed this problem in p(u)=inf{x∈{0,1}:21−x≤u}: choice x=1 becomes feasible at u≥−21 with cost 1, whereas x=0 becomes feasible only at u≥21 with cost 0, producing the staircase p(u)=⎩⎨⎧+∞,1,0,u<−21,−21≤u<21,u≥21, so the unperturbed optimum is p∗=p(0)=1. Any downhill supporting line u↦−λu+q(λ) (λ≥0) beneath this staircase attains its tightest intercept q(λ)=−p∗(−λ)=min{λ/2,1−λ/2}, peaking at λ∗=1. Geometrically, that optimal supporting line u↦21−u rests on the two staircase corners (−21,1) and (21,0), tracing the convex-hull LP relaxation x∈[0,1] (whose perturbation curve drops linearly from 1 to 0) and cutting the vertical axis u=0 at height d∗=p∗∗(0)=21<1=p(0).
The perturbation staircase p(u) jumps from +∞ to 1 on [−21,21) and 0 on [21,+∞); its tightest supporting line 21−u (λ∗=1) hits the vertical axis at d∗=p∗∗(0)=21<1=p(0).
1.3 Hand-crafting linear programming duality
To see how mechanical—and transparent—§1.2’s Lagrangian recipe becomes when everything in sight is linear (the zero-curvature limit from Example 1), let us derive the dual of a standard covering linear program from first principles on the blackboard, without memorizing any sign-flipping table.
Consider n nonnegative decision variables x=(x1,…,xn)∈X:=R≥0n, an objective vector c∈Rn, a constraint matrix A∈Rm×n, and a right-hand side vector b∈Rm: (LP-P)x∈R≥0nminc⊤xsubject toAx≥b. Follow the perturbation-Lagrangian recipe of §1.2 step by step:
Rewrite constraints as g(x)≤0 and introduce multipliers y≥0: The constraint Ax≥b is b−Ax≤0. Since x∈R≥0n is already built into the domain X, introduce one nonnegative multiplier yi≥0 for each of the m inequalities (y∈R≥0m): L(x,y):=c⊤x+y⊤(b−Ax).
Switch the side of the matrix A via its transpose (adjoint): Because y⊤(Ax)=(A⊤y)⊤x, regroup terms to isolate x: L(x,y)=b⊤y+(c−A⊤y)⊤x.
Evaluate the inner minimization q(y):=infx∈R≥0nL(x,y): Since x1,…,xn≥0 vary independently across coordinates, x≥0inf(c−A⊤y)⊤x=j=1∑nxj≥0inf(cj−(A⊤y)j)xj={0,−∞,if (A⊤y)j≤cj for all j∈[n],otherwise, because if even a single coordinate j satisfies cj−(A⊤y)j<0, sending xj→+∞ drives L(x,y)→−∞.
Read off the dual linear program (LP-D): Maximizing q(y) avoids −∞ by enforcing A⊤y≤c, turning supy≥0q(y) into (LP-D)y∈R≥0mmaxb⊤ysubject toA⊤y≤c.
Same recipe with equality constraints or free primal variables. Notice what changes if (LP-P) has an equality constraint (Ax)i=bi or an unconstrained variable xj∈R: - By §1.2, an equality constraint produces an unconstrained multiplier yi∈R; - An unconstrained variable xj∈R forces (c−A⊤y)jxj→−∞ unless (A⊤y)j=cj holds with equality! Also, if we had kept X=Rn and penalized −x≤0 explicitly with s∈R≥0n, we would get c−A⊤y−s=0, identifying s=c−A⊤y≥0 as the dual slack vector. Finally, dualizing (LP-D) recovers (LP-P) back.
Notice the direct one-line verification of Weak Duality and Complementary Slackness for any primal-feasible x and dual-feasible y: because y≥0 and Ax≥b, while x≥0 and A⊤y≤c, b⊤y≤(Ax)⊤y=x⊤(A⊤y)≤c⊤x. Even better, the exact duality gap splits into two sums of nonnegative slack products: c⊤x−b⊤y=≥0(c−A⊤y)⊤x+≥0y⊤(Ax−b). Hence c⊤x=b⊤y if and only if bothprimal complementary slackness (xj>0⟹(A⊤y)j=cj) and dual complementary slackness (yi>0⟹(Ax)i=bi) hold.
Unlike general nonconvex programs (where the staircase in §1.2 had a gap), polyhedral convexity ensures that linear programs never leave a duality gap whenever finite solutions exist—and give an exact characterization even when feasibility fails.
Theorem 2 (Strong LP Duality and the feasibility trichotomy) For any linear program (LP-P) and its dual (LP-D):
Both feasible: If both (LP-P) and (LP-D) admit feasible solutions, then both attain finite optimal values x∗ and y∗, and their optimal objectives coincide: c⊤x∗=b⊤y∗.
Unboundedness forces dual infeasibility: If (LP-P) is feasible and unbounded below (p∗=−∞), then (LP-D) is infeasible. Symmetrically, if (LP-D) is feasible and unbounded above (d∗=+∞), then (LP-P) is infeasible.
One feasible and bounded: If one of (LP-P) or (LP-D) is feasible and bounded, then the other is also feasible and attains the same optimal value.
Simultaneous infeasibility: Both (LP-P) and (LP-D) can simultaneously be infeasible.
Simultaneous infeasibility in 1×1. Take A=(0), b=(1), c=(−1). Primal minx≥0{−x:0⋅x≥1} has no feasible x, and dual maxy≥0{y:0⋅y≤−1} has no feasible y.
You already saw two close cousins of Theorem 2 in Chapter 4: von Neumann’s minimax theorem (§1.10) is the special case of LP duality over probability simplices (Δm,Δn), and the Plotkin–Shmoys–Tardos infeasibility certificate (§1.11) is precisely a dual witness p∈Δm certifying that p⊤Ax<p⊤b for all x∈P. Reading §2.2 gives a completely self-contained geometric proof of Theorem 2 via separating hyperplanes and Farkas’ lemma.
From Lagrange multipliers to LP duality. Joseph-Louis Lagrange introduced multipliers for smooth equality-constrained mechanics in Mécanique Analytique (1788), and William Karush (1939) and Harold Kuhn & Albert Tucker (1951) extended them to inequality constraints. For linear programs specifically, John von Neumann formulated Strong LP Duality immediately after meeting George Dantzig at the Institute for Advanced Study in October 1947, noticing its equivalence to his 1928 minimax theorem for zero-sum games; Gale, Kuhn, and Tucker published the first rigorous proof via Farkas’ lemma in 1951.
Before turning dual variables into approximation algorithms, let us work through a concrete four-vertex graph instance by hand—it will reappear in §1.5 and again in Chapter 7.
Example 2 (Minimum Weighted Vertex Cover and Maximum Edge Packing on the paw graph) Consider the 4-vertex paw graphG=(V,E) with vertices V={1,2,3,4}, edges E={{1,2},{1,3},{2,3},{3,4}}, and vertex weights w=(w1,w2,w3,w4)=(2,3,4,2). We seek a subset S⊆V touching every edge (S∩e=∅ for all e∈E) of minimum total weight ∑v∈Swv.
Relaxing indicators xv∈{0,1} to xv≥0 gives the covering LP and (by our four-step derivation with A the edge–vertex incidence matrix) its dual edge-packing LP: (VC-LP)x≥0mins.t.2x1+3x2+4x3+2x4xu+xv≥1∀{u,v}∈E,(VC-D)y≥0maxs.t.y12+y13+y23+y34e∋v∑ye≤wv∀v∈V. Compare the integral optimum against the LP primal and dual optima:
Integral optimum: Any vertex cover must cover the triangle {1,2,3} (at least two of vertices 1,2,3) and edge {3,4}. Choosing S∗={1,3} costs w1+w3=2+4=6, whereas {2,3} costs 7 and {1,2,4} costs 7, so OPT=6.
Fractional primal candidate: Setting x∗=(21,21,21,21) satisfies xu∗+xv∗=1 on every edge and achieves fractional cost w⊤x∗=21(2+3+4+2)=5.5.
Dual edge-packing certificate: How do we prove that no fractional vector x≥0 can beat 5.5? Put a non-negative edge budget ye on each edge without exceeding any vertex’s weight: y∗=(y12∗,y13∗,y23∗,y34∗)=(1.5,0.5,1.5,2). Check each vertex’s budget: vertex 1 receives 1.5+0.5=2=w1; vertex 2 receives 1.5+1.5=3=w2; vertex 3 receives 0.5+1.5+2=4=w3; vertex 4 receives 2=w4. All four dual constraints hold with equality! Their sum is ∑e∈Eye∗=1.5+0.5+1.5+2=5.5=w⊤x∗, so by Weak Duality, (x∗,y∗) is certified globally optimal—and notice that the LP optimum 5.5 sits strictly below the integral optimum 6.
Paw graph of Example 2: integral optimum S∗={1,3} (green) has weight 6, while dual edge bounties y∗=(1.5,0.5,1.5,2) sum to 5.5=OPTLP.
1.4 Dual prices as algorithmic certificates: Dual Fitting on Greedy Set Cover
In Example 2 we could inspect y∗ because the graph had four vertices. On a graph or set system with a million elements, we want a fast combinatorial algorithm—say, a simple greedy algorithm—whose output cost ALG is provably within a factor α of the unknown optimum OPT.
How can you ever prove ALG≤α⋅OPT when computing OPT itself is NP-hard?
Duality gives a remarkably clean answer: do not compare ALG to the unknown optimal primal solution directly—build a feasible dual solution y instead! Because any feasible dual satisfies Dual(y)≤OPTLP≤OPT by Weak Duality, exhibiting one dual-feasible vector y with ALG≤α⋅Dual(y) immediately certifies ALG≤α⋅OPT without ever solving a linear program!
To see this idea in action, let us formulate Weighted Set Cover cleanly from scratch.
Definition 3 (Weighted Set Cover and its LP/Dual pair) An instance of Weighted Set Cover consists of a finite ground universe U of m elements, a collection S⊆2U of subsets covering U (⋃S∈SS=U), and a nonnegative cost cS≥0 for each set S∈S. Write k:=maxS∈S∣S∣ for the maximum set size. The objective is to select a subcollection C⊆S such that ⋃S∈CS=U minimizing total cost ∑S∈CcS.
Replacing xS∈{0,1} by xS≥0 yields the covering LP and, by the exact four-step Lagrangian recipe of §1.3, its dual: (SC-LP)x≥0mins.t.S∈S∑cSxSS∈S:e∈S∑xS≥1∀e∈U,(SC-D)y≥0maxs.t.e∈U∑yee∈S∑ye≤cS∀S∈S.
The bounty-pricing story
Look at the dual (SC-D) through economic eyes:
Each element e∈U posts a bountyye≥0 for being covered.
Each dual constraint ∑e∈Sye≤cS is a no-arbitrage (budget) rule: the total bounty inside any available set S∈S may not exceed the sticker price cS of buying S.
Why does Weak Duality hold economically? Because any valid cover C∗⊆S (in particular, the unknown OPT) covers every element at least once, so under any no-arbitrage bounties y, e∈U∑ye≤S∈C∗∑e∈S∑ye≤S∈C∗∑cS=OPT (and likewise ∑e∈Uye≤OPTLP).
Now consider the simplest possible algorithm for Weighted Set Cover—Greedy Set Cover—which repeatedly purchases whichever set S∈S currently offers the lowest price per uncovered element, paying cS/∣S∩R∣ per newly covered element (where R⊆U denotes the still-uncovered elements). How do we relate Greedy’s bill to a valid bounty vector y?
Bill splitting (amortize Greedy’s cost onto elements): Whenever Greedy buys a set S and newly covers S∩R, record the unit price it actually paid for each newly covered element e∈S∩R as a raw bountyαe:=∣S∩R∣cS. By construction, Greedy’s total cost equals ∑e∈Uαe!
Audit the overcharge: Does α obey the no-arbitrage constraint ∑e∈Tαe≤cT for every set T? Usually no—later elements of T might have been bought at high prices after T’s other elements were already gone. But how badly can α overcharge T? If T still had r−i+1 uncovered elements when its i-th element ei was covered, Greedy could have picked T instead of paying αei, so αei≤r−i+1cT! Summing over T caps the overcharge factor at Hr=1+21+⋯+r1≤Hk.
Dual fitting (shrink to feasibility): Dividing every raw bounty by Hk—setting ye:=αe/Hk—forces ∑e∈Tye≤cT for every T∈S, fitting y inside the dual polytope (SC-D) and instantly proving ALG=Hk∑eye≤Hk⋅OPTLP≤Hk⋅OPT!
Theorem 3 (Greedy Set Cover achieves an Hk-approximation via dual fitting) Let Hr:=∑i=1ri1 denote the r-th harmonic number (Hk≤lnk+1). Repeatedly selecting a set S∈S that minimizes the cost per uncovered element ∣S∩R∣cS (with R the current uncovered set) produces a set cover C satisfying S∈C∑cS≤Hk⋅OPTLP≤Hk⋅OPT. In particular, the integrality gap OPT/OPTLP of (SC-LP) is at most Hk.
Proof. Suppose Greedy chooses sets S1,S2,…,St in order, and let Rj−1 be the set of uncovered elements right before step j (R0=U, Rt=∅). Set Nj:=Sj∩Rj−1=∅ to be the elements newly covered at step j. Since N1,…,Nt partition U, define the raw cost share of each element e∈Nj by αe:=∣Nj∣cSj≥0. By construction, the total cost paid by Greedy satisfies j=1∑tcSj=j=1∑te∈Nj∑∣Nj∣cSj=e∈U∑αe. Now fix any set T∈S of size r=∣T∣ (if r=0, then ∑e∈Tαe=0≤cT). List the elements of T as e1,e2,…,er in the order in which Greedy covers them (breaking ties among elements covered in the same step arbitrarily). Suppose ei is covered at step j (so ei∈Nj). Just before step j, none of ei,ei+1,…,er has been covered yet, so ∣T∩Rj−1∣≥r−i+1. Because Greedy chose Sj minimizing ∣S∩Rj−1∣cS over all S∈S, comparing Sj against the candidate T gives αei=∣Sj∩Rj−1∣cSj≤∣T∩Rj−1∣cT≤r−i+1cT. Summing over i=1,…,r yields the overcharge bound e∈T∑αe=i=1∑rαei≤cTi=1∑rr−i+11=HrcT≤HkcT. Therefore the scaled vector ye:=αe/Hk≥0 satisfies ∑e∈Tye≤cT for everyT∈S, making y dual-feasible for (SC-D). Weak Duality (Theorem 1) finishes the proof: j=1∑tcSj=e∈U∑αe=Hke∈U∑ye≤Hk⋅OPTLP≤Hk⋅OPT.
Observe the elegance of dual fitting: the algorithm itself is pure combinatorics and never solves (SC-LP) or (SC-D), yet we obtained a certificate against OPTLP (and hence OPT) by pricing the greedy execution and rescaling by the worst-case overcharge Hk. Let us watch the scaling work on a concrete 6-element example.
Example 3 (Watching raw bounties overcharge and dual fitting rescale them (k=3)) Let U={a1,a2,a3,b1,b2,b3} with k=3, and offer five sets: two horizontal triples Ta={a1,a2,a3} and Tb={b1,b2,b3} of cost 1 each (so OPT=2 by buying Ta,Tb), plus three vertical pairs S1={a1,b1} (cS1=0.6), S2={a2,b2} (cS2=0.9), and S3={a3,b3} (cS3=1.8).
Step 1 (R0=U): Unit prices are 0.30 for S1, 0.45 for S2, 0.90 for S3, and 1/3≈0.333 for Ta,Tb. Greedy picks S1, assigning αa1=αb1=0.30.
Step 2 (R1={a2,a3,b2,b3}): Now Ta,Tb contain 2 uncovered elements each (unit price 1/2=0.50), while S2 costs 0.9/2=0.45 and S3 costs 0.90. Greedy picks S2, assigning αa2=αb2=0.45.
Step 3 (R2={a3,b3}): Now Ta,Tb have unit price 1/1=1.00, beaten by S3 at 1.8/2=0.90. Greedy picks S3, assigning αa3=αb3=0.90, for a total bill of 0.6+0.9+1.8=3.3=1.65OPT.
Notice that raw bounties overchargeTa and Tb: αa1+αa2+αa3=0.30+0.45+0.90=1.65>1=cTa. Scaling by H3=1+21+31=611 yields (ya1,ya2,ya3)=(yb1,yb2,yb3)=(559,11027,5527), which drops the total bounty inside Ta (and Tb) down to 559+11027+5527=0.90≤1 (while each Si stays strictly under cSi). Thus y is dual-feasible with ∑e∈Uye=1.80≤2=OPT, certifying ALG=3.3=H3⋅1.80≤H3⋅OPT.
In Example 3, raw greedy shares (0.30,0.45,0.90) sum to 1.65 inside Ta and Tb; dividing by H3=11/6 restores ∑e∈Taye=0.90≤1.
1.5 Staying dual-feasible: the Primal–Dual schema on Weighted Vertex Cover
In dual fitting (§1.4), the greedy algorithm spent money first and worried about dual feasibility afterwards, dividing α by Hk at the end to sneak back under the no-arbitrage cap.
What if we reverse the logic and never cross the no-arbitrage cap in the first place? Starting from the trivial dual y=0, we can gradually raise dual bounties on unsatisfied constraints while strictly enforcing dual feasibility at every instant; whenever a dual constraint becomes tight—meaning the bounties inside an available primal option just match its sticker price—we buy that option into the primal solution!
Notice why this works cleanly: at exact optimality (§1.3), both primal and dual complementary slackness hold with equality (α=β=1). For an αβ-approximation algorithm, we only need relaxed complementary slackness:
Lemma 1 (Relaxed Complementary Slackness) Let x∈R≥0n be primal feasible for (LP-P) and y∈R≥0m be dual feasible for (LP-D). Suppose there exist constants α,β≥1 such that:
Primal α-tightness: If xj>0, then cj≤α(A⊤y)j.
Dual β-packing: If yi>0, then (Ax)i≤βbi.
Then c⊤x≤αβb⊤y≤αβ⋅OPTLP (and in particular, if x is integral, its cost is at most αβ⋅OPT).
Proof. Multiply condition (1) by xj≥0 and sum over j∈[n], swap A to A⊤, and apply condition (2) with yi≥0: c⊤x=j:xj>0∑cjxj≤αj=1∑n(A⊤y)jxj=αi=1∑myi(Ax)i=αi:yi>0∑yi(Ax)i≤αβi=1∑myibi=αβb⊤y. By Weak Duality (Theorem 1), b⊤y≤OPTLP, proving c⊤x≤αβ⋅OPTLP.
Let us deploy this template on Minimum Weighted Vertex Cover: given a graph G=(V,E) with vertex weights wv≥0, pick a subset S⊆V intersecting every edge e∈E to minimize ∑v∈Swv. Note that this is simply Weighted Set Cover where the “elements” are the edges e∈E and each “set” is the star of edges incident to a vertex v∈V, so every edge belongs to at most two sets! From Example 2, the dual (VC-D) asks for edge bounties ye≥0 satisfying ∑e∋vye≤wv at every vertex v∈V.
Here is the Primal–Dual Vertex Cover algorithm:
Initialize ye←0 for all e∈E and S←{v∈V:wv=0} (free zero-weight vertices are bought immediately, automatically satisfying ∑e∋vye=0=wv).
While some edge e={u,v}∈E remains uncovered by S (meaning u∈/S and v∈/S, so both endpoints have strictly positive remaining budget wz−∑e′∋zye′>0):
Raise ye by the maximum amount Δe:=min{wu−e′∋u∑ye′,wv−e′∋v∑ye′}>0 that keeps both endpoints dual-feasible;
Buy into S every endpoint z∈{u,v} whose vertex budget just became tight (∑e′∋zye′=wz).
Return the vertex cover S.
(Equivalently, in the synchronized water-filling variant, we raise ye simultaneously at unit rate on all currently uncovered edges e at once, buying vertices into S and freezing their incident edges whenever their budgets fill up. Every vertex v∈S is still bought only when tight, so the proof below applies word for word to both versions!)
Theorem 4 (Primal–Dual Weighted Vertex Cover is a 2-approximation) In O(∣V∣+∣E∣) time and without solving any linear program, the Primal–Dual algorithm returns a valid vertex cover S⊆V satisfying v∈S∑wv≤2e∈E∑ye≤2⋅OPTLP≤2⋅OPT.
Proof. We check only the two conditions of Lemma 1:
Feasibility & Primal 1-tightness (α=1): Whenever e={u,v} is picked while still uncovered, at least one of u or v hits equality ∑e′∋zye′=wz and enters S, so the loop terminates in at most ∣E∣ iterations with every edge covered. Furthermore, every vertex v∈S satisfies ∑e∋vye=wv (either wv=0 at start or bought when tight), and by construction y≥0 never violates ∑e∋vye≤wv, so y is dual-feasible.
Dual 2-packing (β=2): Because each edge e={u,v} has only two endpoints, it can contribute ye to the weight of at most two vertices in S: ∣e∩S∣≤2.
Summing directly (or invoking Lemma 1 with α=1,β=2) gives v∈S∑wv=v∈S∑e∋v∑ye=e∈E∑∣e∩S∣ye≤2e∈E∑ye≤2⋅OPTLP≤2⋅OPT.
Look closely at why the greedy intuition needs dual prices to avoid a catastrophic trap.
Caution (Why naive cheapest-vertex greedy fails on a star while dual water-filling succeeds).
Why not simply iterate over uncovered edges and greedily buy the cheaper endpoint? On the star graph K1,d (d≥2) whose central hub has weight w0=1+ε (0<ε<1) and whose d leaves each have weight w1=⋯=wd=1, a naive vertex-greedy rule inspects every spoke {0,i}, sees leaf weight 1<1+ε, and buys all d leaves for total cost d—even though OPT=1+ε by buying the hub alone! Sequential edge-by-edge primal–dual already avoids this blowup because raising y01=1 deducts 1 from the hub’s remaining budget, leaving only ε<1 slack on the hub; hence the very next spoke {0,2} saturates the hub at y02=ε and halts with cost 2+ε≤2OPT. Under synchronized dual water-filling, every spoke grows simultaneously at unit rate: at time t=(1+ε)/d<1, all d spokes together saturate the hub first (d⋅t=1+ε), freezing every edge at once and returning the exact optimum 1+ε!
This comparison isolates the exact role of dual slack: naive vertex-greedy ignores how previous edges have already paid down shared vertices and can pay Ω(d)OPT, sequential edge-by-edge primal–dual tracks leftover slack to guarantee ≤2OPT under any edge ordering, and synchronized water-filling eliminates the leaf overshoot on the star completely. Let us trace synchronized water-filling on the paw graph of Example 2.
Example 4 (Tracing Primal–Dual water-filling on the paw graph) Revisit Example 2 with V={1,2,3,4}, E={{1,2},{1,3},{2,3},{3,4}}, and w=(2,3,4,2). Run synchronized Primal–Dual from y=(0,0,0,0):
Phase 1 (all four edges active at rate 1): Vertex 1 has degree 2 and weight w1=2, vertex 2 has degree 2 and weight 3, vertex 3 has degree 3 and weight 4, and vertex 4 has degree 1 and weight 2. Raising all four active edge bounties ye simultaneously at unit rate t, vertex 1 saturates first at t1=2/2=1 (since 2t1=2, while 2t1=2<3, 3t1=3<4, 1t1=1<2). After Phase 1, all four edges stand at y12=y13=y23=y34=1; we add vertex 1 to S and freeze its incident edges {1,2} and {1,3} at 1.
Phase 2 (edges {2,3} and {3,4} remain active): Deducting the Phase 1 growth from each vertex’s budget leaves remaining slack 3−2=1 at vertex 2, 4−3=1 at vertex 3, and 2−1=1 at vertex 4. Raising active y23 and y34 by an additional Δ: vertex 2 saturates at Δ=1, vertex 4 at Δ=1, and vertex 3 (touched by both active edges!) saturates fastest at 2Δ=1⟹Δ=0.5. We add vertex 3 to S and freeze {2,3} and {3,4} at y23=y34=1+0.5=1.5.
All edges are covered, returning S={1,3} (which happens to be the exact integral optimum of cost 6) and dual certificate y=(1,1,1.5,1.5) with ∑eye=5.0, directly verifying w(S)=6≤2⋅5.0=10.
Origins of the Primal–Dual schema. The primal–dual method grew out of Harold Kuhn’s Hungarian algorithm for bipartite matching (1955) and Dantzig, Ford, and Fulkerson’s simplex-inspired primal–dual framework for linear programs (1956). Václav Chvátal (1979) crystallized the dual-fitting analysis of Greedy Set Cover (Hk with general costs), Reuven Bar-Yehuda and Shimon Even (1981) gave the linear-time local-ratio / primal–dual 2-approximation for Weighted Vertex Cover, and Michel Goemans and David Williamson (1995) generalized synchronized “moat-growing” dual ascent to Steiner trees and constrained forest network design.
We have now seen how Dual Fitting and Primal–Dual turn Lagrange multipliers into self-contained approximation proofs—previewing LP Rounding as the third pillar we will build in Chapter 7:
Paradigm
How primal solution & dual certificate relate
Where the α factor comes from
Textbook archetype
LP Rounding(Chapter 7)
Solve LP first to get fractional x∗; round x∗ to integral x^
Rounding inflation E[c⊤x^]≤αc⊤x∗ against OPTLP=Dual∗
Weighted Vertex Cover threshold 1/2; Set Cover random rounding
Dual Fitting(§1.4)
Run greedy first, amortize bill into αe; divide αe/α afterwards to satisfy dual caps
Maximum overcharge factor across all dual constraints (Hk for Set Cover)
Greedy Set Cover (Hk-approx)
Primal–Dual(§1.5)
Keep dual y feasible at all times; buy primal objects only when dual constraints go tight
Dual β-packing multiplicity (β=2 endpoints per edge in Vertex Cover)
1.6 Infinite-dimensional linear duality: Kantorovich optimal transport and why Coupling = Test Functions
So far our primal decision x and dual multiplier y have lived in finite-dimensional Euclidean vectors Rn and Rm. Yet §1.2’s Fenchel perturbation recipe never cared what space X lived in! What happens if we change the stage—making the primal decision an entire joint probability distribution (coupling)γ(x,y) and the dual multipliers potential functionsϕ(x),ψ(y)?
Let us watch the exact same four-step recipe from §1.3 deliver one of the crown jewels of probability and analysis—Kantorovich’s Optimal Transport Duality—and instantaneously resolve our opening mystery linking Chapter 2 and Chapter 5!
Definition 4 (Coupling set and Kantorovich optimal transport cost) Let X and Y be finite state spaces equipped with probability distributions μ∈Δ(X) and ν∈Δ(Y), and let c:X×Y→R be any cost function. A coupling of μ and ν is a joint probability distribution γ∈Δ(X×Y) whose two marginals agree with μ and ν: Π(μ,ν):={γ:X×Y→R≥0y∈Y∑γ(x,y)=μ(x)∀x∈X,x∈X∑γ(x,y)=ν(y)∀y∈Y}. The Kantorovich optimal transport cost between μ and ν under c is Tc(μ,ν):=γ∈Π(μ,ν)minx∈X∑y∈Y∑c(x,y)γ(x,y)=(X,Y)∈Π(μ,ν)minE[c(X,Y)].(On general Polish metric spaces, the sums become integrals infγ∈Π(μ,ν)∫X×Yc(x,y)dγ(x,y) over joint probability measures with marginals μ,ν.)
Theorem 5 (Kantorovich Duality) For any distributions μ∈Δ(X) and ν∈Δ(Y) on finite spaces X,Y and any cost c:X×Y→R, γ∈Π(μ,ν)minx,y∑c(x,y)γ(x,y)=ϕ:X→R,ψ:Y→Rϕ(x)+ψ(y)≤c(x,y)∀x,ymax⎩⎨⎧x∈X∑ϕ(x)μ(x)+y∈Y∑ψ(y)ν(y)⎭⎬⎫=ϕ⊕ψ≤cmax(Eμ[ϕ]+Eν[ψ]), where (ϕ⊕ψ)(x,y):=ϕ(x)+ψ(y). (Economically: if ϕ(x) is a pickup subsidy paid at origin x and ψ(y) is a delivery fee paid at destination y, a carrier facing cost c(x,y) cannot profit from arbitrage iff ϕ(x)+ψ(y)≤c(x,y) everywhere.)
Proof. Look at the constraints in Π(μ,ν): γ(x,y)≥0 lives in the ambient cone R≥0X×Y, subject to two sets of equality constraints—one per origin x∈X and one per destination y∈Y. Because these are equality constraints, §1.2 assigns unconstrained Lagrange multipliers ϕ:X→R and ψ:Y→R: L(γ,ϕ,ψ):=x,y∑c(x,y)γ(x,y)+x∈X∑ϕ(x)(μ(x)−y∈Y∑γ(x,y))+y∈Y∑ψ(y)(ν(y)−x∈X∑γ(x,y)). Regrouping all terms containing γ(x,y)—the infinite-dimensional counterpart of y⊤(Ax)=(A⊤y)⊤x—gives L(γ,ϕ,ψ)=x∈X∑ϕ(x)μ(x)+y∈Y∑ψ(y)ν(y)+x∈X∑y∈Y∑(c(x,y)−ϕ(x)−ψ(y))γ(x,y). Now minimize over γ≥0 coordinate by coordinate (on every pair (x,y)∈X×Y): if c(x0,y0)−ϕ(x0)−ψ(y0)<0 at even a single pair (x0,y0), sending γ(x0,y0)→+∞ drives infγ≥0L(γ,ϕ,ψ)=−∞. Conversely, if ϕ(x)+ψ(y)≤c(x,y) for all (x,y), setting γ=0 attains the minimum of the last sum, leaving Eμ[ϕ]+Eν[ψ].
Finally, Π(μ,ν) is nonempty (it always contains the product coupling γ=μ⊗ν) and bounded (γ(x,y)≤1), while (ϕ,ψ)=(−∥c∥∞/2,−∥c∥∞/2) is dual-feasible. Hence by Strong LP Duality (Theorem 2), the finite primal minimum equals the finite dual maximum!
From Napoleon’s earthworks to Soviet freight planning. In 1781, Gaspard Monge asked for the cheapest way to move soil from an excavation to an embankment via a deterministic map T(x). Because Monge’s constraint T#μ=ν is nonlinear and can even be empty, the problem stayed largely open for 160 years until Leonid Kantorovich (1942) relaxed deterministic maps T to joint couplingsγ∈Π(μ,ν), converting optimal transport into a linear program with shadow prices (ϕ,ψ)—work that earned Kantorovich the 1975 Nobel Prize in Economics.
Closing the loop between Chapter 2 and Chapter 5
Now evaluate Theorem 5 at the simplest nontrivial cost function on a common space X=Y=Ω: the discrete indicator metric c(x,y):=1{x=y}. Look at the left-hand side of Theorem 5: it is min(X,Y)∈Π(μ,ν)P[X=Y], the Coupling Lemma from Chapter 2. Now look at the right-hand side: what does ϕ(x)+ψ(y)≤1{x=y} force? It collapses Kantorovich’s dual directly to Chapter 5’s bounded test-function formula for total variation distance (§1.4)!
Corollary 1 (Unification of Coupling Lemma (Chapter 2) and Test-Function dTV (Chapter 5)) For any distributions μ,ν∈Δ(Ω) on a finite space Ω and cost c(x,y)=1{x=y}, (X,Y)∈Π(μ,ν)minP[X=Y]=T1{x=y}(μ,ν)=dTV(μ,ν)=Z:Ω→[0,1]sup(Eμ[Z]−Eν[Z]).
Proof. By Theorem 5, it suffices to prove that ϕ⊕ψ≤1{x=y}max(Eμ[ϕ]+Eν[ψ])=Z:Ω→[0,1]sup(Eμ[Z]−Eν[Z]).
(≥ direction): Given any bounded test function Z:Ω→[0,1], set ϕ(x):=Z(x) and ψ(y):=−Z(y). Since Z(x)−Z(y)=0 when x=y and Z(x)−Z(y)≤1−0=1 when x=y, we have ϕ(x)+ψ(y)=Z(x)−Z(y)≤1{x=y} for all x,y∈Ω, with objective Eμ[Z]−Eν[Z].
(≤ direction): Take any dual-feasible pair (ϕ,ψ) with ϕ(x)+ψ(y)≤1{x=y}. Set M:=maxx∈Ωϕ(x) and pick x∗∈Ω attaining ϕ(x∗)=M. Define the shifted pair ϕ~(x):=ϕ(x)−M+1 and ψ~(y):=ψ(y)+M−1. Because ∑xμ(x)=∑yν(y)=1, the shift preserves the objective Eμ[ϕ~]+Eν[ψ~]=Eμ[ϕ]+Eν[ψ] and preserves feasibility ϕ~(x)+ψ~(y)≤1{x=y}.
Now define Z(x):=max{ϕ~(x),0}. Since ϕ~(x)≤1 everywhere (as M shifted to 1), we have Z(x)∈[0,1] and ϕ~(x)≤Z(x). Meanwhile, for every y∈Ω:
Taking x=y in ϕ~(x)+ψ~(y)≤1{x=y} gives ϕ~(y)+ψ~(y)≤0, so ψ~(y)≤−ϕ~(y);
Taking x=x∗ (where ϕ~(x∗)=1) gives 1+ψ~(y)≤1{x∗=y}≤1, so ψ~(y)≤0.
Combining both inequalities yields ψ~(y)≤min{−ϕ~(y),0}=−max{ϕ~(y),0}=−Z(y). Hence Eμ[ϕ]+Eν[ψ]=Eμ[ϕ~]+Eν[ψ~]≤Eμ[Z]−Eν[Z].
Finally, in Chapter 5 (§1.4) we verified that supZ:Ω→[0,1](Eμ[Z]−Eν[Z])=dTV(μ,ν), attained by Z∗=1{μ≥ν}. (Even more: complementary slackness γ∗(x,y)(1{x=y}−Z∗(x)+Z∗(y))=0 against Z∗=1{μ≥ν} immediately forces any optimal coupling γ∗ to keep all shared mass on the diagonal (x,x) and transport mass only from {μ>ν} to {μ<ν}!)
1.7 Turning curvature back on: the Pointwise Trick, the Gibbs Variational Principle, and the course-wide duality map
Sections 1.3–1.6 lived in the zero-curvature limit of §1.1: linear programs and Kantorovich couplings had flat objectives and flat {0,+∞} barriers. Now let us close the ring back to §1.1 by turning strict convex curvature back on—and feeding §1.2’s Lagrange multipliers into the Fenchel conjugate of negative Shannon entropy over a finite state space Ω: Φ(q):=⎩⎨⎧−H(q)=x∈Ω∑q(x)lnq(x),+∞,if q∈Δ(Ω)(q≥0,∑x∈Ωq(x)=1),otherwise. Because Δ(Ω) is compact and convex and t↦tlnt is strictly convex and continuous on [0,1], Φ is proper, convex, and lower semicontinuous. Given any potential (negative energy) covector ϕ∈RΩ, we want to evaluate Φ∗(ϕ)=maxq∈Δ(Ω){⟨q,ϕ⟩+H(q)}.
Why does this finite- or infinite-dimensional optimization yield a closed-form answer in five lines? Because once we enforce the normalization constraint ∑xq(x)=1 using a single scalar Lagrange multiplier λ∈R from §1.2, the coordinates q(x) decouple completely and can be optimized pointwise (one x∈Ω at a time)!
Theorem 6 (The Gibbs Variational Principle) Let Ω be a finite state space, let ϕ:Ω→R be any potential function, and define the partition functionZ(ϕ):=∑x∈Ωeϕ(x) and the Gibbs distributionpϕ(x):=Z(ϕ)eϕ(x)∈Δ(Ω). Then the log-partition function lnZ(ϕ) and negative entropy Φ(q)=−H(q) are Fenchel conjugates of each other:
Exact KL gap identity: For every q∈Δ(Ω), lnZ(ϕ)−(EX∼q[ϕ(X)]+H(q))=KL(q∥pϕ)≥0, with equality if and only if q=pϕ.
Proof. First discover the maximizer using the pointwise Lagrange multiplier trick from §1.2. Impose the single scalar equality constraint ∑x∈Ωq(x)=1 with unconstrained multiplier λ∈R: L(q,λ):=x∈Ω∑q(x)ϕ(x)−x∈Ω∑q(x)lnq(x)−λ(x∈Ω∑q(x)−1)=λ+x∈Ω∑(q(x)ϕ(x)−q(x)lnq(x)−λq(x)). For fixed λ, the sum separates across each x∈Ω! Differentiating the scalar function z↦zϕ(x)−zlnz−λz (z>0) gives the first-order condition ϕ(x)−lnq(x)−1−λ=0⟹q∗(x)=eϕ(x)−1−λ. Enforcing the outer constraint ∑x∈Ωq∗(x)=1 determines λ: 1=x∈Ω∑eϕ(x)−1−λ=e−1−λZ(ϕ)⟹λ=lnZ(ϕ)−1⟹q∗(x)=Z(ϕ)eϕ(x)=pϕ(x).
Now check that pϕ is globally optimal over the entire closed simplex Δ(Ω)—including boundary distributions where some q(x)=0—by substituting ϕ(x)=lnpϕ(x)+lnZ(ϕ) directly into Eq[ϕ]+H(q): EX∼q[ϕ(X)]+H(q)=x∈Ω∑q(x)ln(pϕ(x)Z(ϕ))−x∈Ω∑q(x)lnq(x)=lnZ(ϕ)x∈Ω∑q(x)−x∈Ω∑q(x)lnpϕ(x)q(x)=lnZ(ϕ)−KL(q∥pϕ). Since KL(q∥pϕ)≥0 with equality iff q=pϕ, this proves both (1) and the first identity Φ∗(ϕ)=lnZ(ϕ) in (2). Applying the Biconjugate Theorem (Proposition 1 (3) from §1.1) to the convex continuous function Φ immediately yields Φ(q)=Φ∗∗(q)=supϕ∈RΩ{⟨q,ϕ⟩−lnZ(ϕ)}.
Step back and look across all six chapters of our course through the single mirror of Definition 1:
Domain
Primal V
Dual V∗
Conjugate (f↔f∗)
Outcome
Lagrangian & LP(§§1.2–1.5)
Perturbation (u,v)
Slopes (−λ,−μ)
p(u,v)↔−q(λ,μ)
d∗=p∗∗(0,0); LP & bounty bounds
Stat. physics(Gibbs, 1902)
Distribution q∈Δ(Ω)
Potential ϕ∈RΩ
−H(q)↔lnZ(ϕ)
Gibbs pϕ∝eϕ
Online Learning(Ch 4 §1.9)
Simplex Δn
Loss −ηLt−1
−H(q)↔ln∑ieyi
Hedge / EXP3 mirror map ∇Φ∗
Concentration(Ch 1 & §2.4)
Threshold a
Tilt λ
Rate Λ∗(a)↔lnE[eλX]
Chernoff bound e−nΛ∗(a)
Markov Entropy(Ch 3 & §2.4)
Normalized Z≥0, E[Z]=1
Test function X
Ent(Z)↔lnE[eX]
DV rescaling → tensorization
Prob. Coupling(Ch 2, Ch 5, §1.6)
Couplings γ∈Π(μ,ν)
Potentials (ϕ,ψ)
Linear T1x=y(μ,ν)
Coupling Lemma ≡dTV
Look closely at one more bridge hiding inside Theorem 6: we just used §1.1’s Fenchel conjugate to prove the Gibbs Variational Principle at unit temperature, yet the arrow also runs in reverse! On any nonempty finite subset Ω⊂Rn (identifying f:Ω→R with f(x)=+∞ outside Ω), introduce a temperature parameter ε>0 and evaluate Theorem 6 at the scaled potential ϕy,ε(x):=(⟨y,x⟩−f(x))/ε: fε∗(y):=εlnx∈Ω∑e(⟨y,x⟩−f(x))/ε=q∈Δ(Ω)max{x∈Ω∑q(x)(⟨y,x⟩−f(x))+εH(q)}. Because Shannon entropy satisfies 0≤H(q)≤ln∣Ω∣ on Δ(Ω) and the linear term is bounded above by f∗(y)=maxx∈Ω{⟨y,x⟩−f(x)} (achieved at point masses), every finite-temperature Gibbs conjugate is sandwiched between f∗(y) and f∗(y)+εln∣Ω∣. Sending ε↓0 concentrates pϕy,ε onto argmaxx∈Ω{⟨y,x⟩−f(x)} and recovers §1.1’s Fenchel hard-max directly from the ℓ1/ε→ℓ∞ norm limit of softmax free energy. Why does that same limit also trace back one rung further to Fourier transforms in Hilbert space—and turn convolution into infimal convolution? Reading §2.5 develops the full three-rung genealogy.
One more major actor waits in the wings. Looking ahead to Chapter 7 next week: when even linear relaxations of combinatorial problems (like Max-Cut) get stuck at a large integrality gap, we will lift decision variables from vectors x∈Rn to positive semidefinite matricesX∈S+n. What sits on the dual side of the positive semidefinite cone S+n? The exact same Fenchel perturbation duality pattern! (See Further Topics §3.2 for an appetizer before Chapter 7.)
II. Reading Contents
The sections below supply self-contained proofs and geometric depth for every part of our classroom narrative: why evaluation pairings ⟨y,x⟩ differ from inner products, together with Fenchel–Rockafellar composite duality and Slater’s continuity condition (§2.1); the complete separating-hyperplane and Farkas proof of Strong LP Duality (§2.2); metric d-transforms and the Kantorovich–Rubinstein W1 theorem (§2.3); the Donsker–Varadhan variational proof underlying Chapter 3’s entropy tensorization alongside Cramér’s large-deviation conjugate (§2.4); and why Fenchel conjugation is the zero-temperature limit of Wick-rotated Fourier characters, turning convolution into infimal convolution (§2.5).
2.1 Paired spaces, Fenchel–Rockafellar composite duality, and Slater’s condition
Notice how often in §1.1 and §§1.6–1.7 we wrote ⟨y,x⟩ for y⊤x in Rn, ∑xq(x)ϕ(x) on Δ(Ω)×RΩ, or E[ZX] between density ratios and test functions. A common source of confusion in optimization and probability is treating ⟨y,x⟩ as an inner product on a single space. It is cleaner—and geometrically sharper—to distinguish an evaluation pairing from an inner product:
An inner product⟨x,x′⟩V takes two vectors from the same space V×V and measures length and angle; it requires choosing a metric (for example, x⊤x′ vs. x⊤Σ−1x′).
An evaluation pairing⟨y,x⟩:=y(x) acts on two different spacesV∗×V→R, where V∗ is the dual space of continuous linear functionals (probes/covectors) on V. In a Hilbert space (V=Rn), Riesz representation identifies V≅V∗ and hides the distinction; in (L1,L∞) or between probability measures M(Ω) and bounded functions Cb(Ω), primal objects and dual probes are visibly different species!
Geometrically—recalling the base-space topographic contour figure in §1.1 without picking any inner product—visualize a primal vector x∈V as an arrow representing a state or displacement, and visualize a dual covector y∈V∗ as a stack of parallel, equally spaced level hyperplanes {x∈V:y(x)=c} (c∈R). Evaluating ⟨y,x⟩=y(x) simply counts how many hyperplane layers the arrow x pierces, regardless of orthogonality! That is why the exact same picture transports intact from Euclidean space to non-Hilbert pairs such as (L1,L∞) and (M(Ω),Cb(Ω)), and clarifies Chapter 4’s Online Mirror Descent: ∇f(xt) is a covector (an affine slope on Δn), so gradient accumulation happens in V∗, while ∇Φ∗ maps covector stacks back into primal state arrows xt+1∈V.
In §1.2 we applied Fenchel conjugation to explicit inequality and equality constraints via p(u,v). More generally, almost every convex problem in TCS and statistics can be written in composite forminfx∈Rn{f(x)+g(Ax)}—putting constraints, regularizers, and linear transformations inside extended-real functions f,g. Sliding a horizontal perturbation v∈Rm into g(Ax−v) produces Fenchel–Rockafellar Duality, which swallows both constrained LPs and unconstrained convex sums at once.
Theorem 7 (Fenchel–Rockafellar composite duality) Let f:Rn→R∪{+∞} and g:Rm→R∪{+∞} be proper functions, and let A∈Rm×n.
Weak composite duality (no convexity required):y∈Rmsup{−f∗(A⊤y)−g∗(−y)}≤x∈Rninf{f(x)+g(Ax)}.
Strong composite duality: If f and g are both convex and there exists x~∈dom(f) such that Ax~∈int(dom(g)), then equality holds: x∈Rninf{f(x)+g(Ax)}=y∈Rmsup{−f∗(A⊤y)−g∗(−y)}.
Proof. For (1), take any x∈Rn and y∈Rm. Because f and g are proper, f∗(A⊤y)>−∞ and g∗(−y)>−∞, so −f∗(A⊤y)−g∗(−y)<+∞ is always well defined. Whenever f(x)<+∞, g(Ax)<+∞, f∗(A⊤y)<+∞, and g∗(−y)<+∞, adding Young–Fenchel (Proposition 1 (2)) for (f,f∗) at (x,A⊤y) and (g,g∗) at (Ax,−y) yields f(x)+f∗(A⊤y)+g(Ax)+g∗(−y)≥⟨A⊤y,x⟩+⟨−y,Ax⟩=0, so −f∗(A⊤y)−g∗(−y)≤f(x)+g(Ax) (which also holds trivially if any of the four quantities equals +∞). Taking supy and infx proves (1).
For (2), define the composite perturbation function p:Rm→[−∞,+∞] by p(v):=infx∈Rn{f(x)+g(Ax−v)}, so p(0)=infx{f(x)+g(Ax)}. Setting z:=Ax−v for each fixed x∈dom(f) factorizes the Fenchel conjugate of p: p∗(y)=x∈dom(f),v∈Rmsup{⟨y,Ax⟩−f(x)+⟨−y,Ax−v⟩−g(Ax−v)}=x∈dom(f)sup{⟨A⊤y,x⟩−f(x)}+z∈Rmsup{⟨−y,z⟩−g(z)}=f∗(A⊤y)+g∗(−y). Hence the dual supremum is supy∈Rm{−p∗(y)}=p∗∗(0). If p(0)=−∞, weak duality already forces p∗∗(0)=−∞. Otherwise p(0)∈R (since p(0)≤f(x~)+g(Ax~)<+∞). Because Ax~∈int(dom(g)), pick r>0 small enough that Ax~+srej∈dom(g) for all j∈[m] and s∈{±1}. Writing every v with ∥v∥1≤r as a convex combination Ax~−v=(1−∑j∣vj∣/r)Ax~+∑j(∣vj∣/r)(Ax~−sgn(vj)rej) shows by convexity of g that p(v)≤f(x~)+g(Ax~−v)≤f(x~)+max{g(Ax~),j∈[m],s=±1maxg(Ax~+srej)}=:M<+∞ on the cube {v∈Rm:∥v∥∞≤r/m}. The convexity and local-boundedness lemma in the folded proof below then proves that p is convex, proper, and continuous at 0, forcing p∗∗(0)=p(0) and establishing (2)!
As an instant check, observe how Theorem 7 recovers §1.3’s covering/packing LP pair directly from the indicator conjugates of Example 1: taking f(x):=c⊤x+δR≥0n(x) and g(z):=δ{z≥b}(z) gives f∗(s)=δ{s:s≤c}(s), so f∗(A⊤y)=δ{s:s≤c}(A⊤y), and g∗(−y)=sups≥0{−y⊤(b+s)}=−b⊤y+δR≥0m(y), turning supy{−f∗(A⊤y)−g∗(−y)} verbatim into maxy≥0{b⊤y:A⊤y≤c}!
Why Slater’s condition forces strong duality
Why does Slater’s condition for §1.2’s convex program (P) (existence of a feasible point x~∈relint(X) satisfying gi(x~)<0 for all non-affine inequality constraints and hj(x~)=0) guarantee p(0,0)=p∗∗(0,0) whenever p∗>−∞? The folded verification below gives the complete self-contained argument for the strict-inequality case—showing why local upper boundedness alone prevents both −∞ blowups and upward jump discontinuities at 0.
Verification: convexity, local boundedness implying continuity at 0, and the strict-inequality (k=0) Slater mechanism
Convexity of p(u,v) for convex programs and composite problems: Suppose X⊆Rd is convex, f,g1,…,gm are convex on X, and h(x)=Cx−d is affine. Take (u1,v1),(u2,v2)∈dom(p) and θ∈(0,1). For any near-optimal feasible choices x1,x2∈X (g(xr)≤ur, h(xr)=vr), convexity gives xθ:=(1−θ)x1+θx2∈X with g(xθ)≤(1−θ)u1+θu2 and h(xθ)=(1−θ)v1+θv2, so p((1−θ)(u1,v1)+θ(u2,v2))≤f(xθ)≤(1−θ)f(x1)+θf(x2). Taking the infimum over admissible (x1,x2) proves that p is convex. (The identical midpoint estimate applied to f(x)+g(Ax−v) proves convexity of the composite perturbation function p(v) in Theorem 7.)
Continuity and zero gap at 0 from a local upper bound: Let p:Rm→[−∞,+∞] be any convex function (meaning epi(p) is convex) such that p(0)∈R and p(u)≤M<+∞ whenever ∥u∥∞≤δ for some δ>0.
Never takes −∞: If (w,t)∈epi(p) with w=0, setting u′:=−∥w∥∞δw (∥u′∥∞=δ, so p(u′)≤M) and θ:=∥w∥∞+δδ∈(0,1) yields θw+(1−θ)u′=0, whence p(0)≤θt+(1−θ)M⟹t≥p(0)−θ1−θ(M−p(0))>−∞; thus p is proper.
Lipschitz continuous at 0: Take any u with 0<∥u∥∞≤δ, set α:=∥u∥∞/δ∈(0,1] and w′′:=∥u∥∞δu (∥w′′∥∞=δ). Convexity on u=(1−α)0+αw′′ gives p(u)−p(0)≤α(M−p(0)); convexity on 0=1+α1u+1+αα(−w′′) gives (1+α)p(0)≤p(u)+αM⟹p(0)−p(u)≤α(M−p(0)). Combining both yields ∣p(u)−p(0)∣≤δM−p(0)∥u∥∞for all ∥u∥∞≤δ.
Separating hyperplanes force p∗∗(0)=p(0): Given any t0<p(0), continuity of p at 0 keeps an open box around (0,t0) disjoint from epi(p), so (0,t0)∈/epi(p). Applying strict Euclidean hyperplane separation (§2.2) to (0,t0) and the closed convex set epi(p) produces (v,α)∈Rm×R and ε>0 with αt0+ε≤⟨v,u⟩+αt for all (u,t)∈epi(p). Testing (u,t)=(0,p(0)) rules out α=0, and sending t→+∞ rules out α<0. Thus α>0, and y:=−v/α gives p∗(y)≤−t0−ε/α, hence p∗∗(0)≥−p∗(y)≥t0. Sending t0↑p(0) proves p∗∗(0)=p(0).
The strict-inequality (k=0) Slater mechanism: When k=0, X=Rd, and Slater’s point x~ satisfies gi(x~)<−δ<0 for all i∈[m], every u∈Rm with ∥u∥∞≤δ leaves x~ feasible (gi(x~)≤−δ≤ui), so p(u)≤f(x~)=:M on ∥u∥∞≤δ. Applying part (2) proves p(0)=p∗∗(0) whenever p(0)>−∞ (and when p(0)=−∞, d∗≤p∗=−∞ already holds). When affine equalities Cx=d or affine inequalities ai⊤x≤bi are also present, a relative-interior separation argument on the perturbation domain establishes the refined Slater theorem; see Boyd and Vandenberghe (Convex Optimization, §5.2.3).
2.2 Separating hyperplanes, Farkas’ lemma, and Strong LP Duality
Now let us supply the promised self-contained proof of Strong LP Duality (Theorem 2 from §1.3). We build it directly from three finite-dimensional geometric pillars: (i) every finitely generated cone is closed, (ii) Euclidean closest-point projection separates any external point from a closed convex cone (Farkas’ Lemma), and (iii) applying Farkas’ Lemma to a primal–dual stack closes the gap.
Given a matrix A∈Rm×n with columns a1,…,an∈Rm, denote the finitely generated cone spanned by its columns by C(A):={Ax:x∈R≥0n}={j=1∑nxjaj:xj≥0}⊆Rm.
Lemma 2 (Finitely generated cones are closed and convex) For every matrix A∈Rm×n, the cone C(A)={Ax:x∈R≥0n} is a closed, convex subset of Rm.
Convexity is immediate: if z1=Ax1 and z2=Ax2 with x1,x2≥0 and θ∈[0,1], then (1−θ)z1+θz2=A((1−θ)x1+θx2)∈C(A).
For closedness, first verify the conic Carathéodory property: every z=Ax∈C(A) can be written as z=∑j∈Jx~jaj with x~j>0 over a linearly independent subset of columns {aj:j∈J} (hence ∣J∣≤m). Indeed, choose x≥0 solving Ax=z with the smallest number of strictly positive coordinates J={j:xj>0}. If {aj:j∈J} were linearly dependent, some nontrivial vector v supported on J would satisfy Av=0. Rescaling v so that at least one entry satisfies vj<0 and picking t:=minj∈J,vj<0(−xj/vj)>0, the point x′:=x+tv≥0 satisfies Ax′=Ax=z and eliminates at least one positive coordinate, contradicting minimality!
Now let {z(r)}r=1∞⊆C(A) converge to w∈Rm. Write each z(r)=AJxJ(r) using a linearly independent column subset Jr⊆[n] and x(r)∈R>0∣Jr∣. Since there are only finitely many subsets J⊆[n], by the pigeonhole principle some fixed independent subset J appears infinitely often; pass to that subsequence. Because the matrix AJ∈Rm×∣J∣ has full column rank, AJ⊤AJ is invertible and xJ(r)=(AJ⊤AJ)−1AJ⊤z(r) converges to xˉJ:=(AJ⊤AJ)−1AJ⊤w≥0. By continuity of matrix multiplication, w=limr→∞AJxJ(r)=AJxˉJ∈C(A).
Theorem 8 (Farkas’ Lemma (equality form)) Let A∈Rm×n and b∈Rm. Then exactly one of the following two alternatives holds:
There exists x∈R≥0n such that Ax=b.
There exists y∈Rm such that A⊤y≥0 and b⊤y<0.
Proof. First check mutual exclusion: if both x≥0 with Ax=b and y with A⊤y≥0 existed, then b⊤y=(Ax)⊤y=x⊤(A⊤y)≥0, contradicting b⊤y<0.
Now suppose (1) fails, i.e., b∈/C(A). By Lemma 2, C(A) is nonempty (it contains 0), closed, and convex. Pick any radius R>∥b∥2 large enough that C(A)∩B(b,R) is nonempty and compact, so the continuous function z↦∥z−b∥22 attains its global minimum on C(A) at a unique closest point p∈C(A). Set y:=p−b=0(since b∈/C(A)). For any z∈C(A) and any t∈(0,1], convexity gives p+t(z−p)=(1−t)p+tz∈C(A), so optimality of p requires ∥p−b∥22≤∥p−b+t(z−p)∥22=∥p−b∥22+2ty⊤(z−p)+t2∥z−p∥22. Dividing by 2t>0 and letting t↓0 yields the variational inequality y⊤(z−p)≥0for all z∈C(A). Since C(A) is a cone, testing z=0∈C(A) gives y⊤p≤0 and testing z=2p∈C(A) gives y⊤p≥0, forcing y⊤p=0. Hence y⊤z≥0 for every z∈C(A). Plugging in each column z=Aej (j∈[n]) yields (A⊤y)j≥0, i.e., A⊤y≥0. Finally, b⊤y=(p−y)⊤y=p⊤y−∥y∥22=−∥y∥22<0, establishing alternative (2). (Notice that this exact same closest-point projection argument proves the strict hyperplane separation theorem used in the folded proofs of Proposition 1 in §1.1 and Slater’s mechanism in §2.1 when b is separated from any closed convex set K.)
Translating the equality form Ax=b to the inequality form Ax≥b is immediate by adding nonnegative slack variables s∈R≥0m.
Corollary 2 (Farkas’ Lemma (inequality form)) Let A∈Rm×n and b∈Rm. Then exactly one of the following two alternatives holds:
There exists x∈R≥0n such that Ax≥b.
There exists y∈R≥0m such that A⊤y≤0 and b⊤y>0.
Proof. Condition (1) holds iff there exist x∈R≥0n and s∈R≥0m satisfying A~(sx)=b where A~:=[A−Im]. By Theorem 8 applied to A~, this fails iff there exists y~∈Rm such that A~⊤y~=(−y~A⊤y~)≥0 and b⊤y~<0. Defining y:=−y~∈R≥0m converts those conditions into A⊤y≤0 and b⊤y>0.
We can now prove every part of Strong LP Duality (Theorem 2) in one clean sweep.
Theorem 9 (Proof of Strong LP Duality (Theorem 2)) Let A∈Rm×n, b∈Rm, c∈Rn, and consider (LP-P) and (LP-D).
If both (LP-P) and (LP-D) are feasible, then there exist x∗∈R≥0n and y∗∈R≥0m satisfying Ax∗≥b, A⊤y∗≤c, and c⊤x∗=b⊤y∗.
If (LP-P) is feasible and (LP-D) is infeasible, then (LP-P) is unbounded below (p∗=−∞). Symmetrically, if (LP-D) is feasible and (LP-P) is infeasible, then (LP-D) is unbounded above (d∗=+∞).
Proof. For (1), combine primal feasibility, dual feasibility, and reverse weak duality (b⊤y≥c⊤x) into a single inequality system Mz≥r with z=(yx)∈R≥0n+m: M:=A0−c⊤0−A⊤b⊤,r:=b−c0. If Mz≥r has a solution z∗=(y∗x∗)≥0, then Ax∗≥b, A⊤y∗≤c, and b⊤y∗≥c⊤x∗; pairing the last inequality with Weak Duality c⊤x∗≥b⊤y∗ forces c⊤x∗=b⊤y∗!
Suppose for contradiction that Mz≥r,z≥0 is infeasible. By Corollary 2, there exist multipliers u∈R≥0m, v∈R≥0n, and w∈R≥0 such that M⊤(u,v,w)⊤≤0 and r⊤(u,v,w)⊤>0, meaning A⊤u≤wc,Av≥wb,b⊤u>c⊤v.
Case 1 (w>0): Define x~:=v/w≥0 and y~:=u/w≥0. Dividing by w>0 gives Ax~≥b and A⊤y~≤c, so x~ is primal-feasible and y~ is dual-feasible, yet b⊤y~>c⊤x~, contradicting Weak Duality!
Case 2 (w=0): Here A⊤u≤0 and Av≥0. Fix any primal-feasible x0≥0 (Ax0≥b) and dual-feasible y0≥0 (A⊤y0≤c): b⊤u≤(Ax0)⊤u=x0⊤(A⊤u)≤0≤y0⊤(Av)=(A⊤y0)⊤v≤c⊤v, contradicting b⊤u>c⊤v.
Hence Mz≥r,z≥0 is always feasible, proving (1).
For (2), suppose (LP-D) is infeasible, i.e., no y≥0 satisfies (−A⊤)y≥(−c). By Corollary 2, there exists a recession ray d∈R≥0n such that (−A⊤)⊤d=−Ad≤0 (⟺Ad≥0) and (−c)⊤d>0 (⟺c⊤d<0). Given any primal-feasible x0≥0, every x0+td (t≥0) satisfies x0+td≥0 and A(x0+td)≥Ax0≥b, while c⊤(x0+td)=c⊤x0+t(c⊤d)→−∞ as t→+∞. Writing (LP-D) as miny≥0{(−b)⊤y:(−A⊤)y≥(−c)} yields the symmetric statement.
2.3 Metric cost and the Kantorovich–Rubinstein W1 theorem
In §1.6 we plugged the simplest metric c(x,y)=1{x=y} into Kantorovich duality and watched the dual constraints collapse to bounded test functions Z:Ω→[0,1], recovering dTV(μ,ν).
What if the state space (Ω,d) carries a general metric d(x,y) measuring how far apart points x and y are? Plugging c(x,y)=d(x,y) into Definition 4 defines the 1-Wasserstein distance (or earth mover’s distance): W1(μ,ν):=γ∈Π(μ,ν)minx,y∈Ω∑d(x,y)γ(x,y). Why does taking the dual over (ϕ,ψ) with ϕ(x)+ψ(y)≤d(x,y) simplify to maximizing Eμ[f]−Eν[f] over 1-Lipschitz functions f (meaning ∣f(x)−f(y)∣≤d(x,y) for all x,y∈Ω)? The key step is the d-transform (or c-transform) tightening one potential against the other.
Theorem 10 (Kantorovich–Rubinstein W1 duality) Let (Ω,d) be a finite metric space and let μ,ν∈Δ(Ω). Then W1(μ,ν)=f:Ω→R∣f(x)−f(y)∣≤d(x,y)∀x,ymax(Eμ[f]−Eν[f]).
Proof. By Kantorovich Duality (Theorem 5) with c=d, it suffices to show ϕ⊕ψ≤dmax(Eμ[ϕ]+Eν[ψ])=∥f∥Lip≤1max(Eμ[f]−Eν[f]), where ∥f∥Lip:=maxx=yd(x,y)∣f(x)−f(y)∣.
(≥ direction): If ∥f∥Lip≤1, then f(x)−f(y)≤d(x,y) for all x,y∈Ω, so (ϕ,ψ):=(f,−f) is feasible for the Kantorovich dual with objective Eμ[f]−Eν[f].
(≤ direction): Let (ϕ,ψ) be any dual-feasible pair satisfying ϕ(x)+ψ(y)≤d(x,y) for all x,y∈Ω. Define the tight upper envelope of ϕ permitted by ψ: f(x):=y∈Ωmin(d(x,y)−ψ(y)),x∈Ω. Check the three properties of f:
Because ϕ(x)≤d(x,y)−ψ(y) for every y∈Ω, we immediately have ϕ(x)≤f(x) for every x∈Ω.
Taking y=x in the minimum (where d(x,x)=0) gives f(x)≤d(x,x)−ψ(x)=−ψ(x), so ψ(x)≤−f(x) for every x∈Ω.
Given any x,x′∈Ω, let y∗∈Ω attain f(x′)=d(x′,y∗)−ψ(y∗). By the triangle inequality, f(x)≤d(x,y∗)−ψ(y∗)≤d(x,x′)+d(x′,y∗)−ψ(y∗)=d(x,x′)+f(x′). Swapping x and x′ gives ∣f(x)−f(x′)∣≤d(x,x′), so ∥f∥Lip≤1!
Since ϕ≤f and ψ≤−f, we conclude Eμ[ϕ]+Eν[ψ]≤Eμ[f]−Eν[f], and compactness of {f:∥f∥Lip≤1,f(x0)=0} ensures attainment.
Notice how cleanly Theorem 10 generalizes Corollary 1: under the discrete metric d(x,y)=1{x=y}, ∥f∥Lip≤1 means maxxf(x)−minyf(y)≤1, which up to subtracting minf is identical to Z:Ω→[0,1]. On general graphs or lines, however, W1 remembers how far mass had to move.
Example 5 (Total variation versus W1 on three collinear points) Take Ω={1,2,3} with metric d(x,y)=∣x−y∣, and compare μ=(21,41,41) against ν=(41,41,21).
Primal transport: Moving 41 unit of mass from 1 directly to 3 crosses distance d(1,3)=2, giving W1(μ,ν)=2⋅41=21, whereas dTV(μ,ν)=41 pays only 1 per unit of moved mass regardless of distance.
Dual 1-Lipschitz witness: The test function f(1)=2,f(2)=1,f(3)=0 has ∥f∥Lip=1 and achieves Eμ[f]−Eν[f]=∑x=13(μ(x)−ν(x))f(x)=41⋅2+0⋅1−41⋅0=21=W1(μ,ν).
2.4 The Donsker–Varadhan variational formula and Cramér rate functions
In Chapter 3 (Reading §2.13), we proved the Logarithmic Sobolev Inequality on {−1,1}n via the tensorization of entropy. Let us now prove the analytical workhorse behind that tensorization—the Donsker–Varadhan variational formula—using the exact same Fenchel conjugation + Gibbs-KL pattern from §§1.1 and 1.7.
Let (Ω,π) be a finite probability space (with π(x)>0 for all x∈Ω, or restrict Ω to supp(π)). Recall from Chapter 3 §2.13 that for any nonnegative random variable Z:Ω→[0,∞), its entropy functional under π is Entπ(Z):=Eπ[ZlnZ]−Eπ[Z]lnEπ[Z]=Eπ[ZlnEπ[Z]Z], with 0ln0:=0. Notice that when Eπ[Z]=1, Z is a likelihood ratio dπdμ of a distribution μ(x)=Z(x)π(x) with respect to π, and Entπ(Z)=KL(μ∥π)!
Theorem 11 (Donsker–Varadhan variational representation of entropy) For every nonnegative random variable Z:Ω→[0,∞) on a finite probability space (Ω,π), Entπ(Z)=X:Ω→Rsup{Eπ[ZX]−Eπ[Z]lnEπ[eX]}=X:Ω→REπ[eX]=1supEπ[ZX].
Proof. If Z≡0, then Entπ(0)=0 and both right-hand sides equal 0 (note that the normalized constraint set {X:Eπ[eX]=1} is nonempty since it contains X≡0, so its supremum is likewise 0). Assume henceforth that Eπ[Z]>0 and define the normalized density ratio Z:=Z/Eπ[Z], which satisfies Z≥0, Eπ[Z]=1, and Entπ(Z)=Eπ[Z]Entπ(Z) since Entπ(Z)=Eπ[Eπ[Z]ZlnEπ[Z]Z]=Eπ[Z]Eπ[ZlnZ]−Eπ[Z]lnEπ[Z]=Eπ[Z]Entπ(Z). Consider the proper, convex, continuous functional Λ(X):=lnEπ[eX] on RΩ (the log-MGF). Let us verify that for every q∈RΩ, its Fenchel conjugate (under the probability-weighted pairing ⟨q,X⟩π:=Eπ[qX]) is Λ∗(q)={Eπ[qlnq],+∞,if q≥0 and Eπ[q]=1,otherwise. A direct two-line calculation verifies both directions: for anyq≥0 with Eπ[q]=1 and anyX:Ω→R, let pX(x):=Eπ[eX]eX(x); then pXπ∈Δ(Ω) and Eπ[qlnq]−(Eπ[qX]−lnEπ[eX])=x∈Ω∑(q(x)π(x))lnpX(x)π(x)q(x)π(x)=KL(qπpXπ)≥0, proving supX{Eπ[qX]−lnEπ[eX]}≤Eπ[qlnq] (and note that if either q(x0)<0 or Eπ[q]=1, shifting X by constants or spikes X(x0)→−∞ sends Eπ[qX]−lnEπ[eX]→+∞, forcing Λ∗(q)=+∞). To see that equality is approached for Z≥0 with Eπ[Z]=1, set XM(ω):=lnZ(ω) where Z(ω)>0 and XM(ω):=−M where Z(ω)=0; then Eπ[ZXM]=Eπ[ZlnZ] while Eπ[eXM]=Eπ[Z]+π(Z=0)e−M→1 as M→∞, giving Entπ(Z)=Λ∗(Z)=X:Ω→Rsup{Eπ[ZX]−lnEπ[eX]}.(Notice that Λ and Eπ[qlnq] are therefore an exact Fenchel conjugate pair on (RΩ,⟨⋅,⋅⟩π)!)
Multiplying both sides by Eπ[Z]>0 yields the first variational formula: Entπ(Z)=Eπ[Z]Xsup{Eπ[ZX]−lnEπ[eX]}=X:Ω→Rsup{Eπ[ZX]−Eπ[Z]lnEπ[eX]}. Finally, observe that replacing X by X+c (c∈R) shifts Eπ[Z(X+c)]−Eπ[Z]lnEπ[eX+c] by cEπ[Z]−cEπ[Z]=0. Shifting every candidate X by c:=−lnEπ[eX] preserves its objective while enforcing Eπ[eX+c]=1, yielding Entπ(Z)=supX:Eπ[eX]=1Eπ[ZX].
Consequence: recovering Chapter 3’s Entropy Tensorization via Doob martingale log-increments
Let X=(X1,…,Xn) have independent coordinates on a finite product space and let Z=f(X)≥0 with E[Z]>0 (by continuity of Ent, assume f>0 first via f+ε with ε↓0). Form the Doob martingale Zk:=E[f(X)∣X1,…,Xk] (Z0=E[f], Zn=f) and define the logarithmic martingale increments Uk:=ln(Zk/Zk−1). Telescoping gives Ent(f)=E[ZnlnZ0Zn]=k=1∑nE[f(X)Uk]. Condition on X−k:=(X1,…,Xk−1,Xk+1,…,Xn) (notation from Chapter 3 §2.13). Because Uk=ln(Zk/Zk−1) depends only on (X1,…,Xk) and the coordinates X1,…,Xn are independent, averaging eUk=Zk/Zk−1 over Xk with X−k held fixed leaves Zk−1=E[f∣X1,…,Xk−1] constant and integrates Zk=E[f∣X1,…,Xk] down to Zk−1: E[eUk∣X−k]=Zk−1E[Zk∣X1,…,Xk−1]=Zk−1Zk−1=1. By Theorem 11 applied conditionally on X−k, E[f(X)Uk∣X−k]≤Entk(f). Taking full expectations and summing over k=1,…,n recovers Ent(f)≤∑k=1nE[Entk(f)]!
Finally, look back at the very beginning of our course in Chapter 1 (Chernoff’s method). Why did optimizing the exponential Markov bound infλ≥0exp(−n(λa−lnE[eλX1])) give the sharp decay exponent for empirical means of i.i.d. random variables? Because Cramér’s large-deviation rate function is literally the Fenchel conjugate of the log-MGF Λ(λ)=lnE[eλX1]!
Proposition 2 (Chernoff bounds and Cramér rate functions as Fenchel conjugation) Let X1,…,Xn be i.i.d. real-valued random variables with finite log-MGF Λ(λ):=lnE[eλX1]<∞ for all λ∈R, and let μ:=E[X1]. For every threshold a≥μ, Chernoff’s exponential Markov bound equals P[n1i=1∑nXi≥a]≤λ≥0infexp(−n(λa−Λ(λ)))=exp(−nΛ∗(a)), where Λ∗(a):=supλ∈R{λa−Λ(λ)} is the Fenchel conjugate of Λ. In particular, for Xi∼Ber(p) (p∈(0,1)) and a∈[p,1), Λ∗(a)=KL(Ber(a)Ber(p))=alnpa+(1−a)ln1−p1−a.
Proof. Applying Markov’s inequality to exp(λ∑i=1nXi) for any λ≥0 gives P[n1∑iXi≥a]≤exp(−n(λa−Λ(λ))). Notice that for λ≤0 and a≥μ, Jensen’s inequality gives Λ(λ)=lnE[eλX1]≥λE[X1]=λμ≥λa, so λa−Λ(λ)≤0, whereas λ=0 already attains 0. Hence restricting supλ∈R{λa−Λ(λ)} to λ≥0 leaves the supremum unchanged, proving infλ≥0e−n(λa−Λ(λ))=e−nΛ∗(a).
For X1∼Ber(p), Λ(λ)=ln(1−p+peλ). Setting the derivative dλd(λa−Λ(λ))=a−1−p+peλpeλ=0 yields eλ∗=p(1−a)a(1−p) (so λ∗=lnp(1−a)a(1−p)≥0 when a≥p), and substituting λ∗ back gives Λ∗(a)=alnpa+(1−a)ln1−p1−a=KL(Ber(a)∥Ber(p)).
(By Cramér’s Large Deviation Theorem, this upper-bound exponent Λ∗(a) is asymptotically tight: limn→∞n1lnP[n1∑i=1nXi≥a]=−Λ∗(a) whenever a lies in the interior of the range of Λ′.)
2.5 From Fourier to Gibbs to Fenchel: kernel transforms and infimal convolution
Chapter 3 worked extensively with Fourier characters on the Boolean hypercube, and Chapters 1, 4, and 6 kept circling back to Gibbs log-partition functions lnZ and Fenchel conjugates f∗. Notice a striking structural echo: Fourier analysis swaps pointwise multiplication for convolution, maps differentiation to frequency multiplication, leaves the Gaussian e−∥x∥22/2 invariant, and obeys Heisenberg uncertainty; meanwhile Fenchel conjugation swaps sums for infimal convolution, maps subgradients to dual slopes, leaves the quadratic 21∥x∥22 invariant, and trades μ-strong convexity for 1/μ-smoothness. Is this merely a suggestive analogy, or can Fenchel duality actually be traced back to the Hilbert-space Fourier transform?
A natural first guess is to start in a Hilbert space, expand functions in any orthonormal basis {ek}, and take some kind of limit. Tracking that guess carefully exposes two exact forks that pinpoint where Fenchel duality actually comes from:
Why an arbitrary Hilbert orthonormal basis fails (homomorphism, not mere basis). Expanding F in an arbitrary orthonormal basis (such as Hermite functions or wavelets) respects L2 norms via Parseval, yet it neither diagonalizes translation/convolution nor turns products into affine shifts under logarithms. What singles out Fourier modes χy(x)=e−i⟨y,x⟩ on Rn—just like parity characters χS(x)=(−1)∑i∈Sxi on F2n in Chapter 3—is the homomorphism property sending vector addition to scalar multiplication: ϕy(x1+x2)=ϕy(x1)ϕy(x2). Once one passes to logarithms via εlnϕy(x), multiplication turns back into addition: εlnϕy(x1+x2)=εlnϕy(x1)+εlnϕy(x2). Thus any continuous positive solution ϕy has the form ϕy(x)=ey(x)/ε for a linear functionaly∈V∗! Even before fixing an inner product, Fourier’s kernel singles out the covector pairing ⟨y,x⟩ from §2.1.
Trading Hilbert orthogonality for order and convexity (−i↦1/ε). Why can’t χy(x)=e−i⟨y,x⟩ directly take suprema or preserve convex inequalities? Because Hilbert-space orthogonality ∫Rnei⟨y′−y,x⟩dx=(2π)nδ(y′−y) relies entirely on oscillatory phase cancellation, which destroys real order (≤, sup). Performing a Wick rotation−i↦1/ε>0 replaces oscillating unit-modulus characters by strictly positive kernels e⟨y,x⟩/ε>0. Hilbert orthogonality is gone, and in return we gain positivity, order preservation, and Hölder’s inequality—guaranteeing that for nonnegative Fε(x)=e−f(x)/ε, the smoothed transform fε∗(y):=εln∫Rne(⟨y,x⟩−f(x))/εdx(=lne⟨y,⋅⟩−f(⋅)L1/ε(Rn) for ε∈(0,1]) is automatically convex in y∈V∗ for every ε>0 (and agrees with the log L1/ε norm once p=1/ε≥1)!
Now take the zero-temperature limit ε↓0, which sends the Lp exponent p=1/ε→+∞. On any continuous, superlinearly coercive function f:Rn→R (meaning lim∥x∥2→∞f(x)/∥x∥2=+∞, without assuming convexity), the supremum M:=f∗(y)=supx∈Rn{⟨y,x⟩−f(x)} is finite and attained at some x∗∈Rn. Fix any δ>0; continuity gives a ball B(x∗,r) of volume vr>0 where ⟨y,x⟩−f(x)≥M−δ, yielding the lower bound fε∗(y)≥εln(vre(M−δ)/ε)=M−δ+εlnvr. For the upper bound, superlinearity ensures R>0 such that ⟨y,x⟩−f(x)≤M−∥x∥2 whenever ∥x∥2>R. Comparing against ⟨y,x⟩−f(x)≤M on B(0,R) gives, for every ε∈(0,1], ∫Rne(⟨y,x⟩−f(x))/εdx≤eM/ε(vol(B(0,R))+∫∥x∥2>Re−∥x∥2dx). Taking εln(⋅) and letting ε↓0 with δ↓0 proves ε↓0limfε∗(y)=x∈Rnsup{⟨y,x⟩−f(x)}=f∗(y). Notice why nonconvex pockets disappear in the third step! At ε>0, a point x0 sitting strictly inside an upward-dented gap has exponent ⟨y,x0⟩−f(x0)≤f∗(y)−Δ with Δ>0, so every supporting hyperplane downweights its contribution by e−Δ/ε→0 as ε↓0. Unlike Fourier analysis—where linearity and orthogonality preserve nonconvex oscillations faithfully—the ε↓0 limit erases nonconvex pockets so that inverting a second time returns f∗∗=clconv(f) rather than f.
Historical trajectory: Varadhan’s lemma and Maslov dequantization. In large deviations, S. R. S. Varadhan (Comm. Pure Appl. Math., 1966) formalized this Laplace asymptotic principle εln∫eF(x)/εdμε(x)→supx{F(x)−I(x)}—the direct continuous sibling of Cramér duality in §2.4. Independently, Victor Maslov (Uspekhi Mat. Nauk, 1987) and Gunter Litvinov named the passage (R≥0,+,×)ε↓0(R∪{−∞},max,+)idempotent analysis (or tropical dequantization, viewing ε as Planck’s constant ℏ↓0 and the Fenchel transform as the classical Legendre transform of the tropical semiring). Pontryagin duality generalizes Fourier transforms to arbitrary locally compact abelian groups, whereas dropping complex phases trades group orthogonality for real convex cones.
Putting all three rungs side by side turns an abstract analogy into a single continuous family of semiring integral transforms:
Rung
Semiring (⊕,⊗)
Kernel ϕy(x)
Transform of F=e−f/ε
Fixed point
1. Fourier(Hilbert L2)
(+,×) on C
e−i⟨y,x⟩
∫F(x)e−i⟨y,x⟩dx
e−∥x∥22/2
2. Laplace / Gibbs(ε>0)
(+,×) on R≥0
e⟨y,x⟩/ε
εln∫e(⟨y,x⟩−f(x))/εdx
21∥x∥22(limit)
3. Fenchel(ε↓0)
(sup,+) on R∪{−∞}
⟨y,x⟩
supx{⟨y,x⟩−f(x)}
21∥x∥22
Once addition + becomes inf (the tropical operation matching convex minimization) and multiplication × becomes +, the exact analogue of Fourier’s convolution integral ∫F(u)G(x−u)du is infimal convolution:
Proposition 3 (Infimal convolution and additive conjugates) Let f,g:V→R∪{+∞} be proper functions on a paired space (V,V∗,⟨⋅,⋅⟩). Define their infimal convolution(f□g):V→[−∞,+∞] by (f□g)(x):=inf{f(u)+g(v):u∈dom(f),v∈dom(g),u+v=x}, with the convention inf∅=+∞ when x∈/dom(f)+dom(g). Then for every covector y∈V∗, (f□g)∗(y)=f∗(y)+g∗(y).
Proof. Expand the supremum in (f□g)∗(y) using −infS(⋅)=supS(−⋅) over pairs (u,v)∈dom(f)×dom(g) (where f(u) and g(v) are both finite real numbers, eliminating any ∞−∞ ambiguity): (f□g)∗(y)=x∈Vsupu∈dom(f),v∈dom(g)u+v=xsup{⟨y,x⟩−f(u)−g(v)}=u∈dom(f),v∈dom(g)sup{(⟨y,u⟩−f(u))+(⟨y,v⟩−g(v))}=u∈dom(f)sup{⟨y,u⟩−f(u)}+v∈dom(g)sup{⟨y,v⟩−g(v)}=f∗(y)+g∗(y). Notice why the step splitting into two independent suprema uses only finite arithmetic: because f and g are proper, both dom(f) and dom(g) are nonempty, so each supremum lies in (−∞,+∞] and no +∞+(−∞) term can arise.
Two concrete convex-optimization operations fall out of Proposition 3 immediately. First, for indicator functions δA,δB of nonempty sets A,B⊆V, (δA□δB)(x)=0 iff x=u+v∈A+B (and +∞ otherwise), so (δA□δB)=δA+B; applying Proposition 3 recovers the support-function Minkowski sum law σA+B(y)=σA(y)+σB(y). Second, in Euclidean space Rn, taking gλ(v):=2λ1∥v∥22 (λ>0) produces the Moreau envelopeeλf(x):=(f□2λ1∥⋅∥22)(x)=u∈Rninf{f(u)+2λ1∥x−u∥22}, whose Fenchel conjugate is simply (eλf)∗(y)=f∗(y)+2λ∥y∥22—the tropical ε↓0 shadow of convolving e−f/ε with a Gaussian heat kernel!
This three-rung translation explains the entire Fourier–Fenchel property dictionary at a glance:
Property
Fourier (L2 kernel e−i⟨ω,x⟩)
Fenchel (supx{⟨y,x⟩−f(x)})
Shared root
Convolution
F∗G=F^⋅G^
(f□g)∗=f∗+g∗
Character homomorphism ϕy(u+v)=ϕy(u)ϕy(v)
Inversion
F−1FF=F
f∗∗=f(closed convex f)
L2 unitarity vs. ε↓0 convex envelope
Fixed point
e−∥x∥22/2
21∥x∥22
Log Gaussian density is −21∥x∥22
Uncertainty / Curvature
Narrow in x⟺ wide in ω
μ-strongly convex closed f⟺μ1-smooth f∗
Broad quadratic lower bound ⟺ tight upper bound
Shift
F[F(⋅−a)](ω)=e−i⟨ω,a⟩F^(ω)
[f(⋅−a)]∗(y)=⟨y,a⟩+f∗(y)
Substituting x=u+a factors out ϕy(a)
Zero mode
F^(0)=∫F(x)dx
−f∗(0)=infxf(x)
Trivial character ϕ0≡1 aggregates domain
III. Further Topics
3.1 Yao’s minimax principle as linear programming duality for lower bounds
In Chapter 5 Reading §2.4, we used Yao’s Minimax Principle to convert any randomized communication protocol into a deterministic protocol on a hard input distribution μ: Rminx∈Xmaxc(R,x)=μ∈Δ(X)maxDminEx∼μ[c(D,x)]. Since every randomized algorithm R is a convex combination (probability distribution p∈Δ(A)) over deterministic algorithms A on finite input sets X, Yao’s principle is literallyTheorem 2 (via von Neumann’s minimax theorem) applied to the cost matrix MD,x=c(D,x): the primal player picks a randomized algorithm p∈Δ(A) to minimize worst-case cost, while the dual adversary picks a hard input distribution μ∈Δ(X) to force every deterministic algorithm to pay at least V∗. See Yao (1977) and Motwani–Raghavan (Randomized Algorithms, §2.2).
3.2 Conic and spectral duality: the positive semidefinite cone and Courant–Fischer
Our derivation of LP duality in §1.3 placed primal vectors in the nonnegative orthant x∈R≥0n—a convex cone that is self-dual under the standard inner product, meaning {y∈Rn:y⊤x≥0∀x∈R≥0n}=R≥0n. In semidefinite programming (SDP)—the centerpiece of Chapter 7—we replace R≥0n by the cone S+n of n×n real symmetric positive semidefinite matrices, paired via the Frobenius trace pairing ⟨Y,X⟩F:=tr(YX). Remarkably, S+n is also self-dual: tr(YX)≥0 for all X⪰0 iff Y⪰0! Applying the exact same Fenchel-Lagrangian recipe of §§1.2–1.3 to λmax(P)=max{tr(PX):X⪰0,tr(X)=1} immediately yields its dual minimization min{λ:λI−P⪰0}, recovering the Courant–Fischer variational characterization from Chapter 2 via conic duality. Unlike LPs, conic SDPs can exhibit nonzero duality gaps or unattained optima; when the optimal value is finite, strict feasibility (Slater’s condition) on one side guarantees zero duality gap and attainment on the opposite side, whereas attainment on both sides uses strict feasibility on both sides. See Boyd and Vandenberghe (Convex Optimization, Chapters 4–5).
3.3 Monge versus Kantorovich, Prokhorov compactness, and optimal transport in algorithms
In finite spaces (§1.6), Kantorovich duality followed directly from Strong LP Duality. Over continuous Polish spaces (X,Y), why does Strong Kantorovich Duality infγ∈Π(μ,ν)∫cdγ=supϕ⊕ψ≤c(∫ϕdμ+∫ψdν) hold under mild lower-semicontinuity conditions, whereas Monge’s deterministic transport problem infT#μ=ν∫c(x,T(x))dμ(x) can lack any feasible solution (for example, transporting μ=δ0 onto ν=21δ−1+21δ+1)? Two structural properties resolve both obstacles: relaxing deterministic maps T to couplings γ makes Π(μ,ν) convex, and Prokhorov’s theorem shows that fixed marginals (μ,ν) keep Π(μ,ν) tight—hence weakly compact—allowing Sion’s minimax theorem to swap infγ and supϕ,ψ cleanly. Adding an entropic penalty +εKL(γ∥μ⊗ν) turns OT into strictly convex Gibbs scaling efficiently approximated by Sinkhorn’s algorithm (alternating Bregman projections), where each dense scaling pass costs O(∣X∣∣Y∣) operations and iteration complexity scales with the regularization ε and target accuracy. See Santambrogio (Optimal Transport for Applied Mathematicians, Chapter 1 & Chapter 4) and Cuturi (NeurIPS 2013).
3.4 Variational inference, mean-field bounds, and Bethe free energy in counting and sampling
Look one more time at the Gibbs Variational Principle (Theorem 6): lnZ(ϕ)=q∈Δ(Ω)max{Eq[ϕ]+H(q)}. Computing the partition function Z(ϕ)=∑x∈Ωeϕ(x) of a spin system or combinatorial model (such as independent sets or proper colorings in Chapter 2) is typically #P-hard. Variational inference turns Theorem 6 into an algorithmic approximation paradigm by restricting the maximization from the intractable full simplex Δ(Ω) to a tractable sub-family Q⊂Δ(Ω)—for instance, product distributions q(x)=∏v∈Vqv(xv), yielding the mean-field lower bound on lnZ(ϕ) whose tightness is measured directly by minq∈QKL(q∥pϕ). Replacing global entropy H(q) with locally consistent pairwise entropies yields the Bethe free energy, whose stationary points correspond to fixed points of Belief Propagation (BP) on tree-like graphical models. See Wainwright and Jordan (Graphical Models, Exponential Families, and Variational Inference, 2008).
References
Chihao Zhang, Duality from First Principles, Lagrangian Multiplier Methods, and Kantorovich Duality and Lagrangian Methods (course notes, 2026); together with Algorithms and Complexity (AI2615), Lecture 11: Linear Programming and Duality (2021) and Topics in Modern Algorithms (AA2025), Lecture 9: Tensorization of Entropy (2025), Shanghai Jiao Tong University. (Primary basis for the Fenchel-first architecture in §1.1, perturbation-derived Lagrange multipliers in §1.2, LP duality in §1.3, Farkas duality in §2.2, Kantorovich OT in §1.6, the pointwise Donsker–Varadhan/Gibbs derivation in §§1.7 and 2.4, and the paired-space Fenchel–Rockafellar & Slater synthesis in §2.1.)
Stephen Boyd and Lieven Vandenberghe, Convex Optimization, Cambridge University Press, 2004, Chapters 3 and 5. (Standard reference for Lagrange dual functions, Slater’s condition, perturbation functions, Fenchel conjugation, and conic duality.)
David P. Williamson and David B. Shmoys, The Design of Approximation Algorithms, Cambridge University Press, 2011, Chapters 1, 2, and 7; and Vijay V. Vazirani, Approximation Algorithms, Springer, 2001, Chapters 12–15. (References for bounty pricing, Greedy Set Cover dual fitting, and the primal–dual schema for Weighted Vertex Cover and network design.)
Filippo Santambrogio, Optimal Transport for Applied Mathematicians, Birkhäuser, 2015, Chapters 1 and 4; and Marco Cuturi, “Sinkhorn Distances: Lightspeed Computation of Optimal Transport,” Advances in Neural Information Processing Systems (NeurIPS), 2013. (References for Kantorovich duality, c-transforms, Kantorovich–Rubinstein W1, Prokhorov compactness, and entropic optimal transport.)
R. Tyrrell Rockafellar, Convex Analysis, Princeton University Press, 1970. (Classical treatise on biconjugation f∗∗=f, Fenchel–Rockafellar duality, separating hyperplanes, and convex duality.)
Martin J. Wainwright and Michael I. Jordan, Graphical Models, Exponential Families, and Variational Inference, Foundations and Trends in Machine Learning, vol. 1, nos. 1–2, pp. 1–305, 2008. (Reference for Fenchel duality between log-partition and negative entropy, mean-field approximations, and Bethe free energy.)