Subcubic Equivalences between Path, Matrix and Triangle Problems

We say an algorithm on <i>n</i> × <i>n</i> matrices with integer entries in [−<i>M</i>,<i>M</i>] (or <i>n</i>-node graphs with edge weights from [−<i>M</i>,<i>M</i>]) is <i>truly subcubic</i> if it runs in <i>O</i>(<i>n</i><sup>3 − Δ</sup> ċ poly(log <i>M</i>)) time for some Δ > 0. We define a notion of <i>subcubic reducibility</i> and show that many important problems on graphs and matrices solvable in <i>O</i>(<i>n</i><sup>3</sup>) time are <i>equivalent</i> under subcubic reductions. Namely, the following weighted problems either <i>all</i> 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 <i>n</i><sup>2.99</sup> 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 <i>n</i><sup>3−ϵ</sup> 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.

[1]  Jirí Matousek,et al.  Computing Dominances in E^n , 1991, Inf. Process. Lett..

[2]  H. Carter Fuzzy Sets and Systems — Theory and Applications , 1982 .

[3]  Gideon Yuval,et al.  An Algorithm for Finding All Shortest Paths Using N^(2.81) Infinite-Precision Multiplications , 1976, Inf. Process. Lett..

[4]  A. J. Stothers On the complexity of matrix multiplication , 2010 .

[5]  Alon Itai,et al.  Finding a minimum circuit in a graph , 1977, STOC '77.

[6]  Andrzej Lingas,et al.  Finding a heaviest triangle is not harder than matrix multiplication , 2007, SODA '07.

[7]  Ran Duan,et al.  Fast algorithms for (max, min)-matrix multiplication and bottleneck shortest paths , 2009, SODA.

[8]  David R. Karger,et al.  Finding the Hidden Path: Time Bounds for All-Pairs Shortest Paths , 1993, SIAM J. Comput..

[9]  Rusins Freivalds,et al.  Probabilistic Machines Can Use Less Running Time , 1977, IFIP Congress.

[10]  Noga Alon,et al.  Approximating the cut-norm via Grothendieck's inequality , 2004, STOC '04.

[11]  Harry Buhrman,et al.  Quantum verification of matrix products , 2004, SODA '06.

[12]  Don Coppersmith,et al.  Matrix multiplication via arithmetic progressions , 1987, STOC.

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

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

[15]  François Le Gall,et al.  Powers of tensors and fast matrix multiplication , 2014, ISSAC.

[16]  Ryan Williams,et al.  Faster all-pairs shortest paths via circuit complexity , 2013, STOC.

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

[18]  Toshihide Ibaraki,et al.  An efficient algorithm for K shortest simple paths , 1982, Networks.

[19]  Huacheng Yu,et al.  An Improved Combinatorial Algorithm for Boolean Matrix Multiplication , 2015, ICALP.

[20]  Virginia Vassilevska Williams,et al.  Multiplying matrices faster than coppersmith-winograd , 2012, STOC '12.

[21]  Subhash Suri,et al.  On the Difficulty of Some Shortest Path Problems , 2003, STACS.

[22]  Alan M. Frieze,et al.  Quick Approximation to Matrices and Applications , 1999, Comb..

[23]  Timothy M. Chan Speeding up the Four Russians Algorithm by About One More Logarithmic Factor , 2015, SODA.

[24]  Hisao Tamaki,et al.  Algorithms for the maximum subarray problem based on matrix multiplication , 1998, SODA '98.

[25]  Victor Y. Pan,et al.  New Fast Algorithms for Matrix Operations , 1980, SIAM J. Comput..

[26]  Timothy M. Chan More Algorithms for All-Pairs Shortest Paths in Weighted Graphs , 2010, SIAM J. Comput..

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

[28]  Timothy M. Chan,et al.  Deterministic APSP, Orthogonal Vectors, and More: Quickly Derandomizing Razborov-Smolensky , 2016, SODA.

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

[30]  François Le Gall Improved output-sensitive quantum algorithms for Boolean matrix multiplication , 2012, SODA.

[31]  Liam Roditty,et al.  On the k Shortest Simple Paths Problem in Weighted Directed Graphs , 2010, SIAM J. Comput..

[32]  Liam Roditty,et al.  On the K-simple shortest paths problem in weighted directed graphs , 2007, SODA '07.

[33]  Raphael Yuster,et al.  Finding the Smallest H-Subgraph in Real Weighted Graphs and Related Problems , 2006, ICALP.

[34]  Uri Zwick,et al.  Replacement paths and k simple shortest paths in unweighted directed graphs , 2005, TALG.

[35]  V. V. Williams,et al.  Nondecreasing paths in a weighted graph or: how to optimally read a train schedule , 2008, SODA '08.

[36]  Gerhard J. Woeginger,et al.  Open problems around exact algorithms , 2008, Discret. Appl. Math..

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

[38]  Stacey Jeffery,et al.  Improving Quantum Query Complexity of Boolean Matrix Multiplication Using Graph Collision , 2012, ICALP.

[39]  Mikkel Thorup,et al.  Dynamic ordered sets with exponential search trees , 2002, J. ACM.

[40]  E. Lawler A PROCEDURE FOR COMPUTING THE K BEST SOLUTIONS TO DISCRETE OPTIMIZATION PROBLEMS AND ITS APPLICATION TO THE SHORTEST PATH PROBLEM , 1972 .

[41]  Frédéric Magniez,et al.  Quantum algorithms for the triangle problem , 2005, SODA '05.

[42]  Ryan Williams,et al.  Matrix-vector multiplication in sub-quadratic time: (some preprocessing required) , 2007, SODA '07.

[43]  Ryan Williams,et al.  Finding a maximum weight triangle in n3-Δ time, with applications , 2006, STOC '06.

[44]  Fabrizio Grandoni,et al.  Subcubic Equivalences between Graph Centrality Problems, APSP, and Diameter , 2015, SODA.

[45]  Jeremy P. Spinrad,et al.  Efficient graph representations , 2003, Fields Institute monographs.

[46]  Lillian Lee,et al.  Fast context-free grammar parsing requires fast boolean matrix multiplication , 2001, JACM.

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

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

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

[50]  Leslie G. Valiant,et al.  General Context-Free Recognition in Less than Cubic Time , 1975, J. Comput. Syst. Sci..

[51]  Aaron Bernstein A nearly optimal algorithm for approximating replacement paths and k shortest simple paths in general graphs , 2010, SODA '10.

[52]  Manuel Blum,et al.  Designing programs that check their work , 1989, STOC '89.

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

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

[55]  Inderjit S. Dhillon,et al.  The Metric Nearness Problem , 2008, SIAM J. Matrix Anal. Appl..

[56]  Raphael Yuster,et al.  Finding heaviest H-subgraphs in real weighted graphs, with applications , 2006, TALG.

[57]  Timothy M. Chan Geometric Applications of a Randomized Optimization Technique , 1999, Discret. Comput. Geom..

[58]  Jon Bentley,et al.  Programming pearls: algorithm design techniques , 1984, CACM.

[59]  David Eppstein,et al.  Finding the k shortest paths , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[60]  J. Y. Yen,et al.  Finding the K Shortest Loopless Paths in a Network , 2007 .

[61]  J. Y. Yen Finding the K Shortest Loopless Paths in a Network , 1971 .

[62]  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).

[63]  Andrzej Lingas,et al.  Finding a Heaviest Vertex-Weighted Triangle Is not Harder than Matrix Multiplication , 2009, SIAM J. Comput..

[64]  A. Davie,et al.  Improved bound for complexity of matrix multiplication , 2013, Proceedings of the Royal Society of Edinburgh: Section A Mathematics.

[65]  Raphael Yuster,et al.  All-pairs bottleneck paths for general graphs in truly sub-cubic time , 2007, STOC '07.

[66]  Andrzej Lingas,et al.  A Fast Output-Sensitive Algorithm for Boolean Matrix Multiplication , 2011, Algorithmica.

[67]  Victor Y. Pan,et al.  Strassen's algorithm is not optimal trilinear technique of aggregating, uniting and canceling for constructing fast algorithms for matrix operations , 1978, 19th Annual Symposium on Foundations of Computer Science (sfcs 1978).

[68]  Martin Dietzfelbinger,et al.  Universal Hashing and k-Wise Independent Random Variables via Integer Arithmetic without Primes , 1996, STACS.

[69]  Raphael Yuster,et al.  All Pairs Bottleneck Paths and Max-Min Matrix Products in Truly Subcubic Time , 2009, Theory Comput..

[70]  Uri Zwick,et al.  On Dynamic Shortest Paths Problems , 2004, Algorithmica.

[71]  Erik D. Demaine,et al.  Subquadratic Algorithms for 3SUM , 2005, WADS.