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

具有$k$不匹配的循环模式匹配

Circular Pattern Matching with $k$ Mismatches

Panagiotis Charalampopoulos, Tomasz Kociumaka, Solon P. Pissis, Jakub Radoszewski, Wojciech Rytter, Juliusz Straszyński, Tomasz Waleń, Wiktor Zuba

摘要:

$k$不匹配问题在于计算长度为$m$的模式$P$与长度为$n$的文本$T$的每个长度为$m$的子串之间的汉明距离,如果该距离不大于$k$ .在许多实际应用中,$P$的任何循环旋转都是相关模式,因此人们对计算$T$的每个长度- $m$子串与$P$的任何循环旋转的最小距离感兴趣。这是具有$k$不匹配的循环模式匹配($k$ -CPM)问题。大量的文件已致力于解决这个问题,但据我们所知,只有平均情况下的上限是已知的。本文给出了$k$ -CPM问题的第一个非平凡最坏情况上界。具体来说,我们展示了一个$O(nk)$时间算法和一个$O(n+\frac{n}{m}\,k^4)$时间算法.后一种算法以扩展的方式应用最近开发的用于$k$ -失配问题的技术[Bringmann等人,SODA 2019]。这项工作的初步版本出现在FCT 2019上。在这个版本中,我们改善了主要算法的时间复杂度从$O(n+\frac{n}{m}\,k^5)$到$O(n+\frac{n}{m}\,k^4)$。

英文摘要:

The $k$-mismatch problem consists in computing the Hamming distance between a pattern $P$ of length $m$ and every length-$m$ substring of a text $T$ of length $n$, if this distance is no more than $k$. In many real-world applications, any cyclic rotation of $P$ is a relevant pattern, and thus one is interested in computing the minimal distance of every length-$m$ substring of $T$ and any cyclic rotation of $P$. This is the circular pattern matching with $k$ mismatches ($k$-CPM) problem. A multitude of papers have been devoted to solving this problem but, to the best of our knowledge, only average-case upper bounds are known. In this paper, we present the first non-trivial worst-case upper bounds for the $k$-CPM problem. Specifically, we show an $O(nk)$-time algorithm and an $O(n+\frac{n}{m}\,k^4)$-time algorithm. The latter algorithm applies in an extended way a technique that was very recently developed for the $k$-mismatch problem [Bringmann et al., SODA 2019]. A preliminary version of this work appeared at FCT 2019. In this version we improve the time complexity of the main algorithm from $O(n+\frac{n}{m}\,k^5)$ to $O(n+\frac{n}{m}\,k^4)$.

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

↑