Basic feasible solution Created 2026-09-24 Updated 2026-11-05
For a full-row-rank system with rows and variables , choose linearly independent columns as a simplex basis. Set all nonbasic variables to zero and solve . If , the resulting vector is a basic feasible solution. Redundant equality rows can first be removed.
Equivalently, a feasible vector is basic when the columns indexed by its strictly positive coordinates are linearly independent. Those columns can be extended to a basis of the full column space because has row rank . The extension may have zero-valued basic variables; this is degeneracy in linear programming.
For and , the two basic feasible solutions are and . The feasible midpoint is not basic: its two positive columns are dependent. In this standard form, basic feasible solutions are exactly the extreme points of the feasible polyhedron, connecting basis algebra to the Fundamental theorem of linear programming.
Network simplex algorithm Created 2026-10-06 Updated 2026-10-14
The network simplex algorithm specializes the simplex algorithm to network flows. A basis is represented by a spanning tree with nonbasic flows at their bounds; potentials give reduced costs, and entering arcs produce cycle pivots. Degeneracy in linear programming is particularly common in assignment instances.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 38 2 b Solution Created 2026-10-03 Updated 2026-10-07
Introduce nonnegative slack variables for the four dual inequalities. The initial simplex dictionary isAt the origin all four basic slacks are positive. Enter : the simplex ratio test compares bounds from and from , so leaves at . Entering initially would tie two limiting bounds and produce degeneracy in linear programming; the chosen pivot avoids this. The new simplex dictionary isOnly has positive objective coefficient. Enter it; the limiting bound is from , rather than from . Thus leaves, givingEvery nonbasic variable has nonpositive objective coefficient, so this feasible simplex basis is optimal. Setting the nonbasic variables to zero yieldsBoth new basic solutions have strictly positive basic coordinates; neither pivot is degenerate.
The first and fourth dual constraints have positive slacks and . Complementary slackness therefore requires . Since , the second and third primal constraints must be equalities:ConsequentlyThe first primal left side is , so the vector is feasible. Its value matches the feasible dual value, giving a linear programming optimality certificate.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 38 3 a Solution Created 2026-10-03 Updated 2026-10-06
Choose the oriented incidence matrix convention with at an edge's tail and at its head. Let be net supply, so . The uncapacitated minimum-cost flow problem on a finite directed graph isor . Negative denotes net demand. Costs may have either sign; the problem can be infeasible or unbounded.
For vertex network dual potentials , the optimization Lagrangian isThe infimum over is finite exactly when every network reduced cost is nonnegative. Thus the Lagrangian dual problem and complementary slackness areA feasible flow and feasible network dual potentials satisfying these equalities have equal costs and are optimal by weak duality.
If the underlying undirected graph is connected, deleting one redundant balance row makes the oriented incidence matrix have rank . A set of independent edge columns is exactly a spanning tree. Set all non-tree flows to zero, solve the tree balances, and check nonnegativity to obtain a basic feasible solution. Basic tree edges may have zero flow, which is degeneracy in linear programming. Requiring on tree edges determines network dual potentials up to a common additive constant. If every non-tree network reduced cost is nonnegative, the tree flow is optimal. This is the basis of the network simplex algorithm. If the graph is disconnected, solve the balances separately in each component; each component must have total net supply zero and uses its own spanning tree.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 212 3 Solution Created 2026-10-03 Updated 2026-10-06
Use a directed bipartite graph with one vertex for each job and one for each agent. Job vertices have supply and agent vertices demand . An arc from job to agent has cost and nonnegative flow ; an upper bound may be added, but is already implied by the balances. The minimum-cost flow formulation of the assignment problem isInteger supplies and demands give an integral optimum by integrality of the transportation problem. Its positive arcs form a perfect matching, hence give one job per agent.
A network simplex algorithm basis for this connected -vertex network has tree arcs, whereas an integral assignment has only positive flows. For , at least basic tree arcs therefore carry zero flow. This unavoidable degeneracy in linear programming can cause zero-step pivots, extra bookkeeping and cycling unless an appropriate pivot rule is used. The Hungarian algorithm exploits the assignment structure directly rather than maintaining many zero-flow basic arcs.
Suppose the assignment dual potentials satisfy . For every feasible assignment ,If the selected assignment uses only arcs with , its cost equals this lower bound. Weak duality and complementary slackness certify optimality. The PDF correctly denotes the feasible assignment by ; the TeX aid mistakenly replaces it with .
The Hungarian algorithm maintains feasible assignment dual potentials and a matching in a graph of zero reduced cost edges, where . Search for an augmenting path in a matching in this equality graph. If there is none, let be the reachable jobs and the reachable agents in the alternating search from unmatched jobs. Every agent in is matched to a job in . SetReduced costs from to its complement decrease by , those from outside into increase, and the remaining ones do not change. Thus feasibility and current matching equalities are preserved, while at least one new equality edge appears. Continue until an augmenting path in a matching increases the matching size. A perfect matching in the equality graph then has the same value as the dual linear program and is optimal.
For the example, start with the row minima and . The reduced cost matrix isMatch job to agent . Searching from both unmatched jobs gives and ; the minimum cost to an agent outside is . Update to and :The new equality edge augments the matching. From unmatched job , the next alternating search reaches agent and its matched job , giving and . Now . The updated feasible assignment dual potentials and reduced costs areThe augmenting path in a matching uses job to agent , the reversed matched edge to job , then the new edge to agent . It gives the optimal assignmentThe dual linear program value is , an independent optimality certificate.
Simplex method Created 2026-09-24 Updated 2026-11-05
The simplex method solves a standard-form linear program by changing a simplex basis. A feasible basis expresses basic coordinates and the objective in terms of nonnegative nonbasic variables. An improving reduced cost selects a candidate entering variable, and the simplex ratio test chooses the largest step preserving nonnegative basic coordinates.
If this step is positive, the objective improves along an edge. Under degeneracy in linear programming, the step can be zero: the basis changes while the basic feasible solution and objective remain fixed. A negative reduced cost alone therefore does not promise strict improvement in that pivot. If the improving direction has no finite ratio limit, it gives an unbounded feasible ray.
When all reduced costs have the optimal sign, the simplex optimality criterion proves global optimality. Two-phase simplex supplies an initial feasible basis or an infeasibility certificate. A rule such as the Bland pivoting rule prevents cycling; arbitrary improving pivot choices need not terminate, and even terminating rules can require exponentially many steps on a Klee-Minty cube.