arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.01428cs.DScs.FL
收藏

整数字母表上 DAWG、对称索引结构与 MAW 的线性时间计算

Linear-time Computation of DAWGs, Symmetric Indexing Structures, and MAWs for Integer Alphabets

Yuta Fujishige, Yuki Tsujimaru, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda

AI总结:

本文提出在整数字母表上利用后缀树以线性时间构造 DAWG 的算法,并据此首次实现词缀树、对称 CDAWG 等结构的线性时间构建,同时给出 MAW 的最优输入输出敏感计算。

摘要:

长度为 n 的字符串 y 的有向无环词图(DAWG)是最小的(部分)DFA,它仅用 O(n) 个节点和边即可识别 y 的所有后缀。本文展示了如何在整数字母表(其大小为 n 的多项式)上,从 y 的后缀树出发,以 O(n) 时间构造输入字符串 y 的 DAWG。为此,我们首先描述一个民间算法:给定 y 的后缀树,可在 O(n) 时间内构造 y 的反向字符串的 DAWG。然后,我们提出我们的算法,在整数字母表上从 y 的后缀树出发,以 O(n) 时间构建 y 的 DAWG。我们还证明,对我们的 DAWG 构造算法进行直接修改,即可得到第一个在整数字母表上为给定字符串 y 构造词缀树(affix tree)的 O(n) 时间算法。词缀树是一种支持双向模式搜索的文本索引结构。随后,我们讨论这些构造方法如何导出用于构建其他文本索引结构的线性时间算法,例如在整数字母表情形下以线性时间构造线性大小后缀尝试(linear-size suffix tries)和对称 CDAWG。作为我们 O(n) 时间 DAWG 构造算法的进一步应用,我们证明在整数字母表上,y 的所有最小缺失词(MAW)集合 MAW(y) 可以在最优的、输入与输出敏感的 O(n + |MAW(y)|) 时间内、使用 O(n) 工作空间计算得到。

英文摘要:

The directed acyclic word graph (DAWG) of a string $y$ of length $n$ is the smallest (partial) DFA which recognizes all suffixes of $y$ with only $O(n)$ nodes and edges. In this paper, we show how to construct the DAWG for the input string $y$ from the suffix tree for $y$, in $O(n)$ time for integer alphabets of polynomial size in $n$. In so doing, we first describe a folklore algorithm which, given the suffix tree for $y$, constructs the DAWG for the reversed string of $y$ in $O(n)$ time. Then, we present our algorithm that builds the DAWG for $y$ in $O(n)$ time for integer alphabets, from the suffix tree for $y$. We also show that a straightforward modification to our DAWG construction algorithm leads to the first $O(n)$-time algorithm for constructing the affix tree of a given string $y$ over an integer alphabet. Affix trees are a text indexing structure supporting bidirectional pattern searches. We then discuss how our constructions can lead to linear-time algorithms for building other text indexing structures, such as linear-size suffix tries and symmetric CDAWGs in linear time in the case of integer alphabets. As a further application to our $O(n)$-time DAWG construction algorithm, we show that the set $\mathsf{MAW}(y)$ of all minimal absent words (MAWs) of $y$ can be computed in optimal, input- and output-sensitive $O(n + |\mathsf{MAW}(y)|)$ time and $O(n)$ working space for integer alphabets.

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

↑