arXiv:2610.20297cs.DSOct 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2610.20297

Simple, Faster (min, +) Matrix Multiplication and APSP

Barna Saha, Christopher Ye

Abstract

In this note, we provide a deterministic algorithm that computes the (min, +)-Matrix Product C=A∗BC = A * B of two N×NN \times N matrices AA and BB with polynomially bounded integer entries in O~(N2.9964)\tilde{O}(N^{2.9964}) time, improving upon the exponent of O(N2.9995)O(N^{2.9995}) time obtained in the recent breakthrough by Anthropic (Alman and Vassilevska Williams, 2026). Our algorithm uses a phased approach first proposed by Bringmann, Grandoni, Saha, and Vassilevska Williams in 2016. The phased approach produces an approximation C~\tilde{C} of CC in truly subcubic time such that the number of remaining triples (i,k,j):Ai,k+Bk,j<C~(i,j)(i, k, j) : A_{i,k} + B_{k,j} < \tilde{C}(i, j) is truly subcubic. This provided strong evidence that a truly subcubic (min, +)-Matrix Product and therefore, a truly subcubic algorithm for All Pairs Shortest Paths (APSP) may exist. However, to find the remaining triples in subcubic time, a sparse certificate is needed whose construction was not known. We use the thin matrix product theorem of the recent breakthrough to provide such a certificate. This gives a simple modular subcubic algorithm for APSP.

∗^{*}Supported by NSF HDR TRIPODS Phase II grant 2217058 (EnCORE Institute).

1 Introduction

All-Pairs Shortest Paths (APSP), which asks given an N-vertex graph to compute the distance δ(u,v)\delta(u,v) between all pairs of vertices, is one of the central problems in fine-grained complexity. Classical algorithms for APSP, such as the Floyd–Warshall algorithm, achieve a O(N3)O(N^3) running time. A long series of works (e.g. [Fre76, Dob90, Tak92, Tak98, Han04, Pet04, Zwi04, Cha05, Han06, Cha10, HT12]) improved sub-polynomial factors over the classic O(N3)O(N^3) running time, culminating in an algorithm by Williams [Wil18] with N3/2Θ(log⁡N)N^3/2^{\Theta(\sqrt{\log N})} running time. Very recently, a major breakthrough by Anthropic (see Alman and Vassilevska Williams [AV26]) gave the first truly subcubic algorithm for APSP, falsifying one of the central hypotheses in Fine-Grained Complexity, obtaining a deterministic algorithm in O(N2.9995)O(N^{2.9995}) time (see also the simplified exposition due to Karingula and Lovett [KL26] that achieves O(N3−δ)O(N^{3-\delta}) for some δ>0\delta > 0). [AV26] also obtain a Las Vegas algorithm running in expected time O(N2.998)O(N^{2.998}) for real-valued APSP. In light of this breakthrough, one might naturally expect further improvements to the APSP exponent.

In this note, we give a simple improvement to the exponent of APSP, via a faster algorithm for computing the (min⁡,+)(\min, +) Product of two N×NN \times N matrices. The (min⁡,+)(\min, +) product of two matrices A,BA, B, defined (A∗B)[i,j]=min⁡kA[i,k]+B[k,j](A * B)[i, j] = \min_k A[i, k] + B[k, j], is a useful primitive in algorithm design, and is known to be equivalent to APSP up to polylogarithmic factors [VW18]. Our first result is an improved randomized algorithm.

Theorem 1.1. There is a Las Vegas algorithm computing the (min⁡,+)(\min, +)-product of two N×NN \times N matrices A,BA, B with polynomially bounded integer entries in expected time O~(N2.9963432)\tilde{O}(N^{2.9963432}).

Using known reductions, this also gives faster algorithms for many problems equivalent to (min, +)-Matrix Multiplication, including APSP, Negative Triangle, Replacement Paths, Second Shortest Simple Path, Metricity, (min, +)-Verification [VW18], Weighted Tree Edit Distance [BGMW20, NPS+25], and 2D Maximum Subarray [TT00, BDT16].

Our algorithm uses a modular approach to tackle the (min,+)(min, +) product in subcubic time, first proposed by Bringmann, Grandoni, Saha, and Vassilevska Williams [BGSV19], and subsequently refined and modified in [GPVX21, CDXZ22, JPSX26]. In [BGSV19], the very first step of the algorithm is to provide an additive approximation of C by recursively scaling and rounding. This additive approximation is used to perturb the entries of A and B so that many entries of A and B become small. This enables computation of fast (min,+)(min, +) product over those small entries via fast matrix multiplication [AGM97]. Surprisingly, as [BGSV19] shows after the perturbation, only a subcubic number of witnesses, triples which can contribute to C, are left: this provided a promising route towards refuting the APSP conjecture.

In order to complete this framework and obtain truly subcubic APSP, one needs a sparse certificate to find those remaining triplets. The works of [BGSV19, GPVX21, CDXZ22, JPSX26] show such sparse certificate exists for various structured matrices such as bounded difference and monotone matrices. Subsequent work [GPVX21, CDXZ22, JPSX26] combine the perturbation and sparse certification steps through modular arithmetic over primes.

We develop on the modular approach of [BGSV19, GPVX21, CDXZ22, JPSX26] and utilize Theorem 25 of the recent breakthrough [AV26] to provide a sparse certificate in truly subcubic time without any structural assumptions. This leads to a slightly better running time, and a significantly simpler, easy to understand algorithm. We state Theorem 25 of [AV26] below.

Theorem 1.2 (Theorem 25 of [AV26]). For every ε<ε∗:=(ln⁡4)/(5ln⁡10)=0.1204…\varepsilon < \varepsilon^* := (\ln 4)/(5 \ln 10) = 0.1204\ldots and every κ>0\kappa > 0 there is a γ>0\gamma > 0 such that the following holds. Given as input matrices X∈ZN×DX \in \mathbb{Z}^{N \times D} and Y∈ZD×NY \in \mathbb{Z}^{D \times N}, where 2⩽D⩽Nε2 \leqslant D \leqslant N^\varepsilon, whose entries are integers of absolute value at most NO(1)N^{O(1)}, as well as a set WW of at most N2/DκN^2/D^\kappa positions of an N×NN \times N matrix, the entries (XY)[I,J],(I,J)∈W(XY)[I, J], (I, J) \in W, can be computed deterministically in time O(N2log⁡2D/Dγ)O(N^2 \log^2 D/D^\gamma).

To invoke Theorem 1.2, we divide the matrices A and B into blocks and for each block, design a family of new matrices X and Y satisfying the properties of Theorem 1.2 such that computing relevant entries of (XY)(XY) helps us certify whether a given block of A and B is a candidate in which we ought to look for a witness. We stop whenever the first witness is obtained. Our second result shows that the same exponent can be achieved deterministically.

Theorem 1.3. There is a deterministic algorithm computing the (min⁡,+)(\min, +)-product of two N×NN \times N matrices A, B with polynomially bounded integer entries in time O~(N2.9963432)\tilde{O}(N^{2.9963432}).

For the sake of simplicity, we present our randomized algorithm in its entirety, and then present the deterministic algorithm separately. We leave as an interesting future direction to further improve the exponent of (min,+)(min, +) Matrix Multiplication, e.g. by improving the running time of thin matrix product, or to extend our improvements to real-valued matrices.

Ongoing Work. The main goal of this note was to give a simplified, modular approach to (min, +) Matrix Multiplication and APSP, and to contextualize the new breakthrough through existing frameworks, thereby facilitating a better intuitive understanding. Any improvement in exponents is a byproduct of that. After prompting ChatGPT with our algorithm, it has suggested further improvements of the running time, as well as extending exponent improvements to real-valued matrices using known reductions [CVX22], Lemma 37 of [AV26] and re-optimizing the parameters. We are trying to understand if these improvements fit within our simple framework.

Statement on AI Usage. For the randomized algorithm, we used publicly available ChatGPT Pro for verification of our approach, optimization of parameters and for numerical calculations. The subsequent ideas for the deterministic algorithm are due to ChatGPT Pro with mild supervision. We have evaluated all proposed arguments, and refined the proof and exposition of the claimed results. The paper was written by the authors, and we take full responsibility for the final manuscript.