Linear programming optimizes a linear function subject to finitely many linear equalities and inequalities.
An equality representation of a linear program in which each basic variable and the objective function are expressed using nonbasic variables, and all variables are nonnegative. Introducing slack variables into gives . Setting the nonbasic variables to zero yields its basic solution; nonnegative resulting basic values make this a basic feasible solution. A simplex algorithm pivot exchanges a basic and nonbasic index and rewrites these expressions.
Remove the integrality requirements from an integer program while retaining its linear inequalities and variable bounds. Every original feasible point remains feasible. Thus the relaxed optimum is an upper bound for a maximization problem and a lower bound for a minimization problem. An optimal relaxed feasible point need not have integer coordinates. Variable bounds that were implied only by an informal declaration such as binary must be made explicit before removing integrality.
This convention for standard maximum form of a linear program requires a maximizing linear function, upper-bound linear inequalities, and nonnegative variables. An unrestricted variable becomes the difference of two nonnegative variables; a lower-bound inequality changes sign. The corresponding dual linear program is . Adding nonnegative slack variables instead gives the equivalent equality-constraint standard form. Since standard-form terminology varies, state the chosen convention.
This form of linear programming additionally has the uniform vector as a strictly positive feasible point and known optimum zero. A homogeneous self-dual embedding of a linear program, followed by elimination of unrestricted Lagrange multipliers and normalization by the sum of nonnegative coordinates, yields this form without presupposing feasibility of the original program. The known start and optimum support projective interior-point methods. Polynomial bit-complexity statements additionally require finite rational input encoding; bounded arbitrary real coefficients alone do not provide it.
A surplus variable converts a lower-bound inequality into , with . This is the lower-bound counterpart of a slack variable. When the original coefficients, right-hand side and decision variables are integer, the surplus variable is integer as well; that fact permits it to appear in an all-integer Gomory fractional cut row.
The set of minimizers of a linear objective on a linear polyhedron. It is a face: if a strict convex combination of two feasible points minimizes the objective, both points must also minimize it. Hence an extreme point of an optimal face is an extreme point of the original polyhedron. Successively minimizing further linear objectives restricts to nested faces, whose vertices remain original vertices. This preserves uniform rational denominator bounds in exact feasibility-oracle optimization.
A nonempty linear polyhedron with integer inequality coefficients and right sides bounded by contains a point with the displayed bounds. Intersect with an orthant containing a feasible point. Moving along directions annihilating the active constraints, until another constraint becomes active, produces a vertex: the orthant prevents a whole nontrivial line from remaining feasible. At that vertex, choose independent active inequalities, including coordinate constraints as necessary. Cramer's rule and the Hadamard determinant inequality bound both determinants by . The resulting rational witness has polynomial binary length and is verifiable in polynomial time, proving that integer linear feasibility is in NP.
The ellipsoid method repeatedly asks a separation oracle about the center of a containing ellipsoid and replaces that ellipsoid by a smaller one containing its intersection with a separating half-space. The volume decreases by a dimension-dependent factor at each iteration. For rational polyhedra, the exact feasibility theorem has polynomial bit complexity in the dimension and coefficient encoding bounds when separation is polynomial time. It includes lower-dimensional feasible sets through rational precision bounds or suitable relaxations; one must not declare infeasibility just because the original feasible set has zero volume.
A nonempty linear polyhedron can have no extreme point. Intersect it with an orthant containing one feasible point, and minimize the sum of the signed coordinates there. The relevant sublevel sets are compact, so the minimum face has an extreme point, which is also extreme in the orthant intersection. The added signed-coordinate rows are integer rows with entries at most one. The integer-matrix vertex coordinate bound gives . This supplies a bounded feasibility search even when the original polyhedron contains lines.
For an integer linear polyhedron with coefficients bounded by , put and . If , every with satisfies . Thus contains a positive-radius Euclidean ball and is a full-dimensional linear polyhedron. If is empty, the normalized integer Farkas infeasibility gap gives , , and . A point of would give , a contradiction. Consequently this relaxation preserves emptiness and supplies the inner-volume bound needed by the ellipsoid method, even when has empty interior.
A polynomial-time algorithm for integer linear feasibility gives exact rational linear programming optimization. Rational vertex bounds give a polynomial-bit bound on every finite optimal value and its denominator. An objective threshold below that bound detects unboundedness after feasibility is established. Binary search with the additional inequality localizes the finite optimum to an interval containing a unique rational of bounded denominator; continued fractions recover it exactly. A feasible optimizer can then be found by successive coordinate minimizations on a bounded optimal face. These produce faces of one fixed rational polytope, so one uniform vertex-denominator bound works throughout, avoiding exponential growth of precision requirements.
For , the standard ellipsoid covering a centrally cut half of the unit ball has center and shape matrix . Its eigenvalues are along and in the other directions. Hence its volume ratio is . Using and gives . Affine changes of coordinates preserve the volume ratio. The resulting geometric convergence underlies the ellipsoid method; exact rational feasibility additionally needs input-dependent size, precision and lower-dimensional feasibility bounds.
Given finitely encoded linear inequalities, a maximum feasible subsystem is a largest collection that can be simultaneously satisfied. Its decision version asks whether some inequalities admit a common solution. This is NP-complete, despite polynomial time feasibility testing for each fixed collection. For a graph, use nonnegative variables , constraints for vertices, and copies of for each edge. A subsystem of size must retain a copy of every edge constraint and at least vertex constraints; those vertices form an independent set. Conversely an independent set of size supplies such a feasible subsystem by its indicator vector.
A linear polyhedron is an intersection of finitely many closed affine half-spaces in finite-dimensional real space. It may be empty, unbounded, or lower-dimensional. This usage differs from a three-dimensional geometric polyhedron. The strict separation of disjoint linear polyhedra follows from linear programming duality.
For a linear polyhedron , a vertex of a linear polyhedron is a feasible point at which the normals of the active constraints span . Equivalently, linearly independent active constraints uniquely determine . A linear polyhedron may be unbounded or lower-dimensional; the definition applies in those cases as well as to a convex polytope.
Such a point is an extreme point. Indeed, if with and , every active constraint at must also be an equality at and . Selecting independent active rows forces . Conversely, if the active normals do not span , take a nonzero vector annihilated by all active rows. The finitely many inactive inequalities have positive slack, so both and remain feasible for sufficiently small . Their midpoint is , so is not an extreme point. Thus these notions coincide for a linear polyhedron.
A linear polyhedron in is full-dimensional when its affine hull is all of . Equivalently, it contains an open Euclidean ball. An open Euclidean ball spans the ambient space. Conversely, a full-dimensional convex set contains affinely independent points; their convex hull is a simplex with nonempty interior, so the set contains an open Euclidean ball.
An inequality constraint which holds with equality at the point under consideration. For , a direction annihilating every active row permits sufficiently small feasible moves of either sign. If the active rows have rank , their common solution is a basic feasible solution; the independent equalities uniquely determine it.
At an extreme point of , the active rows span the ambient dimension: otherwise a nonzero direction orthogonal to all active rows permits small feasible moves of both signs. Select independent active rows to form an integer matrix . Its nonzero determinant has absolute value at least one. Cramer's rule and the determinant expansion bound each coordinate by , where bounds the entries of and . The vector may be real; only the denominator matrix needs to be integer.
Nonempty disjoint linear polyhedra and admit with a strictly positive separation gap. A phase-I linear program minimizing common constraint violation has positive attained optimum. Its Lagrangian dual problem gives nonnegative with and . Then satisfies . The polyhedral hypothesis matters; arbitrary disjoint closed convex sets need not have a positive separation gap.
A slack variable turns an inequality constraint into the equality with . Its value measures the unused amount of the constraint. In the simplex algorithm, slack variables often supply the initial basic feasible solution.
For of degree and , compute its degree- Bernstein basis coefficients and solve subject to , . This is a linear program with inequalities. The coefficients form a convex-combination enclosure of the polynomial values, so . Degree elevation of Bernstein coefficients makes the bounds monotone. For every , the polynomial is strictly positive, so positive Bernstein coefficients for a strictly positive polynomial gives an eventual feasible bound . Hence converges to the true minimum. Earlier indices can use a one-inequality program at any common coefficient-based lower bound, preserving the stated constraint count for every positive index.
For , , a feasible vector is basic when the columns indexed by its positive coordinates are linearly independent. Equivalently, enlarge those columns to a basis, set every nonbasic coordinate to zero, and solve the resulting square system.
A basic feasible solution is degenerate when one or more of its basic variables is zero. A simplex algorithm pivot may then change the basis without moving the feasible point or changing the objective. Assignment networks force many zero-flow basic tree arcs.
For a full-row-rank system with rows, choose linearly independent columns, set all remaining variables to zero, and solve the resulting square system. The resulting vector is a basic solution; it is feasible when it also satisfies the required nonnegativity constraints.
If a linear program has an optimal solution, it has an optimal basic feasible solution. Choose an optimum with minimal positive support. A dependence among its active columns gives a feasible two-sided perturbation; optimality makes its objective slope zero, and moving until one coordinate vanishes contradicts minimality.
Linear-fractional programming optimizes a ratio over a polyhedron on which the denominator is positive.
For , setThen , and becomes , turning a linear-fractional program into a linear program with objective .
Every linear maximization program has a dual minimization program whose feasible objective values bound the primal values.
For minimization with constraints , , a dual-feasible vector obeys , so is a lower bound on every primal-feasible objective value. For a simplex dictionary with basis matrix , the associated vector is . Its basic reduced costs are zero and its nonbasic reduced costs are . Thus nonnegative reduced costs are exactly dual feasibility in this minimization convention; basic primal values may still be negative, as in the dual simplex algorithm.
Minimizing over unrestricted is a linear program after introducing an epigraph variable and inequalities . Its optimization Lagrangian has finite infimum over exactly when the nonnegative multipliers sum to one and their weighted slopes sum to zero. The displayed Lagrangian dual problem maximizes the resulting constant lower bound. It identifies the role of a zero-slope convex combination of the affine functions.
For a minimization problem with inequalities , the Lagrangian is with . The Lagrangian dual maximizes the concave dual function .
The Lagrange dual function is the infimum of a Lagrangian over its primal variables. It is concave in the multipliers, even before convexity of the primal problem is assumed. Maximizing it over sign-compatible multipliers gives a lower bound on a minimization problem by weak duality; appropriate convex qualifications give strong duality.
A Lagrangian relaxation moves selected constraints into the objective with appropriately signed Lagrange multipliers. Maximizing the relaxed objective over a larger easy set gives an upper bound for a constrained maximization problem. Optimizing that bound need not solve the original integer problem.
Retaining integer assignment equations while dualizing extra capacity inequalities gives an easily evaluated upper bound for a maximization problem. With multipliers and capacities , it is . It is a convex maximum of affine functions. Minimizing it exploits the convex hull of assignments, so it can have a finite optimum when only a fractional mixture satisfies the side constraints and no integer assignment does. This separates a useful relaxation bound from a certificate of integer feasibility.
For binary knapsack optimization, is an upper bound for every . Its minimum is computable from the finitely many profit-to-weight breakpoints and agrees with the fractional knapsack problem optimum. Zero-weight positive-profit terms are added independently.
A dual variable is a multiplier associated with a primal constraint in a dual linear program. In a minimization linear program with equality constraints and nonnegative primal variables, the Lagrangian yields the dual objective and inequalities ; the equality-constraint multipliers are unrestricted in sign. For a transportation problem, row and column dual variables give potentials satisfying . Complementary slackness makes occupied routes attain equality.
Every feasible dual objective value bounds every feasible primal objective value.
For the linear program maximizing with , , a vector with proves for every feasible . If a feasible attains that bound, it is optimal. This is weak duality written as a directly checkable certificate; adding nonnegative multiples of constraints suffices to verify it. The equivalent reversed-inequality certificate applies to a minimization program.
Strong duality means that the primal and dual optimal values are equal. It holds for every feasible bounded linear program and for broad classes of convex optimization problems under a constraint qualification.
A jointly proper convex function represents an optimization problem at perturbation and a family of nearby problems at other . Its primal value function is . Relaxing an inequality by gives the example , using an indicator functional. The resulting convex perturbation duality expresses multipliers as supporting subgradients of the value function.
For a convex perturbation function, defineThe primal and dual values are and ; the signed dual marginal is concave. The identity gives . If is proper and finite near zero, subgradients at zero prove strong duality with dual attainment. In finite dimensions the relative-interior condition also suffices, provided is finite. This does not itself prove primal attainment.
An optimal dual variable bounds the effect of perturbing a convex value function:If is finite convex near zero, . A singleton subdifferential gives differentiability and a first-order expansion. For an upper-bound constraint relaxed by , the derivative equals the negative of the nonnegative Lagrange multiplier; relaxing the bound can decrease the minimum value.
The Slater condition requires a feasible point at which every nonlinear convex inequality is strict and every affine equality holds. For a convex problem it implies strong duality and attainment of the dual optimum under standard finiteness assumptions.
An exact maximum-violation penalty replaces inequalities by the unconstrained objective . If an optimal dual multiplier is , every makes every penalized minimizer feasible and optimal.
Dual attainment means that a feasible choice of Lagrange multipliers achieves the optimal value of the Lagrangian dual problem. Equality of primal and dual optimal values alone does not imply dual attainment.
For finite primal and dual optimal values in a minimization problem, the duality gap is . Strong duality means this difference is zero.
At a primal-dual optimum, each positive variable corresponds to a tight dual constraint and conversely for positive dual variables.
For the linear program maximizing subject to , , let be optimal and let be an optimal dual linear program solution. Complementary slackness makes on every positive coordinate of . Any nonnegative supported on those coordinates therefore hasThe same is dual feasible when the right-hand side is changed to . Equality of feasible objectives and weak duality prove optimality of for that modified problem.
There is also a direct primal proof. If had and , then would remain feasible and nonnegative for sufficiently small . On zero coordinates of , support inclusion makes its perturbation nonnegative; on positive coordinates, smallness preserves positivity. Its objective would improve, contradicting optimality of .
For the primal linear program maximising with , , and its dual linear program minimising with , , let be optimal. The complementary slackness identity gives . Thus a strict inequality in the th dual constraint forces . One optimal dual feasible solution can therefore force zero components in every primal optimum. The same argument with roles reversed says that forces the th primal constraint to be an equality.
The transportation problem minimizes linear shipping cost while matching prescribed row supplies and column demands.
This is the finite discrete optimal transport problem with prescribed supply and demand marginals.
When factory incurs unit production cost only on goods actually shipped, add that cost to every real shipping destination in its row. Unused capacity incurs no production cost; a dummy unused-capacity column therefore keeps zero cost rather than receiving . This changes the optimal factory utilization when capacity exceeds total demand. Transportation dual certificate with capacity inequalities proves optimality without assuming every factory must produce at full capacity.
Row and column potentials satisfying the displayed inequalities give a lower bound on the cost of every feasible shipment matrix: , since row sums are supplies and column sums are demands . The reduced costs are . A feasible matrix using only zero-reduced-cost cells attains the lower bound, proving optimality by weak duality. The transportation simplex algorithm sets these potentials by equality on a transportation spanning tree, and enters a negative-reduced-cost cell if one exists.
For shipments with factory row sums at most capacities and shop column sums exactly demands , the displayed dual potentials give . The sign ensures . Equality proves optimality. It occurs when every used cell is tight and every row with spare capacity has , the relevant complementary slackness conditions. A dummy demand column with zero costs converts unused capacity into a balanced transportation problem.
The assignment problem chooses a one-to-one pairing of jobs and agents minimizing their total cost. Its minimum-cost flow formulation puts unit supplies on job vertices and unit demands on agent vertices of a bipartite graph. Integral feasible flows are perfect matchings.
For a partial assignment problem, add its fixed cost to the sum, over remaining tasks, of each task's cheapest available machine cost. This is a lower bound because it relaxes the requirement that different tasks use distinct machines. It is an admissible bound for branch and bound, even though the minimizing choices may assign the same machine repeatedly.
// Target: mathematical-optimization.bigb
The Hungarian algorithm maintains feasible assignment dual potentials and a matching of equality edges. If the alternating search cannot augment, adjust reachable job and agent potentials by the smallest reduced cost leaving the search set. This preserves feasibility and existing matching equalities while exposing a new equality edge. A resulting perfect matching attains the dual lower bound.
These feasible potentials give the lower bound on every assignment cost. An assignment using only equality edges attains this bound and is optimal by weak duality and complementary slackness.
The positive cells of a nondegenerate transportation basis form a spanning tree in the bipartite graph of supply and demand vertices.
The transportation simplex computes row and column potentials, enters a negative-reduced-cost cell, and pivots around its induced alternating cycle.
The northwest-corner method repeatedly allocates the smaller remaining supply and demand in the current top-left cell to construct an initial transportation basis.
For transportation potentials, the reduced cost is ; a negative value identifies an improving entering cell.
Adding a nonbasic edge to a transportation tree creates one cycle; alternating equal additions and subtractions around it preserves every row and column sum.
Integer supplies and demands admit an integer optimum because an integer initial basis and every cycle pivot remain integer.
A matrix of nonnegative rational numbers with integer row and column sums can be rounded entrywise up or down while preserving all those sums. Let and be its floor and fractional part. The residual row and column sums and are nonnegative integers. Build a flow network with source-to-row flow network edge capacities , row-to-column flow network edge capacities one where , and column-to-sink flow network edge capacities . The fractional parts supply a feasible flow saturating all source arcs. The integral max-flow theorem supplies an integral one of the same total value. If its middle-arc flows are , with where , then is the required matrix. This is a constructive polynomial-time algorithm; no multiplication by a common denominator is required.
A matrix is totally unimodular when every square subdeterminant is , , or ; linear programs with such a constraint matrix and integer right side have integral vertices.
A matrix with entries in is a totally unimodular matrix if every column has at most two nonzero entries, with opposite signs when both occur. To prove this, induct on the size of a square submatrix. A zero column gives determinant zero, a one-entry column reduces by cofactor expansion, and if every column has two entries then all column sums vanish, giving dependent rows. The total unimodularity of directed incidence matrices is a central instance.
The directed vertex-edge incidence matrix has one and one per nonloop column and a zero column for a loop. Every square subdeterminant belongs to . Induct on its size: a column with no nonzero entries makes the determinant zero; a column with one nonzero entry permits a cofactor expansion to a smaller determinant; and if every column has two nonzero entries, their opposite signs make the column sums zero, giving linearly dependent rows. Negating rows preserves absolute subdeterminants. Consequently the unsigned vertex-edge incidence matrix of a bipartite graph is totally unimodular: negate all rows in one part. The assignment problem is an instance, with row vertices and column vertices forming the two parts.
The simplex method moves between adjacent basic feasible solutions along improving edges of a feasible polytope until no improving pivot remains.
In a feasible minimization simplex dictionary, the nonbasic variables are nonnegative. If every reduced cost , the displayed objective identity proves for every feasible point. Thus the current basic feasible solution is globally optimal. If all reduced costs are strictly positive, equality forces every nonbasic variable to vanish and gives a unique basic solution, provided the dictionary determines all basic variables.
For a feasible simplex dictionary, let be a nonbasic variable's improving reduced cost and let be its largest feasible increase from the simplex ratio test. The greatest improvement pivot rule chooses an entering variable maximizing . It measures the improvement over the entire edge, whereas the Dantzig pivot rule maximizes only .
// Target: mathematical-optimization.bigb
In maximization, select the entering nonbasic variable with greatest positive reduced cost, meaning objective increase per unit of that variable. Unlike geometric steepest-edge pricing, this rate depends on variable and constraint scaling. A rescaled Klee-Minty cube can give the same -pivot path as smallest-index improving-facet pivoting.
For , these inequalities define a deformed cube with vertices of a polytope. Choose either the lower or upper bound recursively at each coordinate to obtain a vertex of a polytope; changing one choice gives an adjacent vertex of a polytope. When maximizing , smallest-index improving-facet pivoting visits all vertices of a polytope: first traverse the lower last-coordinate face, then move to the upper face and traverse the preceding path in reverse. Thus this geometric version of the Bland pivoting rule can require pivots. Rescaling the coordinate to makes the positive rate per unit freed coordinate equal to ; Dantzig pivot rule then selects the same exponential path. Euclidean edge-length pricing is a different rule.
A simplex tableau records the canonical constraint equations for a simplex basis and the canonical objective equation. For maximization use , so a negative nonbasic objective-row coefficient is an improving direction. Constraint rows have an identity matrix in the basic columns. A simplex method pivot divides the leaving row by the pivot coefficient and eliminates the entering column from the other rows, including the objective row. The simplex ratio test chooses the largest feasible step. When all basic values and all are nonnegative, the objective equation directly proves for every nonnegative feasible vector.
For a maximization problem with unpriced unit slack variables, their columns in a final simplex tableau give , where consists of the original basic columns. The constraint right side is , so . If the objective row uses reduced costs , its slack entries are with . Therefore . In a homogeneous linear objective with no constant offset, the displayed basic objective value must equal . This identity detects inconsistent tableau constants; an affine offset affects the value but not the reduced costs.
If a variable gains an objective coefficient , the new objective is . Substitute this in the old canonical objective equation and eliminate any remaining basic-column coefficients using the constraint rows. If is nonbasic, this simply subtracts from its objective-row coefficient. When a slack variable is sold, rename the old slack as the sales quantity; its equation already gives the correct equality and no new slack is added. Reoptimization can then start directly from the altered simplex tableau.
For a maximization simplex dictionary, choose the smallest-index nonbasic variable with positive reduced cost to enter. Among basic variables attaining the minimum feasible ratio, choose the smallest-index one to leave. This fixed index rule prevents cycling, including in degenerate pivots whose step length is zero. It need not minimize the number of pivots on a particular instance.
Phase I introduces nonnegative artificial variables to create a feasible basis and minimizes their sum, or maximizes its negative. A positive minimum proves infeasibility. At a zero minimum, remove artificial variables and use the resulting feasible original basis in Phase II with the original objective. If an artificial variable remains basic at zero, pivot it out when possible; otherwise its row is redundant. Each phase uses the simplex ratio test to preserve nonnegative basic values.
In a feasible simplex basis, increasing a nonbasic variable by changes basic coordinates to . Nonnegativity limits by the smallest ratio with ; a minimizing coordinate leaves the basis. Ties can leave zero-valued basic variables. This pivot test is distinct from the analytic ratio test for series convergence.
For standard-form linear programming constraints of full row rank, a simplex basis is a set of columns forming an invertible square matrix . The remaining variables are nonbasic; setting them to zero gives the basic solution . It is feasible if these basic variables are nonnegative. A pivot exchanges one basic and one nonbasic column while maintaining this representation.
A nonbasic variable corresponds to a column outside the current simplex basis. In standard nonnegative linear programming, it is set to zero at the basic solution. With explicit finite bounds, it is normally fixed at one of its bounds.
// Target: mathematical-optimization.bigb
A basic variable corresponds to a column of the current simplex basis. Given the nonbasic variables, the invertible basis matrix determines the basic variables from the equality constraints.
// Target: mathematical-optimization.bigb
For a linear program with unchanged cost and constraint matrix, an optimal simplex basis remains optimal while its basic solution remains feasible. Its reduced costs and dual certificate do not change. The new basic variables are , and the objective is the displayed affine function, with the basis's dual solution. This gives an exact piecewise-affine sensitivity region, determined by nonnegativity of the basic variables, rather than merely a formal first derivative.
For a square invertible constraint matrix in , suppose and . This fixed dual vector stays optimal under a changed right-hand side exactly when . Sufficiency follows from primal feasibility and equal primal/dual objectives. Necessity follows from complementary slackness: since every is positive, every optimal primal constraint must bind, forcing . The inequalities define the whole validity cone, including degenerate boundary optima.
For , , and objective , the oriented edge graph has eight improving paths from the origin to the unique optimum . Their lengths range from three to five pivots.
Articles by others on the same topic
Linear programming is a mathematical optimization technique used to achieve the best outcome in a mathematical model whose requirements are represented by linear relationships. It involves maximizing or minimizing a linear objective function subject to a set of linear constraints. Key components of linear programming include: 1. **Objective Function**: This is the function that needs to be maximized or minimized. It is expressed as a linear combination of decision variables.