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

可变长度间隔的字符串匹配

String Matching with Variable Length Gaps

Philip Bille, Inge Li Goertz, Hjalte Wedel Vildhøj, David Kofoed Wind

摘要:

我们考虑字符串匹配与可变长度的差距。给定一个字符串$T$和一个由可变长度间隔(指定范围内的任意长度字符串)分隔的字符串组成的模式$P$,问题是找到$T$中与$P$匹配的子串的所有结束位置。这个问题是计算生物学应用中的一个基本问题。令$m$和$n$分别为$P$和$T$的长度,令$k$为$P$中的字符串数。本文提出了一种新的时间$O(n\log k + m +α)$和空间$O(m + A)$的计算方法,其中$A$是$P$中间隔长度的下界之和,$α$是$P$中字符串在$T$中出现的总次数.与以前的结果相比,该界基本上同时实现了已知的最佳时间复杂度和空间复杂度。因此,我们的算法获得了几乎所有$m$、$n$、$k$、$A$和$α$组合的最佳已知边界。我们的算法是令人惊讶的简单和直接实现。我们还提出了算法,发现和编码的位置,所有字符串在$P$的模式的每一个匹配。

英文摘要:

We consider string matching with variable length gaps. Given a string $T$ and a pattern $P$ consisting of strings separated by variable length gaps (arbitrary strings of length in a specified range), the problem is to find all ending positions of substrings in $T$ that match $P$. This problem is a basic primitive in computational biology applications. Let $m$ and $n$ be the lengths of $P$ and $T$, respectively, and let $k$ be the number of strings in $P$. We present a new algorithm achieving time $O(n\log k + m +α)$ and space $O(m + A)$, where $A$ is the sum of the lower bounds of the lengths of the gaps in $P$ and $α$ is the total number of occurrences of the strings in $P$ within $T$. Compared to the previous results this bound essentially achieves the best known time and space complexities simultaneously. Consequently, our algorithm obtains the best known bounds for almost all combinations of $m$, $n$, $k$, $A$, and $α$. Our algorithm is surprisingly simple and straightforward to implement. We also present algorithms for finding and encoding the positions of all strings in $P$ for every match of the pattern.

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

↑