# Encoding 3SUM

**Authors:** Sergio Cabello, Jean Cardinal, John Iacono, Stefan Langerman, Pat, Morin, Aur\'elien Ooms

arXiv: 1903.02645 · 2019-03-08

## TL;DR

This paper introduces an efficient data structure for the 3SUM problem that uses near-quadratic space and enables constant-time queries for determining the sign of sums of triples from three sets.

## Contribution

It presents a novel encoding scheme for 3SUM that achieves constant query time with space complexity of approximately O(N^{3/2}), improving upon previous subquadratic solutions.

## Key findings

- Achieves constant-time queries for 3SUM sign determination.
- Uses approximately O(N^{3/2}) space for encoding.
- Improves on previous subquadratic space solutions.

## Abstract

We consider the following problem: given three sets of real numbers, output a word-RAM data structure from which we can efficiently recover the sign of the sum of any triple of numbers, one in each set. This is similar to a previous work by some of the authors to encode the order type of a finite set of points. While this previous work showed that it was possible to achieve slightly subquadratic space and logarithmic query time, we show here that for the simpler 3SUM problem, one can achieve an encoding that takes $\tilde{O}(N^{\frac 32})$ space for inputs sets of size $N$ and allows constant time queries in the word-RAM.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1903.02645/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/1903.02645/full.md

## References

10 references — full list in the complete paper: https://tomesphere.com/paper/1903.02645/full.md

---
Source: https://tomesphere.com/paper/1903.02645