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
Linear programming sensitivity within a fixed optimal basis Created 2026-10-06 Updated 2026-10-14
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.
Nonbasic variable 2026-10-14
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
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.
Past exam of the mathematics course of the University of Cambridge 2007 ib Paper 4 20C i Solution Created 2026-09-24 Updated 2026-10-14
Use payoff , so maximization of is equivalent to the required minimization. In the given simplex tableau, can increase the payoff. The simplex ratio test has candidate ratios in the row and in the row; the negative coefficient in the row imposes no upper bound. Thus enters the simplex basis and leaves.
Divide the pivot row by , then eliminate from the other rows. The resulting simplex dictionary isAll slack variables and original variables are nonnegative. The last row therefore proves for every feasible point; setting the nonbasic variables to zero attains it and leaves all basic variables nonnegative. HenceThe slack vector is .
Past exam of the mathematics course of the University of Cambridge 2008 ib Paper 3 20H Solution Created 2026-09-24 Updated 2026-10-14
Set , so and . Introduce nonnegative slack and surplus variables :The objective is . A feasible simplex basis is with nonbasic variables ; its basic values are . The initial simplex dictionary isIn the simplex algorithm, choose as the entering variable since it has positive objective coefficient. With the other nonbasic variables zero, only decreases; the simplex ratio test gives . Thus leaves. Pivoting its row givesAll nonbasic variables are nonnegative, and all objective coefficients in the final dictionary are nonpositive, proving optimality. Setting them to zero gives , , , henceThe surplus value is , so the lower constraint is indeed satisfied, not mistakenly treated as equality at the optimum. The strict negative objective coefficients also show uniqueness of the optimizer.
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 2017 ib Paper 1 8H Solution Created 2026-09-24 Updated 2026-10-05
Introduce nonnegative slack variables and use the origin as the initial feasible simplex basis:In the simplex method, let enter. The ratio test is , so leaves. Solving the first constraint for yields the dictionaryAll nonbasic variables are nonnegative and have negative reduced objective coefficients. Setting them to zero is feasible and optimal:Subtracting from both right-hand sides changes the same dictionary toIt remains feasible throughout , including the degenerate endpoint , and the reduced coefficients are unchanged. HenceAs an independent optimality certificate, , with equality at the stated point. Negative reduced coefficients also prove uniqueness of the optimal decision vector.
Simplex ratio test Created 2026-10-06 Updated 2026-10-07
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.
Simplex tableau 2026-10-14
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.