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

确定性有限自动机的更快前缀排序算法

Faster Prefix-Sorting Algorithms for Deterministic Finite Automata

Sung-Hwan Kim, Francisco Olivares, Nicola Prezza

AI总结:

本文研究DFA的最小宽度偏反词典序计算,利用新组合性质提出任意DFA的$O(mn)$、$O(n^2\log n)$排序算法及无环DFA的$O(m\log n)$算法,并验证其实用性。

摘要:

排序是一种基础的算法预处理技术,通常能够更紧凑地表示数据,同时加快对数据的搜索查询。本文聚焦于已得到充分研究的字符串集合排序与索引问题。自1973年后缀树被提出以来,文献中已经描述了数十种后缀排序算法。2017年,这些技术被扩展到由有限自动机描述的字符串集合:Wheeler graphs理论(Gagie等人,TCS'17)引入了一类自动机,其状态可以按照该自动机所接受单词前缀的反词典序(以下简称co-lex)进行全排序。最近,Cotumaccio和Prezza在SODA'21中展示了如何通过偏反词典序将这些思想扩展到任意自动机。该工作表明,在确定性有限自动机(DFA)上,可以在$O(m^2 + n^{5/2})$时间内计算最小宽度的反词典序(从而优化搜索查询时间),其中$m$是输入DFA的转移数,$n$是状态数。本文揭示了DFA最小宽度反词典序的新组合性质,并利用这些性质设计更快的前缀排序算法。具体而言,我们描述了两种分别在$O(mn)$和$O(n^2\log n)$时间内对任意DFA排序的算法,以及一种在$O(m\log n)$时间内对无环DFA排序的算法。在这些运行时间内,所有算法还计算该偏序的最小链划分(这是为DFA建立索引所必需的)。我们给出一项实验结果,表明$O(n^2\log n)$时间算法的优化实现在大型确定性泛基因组图上表现出近似线性的行为,因此也具有实际意义。

英文摘要:

Sorting is a fundamental algorithmic pre-processing technique which often allows to represent data more compactly and, at the same time, speeds up search queries on it. In this paper, we focus on the well-studied problem of sorting and indexing string sets. Since the introduction of suffix trees in 1973, dozens of suffix sorting algorithms have been described in the literature. In 2017, these techniques were extended to sets of strings described by means of finite automata: the theory of Wheeler graphs [Gagie et al., TCS'17] introduced automata whose states can be totally-sorted according to the co-lexicographic (co-lex in the following) order of the prefixes of words accepted by the automaton. More recently, in [Cotumaccio, Prezza, SODA'21] it was shown how to extend these ideas to arbitrary automata by means of partial co-lex orders. This work showed that a co-lex order of minimum width (thus optimizing search query times) on deterministic finite automata (DFAs) can be computed in $O(m^2 + n^{5/2})$ time, $m$ being the number of transitions and $n$ the number of states of the input DFA. In this paper, we exhibit new combinatorial properties of the minimum-width co-lex order of DFAs and exploit them to design faster prefix sorting algorithms. In particular, we describe two algorithms sorting arbitrary DFAs in $O(mn)$ and $O(n^2\log n)$ time, respectively, and an algorithm sorting acyclic DFAs in $O(m\log n)$ time. Within these running times, all algorithms compute also a smallest chain partition of the partial order (required to index the DFA). We present an experiment result to show that an optimized implementation of the $O(n^2\log n)$-time algorithm exhibits a nearly-linear behaviour on large deterministic pan-genomic graphs and is thus also of practical interest.

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

↑