arXiv:2610.10153cs.DSOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.10153

3SUM Is Really Hard: A Real-to-Integer Reduction

Nick Fischer, Adam Polak, Jonas Schmidt

Abstract

We show that if the 3SUM problem on integer-valued inputs can be solved in truly subquadratic time, then it can also be solved in truly subquadratic time on real-valued inputs. This answers an open problem posed by Chan, Vassilevska Williams, and Xu [STOC 2022], and constitutes the first such tight real-to-integer self-reduction in fine-grained complexity. Our proof relies on a surprising combination of the Frank–Tardos theorem from optimization with Freiman-type theorems from additive combinatorics.

1 Introduction

Given nn numbers, the 3SUM problem asks whether any three of them sum up to zero. It can be solved in time O(n2)O(n^{2}). One of the three main hypotheses of fine-grained complexity [VW18], the 3SUM Hypothesis, asserts that this running time is optimal, up to subpolynomial no(1)n^{o(1)} factors.

Some mild polylogarithmic improvements over the quadratic running time are however possible. In particular, Baran, Demaine and Pătrașcu [BDP08] showed that relatively simple hashing and bit-packing tricks suffice to obtain an O(n2log⁡2n)O\left(\frac{n^2}{\log^2 n}\right) polyloglog(n)-time algorithm for Integer 3SUM, i.e., 3SUM with input numbers required to be integers. It took much more time and a series of papers [GP18, GS17, Fre17, Cha20] to arrive at the same running time also for real-valued inputs, and these Real 3SUM algorithms employ a significantly more complex approach based on linear decision trees.

Gajentaan and Overmars [GO95] first introduced 3SUM in the context of conditional lower bounds for computational geometry problems, where it is natural to consider real-valued inputs. Later, Pătrașcu [Păt10] showed how to use hashing to reduce Integer 3SUM to combinatorial problems, such as finding triangles in graphs. This technique has quickly become prevalent in 3SUM-based hardness proofs (see [FKP24]), and in modern fine-grained complexity, 3SUM is essentially synonymous with Integer 3SUM.

Chan, Vassilevska Williams, and Xu [CVWX22] asked whether fine-grained reductions from Integer 3SUM can be turned into reductions from Real 3SUM, and they made a partial progress on this question. In particular, they give non-tight reductions from Real 3SUM to the Integer All-Numbers 3SUM, All-Color-Pairs Triangle Collection, All-Edges Sparse Triangle, and All-Edges Monochromatic Triangle problems, as well as tight reductions to counting versions of the last two problems. They remark that

“(...) it would be extremely interesting if one could show that the Real 3SUM hypothesis implies the Integer 3SUM hypothesis.”

Our main result establishes this implication.

Theorem 1.1 (Real-to-Integer Reduction for 3SUM). If Integer 3SUM can be solved in time O(n2−ϵ)O(n^{2-\epsilon}), for some constant ϵ>0\epsilon > 0, then Real 3SUM can be solved in time O(n2−Ω(ϵ4))O(n^{2-\Omega(\epsilon^{4})}) (in the comparison-addition model).

In other words, we show that Integer 3SUM is as hard as Real 3SUM. Thus, if we believe that Real 3SUM is really hard, then also Integer 3SUM and all the numerous problems with known (Integer) 3SUM-based fine-grained lower bounds are also really hard. We consider this result quite unexpected. To our knowledge, it constitutes the first and only tight real-to-integer self-reduction in fine-grained algorithms and complexity.

Our result fits a broader line of work that tries to understand how much of the hashing-based machinery developed around 3SUM (and other related problems such as Subset Sum) is actually necessary. One part of this line deals with derandomization [CH20, FKP24], another (including this work) with real-valued inputs [CVWX22, Fis25].

Further Consequences. Our reduction from Real to Integer 3SUM goes through an intermediate problem, the Real Convolution 3SUM problem, which asks, for a given input sequence a∈Rna \in \mathbb{R}^n, to determine if there exist i,j,ki, j, k such that i+j=ki + j = k and a[i]+a[j]=a[k]a[i] + a[j] = a[k]. The integer-valued version of this problem was first introduced by Pătrașcu [Păt10], who showed that it is equivalent to Integer 3SUM under subquadratic fine-grained reductions, and used it as an intermediate problem for showing hardness of a number of combinatorial problems. Pătrașcu's reduction from 3SUM to Convolution 3SUM relies on linear hashing as in [BDP08]—a technique inherently only suited to integers. It was later simplified and derandomized by Chan and He [CH20], who “leave open the question of whether (...) a similar reduction from 3SUM to Convolution 3SUM is possible for real numbers.” We answer this question in the affirmative with our intermediate reduction (Theorem 4.1).

Another important problem in fine-grained complexity is the Exact Triangle problem, which asks to determine whether a given edge-weighted graph contains a triangle whose total edge weight equals exactly zero. In the world of integer-valued inputs, Exact Triangle is known to be harder than both 3SUM [VWW13] and APSP [VWW18] (All-Pairs Shortest Path, the second of the three central problems in fine-grained complexity), and thus its conjectured hardness gives rise to a weaker unifying hypothesis, which turns out to be sufficient to prove hardness of many problems previously known to be 3SUM-hard [VWX20, CX24]. Up until now it was not known if there is a real analogue of the reduction from (Integer) 3SUM to (Integer) Exact Triangle. This reduction goes through the Convolution 3SUM problem and applies a generic convolution-to-product transformation [VWW13]—the latter would work as well with real-valued inputs, but only our Theorem 4.1 establishes a real counterpart of the former.

Corollary 1.2. If Real Exact Triangle can be solved in time O(n2−ϵ)O(n^{2-\epsilon}), for some constant ϵ>0\epsilon > 0, then Real 3SUM can be solved in time O(n2−Ω(ϵ2))O(n^{2-\Omega(\epsilon^{2})}) (in the comparison-addition model).

Another immediate consequence of our result is that all problems previously known to be as hard as Integer 3SUM (e.g., All-Pairs Sparse Triangle [Pát10, KPP16]) are now also known to be as hard as Real 3SUM.

References (40)