Skip to main content
QUICK REVIEW

[Paper Review] 3SUM, 3XOR, Triangles

Zahra Jafargholi, Emanuele Viola|arXiv (Cornell University)|May 16, 2013
Complexity and Algorithms in Graphs13 references9 citations
TL;DR

This paper presents a deterministic reversal of Pätraşcu's reduction from 3SUM to triangle listing, showing that solving 3SUM in time $\tilde{O}(n^{1+\epsilon})$ implies an algorithm for listing $t$ triangles in a graph with $m$ edges in time $\tilde{O}(m^{1+\epsilon}t^{1/3 - \epsilon/3})$. The key contribution is a web of reductions linking 3SUM, 3XOR, and triangle listing, showing that if one of these problems is significantly faster than quadratic, then triangle listing must also be faster than $m^{4/3}$, up to subpolynomial factors.

ABSTRACT

We show that if one can solve 3SUM on a set of size n in time n^{1+\e} then one can list t triangles in a graph with m edges in time O(m^{1+\e}t^{1/3-\e/3}). This is a reversal of Patrascu's reduction from 3SUM to listing triangles (STOC '10). Our result builds on and extends works by the Paghs (PODS '06) and by Vassilevska and Williams (FOCS '10). We make our reductions deterministic using tools from pseudorandomness. We then re-execute both Patrascu's reduction and our reversal for the variant 3XOR of 3SUM where integer summation is replaced by bit-wise xor. As a corollary we obtain that if 3XOR is solvable in linear time but 3SUM requires quadratic randomized time, or vice versa, then the randomized time complexity of listing m triangles in a graph with $m$ edges is m^{4/3} up to a factor m^αfor any α> 0.

Motivation & Objective

  • To reverse Pätraşcu's reduction from 3SUM to triangle listing, establishing a bidirectional connection between the two problems.
  • To extend this connection to the 3XOR variant of 3SUM, where integer addition is replaced by bitwise XOR.
  • To use pseudorandomness tools to make reductions deterministic, overcoming limitations of randomized constructions.
  • To analyze the implications of differing complexities between 3SUM and 3XOR on the time complexity of listing triangles in graphs.
  • To show that if 3SUM requires quadratic time but 3XOR is linear, or vice versa, then triangle listing must be $m^{4/3}$ up to subpolynomial factors.

Proposed method

  • Adapt and extend Vassilevska and Williams' reduction from triangle listing to triangle detection to work on adjacency lists, not just adjacency matrices.
  • Use a recursive divide-and-conquer strategy with randomized sampling to reduce the number of edges in subproblems while preserving triangle coverage.
  • Apply pseudorandom constructions to derandomize the sampling process, ensuring deterministic guarantees via concentration bounds.
  • Bound the expected number of edges in sampled subgraphs using variance analysis of edge inclusion probabilities, controlling deviations via $\alpha$ and $\delta$ parameters.
  • Combine subroutines for triangle detection, edge sampling, and recursive listing into a single algorithm with total time complexity $\tilde{O}(m^{1+\epsilon}t^{1/3 - \epsilon/3})$.
  • Use a layered recursion where subproblems are processed in levels, with the number of levels bounded by $\lg t^{1/3}$, and analyze the total cost via geometric series.

Experimental results

Research questions

  • RQ1Can the reduction from 3SUM to triangle listing be reversed, so that faster 3SUM implies faster triangle listing?
  • RQ2What is the impact of the 3XOR variant of 3SUM on the complexity of triangle listing in graphs?
  • RQ3Is it possible for 3SUM to require $\tilde{\Omega}(n^2)$ time while 3XOR is solvable in $\tilde{O}(n)$ time, or vice versa?
  • RQ4What are the tightest possible bounds on the randomized time complexity of listing $m$ triangles in a graph with $m$ edges?
  • RQ5How can pseudorandomness be used to make randomized reductions deterministic in the context of triangle listing and 3SUM?

Key findings

  • A deterministic reversal of Pätraşcu's reduction is achieved: solving 3SUM in time $\tilde{O}(n^{1+\epsilon})$ implies listing $t$ triangles in a graph with $m$ edges in time $\tilde{O}(m^{1+\epsilon}t^{1/3 - \epsilon/3})$.
  • The time complexity of listing $t$ triangles is bounded by $\tilde{O}(m^{1+\epsilon}t^{1/3 - \epsilon/3})$, which improves upon Pagh's $\tilde{O}(m^{1.4})$ algorithm when $\epsilon < 1/15$.
  • If 3SUM requires $\tilde{\Omega}(n^2)$ randomized time but 3XOR is solvable in $\tilde{O}(n)$ time, or vice versa, then listing $\min\{z,m\}$ triangles requires $m^{4/3}$ time up to $m^{\alpha}$ factors for any $\alpha > 0$.
  • The reduction from 3XOR to triangle listing is established using similar techniques, showing that the two problems are tightly linked in terms of complexity.
  • The analysis shows that the variance in edge sampling is bounded by $O((\alpha + \delta)m^2)$, which ensures concentration and enables the recursive sampling strategy to succeed with high probability.
  • The final time bound is derived by summing geometric series over recursion levels, with the dominant term determined by the level $\ell = \lg t^{1/3}$, leading to the stated complexity.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.