Where the flop count stopped predicting the time

The last digit is the cheapest

Every cost curve on this site has the same shape: the first digits are cheap and the last ones are not. One method inverts it. Doubling the work buys twice as many digits as the previous doubling did, so the price of a digit halves every time it is paid.

Worth reading first: A problem with infinitely many eigenvalues.

Every cost curve in this field has the same shape. A direct solve is a fixed price and buys every digit the arithmetic has. An iterative solve buys digits at a constant rate — conjugate gradients takes about the same number of steps for each further factor of ten, which is what the rate the condition number predicts measures. A hierarchical format buys them at a worsening rate: where the format starts paying prices a rank against an accuracy and the rank grows faster than the digits do.

Fixed, constant, or worsening. There is a method here whose curve is none of those.

Counting the eigenvalues inside a circle: an integral that is an integer once it has convergedThe number of eigenvalues of the delay problem inside |z| = 2, computed as (1/2πi)∮tr(T(z)⁻¹T′(z))dz by the trapezoidal rule. The true count is 2, from the closed form. The error runs 0.00282, 0.0572, 0.0151, 5.25·10⁻⁴, 3.6·10⁻⁷, 1.35·10⁻¹³ at 4 to 128 points — a straight line on this axis is a constant factor a doubling, and this falls faster than that, which is what exponential convergence looks like when the integrand is analytic on the contour. The answer is then ROUNDED, and 0 of the 6 quadratures round to the wrong integer while looking exactly as confident as the ones that do not. The only evidence available is the distance from the nearest integer, which is the quantity plotted.11.31.61.92.210⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²log₁₀ quadrature pointsdistance from the true counthalf an eigenvaluean integer, eventuallytrue count2at 4 points2at 128 points2finest error1.4·10⁻¹³the integral is an integerand a rounding hides how far it was
Fig. 1 The distance from the true count against the number of quadrature points. Each doubling of the work moves further down the axis than the doubling before it.

The measurement

Counting the eigenvalues inside a circle is an integral of a trace, and the trapezoidal rule on a circle is the right quadrature because the integrand is analytic and periodic. Measured on a four-by-four delay problem, on a circle of radius two containing two eigenvalues:

points error digits gained by this doubling
8 5.7·10⁻²
16 1.5·10⁻² 0.58
32 5.3·10⁻⁴ 1.46
64 3.6·10⁻⁷ 3.16
128 1.4·10⁻¹³ 6.43

The third column roughly doubles each time. Each doubling of the work buys about twice as many digits as the previous doubling did, so the price of a digit halves every time it is paid.

Sixteen points cost twice eight and buy 0.6 digits. A hundred and twenty-eight cost twice sixty-four and buy 6.4. On any other curve in this field, that ordering runs the other way.

Why it inverts

The mechanism is one of the pleasant facts of numerical analysis and it is worth stating carefully because it is what limits the finding.

The trapezoidal rule on a non-periodic interval has an error of O(h²), so halving h buys a fixed two digits per four-fold refinement — the algebraic behaviour every quadrature rule has in a first course. On a periodic analytic function the Euler–Maclaurin correction terms all cancel: every one of them involves the difference of derivatives at the two endpoints, and on a closed contour the endpoints are the same point. What is left is not an algebraic term at all but one that decays like ρ^{−N} for a ρ set by how far the integrand can be continued analytically off the contour.

Geometric decay in N, plotted against a doubling N, is what produces the doubling third column. Nothing about the method is clever; the integrand’s analyticity is doing all the work.

What sets ρ, and what it costs when it is small

ρ is the distance from the contour to the nearest singularity of the integrand, measured in the right conformal sense — and the singularities of tr(T⁻¹T′) are exactly the eigenvalues.

So a circle that runs close to an eigenvalue converges slowly. Measured at radius 1.5, which passes near an eigenvalue at 1.587, a hundred and twenty-eight points reach only 7.6·10⁻⁴ where the radius-two circle reached 1.4·10⁻¹³. Same problem, same routine, nine orders of difference, decided entirely by where the contour was drawn.

That gives the practical rule, and it is unusual in this field for being about input rather than about effort: move the contour before adding points. A circle placed in a gap converges so fast that the quadrature is free; a circle placed across a gap cannot be rescued by any amount of work that anybody would pay for.

What “digits per doubling” is measuring

The third column is a ratio of logarithms and it is worth being careful about what it says, because a doubling is not the only way to spend.

Work here is the number of quadrature points N, and each point is one factorisation. The error behaves like ρ^{−N} for a fixed ρ > 1, so log₁₀(error) is linear in N: each additional point buys a constant number of digits, and that constant is log₁₀ρ. Measured on the radius-two circle it is about 0.1 digits a point, which is the honest per-unit statement.

Doubling N therefore adds N·log₁₀ρ digits, and N is itself doubling — which is where the doubling third column comes from. So the sentence “each digit is cheaper than the last” is true of doublings and false of individual points, and both are worth having: the per-point rate is what a scheduler budgets, and the per-doubling rate is what a person deciding between 32 and 64 points experiences.

Compare an algebraic method, where the error goes like N^−p. There log(error) is linear in log(N), so a doubling buys a constant p·log2 digits — 0.6 digits for the trapezoidal rule on a non-periodic interval, at every doubling, forever. That is the curve everybody has in mind, and it is what makes the table above surprising.

Where else this shape appears on the site

Once named, the shape is recognisable, and it has appeared here twice before without being called out.

A multigrid V-cycle has a rate that does not notice the size, so its cost per digit is constant in the problem’s size — but constant per digit, not improving. A rate that does not notice the size is the strongest cost result in the iterative field and it is still a linear exchange.

Newton’s method genuinely doubles its digits per step, which is the same geometric shape at the level of an iteration rather than a quadrature. Its cost per digit halves at every step, exactly as here — and it is only available in a neighbourhood, which is the qualification a contour rule does not need.

And a Chebyshev interpolant of an analytic function converges geometrically for the same Euler–Maclaurin-adjacent reason. What all three share is analyticity: a smooth-but-not-analytic integrand has algebraic convergence, and the exponential rate is bought entirely by the integrand being extendable off the contour.

That is the sentence to carry into a cost argument: geometric convergence is a property of the data, not a property of the method. A contour rule applied to a non-analytic integrand is an ordinary trapezoidal rule with an ordinary O(h²) error, and nothing about it improves with spending.

The exchange rate is not the whole price

Two costs sit outside the table and both matter.

Each quadrature point is a factorisation. The integrand needs T(z)⁻¹ applied to something, at a complex z, so every point costs one complex n × n factorisation — which here is a real 2n × 2n factorisation through the embedding, at eight times the price of an n × n one. A hundred and twenty-eight points is a hundred and twenty-eight factorisations, which for n in the thousands is the entire budget of the computation.

And the points are independent. Every one of them is a separate factorisation of a separate matrix with no data dependence on any other, which is the property a reduction that changes the order spends a whole essay wanting: a hundred and twenty-eight embarrassingly parallel factorisations, with one sum at the end. Compare a Krylov method, where step j cannot start until step j − 1 has finished, and whose cost model is dominated by that chain.

So the honest accounting is: expensive per digit in absolute terms, improving with spending, and perfectly parallel. Which is a combination no other method in this field has, and it is why contour methods are the ones used when the machine is wide rather than fast.

The other measurement in this field with an exact ratio

The polynomial field supplies a second cost result, and it is exact rather than asymptotic.

A Krylov method for a quadratic eigenvalue problem can build its subspace out of the 2n × 2n linearisation or out of the coefficients directly. The second stores vectors of length n rather than 2n, and its projection is taken onto the quadratic, which has 2m eigenvalues for an m × m problem. So:

storage        exactly half
Ritz values    exactly twice
per number held    a factor of four

Measured at every subspace size from six to twenty-six vectors, on chains of sixteen to fifty-six masses, and exact at every one because both halves of it are counting rather than arithmetic. The essay that draws it is a Krylov space for a problem that is not linear, and what it adds to this one is the reminder that a cost ratio can be a theorem: no measurement was needed for the factor of four, only for the question of whether the cheaper basis is worth having, which is a different question and has a less comfortable answer.

Two Krylov methods for one quadratic, priced by the numbers they storeA chain of 40 masses. Arnoldi on the 80 × 80 linearisation stores m vectors of length 80 and returns m Ritz values; the second-order recurrence stores m vectors of length 40 and its projection is taken onto the QUADRATIC, which has 2m eigenvalues for an m × m problem. So at every subspace size the second route holds half as many numbers and returns twice as many approximations — a factor of four in Ritz values per number stored, exactly and by construction. Plotted against storage, its curve is the lower one at every point: at 240 numbers it is 0.01379 from the dominant eigenvalue where the linearised route needs 480 to reach 0.07294. Both converge slowly — twenty-six vectors buy three digits — because the chain's spectrum is an arc with no isolated extreme, and that is the honest half: this is a comparison of prices rather than a fast method.33.310⁻⁴10⁻³10⁻²10⁻¹1log₁₀ numbers storeddistance to the dominant eigenvalueArnoldi, linearisedprojected quadraticper number heldstorage, linearised2080storage, second-order1040Ritz values, linearised26Ritz values, second-order52half the storageand twice the approximations
Fig. 2 The same two methods priced by the numbers they hold rather than by the steps they take, which is the axis a storage-bound computation is actually on.

Where the shift-and-invert saving is

One more exact ratio, and it is the one that decides how a real problem is solved.

A shift-and-invert step for a quadratic needs Q(σ)⁻¹ applied to a vector. Q(σ) is n × n — it is λ²M + λC + K evaluated at a number — so the factorisation is of the original size, not of the linearisation’s. Factorising the 2n × 2n linearisation instead costs eight times as much and gains nothing: the shift is a number and the polynomial can be evaluated at it.

That is the same shape of saving as the same arithmetic at a different price — the work is identical and the arrangement is not — and it is the reason the practical methods in this field never form a linearisation at all. They evaluate the polynomial, factorise something of size n, and iterate.

The cost of the thing that is not the count

A contour method is rarely run for the count alone, so the honest budget has to include the second integral — the moment ∮T(z)⁻¹V dz whose rank gives the eigenvalues.

It uses the same factorisations. At each quadrature point T(z) is factorised once, and then the count needs n solves for the trace while the moment needs ℓ solves for the probe block. So running both costs (n + ℓ) solves per point against ℓ for the moment alone, on top of one factorisation that is shared — which for n in the hundreds is a factor of about two, not a factor of two in the whole computation but in the cheap half of it.

Two integers for the price of one and a bit is the trade, and counting what is inside a circle is where the second integer earns it: the rank of the moment saturates at the smaller of the probe count, the number of eigenvalues inside and the size of the matrix, and only the independently computed count distinguishes those three.

Why the exchange rate matters more than the constant

A final point of accounting, since it is the reason to care about the shape of a curve rather than about its height.

If a method’s exchange rate is constant, the decision about how much accuracy to ask for is a linear budget: twice the digits, twice the work, and a project can be planned against it. If the rate improves, the calculus inverts — the marginal digit is cheap, so the sensible policy is to overshoot rather than to tune, and the whole business of choosing a tolerance stops being worth the meeting.

Here the numbers say: whatever accuracy the eight-point run gave, the sixty-four-point run costs eight times as much and gives five more digits. Nobody should spend an afternoon deciding between them. Spend the eight times, and spend the afternoon on where to put the contour — where a factor of a hundred in ρ is decided, and where no amount of work substitutes for the choice.

What to carry

Three sentences, and the first is the one that is unusual.

A geometric method’s exchange rate improves with spending, so the intuition that the last digit is the dearest is a fact about algebraic convergence rather than about accuracy. It survives everywhere else in this field because everything else here is algebraic or linear.

The rate is set by the input rather than by the effort. Where the contour is placed decides ρ, and ρ decides everything; adding points to a badly placed contour is the expensive way to discover that.

And the cheapest run is the one most likely to be wrong. The eight-point count on a circle of radius four returns minus two where the answer is four — a negative number of eigenvalues, from the cheapest row of the table. The exchange rate improving does not make the early rows safe; it makes them cheap, which is a different property, and the distance from the nearest integer is what tells them apart.

Where the shape breaks

One boundary, and it is worth stating so that the finding is not over-generalised.

The doubling column doubles because the error is ρ^{−N} with a fixed ρ. That holds while the quadrature is the only source of error. It stops holding at the rounding level: once the integral is computed to 10⁻¹³ the next doubling buys nothing at all, because what is left is the arithmetic rather than the truncation, and 256 points give the same answer as 128 for twice the price.

So the curve is geometric and then flat, and the useful policy is to stop at the knee. Measured here the knee is at about 128 points, where the error reaches 1.4·10⁻¹³ — which for an integer-valued answer is thirteen digits past what anybody needs.

The same shape appears in every geometric method on this site, and it is the reason four knobs and one floor exists: several parameters that each improve an answer share a floor, and past it the only thing more work buys is confidence that the floor is where it appears to be.

At other settings

Counting the eigenvalues inside a circle: an integral that is an integer once it has convergedThe number of eigenvalues of the delay problem inside |z| = 1.5, computed as (1/2πi)∮tr(T(z)⁻¹T′(z))dz by the trapezoidal rule. The true count is 1, from the closed form. The error runs 0.473, 0.39, 0.289, 0.142, 0.0268, 7.58·10⁻⁴ at 4 to 128 points — a straight line on this axis is a constant factor a doubling, and this falls faster than that, which is what exponential convergence looks like when the integrand is analytic on the contour. The answer is then ROUNDED, and 0 of the 6 quadratures round to the wrong integer while looking exactly as confident as the ones that do not. The only evidence available is the distance from the nearest integer, which is the quantity plotted.11.31.61.92.210⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²log₁₀ quadrature pointsdistance from the true counthalf an eigenvaluean integer, eventuallytrue count1at 4 points1at 128 points1finest error7.6·10⁻⁴the integral is an integerand a rounding hides how far it was
Fig. 3 A contour close to an eigenvalue, where ρ is small and the same doublings buy far less.
Counting the eigenvalues inside a circle: an integral that is an integer once it has convergedThe number of eigenvalues of the delay problem inside |z| = 4, computed as (1/2πi)∮tr(T(z)⁻¹T′(z))dz by the trapezoidal rule. The true count is 4, from the closed form. The error runs 2.23, 5.64, 1.38, 0.167, 0.00222, 0.00483 at 4 to 128 points — a straight line on this axis is a constant factor a doubling, and this falls faster than that, which is what exponential convergence looks like when the integrand is analytic on the contour. The answer is then ROUNDED, and 3 of the 6 quadratures round to the wrong integer while looking exactly as confident as the ones that do not. The only evidence available is the distance from the nearest integer, which is the quantity plotted.11.31.61.92.210⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²log₁₀ quadrature pointsdistance from the true counthalf an eigenvaluean integer, eventuallytrue count4at 4 points6at 128 points4finest error0.0048the integral is an integerand a rounding hides how far it was
Fig. 4 And the one whose cheapest row returns a negative count.
How many eigenvalues a contour method can return: the probe block is a ceiling and does not say soBeyn's method probes the contour with a random 4 × ℓ block V and reads the eigenvalues out of the rank of ∮T(z)⁻¹V dz. That rank is at most ℓ whatever is inside, so a probe block narrower than the number of eigenvalues present returns ℓ of them — with small residuals, and with nothing in the returned object to say that there were more. Measured with 4 eigenvalues inside |z| = 4: the rank is 1, 2, 3, 4, 4 at ℓ = 1, 2, 3, 4, 5, rising with the probe count and then stopping at 4. A caller who asked for two gets two. The counting integral is the check that says so, and it costs one more pass round the same contour.1 probe12 probes23 probes34 probes45 probes44 insidea ceiling nothing announceseigenvalues inside4rank at 1 probe1rank at 5 probes4the binding ceiling4the residuals are smalland half the answer is missing
Fig. 5 What the same contour costs when eigenvalues rather than a count are wanted.
Two Krylov methods for one quadratic, priced by the numbers they storeA chain of 16 masses. Arnoldi on the 32 × 32 linearisation stores m vectors of length 32 and returns m Ritz values; the second-order recurrence stores m vectors of length 16 and its projection is taken onto the QUADRATIC, which has 2m eigenvalues for an m × m problem. So at every subspace size the second route holds half as many numbers and returns twice as many approximations — a factor of four in Ritz values per number stored, exactly and by construction. Plotted against storage, its curve is the lower one at every point: at 96 numbers it is 0.01231 from the dominant eigenvalue where the linearised route needs 192 to reach 0.07122. Both converge slowly — twenty-six vectors buy three digits — because the chain's spectrum is an arc with no isolated extreme, and that is the honest half: this is a comparison of prices rather than a fast method.22.32.62.910⁻⁴10⁻³10⁻²10⁻¹1log₁₀ numbers storeddistance to the dominant eigenvalueArnoldi, linearisedprojected quadraticper number heldstorage, linearised832storage, second-order416Ritz values, linearised26Ritz values, second-order52half the storageand twice the approximations
Fig. 6 The storage ratio at sixteen masses.
A basis that stops being a basis, and a Ritz value that keeps improving through it‖QᵀQ − I‖ for the two Krylov bases on a chain of 40 masses, against the number of vectors. Both are orthogonalised by the same modified Gram–Schmidt sweep, so what differs is the recurrence: the linearised basis stays at 2.37·10⁻¹³ throughout, and the second-order one runs from 1.29·10⁻¹² at four vectors to 1.347 at twenty — orthogonality gone entirely. The third curve is the distance from the dominant eigenvalue, which falls from 0.03036 to 0.001559 across the same range — the answer improves across the collapse, so a run watching only the answer would report progress at every step.3691215182110⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹vectors held‖QᵀQ − I‖, and the distance to λsecond-order basisdistance to λlinearised basisthe symptom is absence‖QᵀQ − I‖ at 4 vectors1.3·10⁻¹²at 201.3linearised, worst2.4·10⁻¹³distance to λ at 200.0016the basis fails firstand the answer does not say so
Fig. 7 And the price the cheaper basis pays, which is not in any cost model.
Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.93, 1.74 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 128: below it the format is the more expensive way to solve the system, at 1.48 times the dense count, and at n = 512 it is 6.2 times cheaper. Every point returns an answer at a backward error of about 1.4·10⁻¹⁰, so the comparison is between two ways of getting the same thing.567891010⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 641.5ratio at n = 5120.16exponent, first doubling2.1exponent, last doubling1.7backward error1.4·10⁻¹⁰cheaper is a sizenot a property
Fig. 8 A hierarchical solve priced against an accuracy, where the rate worsens.
Numbers stored per unknown, against the size of the matrix, at 10⁻⁸The dense matrix stores n numbers per unknown, which is the straight line through the origin and doubles whenever n does. The hierarchical representations store 54, 79, 106, 133 and 50, 70, 94, 120, adding about 26 per doubling — a constant per doubling is a logarithm, and it is the whole claim. At n = 512 that is 26 and 23 per cent of the dense matrix, and the share falls at every size. The exponent between consecutive sizes is 1.55, 1.42, 1.33, falling towards one and never arriving, which is what a logarithm looks like from inside.56789100108216324432log₂ nnumbers stored per unknowndenseweak: every off-diagonal blockstrong: only the admissible onesa constant per doublingstrong, n = 5126.8·10⁴weak, n = 5126.1·10⁴dense, n = 5122.6·10⁵per doubling26‖A − A_H‖ ⁄ ‖A‖3.8·10⁻¹⁰the dense line doublesand the other two add a constant
Fig. 9 And the storage the same accuracy costs there.
Conjugate gradients at κ = 104, against the bound κ permitsA semi-logarithmic plot of the relative A-norm error against iteration count. The measured curve falls below a smooth dashed curve showing the classical condition-number bound.0408012016020024010⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹iteration‖e‖_A / ‖e₀‖_Ameasuredκ bound119 steps40×40, spectrum spread evenly in logbound permits 1417
Fig. 10 A Krylov method’s constant exchange rate.
Applications of an operator that is never assembled, against the entries of the matrix it stands forThe blocks at one level of the tree have disjoint column supports, so one batch of random vectors samples all of them at once: two batches a level for the ranges, two more for the projections, and one batch of leaf products for every diagonal block in the matrix together. That is leaf + 2(2k + p)·levels products, and the counter inside the operator says 112, 160, 208, 256 at n = 64, 128, 256, 512 — 48 more per doubling, which is a logarithm. The other line is n², the entries the compression route reads. At n = 512 that is 256 products against 262,144 entries, and the representation it produces is within 7.3× of the one that read them all.567891010¹10²10³10⁴10⁵10⁶log₂ nnumbers the construction touchedentries, n²products with the operatoran operator, applied a few hundred timesproducts at n = 512256entries at n = 5122.6·10⁵per doubling48‖A − A_H‖ ⁄ ‖A‖4·10⁻⁷excess over the compression7.3no entry of the matrixwas ever read
Fig. 11 Counting products rather than seconds, which is what this field does.
Words moved against the block size, n = 48, M = 100A U-shaped curve on logarithmic axes. Too small a block refactors the panel too often; too large a block does not fit in the fast memory and the tiled update evicts what it is about to read. The minimum is at b = 8, which is √M − 2. The three-line count says √(M/3) = 5, which has the right scaling and the wrong constant.110¹10⁴10⁵block size bwords movedthe count: √(M/3) = 5measured best: b = 8words movedat the best block1.6·10⁴at b = 13.9·10⁴at b = 243.9·10⁴derived from M with no measurement, and scannedthe two agree
Fig. 12 Where the arithmetic stops being what a computation spends its time on.
Communication for a 512×12 factorisation on 16 processorsTwo counts for the same factorisation. Rounds on the critical path: 48 for the column sweep, 4 for the reduction tree, 4 for Cholesky QR — a factor of n between the first and the other two. Words sent: 1170, 1170 and 2160 — the sweep and the tree send the same number, and the method with the fewest rounds sends the most.rounds on the critical pathHouseholder sweep48reduction tree4Cholesky QR4words sentHouseholder sweep1170reduction tree1170Cholesky QR2160two counts, two rankingsrounds, sweep ÷ tree12words, Cholesky ÷ tree1.8arithmetic, tree ÷ sweep1.5the rounds separate the threeand the words do not
Fig. 13 Messages against words, which is the other axis a parallel method is priced on.
A spectrum with no last eigenvalue: 12 of the infinitely many solutions of a delay problemT(λ) = A − λI + 1e^−λI for the model matrix at n = 4. The problem decouples in A's eigenvector basis, so each of its 4 eigenvalues μ contributes the scalar equation μ − λ + γe^−λ = 0, whose solutions are λ = μ + W_k(γe^−μ) — one for every branch of the Lambert W function, and therefore countably infinitely many, running off to the left along two curves. The marks are the closed form, each checked by substitution to 1.6·10⁻¹⁵. There is no computation that returns this set: the only well-posed question is which eigenvalues lie inside a region, and the circle of radius 4 contains 4 of them.-2-101234-5-3-1135real partimaginary part4 insidea countable spectruminside the contour4drawn12existingworst branch residual1.6·10⁻¹⁵there is no last eigenvalueso the question has to change
Fig. 14 The spectrum the count is a count of.
Where the missing eigenvalues went: an 6 × 6 quadratic with 1 of its masses removedA chain of 6 masses with the first 1 of them set to zero, so M is singular of rank 5. det Q(λ) is a polynomial of degree at most 12; interpolated exactly in BigInt rationals at 13 nodes it has degree 11, so 1 of the 12 eigenvalues are at infinity — the same object a descriptor pencil has, arriving here because a degree of freedom with no inertia is an algebraic constraint. The float route counts the singular values of M judged to be zero and reaches 1, backed by a gap of ∞ between consecutive singular values. One integer, two routes, and only the second of them is a decision.finite eigenvalues (degree of det Q)11at infinity (2n − degree)1at infinity, by the rank of M12n, if M were nonsingular12a degree, not a decisiondegree of det Q11at infinity1by the rank of M1singular-value gapthe count is a degreeand the other route is a judgement
Fig. 15 And a count that costs one exact interpolation instead.
What 12 members of a sequence cost, by what changes between themEvery bar is 12 solves of an 120×120 system, costed in multiplications with a dense Cholesky at n³/3 and a solve at 4n². When nothing changes the answer is reused and the cost is one factorisation. When only the right-hand side changes, one factorisation serves every member — 16.5 per cent of the independent cost, with every solve still at a relative residual of 1.54·10⁻¹³. When the matrix drifts, the factorisation is reusable for a while and the while has to be measured: 4 factorisations for 12 members. When everything changes, nothing carries.nothing8.3%the right-hand side16.5%the matrix, slowly85.9%everything100.0%what can be reused: the answerwhat can be reused: the factorisationwhat can be reused: the factorisation, for a whilewhat can be reused: nothingshare of the cost of a sequence that shares nothingwhat 12 members cost in factorisationssame: factorisations1rhs: factorisations1drift: factorisations4independent: factorisations12what changes between the membersdecides what may be carried
Fig. 16 What a hundred solves of the same problem cost when something is kept between them.
Stored entries per row at each level, 400 unknowns and 1192 edgesA rising curve of stored entries per row against level in the hierarchy, beside a flat one for a geometric hierarchy on a grid.01234567110¹10²levelstored entries per rowalgebraicgeometrictwo complexities, one hierarchygrid complexity3.1operator complexity18geometric, for comparison1.5a ring plus random chords — nothing is anywherelevel 6 is 100% dense
Fig. 17 And the recursion whose cost is chosen rather than handed over.
Counting the eigenvalues inside a circle: an integral that is an integer once it has convergedThe number of eigenvalues of the delay problem inside |z| = 2, computed as (1/2πi)∮tr(T(z)⁻¹T′(z))dz by the trapezoidal rule. The true count is 2, from the closed form. The error runs 0.00282, 0.0572, 0.0151, 5.25·10⁻⁴, 3.6·10⁻⁷, 1.35·10⁻¹³ at 4 to 128 points — a straight line on this axis is a constant factor a doubling, and this falls faster than that, which is what exponential convergence looks like when the integrand is analytic on the contour. The answer is then ROUNDED, and 0 of the 6 quadratures round to the wrong integer while looking exactly as confident as the ones that do not. The only evidence available is the distance from the nearest integer, which is the quantity plotted.11.31.61.92.210⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²log₁₀ quadrature pointsdistance from the true counthalf an eigenvaluean integer, eventuallytrue count2at 4 points2at 128 points2finest error1.4·10⁻¹³the integral is an integerand a rounding hides how far it was
Fig. 18 The table’s own curve, at the resolution the digits-per-doubling column is read from.
Counting the eigenvalues inside a circle: an integral that is an integer once it has convergedThe number of eigenvalues of the delay problem inside |z| = 3, computed as (1/2πi)∮tr(T(z)⁻¹T′(z))dz by the trapezoidal rule. The true count is 3, from the closed form. The error runs 0.151, 0.532, 0.0874, 0.0263, 8.44·10⁻⁴, 7.21·10⁻⁷ at 4 to 128 points — a straight line on this axis is a constant factor a doubling, and this falls faster than that, which is what exponential convergence looks like when the integrand is analytic on the contour. The answer is then ROUNDED, and 1 of the 6 quadratures round to the wrong integer while looking exactly as confident as the ones that do not. The only evidence available is the distance from the nearest integer, which is the quantity plotted.11.31.61.92.210⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²log₁₀ quadrature pointsdistance from the true counthalf an eigenvaluean integer, eventuallytrue count3at 4 points3at 128 points3finest error7.2·10⁻⁷the integral is an integerand a rounding hides how far it was
Fig. 19 A contour nearer the spectrum, where the same doublings buy less.
How many eigenvalues a contour method can return: the probe block is a ceiling and does not say soBeyn's method probes the contour with a random 4 × ℓ block V and reads the eigenvalues out of the rank of ∮T(z)⁻¹V dz. That rank is at most ℓ whatever is inside, so a probe block narrower than the number of eigenvalues present returns ℓ of them — with small residuals, and with nothing in the returned object to say that there were more. Measured with 3 eigenvalues inside |z| = 3: the rank is 1, 2, 3, 3, 3 at ℓ = 1, 2, 3, 4, 5, rising with the probe count and then stopping at 3. A caller who asked for two gets two. The counting integral is the check that says so, and it costs one more pass round the same contour.1 probe12 probes23 probes34 probes35 probes33 insidea ceiling nothing announceseigenvalues inside3rank at 1 probe1rank at 5 probes3the binding ceiling3the residuals are smalland half the answer is missing
Fig. 20 The second integral, which shares the factorisations and answers the other question.
Two Krylov methods for one quadratic, priced by the numbers they storeA chain of 24 masses. Arnoldi on the 48 × 48 linearisation stores m vectors of length 48 and returns m Ritz values; the second-order recurrence stores m vectors of length 24 and its projection is taken onto the QUADRATIC, which has 2m eigenvalues for an m × m problem. So at every subspace size the second route holds half as many numbers and returns twice as many approximations — a factor of four in Ritz values per number stored, exactly and by construction. Plotted against storage, its curve is the lower one at every point: at 144 numbers it is 0.01305 from the dominant eigenvalue where the linearised route needs 288 to reach 0.06995. Both converge slowly — twenty-six vectors buy three digits — because the chain's spectrum is an arc with no isolated extreme, and that is the honest half: this is a comparison of prices rather than a fast method.310⁻⁴10⁻³10⁻²10⁻¹1log₁₀ numbers storeddistance to the dominant eigenvalueArnoldi, linearisedprojected quadraticper number heldstorage, linearised1248storage, second-order624Ritz values, linearised26Ritz values, second-order52half the storageand twice the approximations
Fig. 21 The exact storage ratio at twenty-four masses.
Two Krylov methods for one quadratic, priced by the numbers they storeA chain of 56 masses. Arnoldi on the 112 × 112 linearisation stores m vectors of length 112 and returns m Ritz values; the second-order recurrence stores m vectors of length 56 and its projection is taken onto the QUADRATIC, which has 2m eigenvalues for an m × m problem. So at every subspace size the second route holds half as many numbers and returns twice as many approximations — a factor of four in Ritz values per number stored, exactly and by construction. Plotted against storage, its curve is the lower one at every point: at 336 numbers it is 0.01393 from the dominant eigenvalue where the linearised route needs 672 to reach 0.07166. Both converge slowly — twenty-six vectors buy three digits — because the chain's spectrum is an arc with no isolated extreme, and that is the honest half: this is a comparison of prices rather than a fast method.33.33.610⁻⁴10⁻³10⁻²10⁻¹1log₁₀ numbers storeddistance to the dominant eigenvalueArnoldi, linearisedprojected quadraticper number heldstorage, linearised2912storage, second-order1456Ritz values, linearised26Ritz values, second-order52half the storageand twice the approximations
Fig. 22 And at fifty-six, where a vector is longer and the curve shifts right.
A basis that stops being a basis, and a Ritz value that keeps improving through it‖QᵀQ − I‖ for the two Krylov bases on a chain of 24 masses, against the number of vectors. Both are orthogonalised by the same modified Gram–Schmidt sweep, so what differs is the recurrence: the linearised basis stays at 4.17·10⁻¹³ throughout, and the second-order one runs from 1.81·10⁻¹² at four vectors to 1.558 at twenty — orthogonality gone entirely. The third curve is the distance from the dominant eigenvalue, which falls from 0.02877 to 2.12·10⁻⁴ across the same range — the answer improves across the collapse, so a run watching only the answer would report progress at every step.3691215182110⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹vectors held‖QᵀQ − I‖, and the distance to λsecond-order basisdistance to λlinearised basisthe symptom is absence‖QᵀQ − I‖ at 4 vectors1.8·10⁻¹²at 201.6linearised, worst4.2·10⁻¹³distance to λ at 202.1·10⁻⁴the basis fails firstand the answer does not say so
Fig. 23 What the cheaper basis costs, which appears in no cost model.
Three tolerances from three fields: work not done, against backward error acceptedA deflation criterion writes a zero into a subdiagonal entry of a Hessenberg matrix; a drop tolerance discards an entry of an incomplete Cholesky factor; a truncation discards a singular value. The three are described in different vocabularies, live in different fields and share no arithmetic. Plotted as the fraction of the work not done against the relative backward error the choice introduces, they are three samples of one curve: fitted slopes of 0.039, 0.051, 0.225 of the work a decade of error. Nothing is rescaled to make that happen. The low-rank curve goes below zero at the tight end, which is the part nobody plots: a rank-k factored form of an n×n symmetric matrix costs more to store than the matrix once k passes n/2.10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²-1-0.500.51relative backward error acceptedfraction of the work not doneQR deflation criterionincomplete Cholesky droplow-rank truncationthree fields, no shared arithmeticslope, deflation criterion0.039slope, drop tolerance0.051slope, rank truncation0.23widest apart, as a ratio5.7a tolerance is an offerand the three offers are one offer
Fig. 24 A trade priced in the cost field’s own currency.
What one symmetric permutation does to the storage, on a matrix it does not changeThe same 256 × 256 matrix, its rows and columns renumbered by one permutation and its columns by the same one. The condition number is 24.3948 either way, to eight digits; the Frobenius norm is 6139.964 either way, to twelve. Nothing a norm can see has moved. Clustered, the partition stores 27,008 numbers. Shuffled, the admissibility test finds no admissible pair anywhere — every cluster of a shuffled numbering spans the whole interval, so every q is infinite — and the format degenerates to dense storage exactly. The rule with no test to fail does worse than that: it compresses every off-diagonal block regardless, gets ranks up to 119 out of 128, and stores 118,208 numbers — 1.80 times the matrix it was compressing. A rank-119 factorisation of a 128-column block is a more expensive way to write down the block than the block.numbers stored, 256 × 256clustered, strong27,008clustered, weak24,064the dense matrix65,536shuffled, strong65,536shuffled, weak118,208the same matrix, twiceκ, clustered24κ, shuffled24‖A‖_F, clustered6140‖A‖_F, shuffled6140shuffled weak ⁄ dense1.8the compressibility is in the numberingand the numbering is not in the matrix
Fig. 25 And a cost decided before any arithmetic happens.
BiCG iterations on one 12×12 system against the distance of the shadow vector from a breakdownThe matrix, the right-hand side and the answer are the same at every stop. The only thing that moves is r̃₀, the second starting vector, which the method requires and for which every account gives the same non-reason. At η = 0.01 from the surface where the second divisor vanishes, BiCG is the direct method it is advertised as and finishes in 12 steps on 12 unknowns. The steps then run 12, 12, 13, 17, 20, 24, 80, 80, 80, 80 as η falls, and at 10⁻¹¹ the method has not converged after 80. Wherever it does finish it finishes at the same accuracy — the cost is the guarantee, not the answer.10⁻¹¹10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹0122436486072distance of the shadow vector from the breakdownBiCG steps to 10⁻¹⁵n = 12, where it should endone matrix, one right-hand sideρ₂ ÷ η, at every stop0.28steps at the far stop12steps at the near stop80residual history over n steps0.27the answer does not movethe guarantee does
Fig. 26 Work that is done twice on purpose, to avoid moving data.
The accuracy worth paying for in a preconditioner, against the condition number of the problemFour complete cost sweeps, each reduced to the ε that minimised the total work, against the κ of the problem it was run on. The shift that moves κ over 2.7 decades leaves every distance between every pair of clusters exactly where it was, so the ranks the partition asks for stay at 10, 9, 7, 5 throughout and nothing geometric is moving. The optimum walks 0.5 → 0.5 → 10⁻⁶ → 10⁻⁸ — six decades of accuracy, bought because the problem got harder and for no other reason. On the easiest problem the best hierarchical preconditioner in the comparison has rank one; on the hardest it is the tightest one on the sweep. How accurate an approximate inverse should be is a question with an answer, and the answer is not in the matrix's structure.10¹10²10³10⁴10⁵-9-7-5-3-11condition number of the problemlog₁₀ ε at the cheapest totalrank 1rank 1rank 6rank 5the knob answers to κκ = 210.5κ = 1.1·10⁴10⁻⁸rank at the easy end1rank at the hard end5ranks at 10⁻⁸, spread5the geometry did not moveand the right accuracy did
Fig. 27 An accuracy with a best value rather than a monotone price.
A spectrum with no last eigenvalue: 12 of the infinitely many solutions of a delay problemT(λ) = A − λI + 2e^−λI for the model matrix at n = 4. The problem decouples in A's eigenvector basis, so each of its 4 eigenvalues μ contributes the scalar equation μ − λ + γe^−λ = 0, whose solutions are λ = μ + W_k(γe^−μ) — one for every branch of the Lambert W function, and therefore countably infinitely many, running off to the left along two curves. The marks are the closed form, each checked by substitution to 1.8·10⁻¹⁵. There is no computation that returns this set: the only well-posed question is which eigenvalues lie inside a region, and the circle of radius 4 contains 6 of them.-101234-5-3-1135real partimaginary part6 insidea countable spectruminside the contour6drawn12existingworst branch residual1.8·10⁻¹⁵there is no last eigenvalueso the question has to change
Fig. 28 And the spectrum being counted, which has no largest member to converge to.
Counting the eigenvalues inside a circle: an integral that is an integer once it has convergedThe number of eigenvalues of the delay problem inside |z| = 4, computed as (1/2πi)∮tr(T(z)⁻¹T′(z))dz by the trapezoidal rule. The true count is 4, from the closed form. The error runs 2.23, 5.64, 1.38, 0.167, 0.00222, 0.00483 at 4 to 128 points — a straight line on this axis is a constant factor a doubling, and this falls faster than that, which is what exponential convergence looks like when the integrand is analytic on the contour. The answer is then ROUNDED, and 3 of the 6 quadratures round to the wrong integer while looking exactly as confident as the ones that do not. The only evidence available is the distance from the nearest integer, which is the quantity plotted.11.31.61.92.210⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²log₁₀ quadrature pointsdistance from the true counthalf an eigenvaluean integer, eventuallytrue count4at 4 points6at 128 points4finest error0.0048the integral is an integerand a rounding hides how far it was
Fig. 29 The row of the table that returns a negative count.
Two Krylov methods for one quadratic, priced by the numbers they storeA chain of 32 masses. Arnoldi on the 64 × 64 linearisation stores m vectors of length 64 and returns m Ritz values; the second-order recurrence stores m vectors of length 32 and its projection is taken onto the QUADRATIC, which has 2m eigenvalues for an m × m problem. So at every subspace size the second route holds half as many numbers and returns twice as many approximations — a factor of four in Ritz values per number stored, exactly and by construction. Plotted against storage, its curve is the lower one at every point: at 192 numbers it is 0.01363 from the dominant eigenvalue where the linearised route needs 384 to reach 0.07029. Both converge slowly — twenty-six vectors buy three digits — because the chain's spectrum is an arc with no isolated extreme, and that is the honest half: this is a comparison of prices rather than a fast method.33.310⁻⁴10⁻³10⁻²10⁻¹1log₁₀ numbers storeddistance to the dominant eigenvalueArnoldi, linearisedprojected quadraticper number heldstorage, linearised1664storage, second-order832Ritz values, linearised26Ritz values, second-order52half the storageand twice the approximations
Fig. 30 And the exact ratios at thirty-two masses.

Reads more easily once this is understood

Essays that name this one as worth reading first.

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.

Arithmetic costContour integralConvergence rateKrylov subspaceNonlinear eigenvalue problemQuadratureSecond order arnoldiTrace estimation