English

New Applications of 3SUM-Counting in Fine-Grained Complexity and Pattern Matching

Data Structures and Algorithms 2024-10-29 v1

Abstract

The 3SUM problem is one of the cornerstones of fine-grained complexity. Its study has led to countless lower bounds, but as has been sporadically observed before -- and as we will demonstrate again -- insights on 3SUM can also lead to algorithmic applications. The starting point of our work is that we spend a lot of technical effort to develop new algorithms for 3SUM-type problems such as approximate 3SUM-counting, small-doubling 3SUM-counting, and a deterministic subquadratic-time algorithm for the celebrated Balog-Szemer\'edi-Gowers theorem from additive combinatorics. As consequences of these tools, we derive diverse new results in fine-grained complexity and pattern matching algorithms, answering open questions from many unrelated research areas. Specifically: - A recent line of research on the "short cycle removal" technique culminated in tight 3SUM-based lower bounds for various graph problems via randomized fine-grained reductions [Abboud, Bringmann, Fischer; STOC '23] [Jin, Xu; STOC '23]. In this paper we derandomize the reduction to the important 4-Cycle Listing problem. - We establish that \#3SUM and 3SUM are fine-grained equivalent under deterministic reductions. - We give a deterministic algorithm for the (1+ϵ)(1+\epsilon)-approximate Text-to-Pattern Hamming Distances problem in time n1+o(1)ϵ1n^{1+o(1)} \cdot \epsilon^{-1}. - In the kk-Mismatch Constellation problem the input consists of two integer sets A,B[N]A, B \subseteq [N], and the goal is to test whether there is a shift cc such that (c+B)Ak|(c + B) \setminus A| \leq k (i.e., whether BB shifted by cc matches AA up to kk mismatches). For moderately small kk the previously best running time was O~(Ak)\tilde O(|A| \cdot k) [Cardoze, Schulman; FOCS '98] [Fischer; SODA '24]. We give a faster Ak2/3No(1)|A| \cdot k^{2/3} \cdot N^{o(1)}-time algorithm in the regime where B=Θ(A)|B| = \Theta(|A|).

Keywords

Cite

@article{arxiv.2410.20764,
  title  = {New Applications of 3SUM-Counting in Fine-Grained Complexity and Pattern Matching},
  author = {Nick Fischer and Ce Jin and Yinzhan Xu},
  journal= {arXiv preprint arXiv:2410.20764},
  year   = {2024}
}

Comments

To appear in SODA 2025. Abstract shortened to fit arXiv requirements

R2 v1 2026-06-28T19:37:39.114Z