Faster All-Pairs Shortest Paths via Circuit Complexity

We present a new randomized method for computing the min-plus product (a.k.a., tropical product) of two $n \times n$ matrices, yielding a faster algorithm for solving the all-pairs shortest path problem (APSP) in dense $n$-node directed graphs with arbitrary edge weights. On the real RAM, where additions and comparisons of reals are unit cost (but all other operations have typical logarithmic cost), the algorithm runs in time $\frac{n^3}{2^{\Omega(\log n)^{1/2}}}$ and is correct with high probability. On the word RAM with wordsize $\log(n)$, the algorithm runs in $n^3/2^{\Omega(\log n)^{1/2}} + n^{2+o(1)}\log(nM)$ time for edge weights in $([0,M] \cap \mathbb{Z})\cup\{\infty\}$. Prior algorithms took either $O(n^3/\log^c n)$ time for various $c \leq 2$, or $O(M^{\alpha}n^{\beta})$ time for various $\alpha > 0$ and $\beta > 2$. The new algorithm applies a tool from circuit complexity, namely the Razborov--Smolensky polynomials for approximately representing ${\sf AC}^0[p]$ circuits, to efficiently reduce a...