Linear Programming & Optimisation
From the simplex method to game theory and convex optimisation — the mathematical foundations of decision-making and resource allocation under constraints.
Linear programming concerns optimising a linear objective function subject to linear inequality and equality constraints. The graphical method provides geometric insight for two-variable problems.
The feasible region $\{\mathbf{x} : A\mathbf{x} \le \mathbf{b},\, \mathbf{x} \ge 0\}$ is a convex polyhedron. By the fundamental theorem of LP, if an optimal solution exists, it occurs at a vertex (extreme point) of the feasible region.
The simplex algorithm systematically moves from vertex to vertex of the feasible polyhedron, improving the objective at each step, until optimality is reached.
The simplex tableau organises the computation. At each iteration:
- Entering variable: Choose the non-basic variable with the most negative reduced cost (in maximisation).
- Leaving variable: Apply the minimum ratio test to maintain feasibility.
- Pivot: Perform row operations to update the tableau.
The algorithm terminates when all reduced costs are non-negative (optimality) or when the minimum ratio test fails (unbounded).
Anti-cycling rules:
- Bland's rule: Always choose the entering and leaving variables with the smallest index among eligible candidates. This prevents cycling.
- Lexicographic method: Uses lexicographic ordering to break ties consistently.
Every linear program has an associated dual. The relationship between primal and dual provides optimality conditions, economic interpretations, and computational shortcuts.
(i) $y_i^*(b_i - \sum_j a_{ij}x_j^*) = 0$ for all $i$ (if dual variable is positive, primal constraint is tight).
(ii) $x_j^*(\sum_i a_{ij}y_i^* - c_j) = 0$ for all $j$ (if primal variable is positive, dual constraint is tight).
Economic interpretation: The dual variables $y_i$ represent shadow prices — the marginal value of relaxing the $i$-th constraint by one unit. Complementary slackness says that a resource with slack has zero shadow price.
Special structures in LP lead to efficient algorithms: the transportation problem for shipping goods from sources to destinations, and the assignment problem for one-to-one matching.
Initial BFS methods:
- North-West Corner Rule (NWCR): Start at top-left; allocate as much as possible, then move right or down.
- Vogel's Approximation Method (VAM): Compute row/column penalties (difference between two smallest costs), allocate to the cell with minimum cost in the row/column with largest penalty. Gives near-optimal starting solutions.
Optimality test — MODI method: Compute dual variables $u_i, v_j$ from basic cells ($u_i + v_j = c_{ij}$). For non-basic cells, check $\Delta_{ij} = c_{ij} - u_i - v_j \ge 0$. If some $\Delta_{ij} < 0$, perform a loop-based pivot.
Hungarian method:
- Step 1: Subtract row minima, then column minima.
- Step 2: Cover all zeros with minimum number of lines.
- Step 3: If $n$ lines needed, optimal assignment exists among the zeros. Otherwise, adjust: subtract the smallest uncovered element from all uncovered entries and add it to doubly-covered entries. Repeat.
Two-person zero-sum games model adversarial decision-making. The minimax theorem guarantees the existence of optimal mixed strategies.
A mixed strategy is a probability distribution over pure strategies. Player I uses $\mathbf{p} = (p_1, \ldots, p_m)$ with $\sum p_i = 1$, $p_i \ge 0$.
Finding the optimal mixed strategy for Player I reduces to an LP:
- $\max\, v$ subject to $\sum_i p_i a_{ij} \ge v$ for all $j$, $\sum_i p_i = 1$, $p_i \ge 0$.
Player II's problem is the dual of Player I's.
Convex optimisation generalises LP to nonlinear objectives and constraints while preserving the powerful property that every local minimum is global.
(i) Stationarity: $\nabla f(x^*) + \sum_i \mu_i \nabla g_i(x^*) + \sum_j \lambda_j \nabla h_j(x^*) = 0$.
(ii) Primal feasibility: $g_i(x^*) \le 0$, $h_j(x^*) = 0$.
(iii) Dual feasibility: $\mu_i \ge 0$.
(iv) Complementary slackness: $\mu_i g_i(x^*) = 0$.
- LP optimal solutions (when finite) always occur at extreme points of the feasible polyhedron.
- The simplex method is efficient in practice despite exponential worst-case complexity; Bland's rule prevents cycling.
- Strong duality: the primal and dual optimal values coincide; complementary slackness provides a bridge.
- The Hungarian method solves $n \times n$ assignment problems in $O(n^3)$ time.
- Von Neumann's minimax theorem guarantees a value for every finite two-person zero-sum game.
- In convex optimisation, KKT conditions are necessary and sufficient for optimality under constraint qualifications.