Greatest improvement pivot rule 2026-10-14
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
Past exam of the mathematics course of the University of Cambridge 2002 ib Paper 3 15H Solution Created 2026-09-24 Updated 2026-10-14
Introduce surplus variables , slack , and artificial variables , all nonnegative. The two-phase simplex standard-form equations arePhase I maximizes . An initial basic feasible solution has basic variables and all others zero. Its simplex dictionary isLet enter. The simplex ratio test gives from the row and from the row, so leaves. After this pivot,Choose to enter; the limiting ratios are and , so leaves. The resulting dictionary isThus , attained at with . Since for every feasible Phase I point, this proves feasibility and completes Phase I.
Delete the artificial variables and restore the original objective . The resulting Phase II dictionary isLet enter; only decreases, and it reaches zero at . Pivoting givesAn optimal simplex tableau, with each row recording its equality, isBoth reduced costs in the maximization dictionary are negative. Setting nonbasic therefore givesAs a direct optimality check, implies ; the displayed point attains both equalities.
Past exam of the mathematics course of the University of Cambridge 2006 ib Paper 4 20C Solution Created 2026-09-24 Updated 2026-10-14
Use two-phase simplex to handle the constraint of the opposite inequality direction. Introduce nonnegative slack variables , a surplus variable , and an artificial variable . The equality constraints areFor Phase I maximize , initially with basis . Its initial simplex dictionary isChoose to enter. The simplex ratio test compares , and , so leaves. The new dictionary isSince , choose to enter. Its limiting ratios are from and from , so leaves. This givesNow , so let enter. Its limiting ratios are from and from ; the artificial variable leaves. The simplex dictionary becomesSetting all nonbasic variables to zero gives , a feasible original basis. Since , Phase I is optimal with value zero; delete .
For Phase II the original objective in this basis isAll nonbasic reduced costs are strictly negative, so no further improving simplex pivot exists. As the nonbasic variables are nonnegative, the dictionary also directly certifies , with equality only when . ThereforeThe second original constraint has slack five and the other two are tight. As an independent linear programming optimality certificate, multiply the first constraint by and the third, after reversing it, by . This gives , and subtracting proves the same upper bound for the objective.
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 ii Solution Created 2026-09-24 Updated 2026-10-14
The amended payoff is . Using the previous simplex dictionary,Thus enters. The positive pivot-column coefficients give ratios from and from ; the coefficient in the row gives no bound. The simplex ratio test makes leave. Dividing that row by and eliminating givesThe positive objective-row coefficients and nonnegative slack variables prove optimality at . ThereforeAll three constraints are equalities at this point. Strict positivity of the three objective-row coefficients also forces every optimal point to have all three slacks zero; the displayed dictionary then makes the optimizer unique.
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 2007 iii Paper 40 1 Solution Created 2026-10-03 Updated 2026-10-14
Introduce nonnegative slack variables , and , and write the objective as . With nonbasic, the initial simplex dictionary isThis is feasible at the origin. Enter . The simplex ratio test selects to leave, since its bound is , compared with from . Pivoting givesNow enter . The ratio test chooses to leave: its bound is smaller than from and from . The resulting dictionary isAll basic values are nonnegative and all nonbasic objective coefficients are nonpositive. The simplex algorithm therefore certifiesThe negative objective coefficients also make this continuous optimum unique.
For integer , all three original slacks are integers. Apply a Gomory fractional cut to the rowThe fractional part of is , so the cut is , or . To justify it directly, rewrite the row asThe parenthesized term is an integer and is at most , since the other term is nonnegative. It is therefore at most , proving the cut. This retains every feasible integer solution and excludes the current fractional optimum. Since , the cut is equivalently .
Introduce the integer-valued nonnegative slack . Its dictionary row is , so primal feasibility fails while the objective row remains dual feasible. In the dual simplex algorithm, leaves; tie in the dual ratio test, each with ratio . Choose to enter. Substituting givesThis dictionary is feasible at and certifies the cut relaxation's optimum , achieved at the integer point .
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 2008 iii Paper 38 3 Solution Created 2026-10-03 Updated 2026-10-14
In a minimum-cost flow problem, a directed graph has arc flows , unit costs , lower and upper capacities , and net supplies summing to zero. The linear program minimizes subject to the flow balances and .
Give each graph vertex a network dual potential . With the outgoing-minus-incoming oriented incidence matrix , the optimization Lagrangian isMinimizing over the capacity intervals is separable. A candidate feasible flow minimizes this optimization Lagrangian if it takes its lower bound whenever the network reduced cost is positive, its upper bound whenever that network reduced cost is negative, and any allowed value when that network reduced cost is zero. Equivalently, for arcs with distinct lower and upper bounds,For every other feasible flow , these conditions give . This proves the Lagrangian sufficiency theorem certificate, rather than merely stating the capacitated flow optimality conditions.
Put . The four flow balances determineIntersecting the four capacity intervals gives . In particular,is a feasible flow. Write . Its cost along the feasible interval isHence is optimal precisely when . A network dual potential certificate isThe three interior arcs have zero network reduced costs and , which has the required nonnegative sign at its lower capacity.
For the network simplex algorithm, start with the network simplex tree basis consisting of arcs , and fix nonbasic arc at its lower bound 2. These are exactly the potentials just found. If , no improving pivot is needed. If , arc enters and its fundamental graph cycle increases all four flows by the same amount. At the remaining upper capacities are , so the simplex ratio test allows an increase of 2. Arc reaches its upper bound and leaves the tree. The new network simplex tree basis has arcs , with potentialsNow only the nonbasic arc has a possibly nonzero network reduced cost, namely . It is at its upper bound, so the sign is optimal. Thus for all real costs the complete answer isWhen , both endpoint basic feasible solutions and every intermediate feasible flow have the same cost.
To count basic solutions, a network simplex tree basis omits one arc of the four-cycle and fixes that arc at either bound. The possibilities areThere are eight tree/bound basic representations, seven distinct basic flow vectors, and two basic feasible solutions. The distinction in the first count matters: the upper bounds on and both give the identical flow at . Thus if “basic solutions” counts vectors rather than basis representations, the answer to (i) is seven; the frequently used count of basis/bound choices is eight. The answer to (ii) is unambiguously two, since only satisfy all capacities.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 35 2 a Solution Created 2026-10-03 Updated 2026-10-14
Introduce nonnegative slack variables and let denote profit. We display each simplex tableau as coefficients of its row equation, with the coefficient of in the objective equation implicitly one. Thus a negative coefficient in the last row permits an improving entering variable. The initial simplex tableau isUse the simplex method with entering. The simplex ratio test gives ratios and , so leaves. Divide its row by two and eliminate the other entries:Next enters. The positive-column ratios are and , so leaves. After this pivot and a row reordering,The last row is , so every nonnegative feasible solution has . Setting the nonbasic variables to zero givesThe equality certificate also shows uniqueness, since both nonbasic objective coefficients are strictly unfavorable.
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 2014 iii Paper 37 4 c Solution Created 2026-10-03 Updated 2026-10-06
Introduce nonnegative surplus variablesAt the proposed starting basic feasible solution, the basic variables are and the nonbasic variables are . Its simplex dictionary, with objective , isIncrease to decrease . The simplex ratio test gives limits from , from , and from . The smallest is , so enters and leaves. After this single pivot the dictionary isAll objective coefficients of nonbasic variables are strictly positive. Thus the simplex method has reached its unique optimum:The feasible dual vector has the same objective, providing an independent weak duality certificate. Normalization givesThese are all the equilibria: the dual's strict slack in row two forces , and the primal's strict slack in column two forces . Equality of the two active row and column payoffs then fixes the displayed probabilities. The value is the first player's expected net loss; the second gains .
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 38 3 b Solution Created 2026-10-03 Updated 2026-10-14
On the dashed spanning tree, the nonzero flows arewith and all non-tree flows zero. The tree balances give supply four at vertex , demands one at and , and demand two at . Its cost is .
Choose and make the tree network reduced costs zero. The resulting network dual potentials areFor the non-tree edges, in the order , the network reduced costs areOnly has negative network reduced cost, so it enters the basis.
Adding this edge to the tree creates the graph cycle . Increasing its flow by adds on and subtracts on . These signed changes preserve every flow balance. The simplex ratio test allows , and the objective decreases by because the cycle's signed cost is .
Take and remove from the basis. The other tied edge remains a zero-flow basic edge; this is a legitimate degenerate tree basis and requires no extra pivot. The new flow isIts cost is . For the new tree, chooseEvery network reduced cost is nonnegative: the new non-tree costs for are . All positive-flow edges have zero network reduced cost, and the dual objective is . Thus complementary slackness gives
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 38 6 b Solution Created 2026-10-03 Updated 2026-10-06
In the first tableau the basis is , givingThe second basis is , giving and . This pair is not yet a Nash equilibrium: label is missing and label is duplicated.
Resolve the duplicate by bringing into the second tableau. Its column is , so the simplex ratio test givesVariable leaves, givingNow label is duplicated. Bring into the first tableau; its column is . The positive-entry ratios are and . Thus leaves, givingAll labels are now present and . Each unnormalized strategy has total mass , so the Lemke-Howson algorithm produces
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.
Two-phase simplex 2026-10-07
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.
