Skip to content

Spiro's conjecture on signed trees: exactly where its lower half holds, and a formula for the double-star maximum

ComputationChecked by two programsPaper under reviewNovember 9, 2026updated Nov 20, 202615 min

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

The result: Computed exactly and confirmed by two separately written programs, with the code and data in a permanent public record. Not yet peer reviewed. The paper: A paper about this result is under review at a peer-reviewed journal, sent November 13, 2026. The journal is not named here while the paper is under review.

This settles exactly where the lower half of Spiro’s conjecture on signed trees holds. By exhaustive computation over every tree, the path has the smallest minimum signed Wiener index at every size below the one from which Guo, Wang and Wang proved that the lower half fails, so their bound is best possible. The work also gives a formula, with a written proof by Claude agents not yet checked by a human, for the largest minimum signed Wiener index over double stars.

In short

The question. A tree here is a network of points joined by links, in one piece and with no loops. Mark each link plus or minus. The signed distance between two points is the absolute value of the sum of the signs along the path between them, so a plus followed by a minus gives 0 and two minuses give 2. Add the signed distances over all pairs of points, and choose the signs that make this total as small as possible. That smallest total is a number attached to each tree. In a paper posted in 2021 and published in 2022, S. Spiro conjectured, as the lower half of a two-part conjecture, that among all trees with the same number of points the path (all points in a single line) has the smallest such number. In 2023 Guo, Wang and Wang proved that this fails for every size from ▲ points up. Spiro reports a check up to points, and a literature search found no published answer for the sizes in between.

What was found. The path does have the smallest number at every size up to ▲ points. At 29 points one other tree ties it, which the conjecture allows. So 30 points is exactly where the lower half breaks, and Guo, Wang and Wang's bound cannot be lowered. This was found by computer: Claude agents (AI models made by Anthropic), working under my direction, wrote two programs separately, each of which went through every tree of each of these sizes, including all trees with 29 points, and the two agree everywhere. Both also went through all trees with 30 points and agree there too.

Why it matters. Without signs, the same total is the Wiener index, one of the oldest measures in chemical graph theory, and there the path has the largest value and the star (one hub with every other point attached to it) the smallest. Spiro found it somewhat surprising that signs seem to reverse this order. The result settles exactly how far his guess about the path holds. A smaller second result concerns the upper half of the conjecture, which is about the largest value: a formula for the largest value among double stars, the trees the conjecture names there, which as far as I can find is not in print before this.

What is not claimed. The conjecture is not proved. Its lower half is false from 30 points on, by Guo, Wang and Wang's work, and its upper half is checked only up to 28 points. The result for smaller sizes rests on computer runs, which can be rerun from the published code and depend on the programs and the tree generator being correct. The formula has a written proof by Claude agents that no human mathematician has checked yet, and nothing here has been peer reviewed. A short note on the results has been submitted to a journal and is under review. The programs, their outputs, the certificates and the proofs are public in a Zenodo record (Zenodo is a research archive that gives each record a permanent DOI).

How it was checked, in the ledger →

For readers in
opens a short section on what this result means in that field

Definitions and prior work

Write W∗(T)W_*(T) for the smallest total described above, the minimum signed Wiener index of a tree TT, and PnP_n for the path on nn points; W∗(Pn)=⌊n2/4⌋W_*(P_n) = \lfloor n^2/4 \rfloor. A double star is a tree with two points that between them touch every link: two hubs joined by a link, each carrying some leaves, form one, and so do two hubs joined through one middle point; the star counts as one too.

Spiro (The Wiener index of signed graphs, Applied Mathematics and Computation 416, 2022; Conjecture 6.4 in the arXiv numbering) conjectured that every tree TT with nn points satisfies W∗(Pn)≤W∗(T)≤max⁡DW∗(D)W_*(P_n) \le W_*(T) \le \max_D W_*(D), the maximum over double stars DD with nn points. I call the two inequalities the lower half and the upper half. Spiro reports verifying the conjecture for n≤n \le 9 and remarks that it is false with stars in place of double stars.

Guo, Wang and Wang (Applied Mathematics and Computation 439, 2023) disproved Spiro's related Conjecture 6.3, that the path with alternating signs has the smallest signed total among all signed trees, for every n≥n \ge 30, and remark that the same trees break the lower half for every such nn. At 30 points their counterexample is the tree T(3,4,4,4,4,4)T(3,4,4,4,4,4) with a signing of total 222, against 225 for the path. Here T(a1,…,ak)T(a_1, \dots, a_k) is their notation for the tree whose root has kk children, the ii-th of which carries aia_i leaves. Their paper leaves the sizes below 30 open, and a literature search found no published check between Spiro's range and theirs. A search of this kind cannot prove that none exists.

Results

Lower half, computer-assisted. From 4 points up to points the path is the only tree with the smallest W∗W_*. At 29 points ( trees) the minimum is still the path's, , attained by the path and by exactly one other tree, T(3,3,4,4,4,4)T(3,3,4,4,4,4); since the conjecture is a non-strict inequality, it holds there. With Guo, Wang and Wang's result, 30 is the smallest size at which the lower half fails.

At 30 points, computer-assisted. The failure here was already known. This size was run, over all trees, to get the complete list of trees at or below the path and to test the programs against a published signing. The minimum is 222, attained only by T(3,4,4,4,4,4)T(3,4,4,4,4,4), so Guo, Wang and Wang's counterexample is the only tree with the smallest value and their signing of it is optimal. Exactly one other tree goes below the path: T(3,3,4,4,4,5)T(3,3,4,4,4,5), with . Exactly one tree other than the path ties it: T(4,5,5,5,5)T(4,5,5,5,5), the 30-point member of the family Guo, Wang and Wang use in their proof.

The double-star maximum, written proof. For trees with at least five points, the largest W∗W_* among double stars is M(n)=⌊(7n2−20n+24)/12⌋M(n) = \lfloor (7n^2 - 20n + 24)/12 \rfloor. From eight points on, only the balanced double star reaches it: two adjacent hubs whose leaves are split as evenly as possible. With five, six or seven points several double stars tie, the star among them. Spiro's conjecture refers to this maximum without giving a formula for it. The proof was written by Claude agents and has not been checked by a human. Besides the proof, the largest value was computed from an explicit count of each double star's signings for every size up to 120 points (up to 80 for double stars whose hubs are joined through a middle point), and a separate brute force over all signings agrees for 5 to 14 points.

Upper half, computer-assisted, up to 28 points. For every size from 5 to 28 points, every tree other than the double stars that reach M(n)M(n) has a signing whose total is below M(n)M(n). One such signing, called a witness, is enough, since a tree's minimum is at most the total of any of its signings. So no tree in that range goes above M(n)M(n), and from 8 points on the balanced double star is the only tree that reaches it. The upper half is open beyond.

How every tree was checked

There are billions of trees at these sizes, and the number of ways to sign a tree doubles with every link, so trying every signing of every tree is out of reach. The programs used three steps.

  • A filter. A short inequality with a written proof (Lemma A, in the specialist notes below) gives, from the shape of a tree alone, a lower bound on the total of every signing. A tree whose bound is already above the path's value cannot beat or tie the path and needs no search. This sets aside of the trees at 29 and 30 points.
  • An exact search. For the trees that remain ( at 29 points and at 30), a search signs the links one at a time, keeping only signings that could come out at or below the path's value, and drops a partial signing once a second proved inequality (Lemma B) shows it cannot beat the best total found so far. So for each of these trees the search either shows that it is above the path or finds its exact value. That inequality was also tested by computer on cases, with no violation.
  • A complete list of trees. The trees came from nauty, a standard program for generating graphs, and the number read at each size matches the known count of trees in the On-Line Encyclopedia of Integer Sequences (OEIS A000055).

The two exact programs were written separately, in the same project and on the same day, the second with the source of the first at hand, so they are not independent in the way the work of two different authors would be. They agree at every size from 4 to 30 points: the same minimum at each size, the same lists of trees at or below the path, and the same number of trees passing the filter. They share the filter inequality, the input format and, from 27 points up, the stream of trees from nauty. Below 27 points the first program also ran on trees from its own generator, with the same results; from 27 points up the claim that every tree was read rests on nauty and on its counts matching the OEIS. A third program, written separately in JavaScript and reading the trees in a different format, recounted the trees that pass the filter and got the same numbers. It checks the filter step and the tree counts, not the exact search.

For the upper half, besides the first program, a separately written witness program, reading its trees from the same generator, went through every one of the trees with 5 to 28 points. It uses no pruning: it builds a signing greedily, improves it by changing one sign at a time and evaluates the total from the definition. Most of its witnesses were not stored, so checking the upper half again means rerunning that program.

The record also holds certificates, each a tree, a signing and its total, which a separate script recomputes from the definition; all are correct. A certificate shows only that a tree's value is at most the printed total; the statements that no tree goes lower rest on the exhaustive runs.

How it was found and who did what

On November 9, 2026, I asked Claude agents to look for open problems within reach, in mathematics or in other sciences. An agent surveying fields such as chemistry and statistics put Spiro's conjecture first, and the agents took it up. The same day the agents wrote the programs, ran them on one laptop, wrote the proofs and checked the literature, and that evening I published the Zenodo record. The pick came at 1:11 p.m. Pacific time, from the scouting run that also proposed that afternoon's other problems, and the result was recorded at 4:10 p.m., three hours later. Before the record went out, a fresh Claude agent with no prior context reviewed the note twice, the way a journal referee would: the first round, at 4:30 p.m., asked for major revisions, including a proved pruning bound and a second program's run at the largest size, and the second, at 5:45 p.m., asked for minor ones. These were rehearsals inside my own process, not journal peer review.

My part was setting the task, directing the work and deciding when the results were ready to publish. The Claude agents wrote and ran the code, wrote the proofs, checked the results and the literature, and helped write the record and a short note on the results; the record's statement on the use of AI lists these roles. The result is published under my name.

For readers in software:how the software was built, and which parts can be reused

The search is branch and bound with provable pruning. The filter is the bound: a short inequality with a written proof that sets most trees aside before the expensive exact search, and because the inequality is proved, nothing it discards could have been a counterexample. That is the difference from a heuristic cut, which makes a search fast but leaves open what it skipped. The pattern travels to any exhaustive check at scale: prove the pruning rule, count what it removes, and confirm the total number of cases against a count that is already known.

For readers in mathematics:the result stated the way a mathematician would

In the terms of extremal graph theory, the question is which tree minimises a distance-based invariant, here the minimum over all signings of the signed Wiener index, among all trees of a given size; the answer is the path up to the threshold and not from it on. Signed graphs, with each edge marked plus or minus, are also the model network science uses for networks of friendly and hostile ties, so the same object appears there. That is a related use, not one tested here. In chemical graph theory the unsigned Wiener index is the oldest of the distance-based descriptors of molecules, and the signed index is a variant of it.

The checks

CheckWhat it testedResult
Sourcesthe papers of Spiro and of Guo, Wang and Wang, read from their source files, and a search for later work on these sizesno later work found
Brute forcethe first program against a search over every signing, for every tree up to 14 pointsagree
Second exact programevery tree at every size from 4 to 30 pointsthe same minimum at each size, the same trees and filter counts
Filter recounta third program, in JavaScript, counts the trees that pass the filterthe same counts at every size
Pruning inequalitya written proof, and a test on 2,882,140 casesno violation
Double-star formulathe written proof, the largest value computed from an explicit count of signings up to 120 points, and a separate brute force over all signings for 5 to 14 pointsagree
Upper halfthe witness program, for every tree with 5 to 28 pointsa witness for every tree except the double stars that reach the maximum
Certificatesall 3,486 certificates recomputed from the definitionall correct
Human check of the proofsa mathematician or a journal refereenot yet; the note is under review at a journal
For specialists

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)W_\sigma(T) is the sum of dσ(u,v)d_\sigma(u,v) over unordered pairs, and W∗(T)=min⁡σWσ(T)W_*(T) = \min_\sigma W_\sigma(T). With all signs positive WσW_\sigma is the classical Wiener index. On the attribution of the threshold: the main theorem of Guo, Wang and Wang is about Conjecture 6.3 (the alternating path minimises WσW_\sigma over all signed trees); the failure of W∗(T)≥W∗(Pn)W_*(T) \ge W_*(P_n) for every n≥30n \ge 30 is derived in a remark at the end of their Section 2 from the same trees, since W∗(Pn)W_*(P_n) equals the value of the alternating signing.

Lower half. For 4≤n≤284 \le n \le 28 the path is the unique minimiser of W∗W_*. At n=29n = 29 the minimum, the path's value, is attained by exactly the path and T(3,3,4,4,4,4). At n=30n = 30 the minimum is attained only by T(3,4,4,4,4,4), T(3,3,4,4,4,5) is the only other tree below the path, and T(4,5,5,5,5) (the 30-vertex tree of the family of Guo, Wang and Wang) is the only tree other than the path that equals it.

Double stars. By Spiro's definition a double star has two vertices x,yx, y such that every edge meets xx or yy: the star, D(a,b)D(a,b) with adjacent centres c,c′c, c' carrying aa and bb leaves (a+b=n−2a + b = n - 2), or D′(a,b)D'(a,b) with a,b≥1a, b \ge 1 and centres joined through a vertex of degree 2. For D(a,b)D(a,b), with cc′cc' positive (flipping every sign does not change WσW_\sigma) and xx of the aa leaves at cc and yy of the bb leaves at c′c' 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. The proof minimises this over integers x,yx, y (a change of variables reduces it to the form u2+uv+v2u^2 + uv + v^2 on a residue class modulo 3) and maximises over a+b=n−2a + b = n - 2, giving M(n)M(n), attained for n≥8n \ge 8 only by D(⌊(n−2)/2⌋,⌈(n−2)/2⌉)D(\lfloor (n-2)/2 \rfloor, \lceil (n-2)/2 \rceil). An explicit signing gives W∗(D′(a,b))≤n2/2−n<M(n)W_*(D'(a,b)) \le n^2/2 - n < M(n) for n≥6n \ge 6, and D′(1,1)=P5D'(1,1) = P_5. Hence max⁡TW∗(T)≥M(n)∼7n2/12\max_T W_*(T) \ge M(n) \sim 7n^2/12, against W∗(Sn)=n−1+⌊(n−2)2/2⌋∼n2/2W_*(S_n) = n - 1 + \lfloor (n-2)^2/2 \rfloor \sim n^2/2 for the star SnS_n and ⌊n2/4⌋\lfloor n^2/4 \rfloor for the path, which makes Spiro's remark about stars quantitative. The record's proofs file also sketches an induction on leaves for the upper half and where it breaks: at the balanced double star there is no slack, so an inductive proof would need a stability statement for trees near double stars.

Upper half. For 5≤n≤285 \le n \le 28 every tree other than the double stars attaining M(n)M(n) has a signing of value at most M(n)−1M(n) - 1 (one double star for each n≥8n \ge 8; several for n=5,6,7n = 5, 6, 7). The first exact program (sw2.c) found these signings, and the witness program upcheck.c repeats the whole range with a greedy signing, single sign changes and evaluation from the definition, without any bound.

Lemma A (the filter). 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. Each of the ∣U∣∣V∣|U||V| pairs at odd distance contributes at least 1, since dσd_\sigma has the parity of the ordinary distance. At a vertex with pp positive and qq negative edges the (p2)+(q2)\binom p2 + \binom q2 same-sign pairs of neighbours are at signed distance 2, at least ⌊(dv−1)2/2⌋\lfloor (d_v-1)^2/2 \rfloor in total; these pairs are at even distance and each has a single middle vertex, so nothing is counted twice. The same count, summed over one side of the bipartition only, appears in the proof of Lemma 4 (arXiv numbering) of Guo, Wang and Wang, a lemma they credit to Spiro. The term ∣U∣∣V∣|U||V| is Spiro's bound for bipartite graphs.

Lemma B (the pruning bound). Number the vertices so that each comes after its parent, let SS be the first kk of them, with signs fixed on the k−1k - 1 edges inside SS, and at each vertex ww let pwp_w, qwq_w and rwr_w count its positive, negative and unsigned edges. Let h(p,q,r)h(p, q, r) be the minimum over 0≤i≤r0 \le i \le r of (p+i)(p+i−1)+(q+r−i)(q+r−i−1)−p(p−1)−q(q−1)(p+i)(p+i-1) + (q+r-i)(q+r-i-1) - p(p-1) - q(q-1), the least possible growth of the same-sign neighbour contribution at a vertex when rr more of its edges are signed. Every signing extending the fixed signs satisfies Wσ(T)≥A+B+CW_\sigma(T) \ge A + B + C, where AA is the sum of dσd_\sigma over pairs inside SS, BB the number of odd-distance pairs not inside SS, and C=∑wh(pw,qw,rw)C = \sum_w h(p_w, q_w, r_w). The three terms count disjoint sets of pairs: the pairs counted in CC are at distance 2, so even, and lie outside SS because one of their two edges is unsigned. For k=1k = 1 this is Lemma A, and for k=nk = n it is an equality. With the best value starting at ⌊n2/4⌋+1\lfloor n^2/4 \rfloor + 1, sw2.c cuts a branch when A+B+CA + B + C reaches the best value so far; the second exact program, sw4.c, cuts on A+BA + B alone, which is sound because C≥0C \ge 0. The full proof is Lemma B in the record's proofs file.

What the programs share. sw2.c and sw4.c share Lemma A, the input format (gentreeg -p parent arrays from nauty) and, from n=27n = 27, the tree generator. Each has its own tree reader, filter code, vertex order, distance routine (a path-sum matrix in sw2.c; potentials and lowest common ancestors in sw4.c), search bound and symmetry reductions. The filter recount (filter3.js) reads gentreeg -l level arrays instead and matches sw4.c chunk by chunk. The tree streams themselves are not stored, so there are no checksums of them; completeness from n=27n = 27 rests on the generator and on its counts matching A000055.

Certificates and witnesses. Certificates prove upper bounds on W∗W_* only. The certificate file holds the lines the runs printed (for the upper half, about one tree in a million and the largest witness value of each chunk); a separate file holds a witness for every tree on 23 vertices, checked by its own script; and a script regenerates the set for any nn.

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.

How this was checked

  • Every case was checked

    At every size in the claim every tree was read, and the number read was checked against OEIS A000055. Trees whose proved lower bound (Lemma A) exceeds the path value were set aside; every other tree went to an exact search with a proved pruning inequality, which decides whether the tree is at or below the path value and, if it is, finds its exact value.

    Nov 9, 2026

  • Two separately written exact programs, plus a third filter count

    Two separately written exact programs agree at every size, including on the number of trees that pass the filter. They come from the same project, share the proved filter inequality and the input format, and at the largest sizes read their trees from the same generator. A third program, in JavaScript and reading a different output format of the generator, recounted the trees that pass the filter and got the same numbers.

    Nov 9, 2026

  • Reproduced known values first

    At small sizes the first exact program agrees with a brute-force search over all signings of every tree, and a separate brute force over all signings of every double star agrees with the double-star formula.

    Nov 9, 2026

  • Not yet peer reviewed

    No referee or human mathematician has checked the written proofs. The upper half is checked only up to a finite size and is open in general.

    Nov 9, 2026

Revision history

  1. 2026-11-20 · revised

    One sentence about the timing of the work now reads more plainly.

  2. 2026-11-16 · status-change

    The status label now says the paper on this result is under review at a peer-reviewed journal; it had still said draft complete.

  3. 2026-11-16 · revised

    Gave the times of the day, three hours from the pick to the result, and the two rounds of review by a fresh agent before the record went out; added doors for readers from software (branch and bound with provable pruning) and mathematics (extremal graph theory on trees, signed networks, chemical graph theory), and listed the page under chemistry as well.

  4. 2026-11-15 · revised

    The title, claim, summary and opening now say the work settles exactly where the lower half of Spiro's conjecture holds, and the opening adds that both programs also went through every tree at the size where it fails.

  5. 2026-11-13 · status-change

    A short note on this result has been submitted to a journal and is under review.

  6. 2026-11-12 · status-change

    Listed after a best-version panel: three independent drafts, blind judging and a final accuracy audit.

How to cite this

Tyler Satchel Orden (2026). Spiro's conjecture on signed trees: exactly where its lower half holds, and a formula for the double-star maximum. Cyborg Mathematics. https://cyborgmathematics.com/results/signed-wiener-index-trees (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{orden2026signedwienerindextrees,
  author       = {Tyler Satchel Orden},
  title        = {Spiro's conjecture on signed trees: exactly where its lower half holds, and a formula for the double-star maximum},
  year         = {2026},
  howpublished = {Cyborg Mathematics},
  url    = {https://cyborgmathematics.com/results/signed-wiener-index-trees}
}

See also