THE CHEAPEST NETWORK, FOUND IN LINEAR TIME
Imagine a map of villages and the cost of running a cable between any two of them. Which set of cables connects every village for the least total cost? The problem asks for a tree: a network that reaches every village without any closed loop. Computer scientists call the cheapest one the minimum spanning tree.
The question is old. The first study of it is often credited to Borůvka in 1926, who met it while designing an efficient scheme for the electrification of Moravia. His method, and the textbook algorithms of Jarník and Prim, and of Kruskal, all run in time of order m log n, for a network with n points and m possible links: “near-linear”, in the paper’s words, but still a little more than proportional to m.
Almost, but not quite, linear
The dream is linear time: work proportional to m, the bare minimum needed just to read every link once. Several near-misses were known:
- a randomised algorithm (Karger, Klein and Tarjan, 1995) runs in linear time on average and with high probability;
- for whole-number weights that fit in a computer word, a deterministic linear algorithm existed (Fredman and Willard, 1994);
- simply checking that a given tree is minimal could be done in linear time.
But in the most general setting — a deterministic algorithm that may only compare two weights at a time — the best bound since Chazelle in 2000 was m · α(m, n), where α is the inverse-Ackermann function, which grows extremely slowly. Slightly more than linear, and nobody could remove that last factor.
An optimal algorithm nobody could time
In 2002, Pettie and Ramachandran had already built an algorithm that is provably optimal: it uses as few comparisons as any deterministic method possibly could. The catch was that nobody knew how many that was. The answer sat somewhere between m and m · α(m, n).
Sanjeev Khanna and Junkai Song (Courant Institute, New York University) and Aaron Putterman (Harvard University) now settle it: a linear number of comparisons always suffices. Plugged into the 2002 algorithm, this gives a deterministic minimum spanning tree in linear time, in the worst case, on every connected network with real-valued weights.
Throwing away links you can prove useless
The proof rests on a classic rule: the heaviest link on any loop can never be in the minimum tree. The new ingredient is a way to find, without any randomness, a provisional forest — several separate loop-free pieces, like small trees — that “supports” most links. A link is supported when lighter links of that forest already join its two ends: it closes a loop as the heaviest member, so it can be thrown away.
The full algorithm repeats three moves:
- a few rounds of Borůvka’s 1926 step, in which every point grabs its cheapest link and each group so joined becomes a single point, which at least halves the number of points;
- the new “certificate” procedure, which builds the supporting forest;
- a fresh start on what is left — at most half the links of the round before.
Since each round costs work proportional to its links and hands at most half of them to the next, the total adds up to a linear amount. The hardest part was replacing chance: random methods pick which links to examine by coin flips. Here, the authors count all the ways the procedure could unfold and show that a good deterministic schedule always exists.
Ideas from a machine
The paper’s acknowledgements are unusual. “The main ideas in this paper were entirely generated by AI,” the authors write — OpenAI’s model Astra 6.2, with credits provided by OpenAI — “with minimal human intellectual intervention”.
Asked directly for a linear algorithm, the model failed. The authors then asked for any improvement on Chazelle’s bound. A team of 15 AI agents found one after 15 hours. That convinced the authors that linear time was the right target; until then, they had some doubt. They kept prompting the model, which produced a chain of ever smaller bounds — one of them, in their words, “absurdly small” — until a final batch of runs returned a linear algorithm.
The humans then verified the proof, simplified it and rewrote it. Their main intervention during the search was steering the model away from approaches based on special kinds of graphs, a direction they had already explored themselves earlier in the year.
On paper only, for now
This is a preprint that other experts have not yet reviewed. The result is purely theoretical: the paper does not quantify the constant hidden in its linear bound and reports no timing on real networks, so it says nothing yet about whether the method would beat today’s practical algorithms. What it does close is the most basic question about the problem, which, in the paper’s words, had remained unresolved despite its long history.
