Faster Approximate Text-to-Pattern Hamming Distances via Near-Optimal Sumset Estimation
Nick Fischer, Yael Kirkpatrick, Vasileios Nakos
Key points
From the paper's conclusion- We solve Sumset Estimation optimally (up to logarithmic factors) by replacing their matrix multiplication techniques with ideas from sparse recovery.
Abstract
\emph{Text-to-Pattern Hamming Distances} is one of the most studied problems in string algorithms: given a text $T$ of length~$n$ and a pattern~$P$, the task is to compute the Hamming distance between~$P$ and every length-$|P|$ substring of~$T$. As exact algorithms have been stuck at time~$\tilde O(n^{3/2})$ for decades, a long line of work has turned to the $(1+\epsilon)$-approximate version of the problem. Milestones include Karloff's $\tilde O(\epsilon^{-2} n)$-time algorithm [IPL '93], followed by randomized improvements to $\tilde O(\epsilon^{-1} n)$ by Kopelowitz and Porat [FOCS '15] and recently to $\tilde O(\epsilon^{-0.915} n)$ by Chan, Jin, Vassilevska W., and Xu [FOCS '23]. In this work, we significantly improve this bound to $\tilde O(\epsilon^{-2/3} n)$, using a considerably simpler algorithm. Our algorithm follows the framework of Chan, Jin, Vassilevska W., and Xu, which reduces the problem to a variant of 3SUM that we call \emph{Sumset Estimation}. We solve Sumset Estimation optimally (up to logarithmic factors) by replacing their matrix multiplication techniques with ideas from sparse recovery. Specifically, we adapt the classic Count Sketch by replacing its random signs with random complex roots of unity---a simple idea that may find further applications for other additive problems. Finally, we give evidence that our running time might in fact be optimal: we show that the $\epsilon^{-2/3}$ dependence is \emph{best possible} for a certain natural class of algorithms, including ours and all previous algorithms.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Small-Space Streaming Hamming ApproximationarXiv · 2026
- Approximate Hamming Convolution via Rectangular Matrix MultiplicationarXiv · 2026
- MaxGeomHash bridges MinHash and FracMinHash for scalable similarity estimation using sub-linear k-mer sketching.Genome research · 2026
- Cell-Probe Lower Bounds and Complexity-Preserving Reductions for Suffix Array QueriesarXiv · 2026
- Metric Weighted Edit Distance: $(3+\varepsilon)$-Approximation in $\widetilde O_\varepsilon(N^{1.6})$ TimearXiv · 2026
- Fast Approximate $\ell_p$ Chamfer Distance via Lopsided Embeddings and Structured JLarXiv · 2026