arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1302.3347cs.DS
收藏

基于Wexponential搜索树的字母相关字符串搜索

Alphabet-Dependent String Searching with Wexponential Search Trees

Johannes Fischer, Pawel Gawrychowski

摘要:

如果坚持线性大小的数据结构和确定性的最坏情况运行时间,则广泛地假设$O(m+\lg σ)$是在存储大小为$σ$的字母表上的字符串的压缩trie中找到长度为$m$的模式所能做的最好的选择[Cole等人,ICALP'06]。在这篇文章中,我们首先展示了一个相当简单的组合,众所周知的想法产生$O(m+\lg\lg σ)$确定性的最坏情况下的静态尝试搜索时间。然后,我们继续进行动态尝试,其中我们实现每个查询或更新的$O(m+\frac{\lg^{2}\lgσ}{\lg\lg\lgσ})$的最坏情况界限,这应该再次与先前已知的$O(m+\lgσ)$确定性最坏情况界限进行比较[Cole等人,ICALP'06],以及依赖于字母表\emph{in}的$O(m+\sqrt{\lg n/\lg\lg n})$确定性最坏情况界限[Andersson和Thorup,SODA'01],其中$n$是trie中的节点数。我们的更新过程的基础是指数搜索树的加权变体,虽然简单,但可能是独立的兴趣。作为一个特定应用,上述界限(静态和动态)适用于后缀树。在那里,更新对应于在文本中添加或追加一个字母,另外一个目标是更新比重新匹配整个后缀更快。我们展示了如何在$O(\lg\lg n + \frac{\lg^{2}\lgσ}{\lg\lg\lgσ})$时间内做到这一点,这改善了先前已知的$O(\lg n)$结合[Amir等人,SPIRE'05]。

英文摘要:

It is widely assumed that $O(m+\lg σ)$ is the best one can do for finding a pattern of length $m$ in a compacted trie storing strings over an alphabet of size $σ$, if one insists on linear-size data structures and deterministic worst-case running times [Cole et al., ICALP'06]. In this article, we first show that a rather straightforward combination of well-known ideas yields $O(m+\lg\lg σ)$ deterministic worst-case searching time for static tries. Then we move on to dynamic tries, where we achieve a worst-case bound of $O(m+\frac{\lg^{2}\lgσ}{\lg\lg\lgσ})$ per query or update, which should again be compared to the previously known $O(m+\lgσ)$ deterministic worst-case bounds [Cole et al., ICALP'06], and to the alphabet \emph{in}dependent $O(m+\sqrt{\lg n/\lg\lg n})$ deterministic worst-case bounds [Andersson and Thorup, SODA'01], where $n$ is the number of nodes in the trie. The basis of our update procedure is a weighted variant of exponential search trees which, while simple, might be of independent interest. As one particular application, the above bounds (static and dynamic) apply to suffix trees. There, an update corresponds to pre- or appending a letter to the text, and an additional goal is to do the updates quicker than rematching entire suffixes. We show how to do this in $O(\lg\lg n + \frac{\lg^{2}\lgσ}{\lg\lg\lgσ})$ time, which improves the previously known $O(\lg n)$ bound [Amir et al., SPIRE'05].

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

↑