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

全在线构造多字符串后缀树和DAWG的指针机算法

Pointer-Machine Algorithms for Fully-Online Construction of Suffix Trees and DAWGs on Multiple Strings

Shunsuke Inenaga

摘要:

我们处理的问题,维护后缀树索引结构的一个完全在线的多个字符串的集合,其中一个新的字符可以在任何时候在集合中的任何字符串的前缀。最近由Takagi等人提出的用于该问题的唯一先前已知的算法[Micromica 82(5):1346-1377(2020)]在字RAM模型上在$O(N \log σ)$时间和$O(N)$空间中运行,其中$N$表示字符串的总长度,$σ$表示字母表大小。他们的算法大量使用了半动态树上的最近标记祖先(NMA)数据结构,该结构可以回答查询并支持在字RAM模型上的$O(1)$分摊时间中插入节点。在本文中,我们提出了一个更简单的全在线从右到左的算法,建立后缀树为一个给定的字符串集合在$O(N (\log σ+ \log d))$时间和$O(N)$空间,其中$d$是最大数量的传入韦纳链接到一个节点的后缀树。我们注意到,$d$由后缀树的高度限定,后缀树的高度又由集合中最长字符串的长度限定。这种新算法的优点是它工作在指针机器模型上,即它不使用涉及查表的复杂NMA数据结构。作为一个副产品,我们还获得了一个指针机算法,用于建立有向无环字图(DAWG)的多个字符串,它运行在$O(N (\log σ+ \log d))$时间和$O(N)$空间再次没有NMA数据结构的帮助下,一个完全在线的左到右收集。

英文摘要:

We deal with the problem of maintaining the suffix tree indexing structure for a fully-online collection of multiple strings, where a new character can be prepended to any string in the collection at any time. The only previously known algorithm for the problem, recently proposed by Takagi et al. [Algorithmica 82(5): 1346-1377 (2020)], runs in $O(N \log σ)$ time and $O(N)$ space on the word RAM model, where $N$ denotes the total length of the strings and $σ$ denotes the alphabet size. Their algorithm makes heavy use of the nearest marked ancestor (NMA) data structure on semi-dynamic trees, that can answer queries and supports insertion of nodes in $O(1)$ amortized time on the word RAM model. In this paper, we present a simpler fully-online right-to-left algorithm that builds the suffix tree for a given string collection in $O(N (\log σ+ \log d))$ time and $O(N)$ space, where $d$ is the maximum number of in-coming Weiner links to a node of the suffix tree. We note that $d$ is bounded by the height of the suffix tree, which is further bounded by the length of the longest string in the collection. The advantage of this new algorithm is that it works on the pointer machine model, namely, it does not use the complicated NMA data structures that involve table look-ups. As a byproduct, we also obtain a pointer-machine algorithm for building the directed acyclic word graph (DAWG) for a fully-online left-to-right collection of multiple strings, which runs in $O(N (\log σ+ \log d))$ time and $O(N)$ space again without the aid of the NMA data structures.

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

↑