Elimination, and the swap

A doubling that arrives two steps late

A pivot rule that looks one elimination ahead chooses Wilkinson's growth row for row, because the doubling it sets up arrives one step later; looking two ahead escapes it. The argument said a matrix whose damage arrives two steps late would defeat the two-step rule the same way. It exists, and it is two Wilkinson matrices interleaved: W ⊗ I₂. Every look-ahead of depth one or two reproduces the greedy rule's growth on it exactly, 4 to 64 from n = 6 to 14, and depth three gives 2. Three copies defeat depth three and yield to four. The growth each depth is held to is 2^(n/d − 1): a fixed depth stretches the exponential and never removes it, at a cost that rises by a factor of about n for every step it looks.

Worth reading first: Elimination is a sequence of choices.

One step ahead is one step short built the pivot rule the greedy rule’s critics always propose. At each column, try every candidate row as the pivot, perform the elimination, and keep the row whose elimination leaves the smallest largest entry in the trailing submatrix — the quantity the growth factor is a maximum of. On Wilkinson’s matrix that rule chose the greedy rule’s rows one for one and attained the same growth, 2n−12^{n-1}: every first pivot leaves the same largest entry, 2, and the doubling the greedy choice sets up only appears at the second elimination. A rule that scored each candidate over two eliminations saw it, took the other row, and held the growth at 2 on every size from 4 to 24.

The essay drew the general conclusion in a sentence and left it unproved: “A look-ahead of depth dd sees consequences that arrive within dd steps, and any construction whose decisions pay off later than that defeats it in the same way. Whether there is a Wilkinson-like matrix built to defer by two steps — and so defeat the two-step rule as completely as this one defeats the one-step rule — is not answered here, and the argument suggests there is.” Its last section asked for “a block version of Wilkinson’s construction, perhaps, in which each doubling needs two eliminations to express.”

There is, and it is the simplest block version there could be.

Two copies, taking turns

Take Wilkinson’s m×mm \times m matrix — ones on the diagonal, minus ones below it, ones down the last column — and replace every entry by that entry times the 2×22 \times 2 identity. The result, Wm⊗I2W_m \otimes I_2, is a 2m×2m2m \times 2m matrix; with the Kronecker product’s natural ordering of rows and columns it is two copies of Wilkinson’s matrix interleaved, the odd rows and columns holding one and the even the other.

The construction two interleaved copies of Wilkinson's four-by-four matrix: Wilkinson's four-by-four matrix with every entry replaced by that entry times the two-by-two identity, so that two copies of it are interleavedEight rows and columns. Rows and columns 1, 3, 5 and 7 hold one copy of Wilkinson's matrix — ones on the diagonal, minus ones below it, ones in the last column of the copy — and rows and columns 2, 4, 6 and 8 hold the other. No entry couples the two copies, so eliminating a column of one leaves the other untouched, and a pivot decision in one copy meets its consequence two eliminations later, when that copy's next column comes up.1·····1··1·····1−1·1···1··−1·1···1−1·−1·1·1··−1·−1·1·1−1·−1·−1·1··−1·−1·−1·1copy 1copy 2pink: the first copy; green: the secondtwo Wilkinson matrices, taking turns
Fig. 1 W4⊗I2W_4 \otimes I_2. The pink entries are one copy of Wilkinson’s four-by-four matrix, on rows and columns 1, 3, 5 and 7; the green entries are the other, on 2, 4, 6 and 8. No entry couples them.

No entry couples the two copies, so eliminating a column of one leaves the other untouched. Elimination works through the columns in order, and the columns alternate between the copies: step one belongs to the first copy, step two to the second, step three to the first again. A pivot decision in the first copy at step one meets its consequence at step three, when that copy is next eliminated — two eliminations later rather than one.

The ties are broken exactly as the earlier essays broke Wilkinson’s: the diagonal is scaled by 1+10−121 + 10^{-12}, so that every rule meets the same tie-break and no difference below comes from it. The look-ahead rule is the earlier essay’s, generalised to any depth dd: a candidate pivot is scored by the smallest worst largest-entry that any sequence of d−1d - 1 further pivots can leave, and ties go to the lower row. At depths one and two it chooses the earlier essay’s rows exactly, on Wilkinson’s matrix and on this one.

The tie lasts as long as the deferral

Each candidate first pivot of two interleaved copies of Wilkinson's four-by-four matrix scored by the look-ahead rule at depths one, two and three: the smallest worst largest entry any continuation of that length leaves1 ahead: row 1 2.000, row 3 2.000, row 5 2.000, row 7 2.000; 2 ahead: row 1 2.000, row 3 2.000, row 5 2.000, row 7 2.000; 3 ahead: row 1 4.000, row 3 2.000, row 5 2.000, row 7 2.000. Row 1 is the greedy rule's choice. At depths one and two every candidate scores 2, a tie broken towards row 1; at depth three row 1 scores 4 and the others 2.123451 step aheadrows 1, 3, 5, 72 steps aheadrows 1, 3, 5, 73 steps aheadrow 1rows 3, 5, 7score: the largest entry the best continuation leavesred: row 1, the greedy choicethe tie lasts as long as the deferral
Fig. 2 Each candidate first pivot of W4⊗I2W_4 \otimes I_2 — rows 1, 3, 5 and 7, the only nonzero entries of the first column — scored looking one, two and three steps ahead. Row 1, in red, is the greedy rule’s choice.

The first column of W4⊗I2W_4 \otimes I_2 has four candidates, rows 1, 3, 5 and 7, all of magnitude one. Scored one step ahead, every one of them leaves a largest entry of 2: the elimination adds the pivot row into the others and the last column of the first copy becomes 2 wherever it was 1. Scored two steps ahead, still 2 for every candidate, because the second step is the other copy’s and does nothing to the first. A tie at both depths, broken towards row 1 — the greedy choice, which sets up the doubling.

Scored three steps ahead, the tie breaks. Row 1’s best continuation reaches 4 by the third elimination, when the first copy is eliminated again and the 2s it left are added to each other; rows 3, 5 and 7, which are Wilkinson’s good ordering for that copy, keep it at 2. So the three-step rule takes row 3.

That is the same picture the earlier essay drew for Wilkinson’s matrix one step earlier. There the tie lasted for one step of look-ahead and broke at the second; here it lasts for two and breaks at the third. The tie lasts exactly as long as the deferral, because what decides the choice is a single elimination that has not happened yet.

The doubling arrives d steps late

The largest entry left in the active submatrix after each elimination of three interleaved copies of Wilkinson's five-by-five matrix, along the order chosen by looking 3 steps aheadlog₂ of the largest active entry after steps 1 to 14: 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16, 16, 16, 16. The final growth is 16. Looking three steps ahead or fewer, the entry doubles every third step; looking four, it stays at 2.W₅ ⊗ I₃, n = 15depth3largest entry160369121501234elimination steplog₂ of the largest active entrypale: the other depthsthe doubling arrives three steps late
Fig. 3 W5⊗I3W_5 \otimes I_3, fifteen by fifteen: the largest entry left in the active submatrix after each elimination, along the order chosen by looking three steps ahead. It doubles at steps 4, 7 and 10 and ends at 16. Drag the depth to four and it never exceeds 2.

With three copies the deferral is three. W5⊗I3W_5 \otimes I_3 interleaves three Wilkinson matrices of size five, and each copy is eliminated at every third step. Along the order the three-step rule chooses, the largest active entry is 2 for the first three steps, 4 from the fourth, 8 from the seventh and 16 from the tenth: one doubling per round of the three copies, each arriving three steps after the decision that caused it. The rules looking one and two steps ahead choose the same order and trace the same staircase. The rule looking four steps ahead is standing on the step where each doubling lands, avoids every one, and keeps the largest entry at 2 throughout.

Every depth has its matrix

The growth factor of Wilkinson's matrix and of the constructions two and three interleaved copies of W that defer its damage, under pivot rules looking one to four eliminations aheadW ⊗ I1 at n = 4, 6, 8, 10, 12: looking up to 1 step ahead the growth is 7.999999999980998, 31.999999999888992, 127.99999999942494, 511.9999999971848, 2047.9999999866877 — 2^(n/1 − 1), the greedy rule's — and looking 2 ahead it is 2; W ⊗ I2 at n = 6, 8, 10, 12, 14: looking up to 2 steps ahead the growth is 3.9999999999929994, 7.999999999980998, 15.999999999952996, 31.999999999888992, 63.99999999974498 — 2^(n/2 − 1), the greedy rule's — and looking 3 ahead it is 2; W ⊗ I3 at n = 9, 12, 15: looking up to 3 steps ahead the growth is 3.9999999999929994, 7.999999999980998, 15.999999999952996 — 2^(n/3 − 1), the greedy rule's — and looking 4 ahead it is 2. Dashed lines are 2^(n/d − 1).468101214160246810nlog₂ of the growth factorW ⊗ I₁W ⊗ I₂W ⊗ I₃look 1 step aheadlook 2 steps aheadlook 3 steps aheadlook 4 steps aheaddashed: 2^(n/d − 1); each family defeats every depth up to its owna fixed depth stretches the exponential
Fig. 4 The growth factor of Wilkinson’s matrix and of two and three interleaved copies of it under look-ahead rules of depth one to four, against n. Each family holds every rule up to its own depth to the greedy rule’s doubling.

This figure puts the three families on one axis.

On Wilkinson’s matrix — W⊗I1W \otimes I_1 — the rule looking one step ahead attains 2n−12^{n-1} at every size measured, 8 at n=4n = 4 and 2,048 at n=12n = 12; looking two ahead, 2. On Wm⊗I2W_m \otimes I_2 the rules looking one and two steps ahead attain 2m−12^{m-1}, which is 2n/2−12^{n/2 - 1}: 4, 8, 16, 32 and 64 at nn = 6, 8, 10, 12 and 14, equal to the greedy rule’s growth to a millionth; looking three ahead, 2 at every size. On Wm⊗I3W_m \otimes I_3 the rules looking one, two and three ahead attain 2n/3−12^{n/3 - 1} — 4, 8 and 16 at nn = 9, 12 and 15 — and looking four ahead gives 2.

So the answer to the earlier essay’s question is a construction rather than an argument. For every depth dd, the matrix W⊗IdW \otimes I_d defeats the look-ahead rule of depth dd, and holds it to the greedy rule’s growth on that matrix, 2n/d−12^{n/d - 1}. Looking further ahead does not remove exponential growth from the worst case; it divides the exponent by the depth. A rule looking ten steps ahead, on W⊗I10W \otimes I_{10} of size 100, would face growth 29=5122^9 = 512 — less than the 2992^{99} partial pivoting faces on Wilkinson’s matrix of the same size, and still exponential in the size.

That is also a statement about the bound that is never attained. The classical bound on partial pivoting’s growth, 2n−12^{n-1}, is attained by Wilkinson’s construction and essentially never in practice. The look-ahead rules move the attained worst case down to 2n/d−12^{n/d-1}, and the constructions here attain that, so the bound for a depth-dd rule is at least that large. Whether it is larger — whether some other construction pushes a depth-dd rule above 2n/d−12^{n/d - 1} — is open.

What the deeper rule finds

The orders themselves say what the rules are doing. On every one of these matrices, every rule that looks no further ahead than the deferral takes the rows in their natural order, 1, 2, 3 and so on to nn — which is the greedy rule’s order, since every column’s candidates tie and every tie goes to the lowest row. The rule that looks one step further takes a cyclic shift by dd rows: on W4⊗I2W_4 \otimes I_2, rows 3, 4, 5, 6, 7, 8, 1, 2; on W4⊗I3W_4 \otimes I_3, rows 4 to 12 and then 1, 2, 3.

That shift is not a new ordering. It is the one the order the greedy rule cannot choose found by scoring every ordering of Wilkinson’s matrix — pivot on row 2, then 3, and row 1 last — applied to every copy at once. The rule that can see the doubling does not invent an escape; it finds the one the exhaustive search found, one copy at a time, without searching more than d+1d + 1 steps. And the rule that cannot see it is not misled into some subtly bad order: it simply has nothing to prefer, and falls back on the order elimination takes when it is taught as a procedure with no decisions in it — the starting point elimination is a sequence of choices argued against.

The deferral is not a tie

Everything above rests on a matrix whose first column is a tie, broken by 10−1210^{-12}. A worst case is as fragile as its margin found that Wilkinson’s growth under partial pivoting survives only as long as the perturbations stay under the margins its construction leaves, and it is fair to ask whether the deferral is a property of the tie rather than of the structure.

Twenty random relative perturbations of two interleaved copies of Wilkinson's five-by-five matrix at each size: the growth under the greedy rule, looking two steps ahead and looking three10⁻¹²: greedy 2–8, two ahead 2–16 (above 2 on 19), three ahead at most 2.00; 10⁻⁹: greedy 2–8, two ahead 2–16 (above 2 on 15), three ahead at most 2.00; 10⁻⁶: greedy 2–8, two ahead 2–16 (above 2 on 15), three ahead at most 2.00; 0.001: greedy 2–8, two ahead 2–16 (above 2 on 15), three ahead at most 2.00; 0.01: greedy 2–8, two ahead 2–16 (above 2 on 15), three ahead at most 1.99. A circle's area is the number of draws at that growth.2481610⁻¹²10⁻⁹10⁻⁶0.0010.01growthsize of the random relative perturbation of every entrygreedytwothreesteps ahead: open greedy, red two, blue threenoise does not lend the two-step rule its third step
Fig. 5 Twenty copies of W5⊗I2W_5 \otimes I_2 with every nonzero entry multiplied by 1 + ε·z, z standard normal, at five sizes of ε: the growth under the greedy rule (open), looking two steps ahead (red) and looking three (blue). A circle’s area is the number of draws at that growth.

Perturb every nonzero entry by a random relative amount and the ties are gone. For Wilkinson’s matrix that is the end of the worst case: the essay on its margin found Gaussian noise of 10−1410^{-14} taking its median growth under partial pivoting to exactly 2. the greedy rule now chooses by whichever candidate’s perturbation came out largest, and lands on growth 2, 4 or 8 — on 8, 9 and 3 of twenty draws — at every size of perturbation from 10−1210^{-12} to a hundredth. The two-step rule does not do better. At perturbations of 10−1210^{-12}, where its own tie threshold still decides, it reaches the full 16 on 13 of twenty draws and is worse than the greedy rule on 17. From 10−910^{-9} to 10−310^{-3}, where the noise decides its choices instead, it lands on 2, 4, 8 and 16 on 5, 8, 2 and 5 draws — the same median as the greedy rule, 4, worse than it on 7 draws and better on one — and at a hundredth the same, with one of the 16s at 15. The three-step rule’s growth is 2 on every draw at every size, to within 0.012 at the largest perturbation.

So the deferral survives the loss of its ties, in the sense that matters. Without a tie the two-step rule’s choice at the first column is decided by a perturbation it has no reason to read, exactly as the greedy rule’s is, and it is no better informed — two copies of Wilkinson’s matrix are as blind to it with noise as without. What noise cannot do is lend it a third step. The three-step rule is not deciding a tie; it sees a factor of two, and a perturbation of a hundredth does not move a factor of two.

What seeing further costs

The look-ahead rule of depth dd scores each candidate by searching all continuations of length d−1d - 1, and at each level of the search every remaining row is a candidate. So each further step multiplies the work by about the number of rows left.

Trial eliminations the look-ahead rule performs over a whole factorisation, against n, at depths one to four, on Wilkinson's matrix and the constructions that defer it1 ahead: 10 at n = 4, 21 at n = 6, 36 at n = 8, 55 at n = 10, 78 at n = 12, 12 at n = 6, 20 at n = 8, 30 at n = 10, 42 at n = 12, 56 at n = 14, 18 at n = 9, 30 at n = 12, 45 at n = 15; 2 ahead: 26 at n = 4, 69 at n = 6, 132 at n = 8, 215 at n = 10, 318 at n = 12, 33 at n = 6, 69 at n = 8, 124 at n = 10, 202 at n = 12, 307 at n = 14, 53 at n = 9, 109 at n = 12, 194 at n = 15; 3 ahead: 67 at n = 6, 173 at n = 8, 354 at n = 10, 630 at n = 12, 1021 at n = 14, 124 at n = 9, 328 at n = 12, 718 at n = 15; 4 ahead: 250 at n = 9, 824 at n = 12, 2068 at n = 15. Each trial elimination is itself up to n squared operations.10¹10²10³ntrial eliminations4681012151 step ahead2 steps ahead3 steps ahead4 steps aheadeach further step multiplies the trials by about nseeing further costs a power of n
Fig. 6 Trial eliminations performed over a whole factorisation, against n, by the look-ahead rule of each depth, on the three families. Each trial is itself up to n2n^2 operations.

Counted as trial eliminations over a whole factorisation of W4⊗I3W_4 \otimes I_3, twelve by twelve, the rules looking one to four steps ahead perform 30, 109, 328 and 824; on W6⊗I2W_6 \otimes I_2, also twelve by twelve, 42, 202 and 630. The factor per step of depth is between 2.5 and 4.8 at this size and grows with nn, because these matrices are sparse and most columns have only a few candidates. On a dense matrix every unused row is a candidate and the factor is close to n−kn - k at step kk: the depth-dd rule costs about nd+3n^{d+3} operations against elimination’s n3n^3.

Put the two measurements together and the trade is stark. Each extra step of look-ahead costs a factor of about nn in work and buys a factor of d/(d+1)d/(d+1) in the exponent of the worst growth it can be held to. Going from depth two to depth three on a matrix of size 100 multiplies the work by about a hundred, and moves the worst case from 2492^{49} to 2322^{32}. A pivot rule is not where exponential growth is cured.

What does cure it, and what that says about look-ahead

The growth these constructions force is not unavoidable for the matrices themselves. On every one of them a rule looking d+1d + 1 steps ahead finds growth 2; the order the greedy rule cannot choose found that a single cyclic shift of Wilkinson’s rows does the same with no look-ahead at all, and the same shift applied to each copy does it here. The matrices are easy. What is hard is a rule that finds the easy order from information it can see at the moment it has to choose.

That frames what look-ahead is. It is a search over orderings truncated at a fixed depth, and any truncated search can be fooled by a payoff placed one step past its horizon. The remedies that work in practice are not deeper searches but different information. Complete pivoting reads the whole active submatrix at every step and has a subexponential bound; a pivot that searches one row and one column measured rook pivoting, which reads a row and a column and kept the median growth of Gaussian matrices of size 64 at 2.53 against partial pivoting’s 4.06; and a threshold that holds the growth still measured what a threshold on the pivot — a bound on the multipliers — buys on the matrices whose growth is a margin. None of them looks forward in time. Each looks wider at the present step.

Which of the choices is doing the work found the same thing from the other end: on random matrices almost all of partial pivoting’s value is in the first few decisions, and the later ones barely matter. A construction like W⊗IdW \otimes I_d is the opposite — a matrix whose every decision matters, and whose decisions matter late.

What three small families do not show

The constructions are block-diagonal in disguise: no entry couples the copies, and the deferral comes entirely from the order in which elimination visits them. A matrix whose copies were coupled would let a decision in one leak into another sooner, and might be easier for the look-ahead rule, or harder. One coupling was tried — the copies sharing a last column — and gave the same growth, 2m−12^{m-1}, with depth two defeated and depth three escaping, but one coupling is not a survey. The sizes stop at fifteen because the depth-four rule’s search is already 2,068 trial eliminations there and grows like n5n^5. And the rules here look ahead with the same objective the earlier essay used, the largest active entry; a rule that looked ahead at the multipliers, or at a norm of the trailing matrix rather than its largest entry, is a different rule and might be defeated by a different construction or not at all.

Still open: a deferral that keeps the full rate, coupled copies, and a wider look

A deferral that doubles every step. Interleaving dd copies holds the depth-dd rule to 2n/d−12^{n/d-1}, because each copy doubles only when it is visited. A construction that deferred each decision by two steps and still doubled at every step would hold the two-step rule to 2n−12^{n-1}. The prediction with a sign is that no such construction exists for the growth measured by the largest active entry — that any matrix on which the two-step rule attains growth gg at size nn has log⁡2g≤n/2\log_2 g \le n/2 — and that an exhaustive search over the ±1,0\pm 1, 0 matrices of size six finds none above 232^{3}.

Copies that leak. Couple the copies by a small amount ε\varepsilon between them — an entry of size ε\varepsilon in every off-copy position of the first copy’s last column. The prediction is that for ε\varepsilon above about 2−m2^{-m} the leaked doubling reaches the two-step rule’s horizon and it escapes, so that the deferral needs its copies separated by more than the growth they are about to suffer.

Looking wider instead of further. Rook pivoting reads one row and one column at each step and needs no look-ahead. The prediction is that it attains growth 2 on every W⊗IdW \otimes I_d at every size measured here, at a cost of at most three times partial pivoting’s comparisons — which would make the width of the present step, not the depth of the future, the dimension in which a pivot rule has to look.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Combinatorial searchGaussian eliminationGrowth factorKronecker productLU factorisationPartial pivotingPivotingWilkinson's matrix