Generator

Two different graphs with the same spectrum, to the last digit

One function in the graphres library, called 25 times across 4 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 40 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 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.

Two different graphs with the same spectrum, to the last digita 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.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 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.

Laplacian-cospectral pairs of connected graphs on six, seven and eight vertices, by whether their critical groups tell them apartEvery 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.separated by the groupboth groups cyclic: cannot bethe same non-cyclic group6 vertices, 2 pairs117 vertices, 65 pairs3023128 vertices, 1022 pairs435361226a cyclic group is fixed by its order, and the order is the tree countthe group heard less than half the time

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.

The two Laplacian-cospectral pairs on six vertices, with the critical group of each graphLeft 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.separated by the groupnot separated: both cyclicℤ₁₂degrees 4 2 2 2 2 212 spanning treesℤ₂ ⊕ ℤ₆degrees 3 3 3 2 2 112 spanning treesℤ₂₄degrees 3 3 3 3 3 124 spanning treesℤ₂₄degrees 4 3 3 2 2 224 spanning treessix verticespairs on six vertices2separated by the group1separated by the degrees2the Smith form of the grounded Laplacian names the groupone pair in two

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.

How often a connected graph's critical group is cyclic, by the number of verticesThe 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.share of groups that are cycliccyclic, eight vertices0.64cyclic, with a mate0.4834567800.20.40.60.81verticesshare with a cyclic critical groupevery connected graphgraphs with a cospectral matea cyclic group says nothing its order does notand the order is the spanning-tree count

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.

Laplacian-cospectral pairs on eight vertices, by whether their shared spanning-tree count has a repeated prime factorEvery 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.separated by the groupnot separatedsquarefree tree count157 pairs0 of 157a square divides it865 pairs435 of 865eight verticesa squarefree order leaves the group nothing to say

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.

The share of the 1022 Laplacian-cospectral pairs on 8 vertices that each invariant tells apartPairs 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.1022 pairs on 8 verticescritical group43%degree sequence35%triangle count34%signless Laplacian spectrum89%adjacency spectrum100%group or degree sequence63%every invariant here is exact: integers compared for equalitya second spectrum beats the finer group

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.

The matrix that is a graph

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 graph

Each 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 graph

The 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 graph

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

The whole library · All essays · What must fail