The matrix that is a graph

A graph with a tenth of the edges

Keeping 344 of 1,225 edges, sampled by effective resistance and reweighted, preserves every eigenvalue of the Laplacian to within a factor of 1.7. It preserves no degree — half of them are wrong by more than a third — and it takes the diameter from one to three.

Worth reading first: A distance computed by a solve · A matrix with no numbers in it · A bound that holds with probability.

A sparsifier is a graph with fewer edges that behaves like the original. Which behaviour is preserved is the entire content of the definition, and the version that has a theorem behind it preserves the quadratic form:

(1 − ε) · xᵀL x   ≤   xᵀL' x   ≤   (1 + ε) · xᵀL x      for every x

Every x. Not every x in a subspace, not with high probability for a given x — every vector at once, which means every cut, every eigenvalue, and the answer to every linear system.

344 of 1225 edges keep every eigenvalue and no degreeA fifty-vertex complete graph sparsified by keeping 400 samples drawn in proportion to each edge's effective resistance and reweighted by the reciprocal of its probability, which leaves 344 distinct edges of 1225. The filled curve is the ratio of each eigenvalue of the sample's Laplacian to the original's, in ascending order: it stays between 0.432 and 1.67, so every quadratic form, every cut and every solve is preserved to that factor. The open curve is the ratio of each vertex's degree, which runs from 0.562 to 1.5 — half the graph's degrees are wrong by more than a third. And the graph's diameter goes from 1 to 3: no shortest path survives. A sparsifier preserves what the Laplacian says and nothing else about the graph, and the two are easy to confuse because they are the same object.19172533414911.251.51.752indexsample ÷ originalkept, and not keptedges kept344of1225eigenvalue ratio, low0.43high1.7degree ratio, low0.56high1.5diameter, after3filled dots are eigenvaluesopen dots are degrees
Fig. 1 A fifty-vertex complete graph sampled down to 344 of its 1,225 edges. The filled curve is the ratio of each eigenvalue to the original’s; the open dots are the ratio of each vertex’s degree.

The construction

Keep each edge with probability proportional to its effective resistance times its weight, sample q times with replacement, and give each kept edge a weight of w/(q·p) where p was its probability.

The reweighting is what makes it work. An edge kept once carries w/(q·p); kept twice, twice that. So the expected Laplacian of the sample is exactly the Laplacian of the original — the estimator is unbiased, edge by edge, and that is the only part of the construction that is a theorem rather than a measurement.

The probabilities come out normalised for free, and by Foster’s identity: Σ w·R(e) over the edges is exactly n − 1 for any connected graph, so dividing by n − 1 gives a distribution without a normalising pass. The assertion in this library checks that sum to 10⁻⁸n before sampling anything, which is Foster’s theorem being used as a precondition rather than as a curiosity.

What survives

On a fifty-vertex complete graph, sampling at five different counts:

samples   edges kept   eigenvalue ratios   degree ratios   diameter after
  200        187        0.289 – 2.018      0.37 – 1.75          3
  400        344        0.432 – 1.674      0.56 – 1.50          3
  800        599        0.611 – 1.589      0.72 – 1.53          2
 1600        887        0.654 – 1.377      0.72 – 1.31          2
 3200       1123        0.721 – 1.222      0.76 – 1.16          2

At 400 samples the graph has 28% of its edges and every one of its forty-nine non-zero eigenvalues is within a factor of 1.7 of the original. That is the theorem working: no vector, of the 2⁵⁰ cuts or the continuum of directions, sees a distortion larger than the band.

The band closes like the square root of the sample count, which is the ordinary rate for an average of independent draws and is the only asymptotic in the construction. Sixteen times the samples buys four times the accuracy: 2.02 down to 1.22 at the top of the band.

What does not

The degree column is the one to read next.

At 400 samples the degrees run from 0.56 to 1.50 of their original values. Half the vertices in a graph whose spectrum is preserved to within 1.7 have a degree wrong by more than a third, and the worst is wrong by half.

That is not a defect of the sampler; it is what the theorem does not claim. A degree is xᵀLx for x = eᵢ — a single indicator vector — and the guarantee is a relative one, so a quantity that is small relative to the norm is preserved only relatively to itself, with a variance that comes from one vertex’s worth of draws rather than the whole graph’s. Fewer draws, wider band.

The diameter is starker. A complete graph has diameter one: every pair is adjacent. The sample has diameter three at 400 samples and two at 800. No shortest path survives. Every pair of vertices that was one hop apart is now up to three, and a routing algorithm run on the sparsifier would return answers that are wrong by a factor rather than by a percentage.

The band is not the same as the error

One reading of the eigenvalue column needs correcting before it becomes a habit, and it is the reading that treats the band as an accuracy.

The guarantee is a relative distortion of a quadratic form, applied uniformly. So a solve using the sparsified Laplacian as a preconditioner converges at a rate governed by the band’s width — a band of 0.43 to 1.67 is a condition number of 3.9 for the preconditioned system, which is excellent — and the answer it converges to is the answer to the original system, exactly, because the preconditioner does not change the problem.

That is the use in which the band is an accuracy of nothing and a cost of something.

The other use is to solve with the sparsifier directly, treating it as a substitute for the graph. The answer is then wrong by the band: a solve with L’ rather than L returns a vector differing from the true one by a relative amount of order ε, and at 400 samples that is tens of per cent. Which is usually not what anybody wanted.

So the same object is either a free speedup or a large approximation error depending on which side of the solve it is put on, and the distinction is not visible in the object. The preconditioning essays make the general form of this argument: an approximate inverse used as a preconditioner is exact in the answer and approximate in the cost, and used as a solver is the reverse.

Why the two are so easy to confuse

The trap is that the sparsifier is the graph, in the sense that it is a set of vertices and weighted edges, and every graph algorithm will run on it and return something.

Run a spectral partitioner on it and the answer is right, because a partition is a quadratic form. Run a solver on it as a preconditioner and it works, because a solve is a quadratic form. Run a shortest-path algorithm on it and the answer is wrong, and nothing warns, because the input was a perfectly well-formed graph.

The general form of that is a shape this site keeps meeting: an approximation preserves the quantity it was built to preserve, and an object that is an approximation for one purpose is not labelled as such. The half of a problem a sketch may touch makes the same argument about randomised sketching — a sketch is a valid input to any routine and is a valid approximation for only some of them — and a rank that is a number of digits makes it about a hierarchical format.

When it fails outright

There is a failure worse than a wide band, and the sampler is not immune to it.

At 200 samples on an eighty-vertex two-block graph, the sample came back disconnected — one vertex with no edges at all. Its eigenvalue ratios then include a zero where the original had a positive eigenvalue, which is not a factor of ε; it is a quadratic form that vanishes on a vector where the original’s does not, and the guarantee has failed completely rather than by a margin.

Undersampling is the whole cause, and there is a bound saying how many samples are enough — of order n log n divided by ε² — with constants nobody uses because they are pessimistic by orders. So in practice the sample count is chosen by measurement, and the measurement to make is not the eigenvalue band but whether the sample is connected, which costs one breadth-first search and catches the catastrophic case before the numerical one.

That is the same asymmetry the randomised field describes: the guarantee changes kind, from a bound that holds to a bound that holds with a probability, and the low-probability event is not a slightly worse answer but a different one.

187 of 1225 edges keep every eigenvalue and no degreeA fifty-vertex complete graph sparsified by keeping 200 samples drawn in proportion to each edge's effective resistance and reweighted by the reciprocal of its probability, which leaves 187 distinct edges of 1225. The filled curve is the ratio of each eigenvalue of the sample's Laplacian to the original's, in ascending order: it stays between 0.289 and 2.02, so every quadratic form, every cut and every solve is preserved to that factor. The open curve is the ratio of each vertex's degree, which runs from 0.375 to 1.75 — half the graph's degrees are wrong by more than a third. And the graph's diameter goes from 1 to 3: no shortest path survives. A sparsifier preserves what the Laplacian says and nothing else about the graph, and the two are easy to confuse because they are the same object.19172533414911.251.51.752indexsample ÷ originalkept, and not keptedges kept187of1225eigenvalue ratio, low0.29high2degree ratio, low0.37high1.7diameter, after3filled dots are eigenvaluesopen dots are degrees
Fig. 2 Two hundred samples on the same graph, where the band is twice as wide and the degrees are wrong by up to seventy-five per cent.

Why resistance is the right probability

Uniform sampling fails on graphs where sparsification is most wanted, and the refusal in this field is exactly that case.

A barbell is two cliques joined by one edge. Keeping edges uniformly at random with probability a quarter keeps about a quarter of the clique edges, which is plenty — the cliques are massively redundant — and keeps the bridge with probability a quarter. Three times in four the sample is disconnected, and a graph in two pieces does not approximate a connected one in any sense at all.

Resistance sampling keeps the bridge with probability one. Its effective resistance is 1, the largest in the graph by a factor of about k², so it takes a proportionate share of the samples and the construction cannot lose it.

That is the informal reading of what effective resistance measures: how much of the graph’s connectivity an edge is personally responsible for. An edge in a clique has dozens of parallel routes and low resistance; a bridge has none and resistance 1. Sampling in proportion to it is sampling in proportion to irreplaceability, and the spectral form of the quantity says why: a high-resistance edge is one the low eigenvalue modes depend on.

What it costs to build

The awkward part of the construction is that computing the sampling probabilities requires all the effective resistances, and computing those requires solving with the Laplacian — which is the thing the sparsifier was going to make cheaper.

Three ways round it, in increasing order of practicality.

Solve exactly anyway. For a graph small enough this is what the figures here do, and it makes the measurement clean at the cost of making the construction pointless.

Estimate the resistances. They can be approximated by a Johnson–Lindenstrauss projection — project the incidence matrix onto O(log n) random directions and read the resistances as squared distances — which needs only O(log n) approximate solves rather than n exact ones. That is the route that makes the whole thing practical, and it is a randomised approximation inside a randomised approximation.

Or use something cheaper as a proxy. Sampling by weight, or by an edge’s position in a spanning tree, gives weaker guarantees and is sometimes enough.

The recursion in the second route is worth noticing: to sparsify a graph cheaply, one needs to solve with it cheaply, which is what sparsification is for. The published algorithms break the circle by building a chain of progressively sparser graphs, each used to precondition the solve that builds the next.

Sampling with replacement, and the edges kept twice

A detail of the construction is worth pulling out because it is where the count of edges and the count of samples part company.

The sampling is with replacement, so 400 samples do not produce 400 edges. They produced 344 in the table above, because fifty-odd of the draws duplicated an edge already kept, and a duplicate adds its weight rather than appearing twice.

That gap widens as the sample count rises relative to the number of edges: 3,200 samples on a graph with 1,225 edges keep 1,123 of them, so at that point 65 per cent of the draws are duplicates and the sparsifier is nearly the original graph with slightly wrong weights.

Two consequences. First, the sample count is the right knob and the edge count is the wrong one: asking for “half the edges” does not determine the accuracy, because how many distinct edges a given number of draws produces depends on the resistance distribution. Second, the construction degrades gracefully into the identity — oversampling gives back something close to the original graph with a narrow band, which is a sensible limit for a randomised method to have and is not automatic.

The weights of the kept edges are also not the original weights. An edge kept once in 400 draws with probability p carries w/(400p), which is w only if it was drawn exactly its expected number of times. So a sparsifier of an unweighted graph is a weighted graph, always, and any downstream code that assumes unit weights is reading a third thing that was not preserved.

What to check when using one

Three things, and the order matters because they fail in this order.

Connectivity. One breadth-first search, which is also the exact route to a component count. A disconnected sample is not an ε-approximation of anything and is the failure mode of undersampling.

The spectral band. For a graph small enough to diagonalise, the ratio of each eigenvalue to the original’s is the direct measurement of ε and takes no argument about constants. For a larger one, the extreme eigenvalues of L’⁺L by a few iterations of a Lanczos process bound the band from both sides.

And the list of things not preserved. Degrees, distances, triangle counts, edge counts, anything local. A sparsifier is an approximation in one norm and in no other, and a pipeline that hands it to a routine reading a degree has substituted a different graph.

The last of those is the one that costs afternoons, because it produces answers rather than errors — which is this site’s most-repeated observation, and is why the essay measures the degrees and the diameter beside the spectrum rather than only the thing that works.

What this field gets from the randomised one

The construction is a randomised method and it inherits the whole of that field’s vocabulary, which is worth stating because the inheritance is exact rather than analogical.

The guarantee changes kind. Everything else in the graph field is deterministic: a conductance is below a bound or it is not. A sparsifier’s band holds with a probability, and the failure event — undersampling to disconnection — is not a slightly worse answer.

The seed is part of the answer. Two sparsifiers of one graph, from two seeds, are different graphs with different degrees and different diameters, and both satisfy the theorem. Reporting one without its seed makes the result irreproducible in exactly the way the seed essays describe.

And the band should be drawn rather than stated. A single run’s eigenvalue ratios are one draw from a distribution, so quoting “ε = 0.5” from one run is quoting a sample. The figures here draw the whole spectrum’s ratios, which is one run seen completely rather than summarised, and the honest version over seeds would be a band of bands.

What the graph field adds in return is a sampling probability that is not uniform and not heuristic. Most randomised methods on this site sample uniformly or with Gaussian weights, because nothing better is available; here the right probability is a computable property of each edge, it is what makes the guarantee hold for every vector at once, and the identity that normalises it is a hundred-year-old theorem about electrical networks.

At other settings

96 of 1225 edges keep every eigenvalue and no degreeA fifty-vertex complete graph sparsified by keeping 100 samples drawn in proportion to each edge's effective resistance and reweighted by the reciprocal of its probability, which leaves 96 distinct edges of 1225. The filled curve is the ratio of each eigenvalue of the sample's Laplacian to the original's, in ascending order: it stays between 0.132 and 2.57, so every quadratic form, every cut and every solve is preserved to that factor. The open curve is the ratio of each vertex's degree, which runs from 0.25 to 2 — half the graph's degrees are wrong by more than a third. And the graph's diameter goes from 1 to 4: no shortest path survives. A sparsifier preserves what the Laplacian says and nothing else about the graph, and the two are easy to confuse because they are the same object.19172533414911.251.51.7522.252.5indexsample ÷ originalkept, and not keptedges kept96of1225eigenvalue ratio, low0.13high2.6degree ratio, low0.25high2diameter, after4filled dots are eigenvaluesopen dots are degrees
Fig. 3 One hundred samples, where the band is wide enough that the approximation is barely one.
599 of 1225 edges keep every eigenvalue and no degreeA fifty-vertex complete graph sparsified by keeping 800 samples drawn in proportion to each edge's effective resistance and reweighted by the reciprocal of its probability, which leaves 599 distinct edges of 1225. The filled curve is the ratio of each eigenvalue of the sample's Laplacian to the original's, in ascending order: it stays between 0.611 and 1.59, so every quadratic form, every cut and every solve is preserved to that factor. The open curve is the ratio of each vertex's degree, which runs from 0.719 to 1.53 — half the graph's degrees are wrong by more than a third. And the graph's diameter goes from 1 to 2: no shortest path survives. A sparsifier preserves what the Laplacian says and nothing else about the graph, and the two are easy to confuse because they are the same object.19172533414911.251.51.752indexsample ÷ originalkept, and not keptedges kept599of1225eigenvalue ratio, low0.61high1.6degree ratio, low0.72high1.5diameter, after2filled dots are eigenvaluesopen dots are degrees
Fig. 4 Eight hundred, where the band has closed to within a factor of 1.6 and half the edges remain.
887 of 1225 edges keep every eigenvalue and no degreeA fifty-vertex complete graph sparsified by keeping 1600 samples drawn in proportion to each edge's effective resistance and reweighted by the reciprocal of its probability, which leaves 887 distinct edges of 1225. The filled curve is the ratio of each eigenvalue of the sample's Laplacian to the original's, in ascending order: it stays between 0.654 and 1.38, so every quadratic form, every cut and every solve is preserved to that factor. The open curve is the ratio of each vertex's degree, which runs from 0.719 to 1.31 — half the graph's degrees are wrong by more than a third. And the graph's diameter goes from 1 to 2: no shortest path survives. A sparsifier preserves what the Laplacian says and nothing else about the graph, and the two are easy to confuse because they are the same object.19172533414911.251.51.752indexsample ÷ originalkept, and not keptedges kept887of1225eigenvalue ratio, low0.65high1.4degree ratio, low0.72high1.3diameter, after2filled dots are eigenvaluesopen dots are degrees
Fig. 5 Sixteen hundred, where the sample is most of the graph and the band is 1.4.
1123 of 1225 edges keep every eigenvalue and no degreeA fifty-vertex complete graph sparsified by keeping 3200 samples drawn in proportion to each edge's effective resistance and reweighted by the reciprocal of its probability, which leaves 1123 distinct edges of 1225. The filled curve is the ratio of each eigenvalue of the sample's Laplacian to the original's, in ascending order: it stays between 0.721 and 1.22, so every quadratic form, every cut and every solve is preserved to that factor. The open curve is the ratio of each vertex's degree, which runs from 0.758 to 1.16 — half the graph's degrees are wrong by more than a third. And the graph's diameter goes from 1 to 2: no shortest path survives. A sparsifier preserves what the Laplacian says and nothing else about the graph, and the two are easy to confuse because they are the same object.19172533414911.251.51.752indexsample ÷ originalkept, and not keptedges kept1123of1225eigenvalue ratio, low0.72high1.2degree ratio, low0.76high1.2diameter, after2filled dots are eigenvaluesopen dots are degrees
Fig. 6 And thirty-two hundred, where the band is 1.2 and the point of sparsifying has gone.
Resistance to 15 vertices, against an answer that is a ratio of integersEffective resistance from vertex 0 to every other vertex of the grid 4×4, computed twice in floating point — once by grounding a vertex and eliminating, once by summing (uₖᵢ − uₖⱼ)²/λₖ over the whole spectrum — and once in BigInt rationals, where for an unweighted graph the answer is exactly a ratio of two integers and there is no rounding anywhere. The curves are the relative errors of the two floating-point routes against that exact answer: at worst 4.75·10⁻¹⁶ for the elimination and 9.98·10⁻¹⁶ for the spectral sum, which use no arithmetic in common beyond the matrix they are both handed. Foster's theorem says Σ w·R over the edges is exactly n − 1 whatever the graph is; it comes to 15 against 15.1357911131510⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1vertexrelative error against the exact answerthree routes, one numberworst, by elimination4.8·10⁻¹⁶worst, by spectrum10·10⁻¹⁶solve residual1.5·10⁻¹⁵Foster's sum15n − 115difference3.6·10⁻¹⁵the answer is a ratio of integersso the error is known
Fig. 7 The quantity the sampling probabilities are built from.
Resistance to 11 vertices, against an answer that is a ratio of integersEffective resistance from vertex 0 to every other vertex of the complete 12, computed twice in floating point — once by grounding a vertex and eliminating, once by summing (uₖᵢ − uₖⱼ)²/λₖ over the whole spectrum — and once in BigInt rationals, where for an unweighted graph the answer is exactly a ratio of two integers and there is no rounding anywhere. The curves are the relative errors of the two floating-point routes against that exact answer: at worst 6.66·10⁻¹⁶ for the elimination and 5·10⁻¹⁶ for the spectral sum, which use no arithmetic in common beyond the matrix they are both handed. Foster's theorem says Σ w·R over the edges is exactly n − 1 whatever the graph is; it comes to 11 against 11.135791110⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1vertexrelative error against the exact answerthree routes, one numberworst, by elimination6.7·10⁻¹⁶worst, by spectrum5·10⁻¹⁶solve residual1.4·10⁻¹⁵Foster's sum11n − 111difference7.1·10⁻¹⁵the answer is a ratio of integersso the error is known
Fig. 8 On a complete graph, where every resistance is the same and the sampling is uniform.
complete 20: 20 vertices, 190 edges, and a matrix built from themThe complete 20 laid out at its own second and third Laplacian eigenvectors, so the picture is the same object the measurements are about. The Laplacian L = D − A is built by subtraction of integers, so every row sums to exactly zero — measured at 0, not at the rounding level — and L·1 is the zero vector with no arithmetic error anywhere in it. Its 1 zero eigenvalue counts the connected components, which breadth-first search also puts at 1; the smallest non-zero eigenvalue is 20 and the largest computed zero is 7.22·10⁻¹⁶, a gap of 2.77·10¹⁶. The quadratic form xᵀLx is Σ over edges of (xᵢ − xⱼ)², which at the alternating vector is 400.the matrix, measuredvertices20edges190‖L·1‖∞0zero eigenvalues1components, by search1λ₂20laid out at its own eigenvectorsand the row sums are exactly zero
Fig. 9 The graph the hero figure sparsifies, at a smaller size.
barbell 12: 24 vertices, 133 edges, and a matrix built from themThe barbell 12 laid out at its own second and third Laplacian eigenvectors, so the picture is the same object the measurements are about. The Laplacian L = D − A is built by subtraction of integers, so every row sums to exactly zero — measured at 0, not at the rounding level — and L·1 is the zero vector with no arithmetic error anywhere in it. Its 1 zero eigenvalue counts the connected components, which breadth-first search also puts at 1; the smallest non-zero eigenvalue is 0.1443 and the largest computed zero is 8.24·10⁻¹⁶, a gap of 1.75·10¹⁴. The quadratic form xᵀLx is Σ over edges of (xᵢ − xⱼ)², which at the alternating vector is 292.the matrix, measuredvertices24edges133‖L·1‖∞0zero eigenvalues1components, by search1λ₂0.14laid out at its own eigenvectorsand the row sums are exactly zero
Fig. 10 A barbell, where uniform sampling disconnects and resistance sampling cannot.
The randomised SVD against the optimum it cannot beatA semi-logarithmic plot of approximation error against target rank. A shaded band shows the spread across seeds, a solid line the optimal error from the exact singular values, and a dashed line the published probabilistic bound well above both.04812162010⁻¹10⁻⁰.⁵1target rank k‖A − A_k‖₂published boundrandomisedσₖ₊₁, optimalhow far apart the three areworst seed spread1.6bound / median at k = 125.9median / optimum at k = 121.960×60, 6 seeds, oversampling p = 5band is best to worst
Fig. 11 A randomised approximation’s error as a band rather than a line.
Sketch distortion against sketch width, for 12 vectorsA log-log plot of the worst relative change in vector length against the number of rows in the sketch, for vectors of two dimensions a factor of four apart. The two curves lie almost on top of one another and both fall steadily.10²10².³10².⁵⁹⁹⁹⁹⁹⁹⁹⁹⁹⁹⁹⁹⁹⁹⁶10⁻¹10⁻⁰.⁵1rows in the sketchworst relative distortiondimension 64dimension 2565 seeds per point, band is best to worstthe dimension does not appear
Fig. 12 A sketch that preserves one property and not others, in the randomised field.
The lower bound is attained and the upper one is out by 37.3×Cheeger's inequality on nine graphs of about 40 vertices each: for the normalised Laplacian's λ₂, λ₂/2 ≤ φ ≤ √(2λ₂), where φ is the conductance the sweep cut actually achieves. Each row shows the two bounds as a bar and the measured conductance as a dot inside it. The lower bound is tight on the complete at a ratio of 1. The upper bound is loosest on the barbell — by a factor of 37.3 — which is the graph in the census with a real bottleneck, and therefore the shape the inequality is always quoted about. The square root is what makes it loose: it is the price of turning a spectral quantity into a combinatorial guarantee, and it is paid where the guarantee is wanted.10⁻³10⁻²10⁻¹110¹12345678910conductance, and the two bounds on itpathcyclegridbarbelltwo blockshypercubepreferentialstarcompletethe bar is the inequalitythe dot is the graph
Fig. 13 The cuts a preserved quadratic form guarantees are preserved.
One real vector, 59 candidate cuts, and the best of them is number 30The Fiedler vector of the two blocks 60, its entries sorted, drawn as the pale rising curve against the right-hand scale; and against the logarithmic left-hand scale, the conductance of the cut that takes the first k vertices in that order. λ₂ = 2.5538. The eigenvector is a real vector and the answer wanted is a subset, so something has to round it: the sweep takes every prefix and keeps the best, which here is k = 30 at a conductance of 0.08982 against a worst prefix of 1 — a factor of 11.1 between the best cut this vector offers and the worst. Nothing in the eigenvalue problem chose k; the sorting did.010203040506010⁻¹1vertices on the smaller sideconductance of the prefix cut0.0898, the best prefixthe rounding stepλ₂2.6cuts considered59best conductance0.09at k =30worst prefix1the dashed curve is the eigenvectorthe solid one is what it costs
Fig. 14 A partition, which is a quadratic form and therefore survives sparsification.
Twenty eigenvalues, one of them zero, and the graph has one pieceThe Laplacian spectrum of two ten-vertex paths joined by a single edge of conductance 1, plotted on a logarithmic axis so the zero end is visible. The dashed line is the threshold 10⁻¹⁰‖L‖ = 1.06·10⁻⁹, and the number of eigenvalues below it is the spectral count of connected components: 1. Breadth-first search, which performs no arithmetic on any weight, says 1. The largest computed zero is 5.81·10⁻¹⁷ and the smallest eigenvalue above the threshold is 0.02462. A count of components is therefore a rank decision at a threshold, and the bridge's conductance decides which side of it λ₂ falls on — at nine orders above the rounding level, not at it.13579111315171910⁻¹⁹10⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹indexeigenvalue of L10⁻¹⁰‖L‖, the thresholda count that is a thresholdeigenvalues below it1components, by search1largest computed zero5.8·10⁻¹⁷smallest above it0.025ratio4.2·10¹⁴the graph is connectedat every stop of the slider
Fig. 15 The spectrum the band in this essay is a distortion of.
κ is between 1 and the total stretch, and the bound is 2.28–3.47× looseThree spanning trees of the grid 5×5 used as preconditioners. For each, the bar spans the smallest and largest eigenvalue of L_T⁻¹L_G on the subspace orthogonal to the constant vector, and the tick is the total stretch — the sum over the graph's edges of the resistance of the path the tree makes them take, which is an integer for an unweighted graph and contains no arithmetic at all. The smallest eigenvalue is 1 to 2·10⁻¹⁵ on every tree, which is a theorem rather than a measurement: a tree is a subgraph, so its quadratic form is never the larger. The largest is below the stretch on every tree, by between 2.28 and 3.47. Choosing a preconditioner is therefore choosing a tree, and it can be scored without factorising anything.10⁻¹110¹10²10³1234eigenvalue of the preconditioned Laplacian, and the stretchbreadth-firstκ = 34.62randomκ = 55.17random, secondκ = 37.11the bar is the spectrumthe tick is a combinatorial bound
Fig. 16 A different subgraph used as an approximation, scored a different way.
Same matrix, same arithmetic, 4.13× the fillGaussian elimination on the Laplacian of the grid 6×6, under five orderings, counting the edges that did not exist before. Eliminating a vertex removes it and joins its neighbours into a clique — the star–mesh transform, which is what the Schur complement of a Laplacian does — so fill is a set of edges rather than a set of nonzeros, and the matrix that remains is still a graph: symmetric, zero row sums, nonpositive off the diagonal, checked at every step and worst at 3·10⁻¹⁵. Minimum degree fills 71 edges against 293 for the worst ordering here, on a graph with 60 to start with. Nothing about the arithmetic differs between these five runs.05101520253035059118177236295vertices eliminatededges of fill so farminDegree: 71natural: 125reverse: 125random: 160maxDegree: 293fill, by orderingminDegree71natural125reverse125random160maxDegree293edges to start60eliminating a vertex makes a cliqueand the order decides how big
Fig. 17 What elimination does to a graph’s edges, which sparsification is the opposite of.
Singular values of a rank-4 matrix with noise of relative size 10⁻⁸Ten singular values on a logarithmic axis. The first four sit near one; the rest sit at the noise level, and the vertical distance between the two groups is the evidence for the rank.1234567891010⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1indexsingular valuecutoff, σ₁ · 10⁻¹⁰numerical rank 10gap 8.2·10⁶an opiniontrue rank 410×10, built with 4 nonzero valuesrank is a decision
Fig. 18 A threshold deciding an integer, which the sample count here also is.
Error of the best rank-k approximation to a 12×12 matrixApproximation error against k on a logarithmic axis, with the measured error and the next singular value drawn as separate curves lying exactly on top of one another.123456789101110⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1rank k of the approximation‖A − Aₖ‖measured, 2-normσₖ₊₁, from theorymeasured, Frobeniusthe first two agreeto 2·10⁻⁸worst |‖A−Aₖ‖₂ − σₖ₊₁| / σₖ₊₁2·10⁻⁸worst Frobenius discrepancy2·10⁻⁸κ = 10⁹; 30 random rank-3 matrices, none closerthe error is σₖ₊₁
Fig. 19 An approximation error against the rank kept, in the field that named the trade.
How close Hager's estimate is to the true κ₁, over 200 seeded 8×8 matricesFive bars. The estimate is exactly the true condition number on 81% of the sample and inside ten per cent on 87%; the worst underestimate in the whole sample returns 38% of the truth. The last bar is the matrix built to defeat it, at 7.7%, well below anything the random sample reached.each bar is a percentage — of the sample, or of the true condition numberexactly right80.5%inside 10%87.0%inside a factor of 287.0%worst in the sample, ×10037.7%the constructed matrix, ×1007.7%usually exactexact share0.81worst of the sample0.38the constructed matrix0.077a routine that is right most of the timeand never wrong in the safe direction
Fig. 20 An estimate reported as a spread, which every randomised answer should be.
Backward and forward error against the condition numberA log–log plot over twelve decades of condition number. The backward error is a flat line at ten to the minus sixteen; the forward error rises in proportion to the condition number.110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹condition number κ(A)relative errorforward errorbackward errorpredicted: κ · u8×8, 20 seeds per κ; dashed is the worstthe problem worsens, not the method
Fig. 21 The two errors, of which a sparsifier’s is neither.
How much a perturbation of the right-hand side is amplified, κ = 10⁶The cumulative distribution of the amplification factor over two hundred random perturbation directions, with the condition number marked as the upper limit.110¹10²10³10⁴10⁵10⁶10⁷00.250.50.751amplification of the input perturbationfraction of directions at or belowκ = 10·10⁵worst found 7.6·10⁵6×6, 200 directionsmedian reaches 0.29 of κ
Fig. 22 The amplifier that a preserved quadratic form bounds the movement of.
The exact solution of a 13×13 Hilbert system beside the computed oneTwo columns of numbers: the exact answer, which is the integers one to thirteen, and the answer double-precision elimination returns, with the number of correct digits beside each.H13 x = b, b formed exactly so that x = (1, 2, …, 13)12345678910111213exact1.00002.00003.00133.97865.18864.993010.46720.048921.2657-2.575319.21478.906013.5113computed6.6 correct digits4.8 correct digits3.4 correct digits2.3 correct digits1.4 correct digit0.8 correct digitno correct digitsno correct digitsno correct digitsno correct digitsno correct digits0.6 correct digit1.4 correct digitbackward error2.2·10⁻¹⁷κ = 1.7·10¹⁸The algorithm solved a neighbouring problem perfectly. That problem's answer is this one.right-hand side built in BigInt rationalsthe truth is known
Fig. 23 An answer that is known, against which the unsampled graph plays the same role here.
Backward error, forward error and the condition number, with measured valuesTwo boxes at the top — the problem posed and the nearby problem the algorithm answered exactly — and two answers below them, with the distances between all four labelled by numbers from a Hilbert solve.the problem you posedA = H10b = A·(1, 2, …, 10)the problem it answered exactlyA + δA, b + δb‖δ‖ / ‖A‖ = 2.3·10⁻¹⁷the answer you wantedx = (1, 2, …, 10), exactlythe answer you gotx̂, wrong by 2.7·10⁻⁴ relativebackward error 2.3·10⁻¹⁷forward error 2.7·10⁻⁴κ = 1.6·10¹³κ · η = 3.6·10⁻⁴, and the measured forward error is 2.7·10⁻⁴.The algorithm is not at fault. The problem is.H10, LU with partial pivotingresidual and error differ
Fig. 24 The identity every measurement here is read against.
Growth factor under partial pivoting to n = 40: the bound, the worst case, and realityGrowth factor against matrix size on a logarithmic vertical axis. The two-to-the-n bound rises as a straight line; Wilkinson's matrix sits exactly on it; random matrices stay near one.0816243240110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴matrix size ngrowth factor max|u| / max|a|the 2ⁿ⁻¹ boundworst of 30 randommedian randomWilkinson's matrix sits on the bound30 Gaussian matrices per sizeat n = 40: bound 5.5·10¹¹, worst 4.8
Fig. 25 A bound never attained, which the sample-count bound for this construction also is.
Forward error of a 6×6 Hilbert solve at eight precisionsA bar for each significand width from 12 to 53 bits showing the relative error in the computed solution, with the condition number times the unit roundoff marked as a prediction.κ = 1.5·10⁷ · the exact answer is (1, 2, …, 6)12 bits3.316 bits0.8620 bits4.324 bits0.09330 bits7.6·10⁻⁴36 bits6.2·10⁻⁶43 bits2·10⁻⁷53 bits4.5·10⁻¹¹dashed: κ · unit roundoffone matrix, eight arithmeticsmeasured against a known answer
Fig. 26 The precision knob, which changes nothing about a sampling error.
What a rank-10 approximation can achieve, by spectrumA semi-logarithmic plot of singular value against index for three spectra — geometric decay, algebraic decay, and flat — with the rank-ten approximation error marked on each.1112131415110⁻³10⁻²10⁻¹1index jσⱼσ11geometric, 0.85ʲalgebraic, j^−1.00flatmeasured, and equal to σ₁₁rank-10 error, geometric0.2rank-10 error, algebraic0.091rank-10 error, flat160×60, spectrum chosen rather than the entriesthe matrix decides, not the method
Fig. 27 A spectrum with no gap, which a sparsifier preserves the shape of.

What links here

Computed from the collection, not written here: the essays that point at this one.

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.

Degree sequenceEffective resistanceFoster theoremGraph laplacianImportance samplingQuadratic formRandomisedSpectral sparsification