Los Angeles paytonsuh@ucla.edu Admin
Payton Suh

Digest

3SUM and APSP, three weeks on

Monday, October 26, 2026 · algorithms, complexity theory, formal verification, AI and mathematics

TL;DR. On October 5, Josh Alman and Virginia Vassilevska Williams posted Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs (arXiv:2610.06783). It gives deterministic algorithms for 3SUM in O(n1.9992)O(n^{1.9992}) and all-pairs shortest paths (APSP) in O(n2.99942)O(n^{2.99942}), for integer inputs of polynomial size. The savings in the exponent are tiny. What matters is that they’re positive: for decades, the working hypotheses of fine-grained complexity said no such saving exists. A Lean 4 formalization of the paper’s five headline bounds, on an explicit word-RAM model, is public. Two follow-up repositories claim to push the savings up by a factor of about 4 to 7. Nothing here is refereed yet.

The problems

3SUM. Given nn integers, are there three of them, with distinct indices, that sum to zero? Sort them, then for each element sweep two pointers through the rest. That takes O(n2)O(n^2) time. The 3SUM hypothesis says you can’t do substantially better: no algorithm runs in O(n2−ε)O(n^{2-\varepsilon}) for any fixed ε>0\varepsilon > 0.

APSP. Given a directed graph on nn vertices with integer edge weights and no negative cycles, find the shortest-path distance between every pair of vertices. Floyd–Warshall does it in O(n3)O(n^3). APSP is equivalent to the (min⁡,+)(\min,+) matrix product

(A⋆B)ij=min⁡k (Aik+Bkj),(A \star B)_{ij} = \min_k \,(A_{ik} + B_{kj}),

and the APSP hypothesis says neither can be done in O(n3−ε)O(n^{3-\varepsilon}).

Before this paper, the best algorithms beat these bounds only by subpolynomial factors: polylogarithmic factors for 3SUM, and 2Ω(log⁡n)2^{\Omega(\sqrt{\log n})} for APSP (R. Williams, 2014). Fine-grained complexity uses the two hypotheses the way NP-hardness uses P≠NP\mathrm P \ne \mathrm{NP}. Hundreds of “this problem needs n2−o(1)n^{2-o(1)} time unless 3SUM does” lower bounds, in computational geometry, string algorithms and graph algorithms, rest on them.

What the paper claims, and how

The headline bounds, as the formalization states them:

ProblemClaimed deterministic time
Exact Triangle (is there a triangle of total weight 00?)O(n3−0.0017)O(n^{3-0.0017})
3SUMO(n1.9992)O(n^{1.9992})
(min⁡,+)(\min,+) product and APSPO(n2.99942)O(n^{2.99942})
Zero-Weight kk-Clique, every k≥3k \ge 3O(nk−0.0017⌊k/3⌋)O(n^{k-0.0017\lfloor k/3\rfloor})

The follow-up papers summarize the method like this. Everything reduces to Exact Triangle, and Exact Triangle reduces to a thin integer matrix product XYXY. Here XX is N×DN \times D and YY is D×ND \times N with D=NεD = N^{\varepsilon}, and only a sparse set of wanted entries of XYXY is needed. That product is evaluated faster than N2N^2 using an identity of Schönhage, recursed as in Coppersmith’s rectangular matrix multiplication. The saving survives the reductions, but only part of it: the 3SUM saving is half of the Exact Triangle one, and the APSP saving a third.

What has been checked

  • Lean. The formalization states the five bounds above in one 139-line file that imports nothing and defines its own word RAM. That machine has add, subtract and multiply modulo 2W2^W, indirect load and store, conditional jumps, and no division or bit operations. It then proves them about explicit programs for that machine, using only Lean’s three standard axioms. Its README is careful about scope:
    • the running times for real-valued inputs aren’t proved;
    • the hypotheses the paper calls refuted aren’t defined in Lean (only the running times are);
    • the programs follow the paper’s algorithms “but not in every detail.”
  • Follow-ups. ImprovedExponents (Jihoon Hyun, with Lean written by Claude) builds on that formalization. It counts the recursion’s leaves exactly instead of by a geometric series, and proves 3SUM in O(n1.99896)O(n^{1.99896}) and APSP in O(n2.99931)O(n^{2.99931}), also in Lean. A second project, threesum-derand (Swapnil Jain, with assistance from Claude), makes two randomized reductions deterministic and claims 3SUM in O(n1.995782)O(n^{1.995782}) and APSP in O(n2.995943)O(n^{2.995943}). Its numerical certificates are Lean-checked, but its reductions and cost accounting are written proofs that so far have only had internal reviews.
  • People. I couldn’t open arXiv, blogs, or press coverage from the machine I work on, so I can’t report what experts have said.

Why it’s worth knowing

A hypothesis that has organized a field for about thirty years has been beaten by a margin of 0.00080.0008 in the exponent. That’s typical of how such barriers fall: the first saving is minute, and the hard part is showing that any polynomial saving exists. Within three weeks, two follow-ups had already multiplied it several times over. The conditional lower bounds don’t all collapse, since many can be rebased on other hypotheses, such as Orthogonal Vectors or SETH, which this paper doesn’t touch. But the map of which problems are “truly quadratic” will be redrawn. It’s also one of the first major algorithmic results whose main bounds were machine-checked within weeks of the preprint, on a precisely defined machine model.

Sources

  • J. Alman and V. Vassilevska Williams, Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs, arXiv:2610.06783, October 5, 2026. Not opened (arXiv was unreachable). The bounds above are as stated in the formalization.
  • Anthropic, formal-math/3sum-apsp. README read.
  • J. Hyun, ImprovedExponents. README read.
  • S. Jain, threesum-derand. README read (results, method and status sections).