Faster Approximate Text-to-Pattern Hamming Distances via Near-Optimal Sumset Estimation
Abstract
\emph{Text-to-Pattern Hamming Distances} is one of the most studied problems in string algorithms: given a text of length~ and a pattern~, the task is to compute the Hamming distance between~ and every length- substring of~. As exact algorithms have been stuck at time~ for decades, a long line of work has turned to the -approximate version of the problem. Milestones include Karloff's -time algorithm [IPL '93], followed by randomized improvements to by Kopelowitz and Porat [FOCS '15] and recently to by Chan, Jin, Vassilevska W., and Xu [FOCS '23]. In this work, we significantly improve this bound to , 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 dependence is \emph{best possible} for a certain natural class of algorithms, including ours and all previous algorithms.
Create a lesson
Related papers
A Near-Optimal Generalized Sorting Algorithm
Shared title terminologycs.DSSanjeev Khanna, Aaron Putterman, Junkai Song
Near-Optimal Space and Time Cut Sparsification in Turnstile Streams
Shared title terminologycs.DSHonghao Lin, Vahab Mirrokni, David P. Woodruff
Planning Width Is Hard to Approximate Even Given the Unique Optimal Plan
Shared title terminologycs.DSViet Bac Nguyen
Approximation Algorithms for Product Query Optimization
Shared title terminologycs.DSMacéo Ottavy, Avijeet Ghosh, Pascal Koiran et al.
Binary Affine Optimization with Nearly-Graphic Constraint Matrices
Shared title terminologycs.DSQiming Fang, Sihong Shao, Yuxuan Wu
Fast Approximate \ell_p Chamfer Distance via Lopsided Embeddings and Structured JL
Shared title terminologycs.DSYing Feng, David P. Woodruff