The Klee–Minty lower bound for Dantzig's rule #
This module proves that the simplex method with Dantzig's largest-coefficient rule
(CslibFrontier.Algorithms.Lean.Simplex.Dantzig) makes exactly 2 ^ n - 1 pivots on the
n-dimensional Klee–Minty program ([KM72]; the form below is the one presented in
[Chv83], Chapter 4), started from its slack dictionary, for every n and over every linearly
ordered field.
The program #
With 0-based indices, the n-dimensional Klee–Minty program is
maximize ∑_{j<n} 10 ^ (n - 1 - j) * x_j
subject to 2 * ∑_{j<i} 10 ^ (i - j) * x_j + x_i ≤ 100 ^ i for i < n, and x ≥ 0
(kleeMintyMatrix, kleeMintyRhs, kleeMintyObj). [Chv83] writes it with 1-based
indices, 10 ^ (n - j) and 100 ^ (i - 1). For n ≥ 1 its optimum is 100 ^ (n - 1),
attained at x = (0, …, 0, 100 ^ (n - 1)).
Proof #
The variables are those of slackDictionary: x_k and its slack w_k form pair k. The run
visits the vertices N = 0, 1, …, 2 ^ n - 1 in order, and the dictionary at vertex N is given in
closed form (KleeMinty.dict): x_k is basic iff bits k and k + 1 of N differ (so the
basic original variables form the reflected binary Gray code of N), and the row constants,
coefficients and reduced costs are explicit functions of the bits of N. If j is the lowest zero
bit of N < 2 ^ n - 1, then
- the nonbasic variable of pair
jhas reduced cost10 ^ (n - 1 - j), strictly larger than every other reduced cost, so Dantzig's rule enters it (KleeMinty.dantzigEntering_dict); - the basic variable of pair
jhas a strictly smaller ratio than every other row that limits the entering variable, so the ratio test makes it leave (KleeMinty.blandLeaving_dict); - the pivot yields exactly the dictionary at vertex
N + 1(KleeMinty.pivot_dict).
At N = 2 ^ n - 1 no reduced cost is positive (KleeMinty.dantzigStep_dict_top). The objective
strictly increases along the run and the 2 ^ n bases are pairwise distinct, so the run visits
every vertex of the deformed cube. The entering and leaving variables are the unique maximizer and
minimizer at every step, so the tie-breaking conventions of dantzigStep play no role.
Main definitions #
Cslib.Algorithms.Lean.Simplex.kleeMintyMatrix,Cslib.Algorithms.Lean.Simplex.kleeMintyRhs,Cslib.Algorithms.Lean.Simplex.kleeMintyObj: the Klee–Minty program.Cslib.Algorithms.Lean.Simplex.KleeMinty.dict: the dictionary at vertexN.
Main results #
dantzigRun_kleeMinty: Klee–Minty. Afterf < 2 ^ n - 1pivots Dantzig's rule is at the dictionary of vertexf, and it stops at an optimal dictionary after exactly2 ^ n - 1pivots.exists_dantzigRun_kleeMinty_eq_outOfFuel_iff: a run withfpivots of fuel runs out of fuel ifff < 2 ^ n - 1.isGreatest_kleeMinty: the optimum of the(n + 1)-dimensional program is100 ^ n.KleeMinty.objConst_dict_lt_of_lt,KleeMinty.eq_of_dict_basis_eq: the visited vertices have strictly increasing objective values and pairwise distinct bases.
Limitations #
The lower bound counts pivots of this particular rule (Dantzig's entering rule with the
smallest-index ratio test); no machine-level running time is certified. Bland's rule also takes
more than polynomially many pivots on suitable programs, but that is not formalized here; the
worked examples only compare the two rules for n = 3, 4.
References #
-1 if bit k of N is set, 1 otherwise.
Pair k is flipped at vertex N when bits k and k + 1 of N differ.
The constant of row k at vertex N.
The coefficient of the nonbasic variable of pair p in the row of pair k.
The reduced cost of the nonbasic variable of pair p.
The dictionary at vertex N of the n-dimensional Klee–Minty program. The variables are
those of slackDictionary: x_k = Fin.castAdd n k and its slack w_k = Fin.natAdd n k form
pair k. Exactly one variable of each pair is basic, x_k iff bits k and k + 1 of N differ
(Basic). Writing t_p for the nonbasic variable of pair p, the row of the basic variable of
pair k is rowConst N k + ∑_{p<k} rowCoeff N k p * t_p - t_k, and the objective is
zVal N n + ∑_p cost n N p * t_p. Entries outside these ranges are 0, as in
Dictionary.pivot.
Bits #
Signs, values and coefficients #
From vertex N to vertex N + 1 #
Variables #
The dictionaries #
The pivot step: at the lowest zero bit j of N, pivoting dict n N on the leaving
basic variable of pair j and the entering nonbasic variable of pair j yields dict n (N + 1).
Dantzig's rule on the dictionaries #
At vertex N < 2 ^ n - 1 with lowest zero bit j, Dantzig's rule enters the nonbasic
variable of pair j: its reduced cost 10 ^ (n - 1 - j) is the unique largest one.
At vertex N with lowest zero bit j, the ratio test leaves the basic variable of pair
j: its ratio is strictly smallest.
Below the last vertex, one step of Dantzig's rule moves from vertex N to vertex N + 1.
At the last vertex 2 ^ n - 1 no reduced cost is positive, so Dantzig's rule stops.
The run of Dantzig's rule from vertex N: after f pivots it is at vertex N + f, and
it stops at the last vertex 2 ^ n - 1.
Every dictionary dict n N is feasible.
The objective strictly increases along the run: the vertices 0, …, 2 ^ n - 1 have
distinct objective values.
The Klee–Minty program #
Klee–Minty: on the n-dimensional Klee–Minty program, started from its slack dictionary,
the simplex method with Dantzig's rule runs out of fuel after f < 2 ^ n - 1 pivots and stops at
an optimal dictionary after exactly 2 ^ n - 1 pivots.
Dantzig's rule makes exactly 2 ^ n - 1 pivots on the n-dimensional Klee–Minty
program: a run with fuel f runs out of fuel iff f < 2 ^ n - 1; otherwise it stops at an
optimal dictionary (dantzigRun_kleeMinty).
The Klee–Minty optimum: the maximum of the (n + 1)-dimensional Klee–Minty program is
100 ^ n, as certified by the final dictionary of the run of Dantzig's rule.