arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.22109cs.DS
收藏

具有 $k$ 个错配的更快二维模式匹配

Faster two-dimensional pattern matching with $k$ mismatches

Jonas Ellert, Paweł Gawrychowski, Adam Górkiewicz, Tatiana Starikovskaya

AI总结:

本文研究带 $k$ 个错配的二维模式匹配,通过新的二维周期性洞见改进已有30年的 $\mathcal{O}(kn^{2})$ 界,在 $k=\mathcal{O}(m^{4/5})$ 时达到 $\tilde{\mathcal{O}}(n^{2})$。

摘要:

经典模式匹配要求在另一个称为文本的字符串中定位一个称为模式的字符串的所有出现位置,其中字符串就是简单的字符序列。由于潜在的实际应用,人们希望寻找近似出现,例如通过限制错配数量。该问题已得到广泛研究,到目前为止,我们对以 $n$(文本长度)、$m$(模式长度)和 $k$(错配数量)为函数的最佳可能时间复杂度已有充分理解。特别是,我们知道当 $k=\mathcal{O}(\sqrt{m})$ 时,可以实现准线性时间复杂度 [Gawrychowski 和 Uznański,ICALP 2018]。我们考虑将近似模式匹配问题自然推广到二维字符串,即简单的字符方形阵列。该问题的精确版本在20世纪90年代初已得到广泛研究。虽然周期性作为一维模式匹配的基本工具可以自然扩展到二维,但事实证明在二维中使用它明显更具挑战性,并且经过一段时间后,Galil 和 Park 才获得独立于字母表的线性时间算法 [SICOMP 1996]。在近似二维模式匹配中,给定一个大小为 $m\times m$ 的模式和一个大小为 $n\times n$ 的文本,并要求找出文本中模式以至多 $k$ 个错配匹配的所有位置。该算法的渐近最快算法运行时间为 $\mathcal{O}(kn^{2})$ [Amir 和 Landau,TCS 1991]。我们对二维周期性提供了新的洞见,以改进这些已有30年历史的界。我们的算法运行时间为 $\tilde{\mathcal{O}}((m^{2}+mk^{5/4})n^{2}/m^{2})$,当 $k=\mathcal{O}(m^{4/5})$ 时,其时间复杂度为 $\tilde{\mathcal{O}}(n^{2})$。

英文摘要:

The classical pattern matching asks for locating all occurrences of one string, called the pattern, in another, called the text, where a string is simply a sequence of characters. Due to the potential practical applications, it is desirable to seek approximate occurrences, for example by bounding the number of mismatches. This problem has been extensively studied, and by now we have a good understanding of the best possible time complexity as a function of $n$ (length of the text), $m$ (length of the pattern), and $k$ (number of mismatches). In particular, we know that for $k=\mathcal{O}(\sqrt{m})$, we can achieve quasi-linear time complexity [Gawrychowski and Uznański, ICALP 2018]. We consider a natural generalisation of the approximate pattern matching problem to two-dimensional strings, which are simply square arrays of characters. The exact version of this problem has been extensively studied in the early 90s. While periodicity, which is the basic tool for one-dimensional pattern matching, admits a natural extension to two dimensions, it turns out to become significantly more challenging to work with, and it took some time until an alphabet-independent linear-time algorithm has been obtained by Galil and Park [SICOMP 1996]. In the approximate two-dimensional pattern matching, we are given a pattern of size $m\times m$ and a text of size $n\times n$, and ask for all locations in the text where the pattern matches with at most $k$ mismatches. The asymptotically fastest algorithm for this algorithm works in $\mathcal{O}(kn^{2})$ time [Amir and Landau, TCS 1991]. We provide a new insight into two-dimensional periodicity to improve on these 30-years old bounds. Our algorithm works in $\tilde{\mathcal{O}}((m^{2}+mk^{5/4})n^{2}/m^{2})$ time, which is $\tilde{\mathcal{O}}(n^{2})$ for $k=\mathcal{O}(m^{4/5})$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑