arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.06037cs.DS
收藏

小空间和流式模式匹配与k编辑

Small space and streaming pattern matching with k edits

Tomasz Kociumaka, Ely Porat, Tatiana Starikovskaya

摘要:

在这项工作中,我们重新审视编辑距离下的近似模式匹配的基本和充分研究的问题。给定一个整数$k$,一个长度为$m$的模式$P$,和一个长度为$n \ge m$的文本$T$,任务是找到$T$的子串,这些子串在$k$和$P$的编辑距离之内。我们的主要结果是一个流算法,解决了这个问题,在$\tilde{O}(k^5)$空间和$\tilde{O}(k^8)$摊销时间每个字符的文本,提供答案正确的概率很高。(此后,$\tilde{O}(\cdot)$隐藏了一个$\mathrm{poly}(\log n)$因子。)这回答了一个十年前的问题:自从Porat和Porat [FOCS 2009]在汉明距离下发现用于模式匹配的$\mathrm{poly}(k\log n)$空间流算法以来,编辑距离的类似结果的存在仍然是开放的。直到这项工作,没有$\mathrm{poly}(k\log n)$空间算法是已知的,即使在更简单的半流模型,其中$T$作为流,但$P$是只读访问。在这个模型中,我们给出了一个确定性算法,实现稍微好一点的复杂性。为了改进完全流算法,我们引入了一个新的编辑距离草图参数为整数$n\ge k$。对于长度最多为$n$的任何字符串,草图的大小为$\tilde{O}(k^2)$,并且可以使用$\tilde{O}(k^2)$空间流算法进行计算。给定两个字符串的草图,在$\tilde{O}(k^3)$时间内,我们可以计算它们的编辑距离或证明它大于$k$。该结果改进了Belazzougui和Zhu的$\tilde{O}(k^8)$大小草图[FOCS 2016]以及Jin、Nelson和Wu最近的$\tilde{O}(k^3)$大小草图[STACS 2021]。

英文摘要:

In this work, we revisit the fundamental and well-studied problem of approximate pattern matching under edit distance. Given an integer $k$, a pattern $P$ of length $m$, and a text $T$ of length $n \ge m$, the task is to find substrings of $T$ that are within edit distance $k$ from $P$. Our main result is a streaming algorithm that solves the problem in $\tilde{O}(k^5)$ space and $\tilde{O}(k^8)$ amortised time per character of the text, providing answers correct with high probability. (Hereafter, $\tilde{O}(\cdot)$ hides a $\mathrm{poly}(\log n)$ factor.) This answers a decade-old question: since the discovery of a $\mathrm{poly}(k\log n)$-space streaming algorithm for pattern matching under Hamming distance by Porat and Porat [FOCS 2009], the existence of an analogous result for edit distance remained open. Up to this work, no $\mathrm{poly}(k\log n)$-space algorithm was known even in the simpler semi-streaming model, where $T$ comes as a stream but $P$ is available for read-only access. In this model, we give a deterministic algorithm that achieves slightly better complexity. In order to develop the fully streaming algorithm, we introduce a new edit distance sketch parametrised by integers $n\ge k$. For any string of length at most $n$, the sketch is of size $\tilde{O}(k^2)$ and it can be computed with an $\tilde{O}(k^2)$-space streaming algorithm. Given the sketches of two strings, in $\tilde{O}(k^3)$ time we can compute their edit distance or certify that it is larger than $k$. This result improves upon $\tilde{O}(k^8)$-size sketches of Belazzougui and Zhu [FOCS 2016] and very recent $\tilde{O}(k^3)$-size sketches of Jin, Nelson, and Wu [STACS 2021].

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

↑