spanning-tree-count
At its defaults it draws backward stable at every size, and wrong from n = 16. The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 9.38·10⁻¹⁵ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. Where they cross, at n = 16, the count has 17 digits and a binary64 has sixteen: rounding to the nearest integer cannot recover it, because the nearest two representable numbers there are 8 apart. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
spanning-tree-count 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.
The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 9.38·10⁻¹⁵ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. Where they cross, at n = 16, the count has 17 digits and a binary64 has sixteen: rounding to the nearest integer cannot recover it, because the nearest two representable numbers there are 8 apart. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
upTo: 22
The arguments are the ones A count that comes out of a determinant 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.
The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 9.38·10⁻¹⁵ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. Where they cross, at n = 16, the count has 17 digits and a binary64 has sixteen: rounding to the nearest integer cannot recover it, because the nearest two representable numbers there are 8 apart. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
upTo: 12
The arguments are the ones A count that comes out of a determinant 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.
The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 8.88·10⁻¹⁶ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
upTo: 8
The arguments are the ones A count that comes out of a determinant 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.
The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 8.88·10⁻¹⁶ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
upTo: 15
The arguments are the ones A count that comes out of a determinant 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.
The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 3.41·10⁻¹⁵ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
upTo: 18
The arguments are the ones A count that comes out of a determinant 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.
The number of spanning trees of the complete graph on n vertices, by Kirchhoff's theorem: the determinant of the Laplacian with one row and column deleted, which is nⁿ⁻² by Cayley's formula and is therefore a whole number known in advance. It is computed twice — in BigInt rationals, where the answer is exact, and by the site's own pivoted elimination in binary64. The filled curve is the relative error of the elimination, which never leaves the rounding level: worst 6·10⁻¹⁵ across the whole range, so the algorithm is backward stable at every size. The dashed curve is the spacing between consecutive doubles at the answer's own magnitude, relative to the answer. Where they cross, at n = 16, the count has 17 digits and a binary64 has sixteen: rounding to the nearest integer cannot recover it, because the nearest two representable numbers there are 8 apart. The error is committed by the format and not by the elimination, which is a distinction no residual can make.
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.
32 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.
Cayley's formula holds at n = 5 — asserted 22 times
a connected graph
a determinant that came out an integer, as the theorem says it must
a graph with at least two vertices
a positive weight
a size the rational determinant can afford
an unweighted graph, which is what the theorem counts trees of
every endpoint inside the vertex set
LU is for square matrices
no edge given twice
no self-loop
Against the rule
It draws a decomposition and prints its residual. It calls
treeCount,
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.
A count that comes out of a determinant
The number of spanning trees of a graph is the determinant of its grounded Laplacian, so it is a whole number known in advance. The elimination that computes it is backward stable at every size — and from sixteen vertices the answer is wrong, because the count has seventeen digits and a binary64 has sixteen.
The matrix that is a graphEliminating a vertex is a graph operation
Gaussian elimination on a Laplacian deletes a vertex and joins its neighbours into a clique with conductances wᵢwⱼ over Σw. The matrix that remains is still a graph — symmetric, zero row sums, nonpositive off the diagonal — and the ordering decides whether the fill is thirty-one edges or four hundred and sixty-five.
The matrix that is a graphThe spectrum is not the graph
Two graphs on six vertices with the same Laplacian characteristic polynomial — as integer polynomials, not to fourteen digits. One contains a triangle; the other is bipartite. Every method in this field that reads only the spectrum is answering about the class.