Generator

sparsifier-quality

One function in the graphres library, called 9 times across 3 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 11 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws 344 of 1225 edges keep every eigenvalue and no degree. A 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.

sparsifier-quality is one function in lib/figures/graphres.js — resistance, sparsification and elimination — three routes to one number, and a count that outgrows the format. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

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

A 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.

q: 400

The arguments are the ones A distance computed by a solve passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

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

A 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.

q: 200

The arguments are the ones A graph with a tenth of the edges passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

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

A 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.

q: 100

The arguments are the ones A graph with a tenth of the edges passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

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

A 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.

q: 800

The arguments are the ones A graph with a tenth of the edges passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

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

A 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.

q: 1600

The arguments are the ones A graph with a tenth of the edges passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

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

A 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.

What it checked while drawing

Every figure above asserted its own claims on the way to being drawn, and a claim that failed would have failed the build rather than drawn a wrong picture. Those assertions used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

11 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

a connected graph, since resistance between components is infinite

a graph with at least two vertices

a positive weight

a sample count the figure can afford

a sample that is still connected

every endpoint inside the vertex set

Jacobi needs a symmetric matrix

LU is for square matrices

no edge given twice

no self-loop

the sampling probabilities are Foster's identity, so they sum to n − 1

Against the rule

It draws a decomposition and prints its residual. It calls laplacianEig, sparsify, whatSurvives, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 214 of 382 generators — 194 print a residual and 20 are exempt with a published reason; 168 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · All essays · What must fail