Generator

cospectral-pair

One function in the graphres library, called 3 times across 1 essay. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 15 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 two different graphs with the same spectrum, to the last digit. A triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Their computed spectra differ by 5.33·10⁻¹⁵, which is the eigensolver's own rounding and not a property of the graphs. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.

cospectral-pair 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.

Two different graphs with the same spectrum, to the last digitA triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Their computed spectra differ by 5.33·10⁻¹⁵, which is the eigensolver's own rounding and not a property of the graphs. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.a triangle and a square, joinedK₂,₃ with a pendant edge1234560123456indexeigenvaluethe same, and not the samevertices each6edges each7spanning trees12spectra differ by5.3·10⁻¹⁵highest degree, left4highest degree, right3one has a trianglethe other is bipartite

A triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Their computed spectra differ by 5.33·10⁻¹⁵, which is the eigensolver's own rounding and not a property of the graphs. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.

normalised: false

The arguments are the ones The spectrum is not the graph 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.

Two different graphs with the same spectrum, to the last digitA triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Their computed spectra differ by 5.33·10⁻¹⁵, which is the eigensolver's own rounding and not a property of the graphs. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.a triangle and a square, joinedK₂,₃ with a pendant edge1234560123456indexeigenvaluethe same, and not the samevertices each6edges each7spanning trees12spectra differ by5.3·10⁻¹⁵highest degree, left4highest degree, right3one has a trianglethe other is bipartite

A triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Their computed spectra differ by 5.33·10⁻¹⁵, which is the eigensolver's own rounding and not a property of the graphs. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.

normalised: true

The arguments are the ones The spectrum is not the graph 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 other matrix separates them at the first eigenvalueA triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Drawn here for the NORMALISED Laplacian D^{-1/2}LD^{-1/2}, whose spectra differ by 0.2225: the second graph is bipartite, and a bipartite graph has an eigenvalue at exactly 2, which the first cannot have. A different matrix built from the same object asks a different question. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.a triangle and a square, joinedK₂,₃ with a pendant edge123456012indexeigenvaluethe same, and not the samevertices each6edges each7spanning trees12spectra differ by0.22highest degree, left4highest degree, right3one has a trianglethe other is bipartite

A triangle joined to a square at one vertex, and the complete bipartite graph K₂,₃ with one pendant edge. Six vertices and seven edges each, 12 spanning trees each, and — for the combinatorial Laplacian — the same characteristic polynomial as an integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues. Drawn here for the NORMALISED Laplacian D^{-1/2}LD^{-1/2}, whose spectra differ by 0.2225: the second graph is bipartite, and a bipartite graph has an eigenvalue at exactly 2, which the first cannot have. A different matrix built from the same object asks a different question. Their degree sequences are 4, 2, 2, 2, 2, 2 and 3, 3, 3, 2, 2, 1, and the first contains a triangle while the second is bipartite — so they are not the same graph by two independent readings, and every method in this field that reads only the spectrum answers about the class.

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.

15 distinct claims across 3 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 choice of which Laplacian to draw

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

an unweighted graph, which is what the theorem counts trees of

and they have the same number of spanning trees

every endpoint inside the vertex set

Jacobi needs a symmetric matrix

no edge given twice

no isolated vertex, which the normalisation divides by

no self-loop

the combinatorial spectra agree to the rounding level

the normalised spectra separate

two graphs that are not the same graph

Against the rule

It draws a decomposition and prints its residual. It calls laplacianEig, spanningTreesExact, 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