Skip to content

Where Spiro's conjecture on signed trees holds, explained from the start

ExplainerNovember 16, 2026updated Nov 20, 202619 min

A ▲ after a number means it has a note at the foot of this page.

Settled exactly where Spiro's conjecture on signed trees holds: at every size below the one where it is known to fail. Explained from the first definition, with every small tree worked out and a tree builder.

Settled exactly where the lower half of Spiro's conjecture on signed trees holds: every size up to 29, and nowhere from 30.

Take a network shaped like a tree, mark each link plus or minus, and for every pair of points add up the signs along the route between them; that sum with any minus sign dropped is their signed distance, and the total over all pairs is a score for the signed tree. Each tree has a lowest possible score, over all the ways of signing it. In 2021 S. Spiro conjectured that among trees with the same number of points, the path, all the points in one line, has the lowest of these (the lower half of his conjecture), and a simple two-hub tree the highest (the upper half). In 2023 Guo, Wang and Wang proved that the lower half fails for every tree size from 30 points up, and said nothing about smaller sizes. Claude agents (Anthropic), working under my direction, checked every tree up to that size, including all 5,469,566,585 trees with 29 points and all 14,830,871,802 with 30, with two separately written programs that agree everywhere. No tree beats the path at any size up to 29 (at 29 one other tree ties it), so 30 is exactly where the lower half breaks, and Guo, Wang and Wang's bound is best possible. With the sizes between 9 and 30 filled in, this half of the conjecture has a complete answer at every size.

Below, every word the story needs is defined in order, each with an example small enough to check by eye. Small trees are then worked out completely, and a builder near the end computes the smallest total of any small tree in the browser.

  • The conjecture: S. Spiro's, from 2021 (published 2022): among trees with the same number of points, the path has the lowest score (the lower half) and a two-hub tree the highest (the upper half). He checked it up to 9 points.
  • Where it fails: the lower half fails from 30 points on, by Guo, Wang and Wang's theorem (2023).
  • This work: I show the lower half holds at every size up to 29, by an exhaustive computer search; the upper half checked to 28 points; a formula for the largest value among two-hub trees (double stars, defined below), with a written proof not yet checked by a person.
  • Public: the programs, their outputs and the proofs in a Zenodo record, a public archive that gives each record a permanent address, published on November 9, 2026 (Pacific time; Zenodo shows November 10, in UTC).
  • Status: a short note was submitted to a peer-reviewed journal on November 13, 2026 and is under review.

Words first

Read these in order. Each one uses only the words before it. Readers who know the signed Wiener index can skip to the short version.

A tree

A tree is a set of points joined by links so that it is in one piece and has no loop: between any two points there is exactly one route. A tree with nn points always has n−1n - 1 links.

Example

Family trees, river systems and the diagrams of many molecules are trees. Four points joined in a row, or three points each joined to a fourth, are the only two trees with four points.

The path, the star and the double star

The path has all its points in one line. The star has one hub joined to every other point. A double star is a tree with two points that between them touch every link. The main shape is two joined hubs, each carrying some leaves (points with only one link). The star, and two hubs joined through one middle point, also count.

A double star D(3, 4): two joined hubs with 3 and 4 leaves

A double star with seven leaves: three on one hub, four on the other. With the leaves split as evenly as possible it is called balanced.

Distance, and the Wiener index

The distance between two points of a tree is the number of links on the route between them. The Wiener index is the sum of the distances over all pairs of points. It is one of the oldest numbers used to describe molecules: Harry Wiener introduced it in 1947, in a paper on predicting the boiling points of paraffins.

Example

The path on four points has pairs at distances 1, 1, 1, 2, 2 and 3: Wiener index 10. The star on four points has three pairs at distance 1 and three at distance 2: Wiener index 9. Without signs the star is smaller.

A signing gives each link of the tree a sign, plus or minus. Signed networks are used to model friendship and hostility, or agreement and disagreement. A tree with n−1n - 1 links has 2 to the power n−1n - 1 signings, and flipping every sign at once changes none of the signed distances defined next, so only half of them need checking.

Signed distance

The signed distance between two points is the size of the sum of the signs on the route between them, ignoring whether the sum is positive or negative. A plus followed by a minus cancels to 0; two pluses or two minuses give 2.

Both links plus

++

total 4

Plus then minus

+−

total 2

The path on three points. Left: both links plus, distances 1, 1 and 2, total 4. Right: plus then minus, distances 1, 1 and 0, total 2. Solid lines are plus, dashed lines are minus.

The signed Wiener index, and its smallest value

The signed Wiener index of a signed tree is the sum of the signed distances over all pairs of points. Changing the signs changes it. The smallest value over all signings of a tree is written W*; it is a number attached to the tree itself.

Example

For the path on three points the two signings above give 4 and 2 (the other two signings are these with every sign flipped), so W* = 2.

Spiro's conjecture

In a paper posted in 2021 and published in 2022, S. Spiro conjectured that for every tree with nn points, W* lies between two values: at least the path's W*, and at most the largest W* among double stars with nn points. This page calls the two inequalities the lower half (the path is smallest) and the upper half (some double star is largest). Spiro checked both up to 9 points. Without signs the order is the other way round (the path has the largest Wiener index and the star the smallest), and Spiro remarked on this reversal.

Counterexample, threshold, best possible

A counterexample is a single case where a statement fails. A threshold here is the size from which a statement fails. A bound is best possible when it cannot be improved: if a statement is known to fail from size 30 on and is shown to hold at every size below, then 30 is the exact threshold.

Exhaustive search, and computer-assisted

An exhaustive search checks every case, one by one. A result that rests on such a search is computer-assisted: its correctness depends on the programs and on the list of cases being complete, which is why it is checked by more than one program and why the code is published.

Peer review, Zenodo, DOI

Peer review is a journal's examination of a paper by other researchers before publication. Zenodo is a public research archive whose records get a DOI, a permanent web address. The programs and outputs here are a Zenodo record; the note on them is under review at a journal.

The short version

  • Mark each link of a tree plus or minus; the signed Wiener index adds up signed distances over all pairs, and W* is its smallest value over all signings (words 5 and 6).
  • Spiro conjectured that the path has the smallest W* among all trees of the same size. Guo, Wang and Wang proved that this fails at every size from 30 on.
  • Before this work the conjecture had been checked up to 9 points. The lower half is now checked at every size up to 30, and the upper half up to 28.
  • Claude agents, working under my direction, checked every tree at every size up to 29: the path is always smallest (at 29 one other tree ties it, which the conjecture allows). So 30 is the exact threshold.
  • A proved filter set aside 99.7 percent of the trees at the two largest sizes before any search, and two separately written exact programs handled the rest.
  • For the other end of the conjecture, the work gives a formula for the largest W* among double stars, with a written proof by Claude agents that no person has checked yet; the upper half itself is checked up to 28 points and is open beyond.

Small trees by hand

Four points: the path against the star

There are two trees with four points. Give the path alternating signs, plus, minus, plus. Every pair and its signed distance:

PairSigns on the waySigned distance
A and B+11
A and C+1 −10
A and D+1 −1 +11
B and C−11
B and D−1 +10
C and D+11
Total4

Computed on this page. The path's points are A, B, C, D in order. No signing of the path does better: its W* is 4.

Now the star. However its three links are signed, two of them share a sign, and those two leaves are at signed distance 2. The best is two of one sign and one of the other:

PairSigns on the waySigned distance
Hub and A+11
Hub and B−11
Hub and C+11
A and B+1 −10
A and C+1 +12
B and C−1 +10
Total5

Computed on this page, and checked against trying all signings: the star's W* is 5, more than the path's 4.

So with signs the path beats the star, the reverse of the unsigned order (word 3). The same happens at every size the page can check quickly:

PointsPath, no signsStar, no signsPath, best signingStar, best signing
410945
63525913
884491625
10165812541

Computed on this page by trying every signing. Without signs the star is smaller (bold); with the best signing the path is smaller (bold).

Every tree from four to ten points

The page itself lists every tree from four to ten points and tries every signing of each, as it is built. The path is the only smallest tree at each of these sizes, and its W* is always ⌊n2/4⌋\lfloor n^2/4 \rfloor (the square of nn, divided by 4, rounded down).

PointsTreesSignings tried per treeSmallest W*Path valueLargest W*M(n)
424445n/a
5386688
6616991313
7113212121818
8236416162626
94712820203434
1010625625254343

At every size here the smallest W* is reached by the path alone. The tree counts are entry A000055 of the OEIS, the online encyclopedia of number sequences (2, 3, 6, 11, 23, 47, 106), and the page checks them. Signings per tree is half of all signings, since flipping every sign changes nothing. M(n) is the largest W* among double stars, explained below; at every size in this table from five points on, the largest W* over all trees equals it (the record checks this up to 28 points; beyond that it is open).

Preciselythe exact statement, for readers who want it

A signing σ\sigma of a tree TT assigns ±1\pm 1 to each edge; dσ(u,v)d_\sigma(u,v) is the absolute value of the sum of the signs on the uu-vv path; Wσ(T)=∑dσ(u,v)W_\sigma(T) = \sum d_\sigma(u,v) over unordered pairs; and W∗(T)=min⁡σWσ(T)W_*(T) = \min_\sigma W_\sigma(T). Spiro's Conjecture 6.4 (arXiv numbering): for every tree TT on nn vertices, W∗(Pn)≤W∗(T)≤max⁡DW∗(D)W_*(P_n) \le W_*(T) \le \max_D W_*(D) over double stars DD on nn vertices. W∗(Pn)=⌊n2/4⌋W_*(P_n) = \lfloor n^2/4 \rfloor.

Where the path loses

Guo, Wang and Wang's counterexample at 30 points is the tree T(3,4,4,4,4,4): a root point joined to six points, which carry 3, 4, 4, 4, 4 and 4 leaves. The signing below, from the Zenodo record, totals 222, while the path on 30 points cannot go below 225.

T(3,4,4,4,4,4): a root, six children, and 3, 4, 4, 4, 4 and 4 leaves under them (30 points)

+++−−−−−−−−−−−−−−++++++++++++

Scroll sideways to see the whole tree.

total 222

T(3,4,4,4,4,4) with the signing that totals 222. The total under the picture is computed on this page from the drawn signs.

Their theorem gives such a tree for every size from 30 on. Below 30 it is silent, and the only published check I found stopped at 9 points. The search filled the whole gap:

PointsTreesPath valueLeft after the filterTrees below the pathOther trees equal to it
20823,0651002,00000
212,144,5051105,61200
225,623,75612114,56600
2314,828,07413241,08600
2439,299,897144104,52700
25104,636,890156304,35400
26279,793,450169760,65400
27751,065,4601822,272,24300
282,023,443,0321965,677,31600
295,469,566,58521017,090,04801
3014,830,871,80222543,322,54121

From the record's per-size table, for 20 to 30 points (the record has every size from 4). "Left after the filter" is the number of trees the exact search had to examine. At 29 points one tree, T(3,3,4,4,4,4), ties the path at 210; at 30 points two trees go below the path, T(3,4,4,4,4,4) at 222 and T(3,3,4,4,4,5) at 224, and one other tree, T(4,5,5,5,5), ties the path at 225. The path values are recomputed on this page.

Preciselythe exact statement, for readers who want it

For 4≤n≤284 \le n \le 28 the path is the unique minimiser of W∗W_*. At n=29n = 29 the minimum, 210, is attained by exactly the path and T(3,3,4,4,4,4). At n=30n = 30 the minimum, 222, is attained only by T(3,4,4,4,4,4); T(3,3,4,4,4,5), with 224, is the only other tree below the path's 225; and T(4,5,5,5,5) is the only other tree equal to it. With Guo, Wang and Wang (whose main theorem concerns Spiro's Conjecture 6.3; the failure of the lower half for every n≥30n \ge 30 is derived from the same trees in a remark at the end of their Section 2), the threshold 30 is exact.

How every tree was checked

At 30 points there are 14,830,871,802 trees, and each has more than a hundred million signings, so trying everything is out of reach. The programs worked in four steps.

Step 1: list every tree

The trees came from nauty, a standard program that lists graphs without repeats, in chunks. The number read at every size matched the known count of trees (OEIS A000055).

Step 2: a filter with a proof

A short inequality, Lemma A (a lemma is a helper result with its own proof), gives a floor under the total of every signing of a tree, from its shape alone. Colour the points of a tree in two colours so that every link joins different colours (there is always exactly one way, up to swapping). Two points of different colours are an odd number of links apart, so their signed distance is odd and at least 1: that gives one unit for each such pair, the product of the two colour counts. At a hub with dd links, two neighbours whose links carry the same sign are at signed distance 2, and however the dd signs are split, the same-sign pairs add at least ⌊(d−1)2/2⌋\lfloor (d-1)^2/2 \rfloor. Any tree whose floor is already above the path's value cannot beat or tie the path, and needs no search.

Tree (30 points)Pairs of different coloursLeast total from same-sign pairs at hubs (2 each)BoundAgainst the path value 225
The path15 × 15 = 2250225not above: searched exactly
The star1 × 29 = 29392421above: set aside, no search
The balanced double star D(14, 14)15 × 15 = 225196421above: set aside, no search
T(4,5,5,5,5)25 × 5 = 12564189not above: searched exactly
T(3,4,4,4,4,4)24 × 6 = 14456200not above: searched exactly

Computed on this page. The star and the balanced double star are set aside at once. The two trees of Guo, Wang and Wang's kind pass the filter and must be searched.

At 29 and 30 points the filter set aside 99.7 percent of all trees, leaving 17,090,048 and 43,322,541 for the exact search. Most trees already exceed this quick floor, so only the trees that could still match the path go on to the slow search.

A hub with four links

Two plus and two minus give two same-sign pairs, each at signed distance 2: 4 in all, and ⌊32/2⌋=4\lfloor 3^2/2 \rfloor = 4. Three plus and one minus give three pairs: 6, more than the floor.

Step 3: an exact search on the rest

For each tree that survives the filter, a search signs the links one at a time and abandons a partial signing as soon as a second inequality, Lemma B, shows it cannot beat the best total found so far. Lemma B has a written proof; as an extra safeguard it was also tested on 2,882,140 cases, with no violation. So for every surviving tree the search either shows that it stays above the path or finds its exact W*.

Step 4: a second program, and a third count

A second exact program, written separately, ran the whole lower half again, every size from 4 to 30, and agreed on every minimum, every list of trees at or below the path, and every filter count. The two come from the same project and the same day: they share the inequality of Lemma A, the input format and, from 27 points on, the tree generator, so they are separately written, not independent in the way two research groups would be. A third program, in JavaScript, recounted the trees that pass the filter and got the same numbers.

Preciselythe exact statement, for readers who want it

Lemma A: for a tree with bipartition (U,V)(U, V) and degrees dvd_v, every signing satisfies Wσ(T)≥∣U∣∣V∣+∑v⌊(dv−1)2/2⌋W_\sigma(T) \ge |U||V| + \sum_v \lfloor (d_v - 1)^2/2 \rfloor. Lemma B (the pruning bound) extends it to a partial signing on the first kk vertices in an order where each vertex follows its parent; for k=1k = 1 it is Lemma A and for k=nk = n an equality. Both are proved in PROOFS.md in the record.

The other end: double stars

The upper half says some double star has the largest W*. Spiro did not give its value. For trees of every size from five points on, the largest W* among double stars is

M(n)=⌊(7n2−20n+24)/12⌋,M(n) = \lfloor (7n^2 - 20n + 24)/12 \rfloor ,

and from eight points on only the balanced double star reaches it. The proof, written by Claude agents under my direction, minimises the total of a double star over the numbers of plus and minus leaves at each hub and then maximises over the split of the leaves. No person has checked it yet. It is also checked by computation for every size up to 120 points, and by trying every signing for 5 to 14 points.

The upper half itself was checked for every tree from 5 to 28 points, 3,222,181,083 trees: for each one, a program found a signing below M(n)M(n), except the double stars that reach it. Beyond 28 points the upper half is open.

Preciselythe exact statement, for readers who want it

For D(a,b)D(a,b) with adjacent centres carrying aa and bb leaves, the central edge positive, and xx of the aa leaves and yy of the bb leaves positive, Wσ=1+ab+a2+b2+2(x2+xy+y2)−2(a−1)x−2(b−1)yW_\sigma = 1 + ab + a^2 + b^2 + 2(x^2 + xy + y^2) - 2(a-1)x - 2(b-1)y. Minimising over integers x,yx, y and maximising over a+b=n−2a + b = n - 2 gives M(n)∼7n2/12M(n) \sim 7n^2/12, against ⌊n2/4⌋\lfloor n^2/4 \rfloor for the path and about n2/2n^2/2 for the star.

Try it

Build a tree, flip signs, and watch the total. "Find the smallest total" tries every signing (up to 18 points) and compares W* with the path's value. The 30-point tree of Guo, Wang and Wang loads with the record's signing; it has too many signings to try them all here, so for it the builder offers single sign changes, which can only show that W* is at most the current total.

+++
Points
4
This signing
10 (click a sign to flip it)
Path value
4 (the smallest total of the path on 4 points)
Lemma A floor
2 × 2 + 0 = 4 (no signing of this tree can total less)
Verdict
Press "Find the smallest total" to try every signing.

Start from the path on four points, press "Find the smallest total", then load the star and do the same: 4 against 5. Then grow the star into a double star and compare with the double-star maximum.

What was checked

CheckWhat it testedResult
SourcesSpiro's paper and Guo, Wang and Wang's, read from their source files; a search for later work on these sizesno later work found
Brute forcethe first program against trying every signing, for every tree up to 14 pointsagree
Second exact programevery tree at every size from 4 to 30 pointsthe same minima, trees and filter counts
Filter recounta third program, in JavaScript, counts the trees that pass the filterthe same counts at every size
Tree countsthe number of trees read at each size, against OEIS A000055match
Double-star formulathe written proof, computation up to 120 points, brute force for 5 to 14agree
Upper halfa signing below the maximum for every tree from 5 to 28 pointsfound for every tree except the double stars that reach it
Certificatesevery certificate in the record, 3,486 of them: a tree, a signing and its total, printed by the runs so that anyone can recompute the total and confirm the tree reaches at most that valueall correct
This pageevery tree from 4 to 10 points, every signing, against the record's counts and formulasagree
Human checka mathematician or a journal refereenot yet; the note is under review

Who did what

S. Spiro posed the conjecture (2021). S. Guo, W. Wang and C. Wang proved that its lower half fails at every size from 30 on (2023). On November 9, 2026 I asked Claude agents to look for open problems within reach; one of them, surveying fields from chemistry to statistics, put this one first, and three hours later the answer was in. Claude agents, working under my direction, wrote and ran the programs on one laptop, wrote the proofs, checked the results and the literature, and helped write the note. I set the task, directed the work and decided when the results were ready to publish. The problem was picked at 1:11 p.m., the result was recorded at 4:10 p.m., and the record went public at 6:45 p.m. (Pacific time), after two rounds of review by fresh Claude agents acting as referees, which are not journal peer review.

Where things stand

  • This half of the conjecture is now settled exactly: true up to 29 points, false from 30 on. The part below 30 is computer-assisted; the part from 30 on is Guo, Wang and Wang's theorem.
  • Spiro's conjecture as a whole is not proved: its lower half is false from 30 on, and its upper half is checked only up to 28 points.
  • The lower half of Spiro's conjecture holds at every size up to 29 points (exhaustive, computer-assisted) and fails from 30 on (Guo, Wang and Wang).
  • The double-star formula has a written proof by Claude agents, not yet checked by a person.
  • Submitted to a peer-reviewed journal on November 13, 2026; under review.

What it is part of

  • The result page: Spiro's conjecture on signed trees, with the full proofs of Lemma A and Lemma B and what the programs share, in the notes for specialists.
  • The record: Zenodo, doi:10.5281/zenodo.24095621, with the programs, all outputs, the certificates and a checker for them.
  • The day it came from: this was one of seven new results found in under two days with Claude agents in November 2026.
  • Graph theory: an extremal question about trees for a distance-based invariant of signed graphs.
  • Chemistry: the unsigned Wiener index is the oldest of the distance-based descriptors of molecules.
  • Search: a proved filter that discards almost every case before an exact search is a pattern that carries over to any exhaustive check at scale.

Sources

Notes on numbers used on this page

Each number marked ▲ on this page has its note here.

  • Number of vertices at which the lower half of the conjecture first fails (it fails for every larger size too): 30. The failure for 30 and above is due to Guo, Wang and Wang (2023); the new part is that the lower half holds below 30, by computer.
  • Largest number of vertices for which the path has the smallest minimum signed Wiener index: 29. Computer-assisted: exhaustive runs over every tree.
  • Largest number of vertices for which every tree was checked against the double-star maximum: 28. The upper half is open for general n.

These notes appear in every version of this page.

Revision history

  1. 2026-11-20 · corrected

    The upper half of the conjecture is now stated only for the sizes checked; the lead says it is the lower half that Guo, Wang and Wang disproved; the double star is defined as Spiro defines it; the short version says how far the conjecture had been checked before; and the builder and the large figure are easier to use on a phone and with a keyboard.

  2. 2026-11-16 · revised

    The Wiener citation now has its pages and DOI.

  3. 2026-11-16 · created

    Written as a from-the-start explainer of where Spiro's conjecture on signed trees holds, with worked tables and a tree builder.

How to cite this

Tyler Satchel Orden (2026). Where Spiro's conjecture on signed trees holds, explained from the start. Cyborg Mathematics. https://cyborgmathematics.com/writing/signed-trees-spiro-from-zero (updated November 20, 2026)

This page has no DOI of its own. Cite the URL and the date; the revision history above keeps a dated citation meaningful.

BibTeX
@misc{orden2026signedtreesspirofromzero,
  author       = {Tyler Satchel Orden},
  title        = {Where Spiro's conjecture on signed trees holds, explained from the start},
  year         = {2026},
  howpublished = {Cyborg Mathematics},
  url    = {https://cyborgmathematics.com/writing/signed-trees-spiro-from-zero}
}

See also