Two different graphs with the same spectrum, to the last digit
At its defaults it draws two different graphs with the same spectrum, to the last digit. a triangle and a square, joined and K₂,₃ with a pendant edge: 6 vertices and 7 edges each, drawn above their combinatorial Laplacian spectra. The two characteristic polynomials are the same integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues, and the 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, so they are not the same graph, and every method in this field that reads only a spectrum answers about the class rather than the graph.
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.
a triangle and a square, joined and K₂,₃ with a pendant edge: 6 vertices and 7 edges each, drawn above their combinatorial Laplacian spectra. The two characteristic polynomials are the same integer polynomial, checked in exact arithmetic rather than by comparing computed eigenvalues, and the 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, so they are not the same graph, and every method in this field that reads only a spectrum answers about the class rather than the graph.
show: "group-census"
The arguments are the ones A finer invariant that hears less passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.
Every pair of non-isomorphic connected graphs with the same Laplacian characteristic polynomial, as a share of all such pairs at each size. 6 vertices: 2 pairs, 1 separated by the critical group, 1 with both groups cyclic, 0 sharing one non-cyclic group; 7 vertices: 65 pairs, 30 separated by the critical group, 23 with both groups cyclic, 12 sharing one non-cyclic group; 8 vertices: 1022 pairs, 435 separated by the critical group, 361 with both groups cyclic, 226 sharing one non-cyclic group.
show: "group-pair"
The arguments are the ones A finer invariant that hears less passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.
Left pair: ℤ₁₂ against ℤ₂ ⊕ ℤ₆, 12 spanning trees each, told apart by the group. Right pair: ℤ₂₄ for both, 24 spanning trees each, and a cyclic group is determined by its order, so the group cannot tell them apart; their degree sequences can.
show: "group-cyclic"
The arguments are the ones A finer invariant that hears less passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.
The share of connected graphs whose grounded Laplacian has at most one invariant factor above one: 100.0% on 3 vertices, 83.3% on 4 vertices, 66.7% on 5 vertices, 61.6% on 6 vertices, 61.0% on 7 vertices, 63.6% on 8 vertices. Among graphs that have a Laplacian-cospectral mate: 75.0% on 6, 51.3% on 7, 48.5% on 8.
show: "group-orders"
The arguments are the ones A finer invariant that hears less passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.
Every abelian group of squarefree order is cyclic, so a pair whose tree count is squarefree cannot be separated by its critical group. squarefree tree count: 157 pairs, 0 separated; a square divides it: 865 pairs, 435 separated.
show: "group-invariants", n: 8
The arguments are the ones A finer invariant that hears less passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.
Pairs of non-isomorphic connected graphs on 8 vertices with the same Laplacian characteristic polynomial, and how many each invariant separates: critical group 435 of 1022; degree sequence 354 of 1022; triangle count 352 of 1022; signless Laplacian spectrum 906 of 1022; adjacency spectrum 1022 of 1022; group or degree sequence 640 of 1022.
What it checked while drawing
Every figure above checked its own claims on the way to being drawn, and a claim that failed
would have stopped the picture rather than shipped a wrong one. Those checks 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.
40 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
a degree and an order a regular graph can have
a determinant that came out an integer, as the theorem says it must
a graph with at least two vertices
a normalised Laplacian that exists — C₄ ∪ K₁ has an isolated vertex, so D^(-1/2) does not
a pair this figure knows
a positive weight
a seven-vertex pair that shares every invariant but the adjacency polynomial
a side of the switching the dial draws
a size the adjacency census covers
a size the census covers, three to eight vertices
a size the figure draws
a size with cospectral pairs, six to eight
an exact Faddeev–LeVerrier step
an integer matrix, since the answer is claimed to be exact
an order and degree the study covers
an unweighted graph, which is what the theorem counts trees of
and it is 2|E|
and the computed spectra separate by more than any rounding
and the one with a triangle does not
and they have the same number of spanning trees
and this matrix gives them different characteristic polynomials
both graphs are bipartite
every endpoint inside the vertex set
every pair both cyclic is unseparated
Jacobi needs a symmetric matrix
LU is for square matrices
no edge given twice
no isolated vertex, which the normalisation divides by
no pair with a squarefree tree count is separated
no self-loop
one adjacency-cospectral pair on six vertices
one of the three matrices a graph has
one six-vertex pair separated, one not
so the computed spectra agree to the rounding level
the bipartite graph's normalised spectrum reaches exactly 2
the second moment is 2|E| and is equal on both
the two characteristic polynomials are the same integer polynomial
two graphs that are not the same graph
while the third moment counts triangles, and separates them
Against the rule
It draws a decomposition and prints its residual. It calls
jacobiEigSym, spectrum, spectrum, 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 217
of 397 generators —
199 print a residual and
18 are exempt with a published reason;
180 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 finer invariant that hears less
The Laplacian spectrum fixes a graph's number of spanning trees and not the group those trees form, so the Smith normal form of the grounded Laplacian is a strictly finer integer invariant — and on the six-vertex pair the spectrum cannot separate, it does: ℤ₁₂ against ℤ₂ ⊕ ℤ₆. Over all 1,022 Laplacian-cospectral pairs of connected graphs on eight vertices it separates 435. The adjacency polynomial, a second spectrum rather than a finer one, separates all of them.
The matrix that is a graphEach spectrum hears the other's pairs
Pairs of graphs with the same Laplacian spectrum share a spanning-tree count, so the critical group could only tell them apart by how that count factors — and did on two pairs in five. Turn the census round, to the 733 pairs of eight-vertex graphs with the same adjacency spectrum, and the tree count is free to differ. It does on 717 of them, by a median of six per cent. The critical group separates exactly those 717 and not one more: on all sixteen pairs whose counts agree, including a non-cyclic one, the two graphs have the same group. And the Laplacian spectrum separates all 733, as the adjacency spectrum separated every Laplacian pair.
The matrix that is a graphThe group hears a switch only at two
On a regular graph the Laplacian is the degree times the identity less the adjacency matrix, so the two spectra are one piece of information and the tree count comes with them; between cospectral regular graphs the critical group is the only exact invariant left. Made by Godsil–McKay switching on four vertices, 705 distinct cospectral pairs of 3- and 4-regular graphs on 12 to 20 vertices give its answer. It separates 181 of 587 quartic pairs and none of 118 cubic ones. And on every one of the 705 the two groups agree everywhere except at the prime two: a switch is a conjugation by a matrix of halves, the group can see it only through its 2-part, and a group whose tree count has fewer than three factors of two cannot see it at all.
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.