skip to main content
research-article

Subcubic Equivalences Between Path, Matrix, and Triangle Problems

Published:29 August 2018Publication History
Skip Abstract Section

Abstract

We say an algorithm on n × n matrices with integer entries in [−M,M] (or n-node graphs with edge weights from [−M,M]) is truly subcubic if it runs in O(n3 − δ ċ poly(log M)) time for some δ > 0. We define a notion of subcubic reducibility and show that many important problems on graphs and matrices solvable in O(n3) time are equivalent under subcubic reductions. Namely, the following weighted problems either all have truly subcubic algorithms, or none of them do:

•The all-pairs shortest paths problem on weighted digraphs (APSP).

•Detecting if a weighted graph has a triangle of negative total edge weight.

•Listing up to n2.99 negative triangles in an edge-weighted graph.

•Finding a minimum weight cycle in a graph of non-negative edge weights.

•The replacement paths problem on weighted digraphs.

•Finding the second shortest simple path between two nodes in a weighted digraph.

•Checking whether a given matrix defines a metric.

•Verifying the correctness of a matrix product over the (min, +)-semiring.

•Finding a maximum subarray in a given matrix.

Therefore, if APSP cannot be solved in n3−ε time for any ε > 0, then many other problems also need essentially cubic time. In fact, we show generic equivalences between matrix products over a large class of algebraic structures used in optimization, verifying a matrix product over the same structure, and corresponding triangle detection problems over the structure. These equivalences simplify prior work on subcubic algorithms for all-pairs path problems, since it now suffices to give appropriate subcubic triangle detection algorithms.

Other consequences of our work are new combinatorial approaches to Boolean matrix multiplication over the (OR,AND)-semiring (abbreviated as BMM). We show that practical advances in triangle detection would imply practical BMM algorithms, among other results. Building on our techniques, we give two improved BMM algorithms: a derandomization of the combinatorial BMM algorithm of Bansal and Williams (FOCS’09), and an improved quantum algorithm for BMM.

References

  1. Amir Abboud, Fabrizio Grandoni, and Virginia Vassilevska Williams. 2015. Subcubic equivalences between graph centrality problems, APSP and diameter. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’15). 1681--1697. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. N. Alon. 2009. Personal communication.Google ScholarGoogle Scholar
  3. N. Alon, Z. Galil, and O. Margalit. 1997. On the exponent of the all-pairs shortest path problem. J. Comput. Syst. Sci. 54, 2 (1997), 255--262. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. N. Alon and A. Naor. 2006. Approximating the cut-norm via Grothendieck’s inequality. SIAM J. Comput. 35 (2006), 787--803. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Arne Andersson and Mikkel Thorup. 2007. Dynamic ordered sets with exponential search trees. J. ACM 54, 3 (2007), 13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Bansal and R. Williams. 2009. Regularity lemmas and combinatorial algorithms. In Proceedings of the Symposium on Foundations of Computer Science (FOCS’09). 745--754. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Nikhil Bansal and Ryan Williams. 2012. Regularity lemmas and combinatorial algorithms. Theory Comput. 8, 1 (2012), 69--94.Google ScholarGoogle ScholarCross RefCross Ref
  8. I. Baran, E.D. Demaine, and M. Patrascu. 2008. Subquadratic algorithms for 3 SUM. Algorithmica 50, 4 (2008), 584--596.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jon Bentley. 1984. Programming pearls: Algorithm design techniques. Commun. ACM 27, 9 (Sept. 1984), 865--873. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Bernstein. 2010. A nearly optimal algorithm for approximating replacement paths and k shortest simple paths in general graphs. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’10). 742--755. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Blum and S. Kannan. 1995. Designing programs that check their work. J. ACM 42, 1 (1995), 269--291. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Brickell, I. S. Dhillon, S. Sra, and J. A. Tropp. 2008. The metric nearness problem. SIAM J. Matrix Anal. Appl. 30, 1 (2008), 375--396. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. H. Buhrman and R. Špalek. 2006. Quantum verification of matrix products. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA'06). 880--889. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. M. Chan. 1999. Geometric applications of a randomized optimization technique. Discrete Comput. Geom. 22, 4 (1999), 547--567.Google ScholarGoogle ScholarCross RefCross Ref
  15. T. M. Chan. 2007. More algorithms for all-pairs shortest paths in weighted graphs. In Proceedings of the Symposium on Theory of Computing (STOC’07). 590--598. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Timothy M. Chan. 2010. More algorithms for all-pairs shortest paths in weighted graphs. SIAM J. Comput. 39, 5 (2010), 2075--2089.Google ScholarGoogle ScholarCross RefCross Ref
  17. Timothy M. Chan. 2015. Speeding up the four russians algorithm by about one more logarithmic factor. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’15). 212--217. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Timothy M. Chan and Ryan Williams. 2016. Deterministic APSP, orthogonal vectors, and more: Quickly derandomizing razborov-smolensky. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’16). 1246--1255. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Coppersmith and S. Winograd. 1990. Matrix multiplication via arithmetic progressions. J. Symbol. Comput. 9, 3 (1990), 251--280. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Czumaj and A. Lingas. 2007. Finding a heaviest triangle is not harder than matrix multiplication. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’07). 986--994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Artur Czumaj and Andrzej Lingas. 2009. Finding a heaviest vertex-weighted triangle is not harder than matrix multiplication. SIAM J. Comput. 39, 2 (2009), 431--444. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A.M. Davie and A. J. Stothers. 2013. Improved bound for complexity of matrix multiplication. Proc. Roy. Soc. Edinburgh, Sec. A Math. 143 (4 2013), 351--369. Issue 02.Google ScholarGoogle Scholar
  23. M. Dietzfelbinger. 1996. Universal hashing and k-wise independent random variables via integer arithmetic without primes. In Proceedings of the Symposium on Theoretical Aspects of Computer Science (STACS’96). 569--580. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Duan and S. Pettie. 2009. Fast algorithms for (max, min)-matrix multiplication and bottleneck shortest paths. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’09). 384--391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. P. Dubhashi and A. Panconesi. 2009. Concentration of Measure for the Analysis of Randomized Algorithms. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Dubois and H. Prade. 1980. Fuzzy Sets and Systems: Theory and Applications. Academic Press.Google ScholarGoogle Scholar
  27. D. Eppstein. 1998. Finding the k shortest paths. SIAM J. Comput. 28, 2 (1998), 652--673. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. J. Fischer and A. R. Meyer. 1971. Boolean matrix multiplication and transitive closure. In Proceedings of the Symposium on Foundations of Computer Science (FOCS’71). 129--131. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. R. W. Floyd. 1962. Algorithm : Shortest path. Comm. ACM 5 (1962), 345. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. L. Fredman and R. E. Tarjan. 1987. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34, 3 (1987), 596--615. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Freivalds. 1977. Probabilistic machines can use less running time. Proceedings of the IFIP Congress. 839--842.Google ScholarGoogle Scholar
  32. A. M. Frieze and R. Kannan. 1999. Quick approximation to matrices and applications. Combinatorica 19, 2 (1999), 175--220.Google ScholarGoogle ScholarCross RefCross Ref
  33. A. Gajentaan and M. Overmars. 1995. On a class of O(n<sup>2</sup>) problems in computational geometry. Computational Geometry 5, 3 (1995), 165--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. François Le Gall. 2014. Powers of tensors and fast matrix multiplication. In Proceedings of the International Symposium on Symbolic and Algebraic Computation (ISSAC’14). 296--303. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. J. Hershberger, S. Suri, and A. Bhosle. 2007. On the difficulty of some shortest path problems. ACM TALG 3, 1 (2007), 5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Itai and M. Rodeh. 1978. Finding a minimum circuit in a graph. SIAM J. Comput. 7, 4 (1978), 413--423.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. S. Jeffery, R. Kothari, and F. Magniez. 2012. Improving quantum query complexity of boolean matrix multiplication using graph collision. In Proceedings of the International Colloquium on Automata, Languages, and Programming (ICALP’12). 522--532. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. D. Karger, D. Koller, and S. Phillips. 1993. Finding the hidden path: Time bounds for all-pairs shortest paths. SIAM J. Comput. 22, 6 (1993), 1199--1217. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. N. Katoh, T. Ibaraki, and H. Mine. 1982. An efficient algorithm for K shortest simple paths. Networks 12, 4 (1982), 411--427.Google ScholarGoogle ScholarCross RefCross Ref
  40. E. L. Lawler. 1971/72. A procedure for computing the K best solutions to discrete optimization problems and its application to the shortest path problem. Manage. Sci. 18 (1971/72), 401--405.Google ScholarGoogle Scholar
  41. F. Le Gall. 2012. Improved output-sensitive quantum algorithms for Boolean matrix multiplication. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’12). 1464--1476. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. L. Lee. 2002. Fast context-free grammar parsing requires fast boolean matrix multiplication. J. ACM 49, 1 (2002), 1--15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. A. Lingas. 2009. A fast output-sensitive algorithm for boolean matrix multiplication. In Proceedings of the European Symposium on Algorithms (ESA’09). 408--419.Google ScholarGoogle ScholarCross RefCross Ref
  44. Andrzej Lingas. 2011. A fast output-sensitive algorithm for boolean matrix multiplication. Algorithmica 61, 1 (2011), 36--50.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. F. Magniez, M. Santha, and M. Szegedy. 2005. Quantum algorithms for the triangle problem. In Proceedings of the Symposium on Discrete Algorithms (SODA’05). 1109--1117. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. J. Matousek. 1991. Computing dominances in E<sup>n</sup>. Info. Process. Lett. 38, 5 (1991), 277--278. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. J. I. Munro. 1971. Efficient determination of the transitive closure of a directed graph. Info. Process. Lett. 1, 2 (1971), 56--58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. V. Y. Pan. 1978. Strassen’s algorithm is not optimal; trilinear technique of aggregating, uniting and canceling for constructing fast algorithms for matrix operations. In Proceedings of the Symposium on Foundations of Computer Science (FOCS’78). 166--176. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. V. Y. Pan. 1980. New fast algorithms for matrix operations. SIAM J. Comput. 9, 2 (1980), 321--342.Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. M. Patrascu. 2010. Towards polynomial lowed bounds for dynamic problems. In Proceedings of the Symposium on Theory of Computing (STOC’10). 603--610. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. L. Roditty. 2007. On the -simple shortest paths problem in weighted directed graphs. In Proceedings of the Symposium on Discrete Algorithms (SODA’07). 920--928. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Liam Roditty. 2010. On the k shortest simple paths problem in weighted directed graphs. SIAM J. Comput. 39, 6 (2010), 2363--2376.Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. L. Roditty and U. Zwick. 2004. On dynamic shortest paths problems. In Proceedings of the European Symposium on Algorithms (ESA’04). 580--591.Google ScholarGoogle Scholar
  54. L. Roditty and U. Zwick. 2005. Replacement paths and k simple shortest paths in unweighted directed graphs. In Proceedings of the International Colloquium on Automata, Languages, and Programming (ICALP’05). 249--260. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Liam Roditty and Uri Zwick. 2012. Replacement paths and k simple shortest paths in unweighted directed graphs. ACM Trans. Algor. 8, 4 (2012), 33. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. A. Shoshan and U. Zwick. 1999. All-pairs shortest paths in undirected graphs with integer weights. In Proceedings of the Symposium on Foundations of Computer Science (FOCS’99). 605--614. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. J. P. Spinrad. 2003. Efficient graph representations. Fields Inst. Monogr. 19 (2003).Google ScholarGoogle Scholar
  58. A. Stothers. 2010. On the Complexity of Matrix Multiplication. Ph.D. Thesis, University of Edinburgh.Google ScholarGoogle Scholar
  59. V. Strassen. 1969. Gaussian elimination is not optimal. Numer. Math. 13 (1969), 354--356. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Hisao Tamaki and Takeshi Tokuyama. 1998. Algorithms for the maximum subarray problem based on matrix multiplication. In Proceedings of the 9th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’98). 446--452. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. L. G. Valiant. 1975. General context-free recognition in less than cubic time. J. Comput. Syst. Sci. 10 (1975), 308--315. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. V. Vassilevska. 2008. Nondecreasing paths in weighted graphs, or: How to optimally read a train schedule. In Proceedings of the Symposium on Discrete Algorithms (SODA’08). 465--472. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. V. Vassilevska and R. Williams. 2006. Finding a maximum weight triangle in n<sup>3 &minus; Δ</sup> time, with applications. In Proceedings of the Symposium on Theory of Computing (STOC’06). 225--231. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. V. Vassilevska, R. Williams, and R. Yuster. 2006. Finding the smallest H-subgraph in real weighted graphs and related problems. In Proceedings of the International Colloquium on Automata, Languages, and Programming (ICALP’06). 262--273. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. V. Vassilevska, R. Williams, and R. Yuster. 2007. All-pairs bottleneck paths for general graphs in truly sub-cubic time. In Proceedings of the Symposium on Theory of Computing (STOC’07). 585--589. Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. Virginia Vassilevska, Ryan Williams, and Raphael Yuster. 2009. All-pairs bottleneck paths and max-min matrix products in truly subcubic time. Theory Comput. 5, 1 (2009), 173--189.Google ScholarGoogle ScholarCross RefCross Ref
  67. Virginia Vassilevska, Ryan Williams, and Raphael Yuster. 2010. Finding heaviest H-subgraphs in real weighted graphs, with applications. ACM Trans. Algor. 6, 3 (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  68. Virginia Vassilevska Williams. 2010. Nondecreasing paths in a weighted graph or: How to optimally read a train schedule. ACM Trans. Algor. 6, 4 (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  69. S. Warshall. 1962. A theorem on boolean matrices. J. ACM 9, 1 (1962), 11--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  70. R. Williams. 2007. Matrix-vector multiplication in sub-quadratic time (some preprocessing required). In Proceedings of the Symposium on Discrete Algorithms (SODA’07). 995--1001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  71. Ryan Williams. 2014. Faster all-pairs shortest paths via circuit complexity. In Proceedings of the Symposium on Theory of Computing (STOC’14). 664--673. Google ScholarGoogle ScholarDigital LibraryDigital Library
  72. Virginia Vassilevska Williams. 2012. Multiplying matrices faster than coppersmith-winograd. In Proceedings of the 44th Symposium on Theory of Computing (STOC’12). 887--898. Google ScholarGoogle ScholarDigital LibraryDigital Library
  73. G. J. Woeginger. 2008. Open problems around exact algorithms. Discrete Appl. Math. 156, 3 (2008), 397--405. Google ScholarGoogle ScholarDigital LibraryDigital Library
  74. J. Y. Yen. 1970/71. Finding the K shortest loopless paths in a network. Manage. Sci. 17 (1970/71), 712--716.Google ScholarGoogle Scholar
  75. Huacheng Yu. 2015. An improved combinatorial algorithm for boolean matrix multiplication. In Proceedings of the 42nd International Colloquium on Automata, Languages, and Programming (ICALP’15). 1094--1105.Google ScholarGoogle ScholarCross RefCross Ref
  76. G. Yuval. 1976. An algorithm for finding all shortest paths using N<sup>2.81</sup> infinite-precision multiplications. Inf. Proc. Lett. 4 (1976), 155--156.Google ScholarGoogle ScholarCross RefCross Ref
  77. U. Zwick. 2002. All-pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM 49, 3 (2002), 289--317. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Subcubic Equivalences Between Path, Matrix, and Triangle Problems

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Journal of the ACM
        Journal of the ACM  Volume 65, Issue 5
        October 2018
        299 pages
        ISSN:0004-5411
        EISSN:1557-735X
        DOI:10.1145/3274534
        Issue’s Table of Contents

        Copyright © 2018 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 29 August 2018
        • Accepted: 1 February 2018
        • Received: 1 February 2017
        Published in jacm Volume 65, Issue 5

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format .

      View HTML Format