Faster Algorithms for Text-to-Pattern Hamming Distances

2023 IEEE 64TH ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE, FOCS(2023)

引用 0|浏览8
暂无评分
摘要
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] for every shift i, under the standard Word-RAM model with Theta(log n)-bit words. center dot We provide an O(n root m) time Las Vegas randomized algorithm for this problem, beating the decades-old O(n root mlogm) running time [Abrahamson, SICOMP 1987]. We also obtain a deterministic algorithm, with a slightly higher O(n root m(logmlog logm)(1/4)) running time. Our randomized algorithm extends to the k-bounded setting, with running time O(n+ nk/root m), removing all the extra logarithmic factors from earlier algorithms [Gawrychowski and Uznanski, ICALP 2018; Chan, Golan, Kociumaka, Kopelowitz and Porat, STOC 2020]. center dot For the (1+epsilon)-approximate version of Text-to-Pattern Hamming Distances, we give an (O) over tilde (epsilon(-0.93) n) time Monte Carlo randomized algorithm (where (O) over tilde hides poly-logarithmic factors), beating the previous (O) over tilde (epsilon(-1)n) 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 3SUM 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 rangerestricted, counting version of 3SUM.
更多
查看译文
关键词
text-to-pattern Hamming distances,approximation algorithms,fine-grained complexity
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要