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.
Basic variable 2026-10-14
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
Using the standard maximum form of a linear program, writewhere , , , and . The inequalities are coordinatewise, and is the objective function. General linear programs can be put in this form: reverse the sign of a minimization objective function, reverse lower-bound linear inequalities, replace an equality by two opposite linear inequalities, and replace each unrestricted variable by the difference of two nonnegative variables. Some conventions instead call the equality-constraint version standard form; the convention here is the maximum-with-upper-bounds convention.
Introduce nonnegative slack variables . The equivalent slack form of a linear program isThe original variables are initially nonbasic and the slack variables basic. More generally, a slack form of a linear program specifies disjoint index sets and writesThus each basic variable and the objective function are expressed using only nonbasic variables. Setting all nonbasic variables to zero gives the associated basic solution, which is a feasible solution exactly when the resulting basic values are nonnegative. The slack form of a linear program does not itself require that initial basic solution to be feasible.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 38 1 Solution Created 2026-10-03 Updated 2026-10-14
Introduce slack variables . The initial simplex dictionary isAll six variables are nonnegative. The given rule is the Dantzig pivot rule: select the nonbasic variable with the largest positive reduced cost. It applies to slack variables too once they become nonbasic. At each step the simplex ratio test limits how far that entering variable can increase before a basic variable reaches zero.
The successive objective rows of the simplex dictionary, expressed in the current nonbasic variables, areThese rows identify each entering variable unambiguously. Performing the corresponding simplex ratio tests gives the complete pivot sequence:For example, after pivot two the dictionary has , and . Although increasing improves the objective at rate four, reaches zero first at , giving pivot three. After pivot four, and ; the upper bound gives pivot five.
In the final objective row every reduced cost is nonpositive. Since , it also directly certifies the upper bound , attained only when all three vanish. Thus
A greatest improvement pivot rule uses the total feasible increase in the objective, rather than its increase per unit of the entering variable. At the origin, the three candidate edge moves have improvements , and . It therefore brings into the simplex basis first, with leaving, and immediately reaches the optimum. This rule solves this instance in one pivot.
This is a three-dimensional Klee-Minty cube example: the specified Dantzig pivot rule visits every vertex before reaching the optimum. Higher-dimensional versions require pivots, so that rule has exponential worst-case running time despite its strong practical performance. Each pivot requires only polynomially many arithmetic operations. An anti-cycling rule such as the Bland pivoting rule ensures finite termination; without one, degenerate pivots can cycle. A crude terminating bound is the number of possible bases, for constraints and original variables, which can be exponential. This does not show that every conceivable pivot rule must take exponential time. Linear programming itself has polynomial-time algorithms, including the ellipsoid method and suitable interior-point methods.
For this tableau sign convention, a negative coefficient in the objective row means the corresponding nonbasic variable can increase profit. Initially has the most negative coefficient. The simplex ratio test gives in row one and in row two, so row two leaves to preserve feasibility. Next is the only column with a negative objective coefficient. The ratios are and , so row one leaves. All resulting basic variables remain nonnegative.
In the usual linear programming sensitivity within a fixed optimal basis, retain the optimal basis while allowing its values to adjust. If the second resource amount is , thenThe dual prices remain , so optimality persists exactly while both basic variables are nonnegative:The optimal profit on that range is . At the endpoints the basis is degenerate but remains optimal. If the wording is instead read as requiring the exact numerical production vector to remain unchanged and optimal, only does so; the standard allowable range concerns the basis and its adjusted solution.
At the current dual prices , the new product has reduced cost , so it can increase profit. Its transformed resource column isIncreasing by changes the old basic variables to and . Thus leaves at , givingFor a certificate, take dual prices . They price the four products at , respectively, each at least its profit. Their resource total is , equal to the achieved profit. Weak duality proves optimality, and the profit has increased by two.
Simplex algorithm Created 2026-09-24 Updated 2026-11-05
The simplex algorithm solves a linear program by moving among basic feasible solutions. For subject to , , a basis selects enough columns of to solve for the basic variables. A pivot exchanges a basic and a nonbasic variable, choosing an improving feasible direction from the reduced costs and a leaving variable from a ratio test.
For with , , , one improving vertex path is , ending at value ten. Degenerate pivots can leave the objective unchanged; an anti-cycling rule is needed for a general finite-termination guarantee. Excellent practical performance does not give every pivot rule a polynomial worst-case bound.
Slack form of a linear program 2026-10-31
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.