3SUM in Preprocessed Universes: Faster and Simpler

📅 2024-10-22
🏛️ SIAM Symposium on Simplicity in Algorithms
📈 Citations: 2
Influential: 0
📄 PDF
🤖 AI Summary
This paper studies the 3SUM problem in the preprocessing model: given three $n$-element integer sets $A$, $B$, and $C$, preprocess them to enable fast queries—specifically, for arbitrary subsets $A' subseteq A$, $B' subseteq B$, $C' subseteq C$, determine whether there exist $a in A'$, $b in B'$, $c in C'$ satisfying $a + b = c$. We present the first subquadratic query algorithm relying solely on FFT and linear modular hashing over prime fields. Our preprocessing time is $O(n^2)$, and query time is $O(n^{1.5} log n)$, improving upon the prior best $ ilde{O}(n^{11/6})$. The algorithm supports dynamic preprocessing when $C$ is initially unknown, enables element-wise membership queries for $c in C'$, and is fully deterministic—introducing only polylogarithmic overhead. Crucially, our approach avoids sophisticated tools from additive combinatorics, achieving both conceptual simplicity and strong practical implementability.

Technology Category

Application Category

📝 Abstract
We revisit the 3SUM problem in the emph{preprocessed universes} setting. We present an algorithm that, given three sets $A$, $B$, $C$ of $n$ integers, preprocesses them in quadratic time, so that given any subsets $A' subseteq A$, $B' subseteq B$, $C' subseteq C$, it can decide if there exist $a in A'$, $b in B'$, $c in C'$ with $a+b=c$ in time $O(n^{1.5} log n)$. In contrast to both the first subquadratic $ ilde{O}(n^{13/7})$-time algorithm by Chan and Lewenstein (STOC 2015) and the current fastest $ ilde{O}(n^{11/6})$-time algorithm by Chan, Vassilevska Williams, and Xu (STOC 2023), which are based on the Balog--Szemer'edi--Gowers theorem from additive combinatorics, our algorithm uses only standard 3SUM-related techniques, namely FFT and linear hashing modulo a prime. It is therefore not only faster but also simpler. Just as the two previous algorithms, ours not only decides if there is a single 3SUM solution but it actually determines for each $c in C'$ if there is a solution containing it. We also modify the algorithm to still work in the scenario where the set $C$ is unknown at the time of preprocessing. Finally, even though the simplest version of our algorithm is randomized, we show how to make it deterministic losing only polylogarithmic factors in the running time.
Problem

Research questions and friction points this paper is trying to address.

Solving 3SUM problem with faster preprocessing time
Using simpler techniques like FFT and hashing
Handling unknown subset C during preprocessing phase
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses FFT and linear hashing modulo prime
Preprocesses sets in quadratic time initially
Achieves O(n^1.5 log n) query time complexity
🔎 Similar Papers
No similar papers found.
S
Shashwat Kasliwal
IIT Delhi
Adam Polak
Adam Polak
Bocconi University
AlgorithmsComputational Complexity
P
Pratyush Sharma
IIT Delhi