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 × 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 [EQUATION] and is correct with high probability. On the word RAM, the algorithm runs in [EQUATION] + n2+o(1) logM time for edge weights in ([0,M]∩Z)∪{∞}. Prior algorithms took either O(n3/logc n) time for various c ≤ 2, or O(Mαnβ) time for various α > 0 and β > 2. The new algorithm applies a tool from circuit complexity, namely the Razborov-Smolensky polynomials for approximately representing AC0[p] circuits, to efficiently reduce a matrix product over the (min, +) algebra to a relatively small number of rectangular matrix products over F2, each of which are computable using a particularly efficient method due to Coppersmith. We also give a deterministic version of the algorithm running in n[EQUATION] time for some δ > 0, which utilizes the Yao-Beigel-Tarui translation of AC0[m] circuits into "nice" depth-two circuits.

[1]  James Demmel,et al.  Communication-optimal parallel algorithm for strassen's matrix multiplication , 2012, SPAA '12.

[2]  L FredmanMichael,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1987 .

[3]  James Demmel,et al.  Communication-Avoiding Parallel Strassen: Implementation and performance , 2012, 2012 International Conference for High Performance Computing, Networking, Storage and Analysis.

[4]  Noga Alon,et al.  On the Exponent of the All Pairs Shortest Path Problem , 1991, J. Comput. Syst. Sci..

[5]  Mithuna Thottethodi,et al.  Recursive Array Layouts and Fast Matrix Multiplication , 2002, IEEE Trans. Parallel Distributed Syst..

[6]  J. Ian Munro,et al.  Efficient Determination of the Transitive Closure of a Directed Graph , 1971, Inf. Process. Lett..

[7]  Richard Beigel,et al.  On ACC , 1994, computational complexity.

[8]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1987, JACM.

[9]  Uri Zwick,et al.  All pairs shortest paths using bridging sets and rectangular matrix multiplication , 2000, JACM.

[10]  Seth Pettie,et al.  A new approach to all-pairs shortest paths on real-weighted graphs , 2004, Theor. Comput. Sci..

[11]  Yijie Han,et al.  An O(n3(log log n/log n)5/4) Time Algorithm for All Pairs Shortest Path , 2008, Algorithmica.

[12]  Uri Zwick,et al.  A Slightly Improved Sub-Cubic Algorithm for the All Pairs Shortest Paths Problem with Real Edge Lengths , 2004, ISAAC.

[13]  Stephen Warshall,et al.  A Theorem on Boolean Matrices , 1962, JACM.

[14]  Tadao Takaoka An O(n3loglogn/logn) time algorithm for the all-pairs shortest path problem , 2005, Inf. Process. Lett..

[15]  Nikhil Bansal,et al.  Regularity Lemmas and Combinatorial Algorithms , 2009, 2009 50th Annual IEEE Symposium on Foundations of Computer Science.

[16]  Raimund Seidel,et al.  On the All-Pairs-Shortest-Path Problem in Unweighted Undirected Graphs , 1995, J. Comput. Syst. Sci..

[17]  D. Coppersmiths RAPID MULTIPLICATION OF RECTANGULAR MATRICES * , 2014 .

[18]  Ryan Williams,et al.  Non-uniform ACC Circuit Lower Bounds , 2011, 2011 IEEE 26th Annual Conference on Computational Complexity.

[19]  Roman Smolensky,et al.  Algebraic methods in the theory of lower bounds for Boolean circuit complexity , 1987, STOC.

[20]  Seth Pettie,et al.  A Shortest Path Algorithm for Real-Weighted Undirected Graphs , 2005, SIAM J. Comput..

[21]  Noga Alon,et al.  Finding and counting given length cycles , 1997, Algorithmica.

[22]  Robert A. van de Geijn,et al.  A High Performance Parallel Strassen Implementation , 1995, Parallel Process. Lett..

[23]  Michael L. Fredman,et al.  New Bounds on the Complexity of the Shortest Path Problem , 1976, SIAM J. Comput..

[24]  Yijie Han,et al.  An O(n 3 loglogn/log2 n) Time Algorithm for All Pairs Shortest Paths , 2012, SWAT.

[25]  Andrew Chi-Chih Yao,et al.  ON ACC and threshold circuits , 1990, Proceedings [1990] 31st Annual Symposium on Foundations of Computer Science.

[26]  V. Pan,et al.  Fast rectangular matrix multiplication and some applications , 2008 .

[27]  Miklós Ajtai,et al.  ∑11-Formulae on finite structures , 1983, Ann. Pure Appl. Log..

[28]  Francesco Romani,et al.  Shortest-Path Problem is not Harder Than Matrix Multiplication , 1980, Inf. Process. Lett..

[29]  Ryan Williams,et al.  Finding, minimizing, and counting weighted subgraphs , 2009, STOC '09.

[30]  Victor Y. Pan,et al.  How to Multiply Matrices Faster , 1984, Lecture Notes in Computer Science.

[31]  V. Pan,et al.  Polynomial and Matrix Computations , 1994, Progress in Theoretical Computer Science.

[32]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[33]  Timothy M. Chan More algorithms for all-pairs shortest paths in weighted graphs , 2007, STOC '07.

[34]  Richard J. Lipton,et al.  Unbounded Fan-In Circuits and Associative Functions , 1985, J. Comput. Syst. Sci..

[35]  Gadiel Seroussi,et al.  On the Arithmetic Complexity of Matrix Kronecker Powers , 1983, Inf. Process. Lett..

[36]  L. R. Kerr The Effect of Algebraic Structure on the Computational Complexity of Matrix Multiplication , 1970 .

[37]  Mike Paterson,et al.  A Faster Algorithm Computing String Edit Distances , 1980, J. Comput. Syst. Sci..

[38]  Mark H. Overmars,et al.  Preprocessing chains for fast dihedral rotations is hard or even impossible , 2002, Comput. Geom..

[39]  Victor Y. Pan,et al.  Fast Rectangular Matrix Multiplication and Applications , 1998, J. Complex..

[40]  Erik D. Demaine,et al.  Subquadratic Algorithms for 3SUM , 2005, Algorithmica.

[41]  Yijie Han,et al.  Improved algorithm for all pairs shortest paths , 2004, Inf. Process. Lett..

[42]  Michael J. Fischer,et al.  Boolean Matrix Multiplication and Transitive Closure , 1971, SWAT.

[43]  Ryan Williams,et al.  New algorithms and lower bounds for circuits with linear threshold gates , 2014, STOC.

[44]  Mark H. Overmars,et al.  On a Class of O(n2) Problems in Computational Geometry , 1995, Comput. Geom..

[45]  Rajeev Motwani,et al.  Randomized algorithms , 1996, CSUR.

[46]  Alexandru Nicolau,et al.  Adaptive Winograd's matrix multiplications , 2009, TOMS.

[47]  Michael Sipser,et al.  Parity, circuits, and the polynomial-time hierarchy , 1981, 22nd Annual Symposium on Foundations of Computer Science (sfcs 1981).

[48]  Richard J. Lipton,et al.  Unbounded fan-in circuits and associative functions , 1983, J. Comput. Syst. Sci..

[49]  François Le Gall,et al.  Faster Algorithms for Rectangular Matrix Multiplication , 2012, 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science.

[50]  Timothy M. Chan All-Pairs Shortest Paths with Real Weights in O(n3/log n) Time , 2005, WADS.

[51]  Eric Allender,et al.  A Uniform Circuit Lower Bound for the Permanent , 1994, SIAM J. Comput..

[52]  Tadao Takaoka,et al.  A New Upper Bound on the Complexity of the All Pairs Shortest Path Problem , 1991, Inf. Process. Lett..

[53]  Piotr Sankowski,et al.  Algebraic Algorithms for B-Matching, Shortest Undirected Paths, and F-Factors , 2013, 2013 IEEE 54th Annual Symposium on Foundations of Computer Science.

[54]  Uzi Vishkin,et al.  Constant Depth Reducibility , 1984, SIAM J. Comput..

[55]  V. Strassen Gaussian elimination is not optimal , 1969 .

[56]  Mihai Patrascu,et al.  Towards polynomial lower bounds for dynamic problems , 2010, STOC '10.

[57]  Donald B. Johnson,et al.  Efficient Algorithms for Shortest Paths in Sparse Networks , 1977, J. ACM.

[58]  Tadao Takaoka A New Upper Bound on the Complexity of the All Pairs Shortest Path Problem , 1991, WG.

[59]  Sariel Har-Peled,et al.  Polygon-containment and translational min-Hausdorff-distance between segment sets are 3SUM-hard , 2001, SODA '99.

[60]  David Cash,et al.  Fast Cryptographic Primitives and Circular-Secure Encryption Based on Hard Learning Problems , 2009, CRYPTO.

[61]  Tadao Takaoka A Faster Algorithm for the All-Pairs Shortest Path Problem and Its Application , 2004, COCOON.

[62]  V.Ya. Pan The bit-operation complexity of matrix multiplication and of all pair shortest path problem , 1981 .

[63]  Don Coppersmith,et al.  Rectangular Matrix Multiplication Revisited , 1997, J. Complex..

[64]  Arnold Schönhage,et al.  Partial and Total Matrix Multiplication , 1981, SIAM J. Comput..

[65]  Tadao Takaoka,et al.  Subcubic Cost Algorithms for the All Pairs Shortest Path Problem , 1998, Algorithmica.

[66]  W. Dobosiewicz A more efficient algorithm for the min-plus multiplication , 1990 .

[67]  Uri Zwick,et al.  All pairs shortest paths in undirected graphs with integer weights , 1999, 40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039).

[68]  Pavel Pudlák,et al.  Threshold circuits of bounded depth , 1987, 28th Annual Symposium on Foundations of Computer Science (sfcs 1987).