Lune

FOCS2023顶会

Faster Algorithms for Text-to-Pattern Hamming Distances

Timothy M. Chan, Ce Jin, Virginia Vassilevska Williams, Yinzhan Xu

摘要

We study the classic Text-to-Pattern Hamming Distances problem: given a pattern P of length m and a text T of length n, both over a polynomial-size alphabet, compute the Hamming distance between P and T[i…i+m−1]T[i \ldots i+m-1] for every shift i, under the standard Word-RAM model with Θ(log⁡n)\Theta(\log n)-bit words.•We provide an O(nm)O(n \sqrt{m}) time Las Vegas randomized algorithm for this problem, beating the decades-old O(nmlog⁡m)O(n \sqrt{m \log m}) running time [Abrahamson, SICOMP 1987]. We also obtain a deterministic algorithm, with a slightly higher O(nm(log⁡mlog⁡log⁡m)1/4)O\left(n \sqrt{m}(\log m \log \log m)^{1 / 4}\right) running time. Our randomized algorithm extends to the k-bounded setting, with running time O(n+nkm)O\left(n+\frac{n k}{\sqrt{m}}\right), removing all the extra logarithmic factors from earlier algorithms [Gawrychowski and Uznanski, ICALP 2018; Chan, Golan, Kociumaka, Kopelowitz and Porat, STOC 2020].•For the (1+ε)(1+\varepsilon)-approximate version of Text-to-Pattern Hamming Distances, we give an O~(ε−0.93n)\widetilde{O}\left(\varepsilon^{-0.93} n\right) time Monte Carlo randomized algorithm (where O~\widetilde{O} hides poly-logarithmic factors), beating the previous O~(ε−1n)\widetilde{O}\left(\varepsilon^{-1} n\right) running time [Kopelowitz and Porat, FOCS 2015; Kopelowitz and Porat, SOSA 2018].Our approximation algorithm exploits a connection with 3SUM, and uses a combination of Fredman’s trick, equality matrix product, and random sampling; in particular, we obtain new results on approximate counting versions of 3 SUM and Exact Triangle, which may be of independent interest. Our exact algorithms use a novel combination of hashing, bit-packed FFT, and recursion; in particular, we obtain a faster algorithm for computing the sumset of two integer sets, in the regime when the universe size is close to quadratic in the number of elements. We also prove a fine-grained equivalence between the exact Text-to-Pattern Hamming Distances problem and a range-restricted, counting version of 3 SUM.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • New Applications of 3SUM-Counting in Fine-Grained Complexity and Pattern Matching 引用了 Faster Matrix Multiplication via Asymmetric Hashing
  • New Applications of 3SUM-Counting in Fine-Grained Complexity and Pattern Matching 引用了 A Fine-Grained Perspective on Approximating Subset Sum and Partition
  • New Applications of 3SUM-Counting in Fine-Grained Complexity and Pattern Matching 引用了 New Bounds for Matrix Multiplication: from Alpha to Omega
  • A Fine-Grained Perspective on Approximating Subset Sum and Partition 引用了 Top-k-convolution and the quest for near-linear output-sensitive subset sum
  • New Bounds for Matrix Multiplication: from Alpha to Omega 引用了 Faster Matrix Multiplication via Asymmetric Hashing
  • Shaving Logs via Large Sieve Inequality: Faster Algorithms for Sparse Convolution and More 引用了 Top-k-convolution and the quest for near-linear output-sensitive subset sum
  • Shaving Logs via Large Sieve Inequality: Faster Algorithms for Sparse Convolution and More 引用了 A Fine-Grained Perspective on Approximating Subset Sum and Partition
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. New Applications of 3SUM-Counting in Fine-Grained Complexity and Pattern MatchingNick Fischer, Ce Jin, Yinzhan XuSODA 2025 · 2 次引用
  2. Faster two-dimensional pattern matching with k mismatchesJonas Ellert, Pawel Gawrychowski, Adam Górkiewicz, Tatiana StarikovskayaSODA 2025 · 1 次引用
  3. Near-Optimal Property Testers for Pattern MatchingCe Jin, Tomasz KociumakaFOCS 2025 · 1 次引用
  4. Shaving Logs via Large Sieve Inequality: Faster Algorithms for Sparse Convolution and MoreCe Jin, Yinzhan XuSTOC 2024 · 1 次引用

它引用的 Paper12

  1. New Bounds for Matrix Multiplication: from Alpha to OmegaVirginia Vassilevska Williams, Yinzhan Xu, Zixuan Xu, Renfei ZhouSODA 2024 · 90 次引用
  2. Faster Matrix Multiplication via Asymmetric HashingRan Duan, Hongxun Wu, Renfei ZhouFOCS 2023 · 54 次引用
  3. Top-k-convolution and the quest for near-linear output-sensitive subset sumKarl Bringmann, Vasileios NakosSTOC 2020 · 18 次引用
  4. A Fine-Grained Perspective on Approximating Subset Sum and PartitionKarl Bringmann, Vasileios NakosSODA 2021 · 14 次引用
  5. Elliptic Curve Fast Fourier Transform (ECFFT) Part I: Low-degree Extension in Time O(n log n) over all Finite FieldsEli Ben-Sasson, Dan Carmon, Swastik Kopparty, David LevitSODA 2023 · 12 次引用

相关 Paper

  1. Approximating text-to-pattern Hamming distancesTimothy M. Chan, Shay Golan, Tomasz Kociumaka, Tsvi Kopelowitz 等STOC 2020 · 2 次引用
  2. Near-Optimal-Time Quantum Algorithms for Approximate Pattern MatchingTomasz Kociumaka, Jakob Nogler, Philip WellnitzSODA 2025 · 1 次引用
  3. Small-space and streaming pattern matching with kk editsTomasz Kociumaka, Ely Porat, Tatiana StarikovskayaFOCS 2021 · 13 次引用
  4. Faster Approximate Pattern Matching: A Unified ApproachPanagiotis Charalampopoulos, Tomasz Kociumaka, Philip WellnitzFOCS 2020 · 2 次引用
  5. Faster Pattern Matching under Edit Distance : A Reduction to Dynamic Puzzle Matching and the Seaweed Monoid of Permutation MatricesPanagiotis Charalampopoulos, Tomasz Kociumaka, Philip WellnitzFOCS 2022 · 8 次引用
黄昏的海面,两侧是细线勾勒的悬崖