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

构造线性大小后缀字典树的线性时间在线算法

Linear Time Online Algorithms for Constructing Linear-size Suffix Trie

Diptarama Hendrian, Takuya Takagi, Shunsuke Inenaga, Keisuke Goto, Mitsuru Funakoshi

AI总结:

本文提出两种直接在线构造线性大小后缀字典树(LST)的算法,分别从右到左和从左到右增量构建,在 O(n log σ) 时间和 O(n) 空间内完成,且无需存储输入文本串。

摘要:

后缀树是各种字符串处理中的基础数据结构。长度为 $n$ 的文本串 $T$ 的后缀树具有 $O(n)$ 个节点和边,每条边的字符串标签由 $T$ 中的一对位置编码。因此,即使在树构建完成之后,输入串 $T$ 仍需要被保存,并且仍需要对 $T$ 进行随机访问。Crochemore 等人提出的线性大小后缀字典树(LSTs)[Linear-size suffix tries, TCS 638:171-178, 2016] 是后缀树的一种“独立”替代方案。也就是说,长度为 $n$ 的输入文本串 $T$ 的 LST 占用 $O(n)$ 总空间,并且在与后缀树相同的效率下支持模式匹配和其他任务,而无需存储输入文本串 $T$。Crochemore 等人提出了一种离线算法,该算法在 $O(n \log σ)$ 时间和 $O(n)$ 空间内将 $T$ 的后缀树转换为 $T$ 的 LST,其中 $σ$ 是字母表大小。在本文中,我们提出了两种类型的在线算法,它们“直接”构造 LST,分别从右到左和从左到右,而无需将后缀树作为中间结构构造。两种算法在读取新符号时增量式地构造 LST,并且不访问先前读取的符号。从右到左构造算法和从左到右构造算法均在 $O(n \log σ)$ 时间和 $O(n)$ 空间内工作。我们算法的主要特点是输入文本串不需要被存储。

英文摘要:

The suffix trees are fundamental data structures for various kinds of string processing. The suffix tree of a text string $T$ of length $n$ has $O(n)$ nodes and edges, and the string label of each edge is encoded by a pair of positions in $T$. Thus, even after the tree is built, the input string $T$ needs to be kept stored and random access to $T$ is still needed. The \emph{linear-size suffix tries} (\emph{LSTs}), proposed by Crochemore et al. [Linear-size suffix tries, TCS 638:171-178, 2016], are a "stand-alone" alternative to the suffix trees. Namely, the LST of an input text string $T$ of length $n$ occupies $O(n)$ total space, and supports pattern matching and other tasks with the same efficiency as the suffix tree without the need to store the input text string $T$. Crochemore et al. proposed an \emph{offline} algorithm which transforms the suffix tree of $T$ into the LST of $T$ in $O(n \log σ)$ time and $O(n)$ space, where $σ$ is the alphabet size. In this paper, we present two types of \emph{online} algorithms which "directly" construct the LST, from right to left, and from left to right, without constructing the suffix tree as an intermediate structure. Both algorithms construct the LST incrementally when a new symbol is read, and do not access the previously read symbols. Both of the right-to-left construction algorithm and the left-to-right construction algorithm work in $O(n \log σ)$ time and $O(n)$ space. The main feature of our algorithms is that the input text string does not need to be stored.

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

↑