We consider the classic 3SUM problem: given sets of integers $A, B, C $, determine whether there is a tuple $(a, b, c) \in A \times B \times C$ satisfying $a + b + c = 0$. The 3SUM Hypothesis, central in fine-grained complexity, states that there does not exist a truly subquadratic time 3SUM algorithm. Given this long-standing barrier, recent work over the past decade has explored 3SUM from a data structural perspective. Specifically, in the 3SUM in preprocessed universes regime, we are tasked with preprocessing sets $A, B$ of size $n$, to create a space-efficient data structure that can quickly answer queries, each of which is a 3SUM problem of the form $A', B', C'$, where $A' \subseteq A$ and $B' \subseteq B$. A series of results have achieved $\tilde{O}(n^2)$ preprocessing time, $\tilde{O}(n^2)$ space, and query time improving progressively from $\tilde{O}(n^{1.9})$ [CL15] to $\tilde{O}(n^{11/6})$ [CVX23] to $\tilde{O}(n^{1.5})$ [KPS25]. Given these series of works improving query time, a natural open question has emerged: can one achieve both truly subquadratic space and truly subquadratic query time for 3SUM in preprocessed universes? We resolve this question affirmatively, presenting a tradeoff curve between query and space complexity. Specifically, we present a simple randomized algorithm achieving $\tilde{O}(n^{1.5 + \varepsilon})$ query time and $\tilde{O}(n^{2 - 2\varepsilon/3})$ space complexity. Furthermore, our algorithm has $\tilde{O}(n^2)$ preprocessing time, matching past work. Notably, quadratic preprocessing is likely necessary for our tradeoff as either the preprocessing or the query time must be at least $n^{2-o(1)}$ under the 3SUM Hypothesis.
翻译:我们考虑经典的3SUM问题:给定整数集合$A, B, C$,判断是否存在三元组$(a, b, c) \in A \times B \times C$满足$a + b + c = 0$。作为精细复杂度理论的核心,3SUM假设断言不存在真正的次二次时间3SUM算法。鉴于这一长期存在的障碍,过去十年的研究开始从数据结构视角探索3SUM问题。具体而言,在预处理全域的3SUM问题框架中,我们需要对规模为$n$的集合$A, B$进行预处理,构建一个空间高效的数据结构,使其能够快速响应形式为$A', B', C'$的查询(其中$A' \subseteq A$且$B' \subseteq B$),每个查询本质上都是一个3SUM问题。一系列研究成果已实现$\tilde{O}(n^2)$预处理时间、$\tilde{O}(n^2)$空间复杂度,且查询时间从$\tilde{O}(n^{1.9})$[CL15]逐步提升至$\tilde{O}(n^{11/6})$[CVX23],最终达到$\tilde{O}(n^{1.5})$[KPS25]。随着查询时间的持续改进,一个自然的开放性问题随之产生:在预处理全域的3SUM问题中,能否同时实现真正的次二次空间复杂度和真正的次二次查询时间?我们对此问题给出肯定回答,并提出查询复杂度与空间复杂度之间的权衡曲线。具体而言,我们提出一种简单的随机化算法,实现$\tilde{O}(n^{1.5 + \varepsilon})$查询时间与$\tilde{O}(n^{2 - 2\varepsilon/3})$空间复杂度。此外,该算法保持$\tilde{O}(n^2)$预处理时间,与已有研究保持一致。值得注意的是,二次预处理时间对我们的权衡方案很可能是必要的,因为根据3SUM假设,预处理时间或查询时间至少需要达到$n^{2-o(1)}$。