Introduce the nonnegative integer surplus variables and . Solving these two equalities gives the optimal relaxed simplex dictionary
with objective
The printed tableau has a sign error in the first row: in equality-row form the coefficient of must be , rather than . The defining constraints and the printed objective row both confirm this correction. The second row, from which the required cut is obtained, is unaffected.
The cutting-plane method solves the linear programming relaxation and, if the optimum is fractional, adds an inequality valid for every feasible integer point but violated by that optimum. For an all-integer tableau row
write each coefficient as its integer part plus its fractional part. The quantity is an integer, while is nonnegative. Thus the integer is at most , and subtraction gives the Gomory fractional cut
It retains every feasible integer point and cuts off the fractional basic point with all nonbasic .
Apply this to the row . Since , and , the resulting valid inequality is
Multiply by five and add an integer slack . Its row is . At the old relaxed optimum, is negative, while the minimization objective coefficients remain nonnegative. This is the starting configuration for the dual simplex algorithm: retain dual feasibility and pivot to repair the negative basic value.
The cut row permits either or to enter. The dual ratio test gives
Thus enters and leaves. Solving the cut row and substituting gives
Setting the nonbasic variables gives nonnegative basic values . The new objective coefficients are nonnegative, so this is optimal for the cut relaxation. Its decision variables are already integer and satisfy the original inequalities. Therefore
Indeed the positive coefficients of both nonbasic variables make this relaxed optimizer unique. No additional cut is needed.
For a directed graph, the uncapacitated minimum-cost flow problem is
Positive is external supply and negative is demand; summing the flow balances requires . There are no finite upper arc capacities. Let be the oriented incidence matrix with tail and head . For free dual potentials , the Lagrangian is
Its infimum over nonnegative flows is exactly when every network reduced cost is nonnegative; otherwise the infimum is minus infinity. Thus the dual maximizes subject to these inequalities. For a primal feasible flow and dual feasible potentials,
This derives weak duality and the complementary slackness condition . A feasible pair satisfying it has equal objectives and certifies optimality.
A spanning tree gives candidate network dual potentials by making all its arcs tight: choose one root potential and propagate along each tree arc, reversing this equation when traversing against the arc. An arbitrary tree does not automatically make the non-tree reduced costs nonnegative; those inequalities must be checked. If a guaranteed feasible construction is needed and there is no negative directed cycle, use dual network potentials from shortest-path distances: add an auxiliary source reaching every vertex, calculate distances , and take . The shortest-path inequality proves dual feasibility, with tightness on the shortest-path tree.
For the printed dashed tree, set all non-tree flows to zero and solve the balances from the leaves. This gives
The remaining arcs have zero flow. The total initial cost is . This is a basic feasible solution, though degenerate because the tree flow on is zero.
Normalize . Tree tightness gives
The non-tree reduced costs are
The negative reduced cost on identifies an improving entering arc for the network simplex algorithm. Adding it to the tree creates a unique undirected cycle. Sending along increases the flows on by and decreases those on by ; all other flows are unchanged. This balanced displacement preserves every node equation. Nonnegativity limits to the minimum of the four decreasing flows, namely . Choose arc to leave among the tied limiting arcs.
After this one pivot the nonzero flows are
and every other arc flow is zero. The objective decreases by , giving cost .
For the new tree, tight potentials normalized at vertex 1 are
All tree reduced costs are zero. For the non-tree arcs they are , respectively, so the potentials are dual feasible. Their dual objective is
matching the primal cost. Complementary slackness therefore proves
This is the stopping test of the network simplex method: maintain a feasible tree flow, compute tight potentials, enter a negative-reduced-cost non-tree arc, make a maximal feasible cycle adjustment and exchange a limiting tree arc, until all reduced costs are nonnegative. Here exactly one improving step suffices.
A balanced transportation problem chooses nonnegative shipments minimizing , subject to and , where the total supply equals total demand. For multipliers , its Lagrangian is
Taking its infimum over produces the linear programming duality problem of maximizing subject to . These are the transportation dual potentials.
The transportation simplex algorithm starts with a feasible transportation spanning tree of basic entries, obtainable by filling the north-west available cell with the smaller remaining supply or demand. Set on basic cells; this determines all potentials up to adding a constant to all and subtracting it from all . If all nonbasic reduced costs are nonnegative, feasibility and the dual bound prove optimality. Otherwise let a negative-cost cell enter. It closes a unique cycle in the basic tree. Alternate additions and subtractions around that cycle and choose the largest amount preserving nonnegativity, namely the minimum shipment on the subtraction cells. A cell that reaches zero leaves the basis. The cost changes by the entering reduced cost times the pivot amount. Zero basic cells and an anti-cycling rule can handle degeneracy; all pivots below are nondegenerate.
The north-west initial shipment matrix is
With , its transportation dual potentials are and . The most negative reduced cost is . The cycle is ; the pivot amount is . Hence
Now and . Enter , of reduced cost , on cycle . The amount is , giving
The new potentials are and . Enter , of reduced cost , on cycle . The amount is . Thus
To certify optimality in the original transportation problem, take and . Their entire reduced-cost matrix is
They satisfy dual feasibility, and their value is , equal to the shipment cost. The minimum transportation cost is therefore , with no unproved optimality assertion from the iterations alone.
Introduce nonnegative slack variables and write for the objective value. The initial simplex dictionary, recovered from the original PDF rather than the corrupted converted table, is
For this minimization convention, nonnegative objective coefficients give dual feasibility. The dual simplex algorithm repairs a negative basic value while retaining those nonnegative reduced costs. If the leaving row is , , an entering variable must have ; choose the smallest ratio of its objective coefficient to .
Choose to leave. Eligible columns are , with ratios and . Thus enters. Solving its row and substituting gives
Now only has a negative basic value. Its only eligible entering column is , so pivot there, with leaving. The resulting dictionary is
Setting the nonbasic variables to zero gives a basic feasible solution. The final objective row also proves for every feasible point, because its nonbasic variables are nonnegative. Hence the unique relaxed optimum is
For the integer program, all four original slack variables are integers whenever the decision variables are integers. The fractional row can be written
The Gomory fractional cut keeps the fractional parts of these coefficients: and . It therefore gives , or . Its validity can also be seen directly: the displayed row makes an odd nonnegative integer. In original variables this cut is .
Introduce the new integer-valued slack , with initial row . It is primal infeasible but retains dual feasibility, so one more dual-simplex pivot has leave and enter. Substitute to obtain
All basic values at are nonnegative integers, including . The objective row proves a lower bound of on every point satisfying the valid cut, hence on every integer-feasible point. It is attained at
The strictly positive nonbasic objective coefficients also show uniqueness. One Gomory cut and its reoptimization are sufficient.