Faster All-Pairs Shortest Paths Via Circuit Complexity
Abstract
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 n 3
References (72)
- Benny Applebaum, David Cash, Chris Peikert, and Amit Sahai. Fast cryptographic primitives and circular-secure encryption based on hard learning problems. In CRYPTO, pages 595-618, 2009.
- Eric Allender and Vivek Gore. A uniform circuit lower bound for the permanent. SIAM J. Computing, 23(5):1026-1049, 1994.
- Noga Alon, Zvi Galil, and Oded Margalit. On the exponent of the all pairs shortest path problem. Journal of Computer and System Sciences, 54(2):255-262, 1997.
- Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley Series in Computer Science and Information Processing, 1974.
- Miklos Ajtai. Σ 1 1 -formulae on finite structures. Annals of Pure and Applied Logic, 24:1-48, 1983.
- Noga Alon, Raphael Yuster, and Uri Zwick. Finding and counting given length cycles. Algo- rithmica, 17:354-364, 1997.
- BCD + 06] David Bremner, Timothy M. Chan, Erik D. Demaine, Jeff Erickson, Ferran Hurtado, John Ia- cono, Stefan Langerman, Mihai Patrascu, and Perouz Taslakian. Necklaces, convolutions, and x+y. CoRR, abs/1212.4771, 2012. See also ESA'06.
- BDH + 12] Grey Ballard, James Demmel, Olga Holtz, Benjamin Lipshitz, and Oded Schwartz. Communication-optimal parallel algorithm for strassen's matrix multiplication. In Proceedin- bgs of the 24th ACM symposium on Parallelism in algorithms and architectures, pages 193-204, 2012.
- Grey Ballard, Jim Demmel, Ben Lipshitz, and Oded Schwartz. Communication-avoiding par- allel strassen: Implementation and performance. In Proceedings of 2012 International Con- ference for High Performance Computing, Networking, Storage and Analysis (SC), volume 12, 2012.
- Ilya Baran, Erik D. Demaine, and Mihai Patrascu. Subquadratic algorithms for 3sum. Algorith- mica, 50(4):584-596, 2008. See also WADS'05.
- Gill Barequet and Sariel Har-Peled. Polygon containment and translational min-hausdorff- distance between segment sets are 3sum-hard. Int. J. Comput. Geometry Appl., 11(4):465-474, 2001.
- Dario Bini and Victor Pan. Polynomial and matrix computations. Birkhauser, 1994.
- Richard Beigel and Jun Tarui. On ACC. Computational Complexity, 4:350-366, 1994.
- Nikhil Bansal and Ryan Williams. Regularity lemmas and combinatorial algorithms. Theory of Computing, 8(4):69-94, 2012. See also FOCS'09.
- Ashok K. Chandra, Steven Fortune, and Richard J. Lipton. Unbounded fan-in circuits and associative functions. J. Comput. Syst. Sci., 30(2):222-234, 1985.
- Timothy M. Chan. All-pairs shortest paths for unweighted undirected graphs in o(mn) time. ACM Transactions on Algorithms, 8(4), 2012. See also SODA'06.
- Timothy M. Chan. All-pairs shortest paths with real weights in o ( n 3 /log n ) time. Algorith- mica, 50(2):236-243, 2008. See also WADS'05.
- Timothy M. Chan. More algorithms for all-pairs shortest paths in weighted graphs. SIAM J. Comput., 39(5):2075-2089, 2010. See also STOC'07.
- John F. Canny, Erich Kaltofen, and Lakshman Yagati. Solving systems of non-linear equations faster. In Proc. ACM-SIGSAM International Symposium on Symbolic and Algebraic Computa- tion, pages 121-128, 1989.
- Siddhartha Chatterjee, Alvin R. Lebeck, Praveen K. Patnala, and Mithuna Thottethodi. Recur- sive array layouts and fast matrix multiplication. IEEE Transactions on Parallel and Distributed Systems, 13(11):1105-1123, 2002.
- Don Coppersmith. Rapid multiplication of rectangular matrices. SIAM J. Comput., 11(3):467- 471, 1982.
- Don Coppersmith. Rectangular matrix multiplication revisited. Journal of Complexity, 13:42- 49, 1997.
- Ashok K. Chandra, Larry Stockmeyer, and Uzi Vishkin. Constant depth reducibility. SIAM Journal on Computing, 13(2):423-439, 1984.
- Paolo D'Alberto and Alexandru Nicolau. Adaptive winograd's matrix multiplications. ACM Transactions on Mathematical Software (TOMS), 36(1):3, 2009.
- Wlodzimierz Dobosiewicz. A more efficient algorithm for the min-plus multiplication. Inter- national Journal of Computer Mathematics, 32(1-2):49-60, 1990.
- Robert W. Floyd. Algorithm 97. Comm. ACM, 5-6:345, 1962.
- Michael J. Fischer and Albert R. Meyer. Boolean matrix multiplication and transitive closure. In IEEE Symposium on Switching and Automata Theory, pages 129-131, 1971.
- Michael L. Fredman. New bounds on the complexity of the shortest path problem. SIAM J. Comput., 5(1):49-60, 1976. See also FOCS'75.
- Merrick Furst, James B. Saxe, and Michael Sipser. Parity, circuits, and the polynomial-time hierarchy. Mathematical Systems Theory, 17(1):13-27, April 1984. See also FOCS'81.
- Michael L. Fredman and Robert E. Tarjan. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM, 34(3):596-615, 1987.
- Franc ¸ois Le Gall. Faster algorithms for rectangular matrix multiplication. In FOCS, pages 514-523, 2012.
- Brian Grayson and Robert Van De Geijn. A high performance parallel strassen implementation. Parallel Processing Letters, 6(01):3-12, 1996.
- Anka Gajentaan and Mark H. Overmars. On a class of O(n 2 ) problems in computational geom- etry. Comput. Geom., 5:165-185, 1995.
- Harold N. Gabow and Piotr Sankowski. Algebraic algorithms for b-matching, shortest undi- rected paths, and f-factors. In FOCS, pages 137-146, 2013.
- Yijie Han. Improved algorithm for all pairs shortest paths. Information Processing Letters, 91(5):245-250, 2004.
- Yijie Han. An o(n 3 (log log n/log n) 5/4 ) time algorithm for all pairs shortest path. Algorithmica, 51(4):428-434, 2008. See also ESA'06.
- HMP + 93] András Hajnal, Wolfgang Maass, Pavel Pudlák, Mario Szegedy, and György Turán. Threshold circuits of bounded depth. J. Comput. Syst. Sci., 46(2):129-154, 1993.
- X. Huang and V. Y. Pan. Fast rectangular matrix multiplication and applications. J. of Com- plexity, 14(2):257-299, 1998.
- Yijie Han and Tadao Takaoka. An o(n 3 log log n/ log 2 n) time algorithm for all pairs shortest paths. In SWAT, volume 7357 of Springer LNCS, pages 131-141, 2012.
- Donald B. Johnson. Efficient algorithms for shortest paths in sparse networks. J. ACM, 24(1):1- 13, 1977.
- Leslie R. Kerr. The effect of algebraic structure on the computation complexity of matrix multi- plications. PhD thesis, Cornell University, Ithaca, NY, 1970.
- ShanXue Ke, BenSheng Zeng, WenBao Han, and Victor Y. Pan. Fast rectangular matrix mul- tiplication and some applications. Science in China Series A: Mathematics, 51(3):389-406, 2008.
- William J. Masek and Michael S. Paterson. A faster algorithm computing string edit distances. Journal of Computer and System Sciences, 20(1):18-31, 1980.
- Rajeev Motwani and Prabhakar Raghavan. Randomized algorithms. Cambridge University Press, 1995.
- Ian Munro. Efficient determination of the transitive closure of a directed graph. Information Processing Letters, 1:56-58, 1971.
- Victor Ya. Pan. The bit-operation complexity of matrix multiplication and of all pair shortest path problem. Computers & Mathematics with Applications, 7(5):431-438, 1981.
- Victor Y. Pan. How to multiply matrices faster. Springer-Verlag Lecture Notes in Computer Science 179, 1984.
- Mihai Patrascu. Towards polynomial lower bounds for dynamic problems. In STOC, pages 603-610, 2010.
- Seth Pettie. A new approach to all-pairs shortest paths on real-weighted graphs. Theor. Comput. Sci., 312(1):47-74, 2004.
- Seth Pettie and Vijaya Ramachandran. A shortest path algorithm for real-weighted undirected graphs. SIAM Journal on Computing, 34(6):1398-1431, 2005.
- Alexander A. Razborov. Lower bounds for the size of circuits of bounded depth over a complete basis with logical addition. Math. Notes Acad. Sci. USSR, 41(4):333-338, 1987. Translated from Mathematicheskie Zametki 41:4, 598-607, 1987.
- F. Romani. Shortest-path problem is not harder than matrix multiplication. Information Pro- cessing Letters, 11:134-136, 1980.
- Arnold Schönhage. Partial and total matrix multiplication. SIAM J. Comput., 10(3):434-455, 1981.
- Raimund Seidel. On the all-pairs-shortest-path problem in unweighted undirected graphs. J. Comput. Syst. Sci., 51(3):400-403, 1995.
- Michael A. Soss, Jeff Erickson, and Mark H. Overmars. Preprocessing chains for fast dihedral rotations is hard or even impossible. Comput. Geom., 26(3):235-246, 2003.
- Gadiel Seroussi and Fai Ma. On the arithmetic complexity of matrix kronecker powers. Infor- mation Processing Letters, 17(3):145-148, 1983.
- Roman Smolensky. Algebraic methods in the theory of lower bounds for Boolean circuit com- plexity. In STOC, pages 77-82, 1987.
- Volker Strassen. Gaussian elimination is not optimal. Numerische Mathematik, 13(4):354-356, 1969.
- Larry J. Stockmeyer and Uzi Vishkin. Simulation of parallel random access machines by cir- cuits. SIAM J. Comput., 13(2):409-422, 1984.
- Avi Shoshan and Uri Zwick. All pairs shortest paths in undirected graphs with integer weights. In FOCS, pages 605-615, 1999.
- Tadao Takaoka. A faster algorithm for the all-pairs shortest path problem and its application. In Computing and Combinatorics, volume 3106 of Springer LNCS, pages 278-289. 2004.
- Tadao Takaoka. An O(n 3 log log n/ log n) time algorithm for the all-pairs shortest path problem. Information Processing Letters, 96(5):155-161, 2005.
- A new upper bound on the complexity of the all pairs shortest path problem. Information Processing Letters, 43(4):195-199, 1992. See also WG'91.
- Tadao Takaoka. Subcubic cost algorithms for the all pairs shortest path problem. Algorithmica, 20(3):309-318, 1998. See also WG'95.
- Virginia Vassilevska Williams and Ryan Williams. Subcubic equivalences between path, matrix and triangle problems. In FOCS, pages 645-654, 2010.
- Virginia Vassilevska Williams and Ryan Williams. Finding, minimizing, and counting weighted subgraphs. SIAM J. Comput., 42(3):831-854, 2013.
- Stephen Warshall. A theorem on Boolean matrices. J. ACM, 9:11-12, 1962.
- Ryan Williams. Non-uniform ACC circuit lower bounds. In IEEE Conference on Computa- tional Complexity, pages 115-125, 2011.
- Ryan Williams. New algorithms and lower bounds for circuits with linear threshold gates. Submitted, 2013.
- Andrew Chi-Chih Yao. On acc and threshold circuits. In FOCS, pages 619-627, 1990.
- Uri Zwick. All pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM, 49(3):289-317, 2002.
- Uri Zwick. A slightly improved sub-cubic algorithm for the all pairs shortest paths problem with real edge lengths. In ISAAC 2004, volume 3341 of Springer LNCS, pages 921-932, 2004.