Monochromatic Triangles, Triangle Listing and APSP

All-Pairs Shortest Paths (APSP) is one of the most basic problems in graph algorithms. Given an $n$-node directed or undirected graph with integer weights in $\{-n^{c}, \ldots, n^{c}\}$ and no negative cycles, APSP asks to compute the shortest paths distance between every pair of vertices. The fastest known algorithm for APSP runs in $n^{3}/2^{\Theta(\sqrt{\log n})}$ time [Williams'14], and no truly subcubic time algorithms are known. One of the main hypotheses in fine-grained complexity is that APSP requires $n^{3-o(1)}$ time. Another famous hypothesis in fine-grained complexity is that the 3SUM problem for $n$ integers (which can be solved in $O(n^{2})$ time) requires $n^{2-o(1)}$ time. Although there are no direct reductions between 3SUM and APSP, it is known that they are related: the (min, +)-convolution problem reduces in a fine-grained way to both, and both fine-grained reduce to the Exact Triangle problem. In this paper we find more relationships between these two problems and other basic problems. Pătraşcu had shown that under the 3SUM hypothesis the All-Edges Sparse Triangle problem in $m$-edge graphs requires $m^{4/3-o(1)}$ time. The latter problem asks to determine for every edge $e$, whether $e$ is in a triangle. It is equivalent to the problem of listing $m$ triangles in an $m$-edge graph where $m=-\tilde{O}(n^{1.5})$, and can be solved in $O(m^{1.41})$ time [Alon et al.'97] with the current matrix multiplication bounds, and in $\tilde{O}(m^{4/3})$ time if $\omega=2$. We show that one can reduce Exact Triangle to All-Edges Sparse Triangle, showing that All-Edges Sparse Triangle (and hence Triangle Listing) requires $m^{4/3-o(1)}$ time also assuming the APSP hypothesis. This allows us to provide APSP-hardness for many dynamic problems that were previously known to be hard under the 3SUM hypothesis. We also consider the All-Edges Monochromatic Triangle problem. Via work of [Lincoln et al.'20], our result on All-Edges Sparse Triangle implies that if the All-Edges Monochromatic Triangle problem has an $O(n^{2.5-\varepsilon})$ time algorithm for $\epsilon > 0$, then both the APSP and 3SUM hypotheses are false. The fastest algorithm for All-Edges Monochromatic Triangle runs in $\tilde{O}(n^{(3+\omega)/2})$ time [Vassilevska et al.'06], and our new reduction shows that if $\omega=2$, this algorithm is best possible, unless 3SUM or APSP can be solved faster. Besides 3SUM, previously the only problems known to be fine-grained reducible to All-Edges Monochromatic Triangle were the seemingly easier problems directed unweighted APSP and Min-Witness Product [Lincoln et al.'20]. Our reduction shows that this problem is much harder. We also connect the problem to other “intermediate” problems, whose runtimes are between $O(n^{\omega})$ and $O(n^{3})$, such as the Max-Min product problem.

[1]  Virginia Vassilevska Williams,et al.  Monochromatic Triangles, Intermediate Matrix Products, and Convolutions , 2020, ITCS.

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

[3]  Noga Alon,et al.  Witnesses for Boolean matrix multiplication and for shortest paths , 1992, Proceedings., 33rd Annual Symposium on Foundations of Computer Science.

[4]  Andrzej Lingas,et al.  Faster algorithms for finding lowest common ancestors in directed acyclic graphs , 2007, Theor. Comput. Sci..

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

[6]  Przemyslaw Uznanski,et al.  Hamming Distance Completeness , 2019, CPM.

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

[8]  François Le Gall,et al.  Improved Rectangular Matrix Multiplication using Powers of the Coppersmith-Winograd Tensor , 2017, SODA.

[9]  Tsvi Kopelowitz,et al.  Higher Lower Bounds from the 3SUM Conjecture , 2014, SODA.

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

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

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

[13]  Grazia Lotti,et al.  On the Asymptotic Complexity of Rectangular Matrix Multiplication , 1983, Theor. Comput. Sci..

[14]  Karl Bringmann,et al.  More consequences of falsifying SETH and the orthogonal vectors conjecture , 2018, STOC.

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

[16]  Uri Zwick,et al.  Listing Triangles , 2014, ICALP.

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

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

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

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

[21]  Raphael Yuster,et al.  Efficient algorithms on sets of permutations, dominance, and real-weighted APSP , 2009, SODA.

[22]  Ran Duan,et al.  Faster Algorithms for All Pairs Non-decreasing Paths Problem , 2019, ICALP.

[23]  Marek Cygan,et al.  On problems equivalent to (min, +)-convolution , 2017, ICALP.

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

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

[26]  Amir Abboud,et al.  Popular Conjectures Imply Strong Lower Bounds for Dynamic Problems , 2014, 2014 IEEE 55th Annual Symposium on Foundations of Computer Science.

[27]  Virginia Vassilevska Williams,et al.  Equivalences between triangle and range query problems , 2020, SODA.

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

[29]  Micha Sharir,et al.  Dominance Product and High-Dimensional Closest Pair under L_infty , 2017, ISAAC.