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

就地稀疏后缀排序

In-Place Sparse Suffix Sorting

Nicola Prezza

摘要:

后缀数组对文本中所有后缀的词典顺序进行编码,并且通常与最长公共前缀数组(LCP)结合使用,以在减少的空间中模拟后缀树上的导航查询。在诸如稀疏和压缩文本索引之类的空间关键型应用中,通常仅需要关于所有$n$文本后缀的大小$b$子集的词典顺序的信息。这样的信息可以空间有效地(以$b$字)存储在稀疏后缀阵列(SSA)中。SSA及其相关的稀疏LCP阵列(SLCP)可以作为稀疏后缀树的空间有效的替代品。最近,Gawrychowski和Kociumaka [SODA 2017]表明,稀疏后缀树(因此SSA和SLCP)可以在渐近最优的$O(b)$空间中构建,蒙特卡罗算法在$O(n)$时间内运行。然而,使用SSA和SLCP数组代替稀疏后缀树的主要原因是它们各自减少了$b$字的空间。这自然导致了对构建这些数组的就地算法的追求。Franceschini和Muthukrishnan [ICALP 2007]表明,可以在最佳运行时间内就地内置的完整的后缀数组。另一方面,几十年来,为后缀的\emph{general}子集找到用于构建SSA和SLCP的次二次原地算法一直是一项难以捉摸的任务。在本文中,我们给出了这个问题的第一个解决方案。我们提供了在$O(n\log n)$预期时间内构建完整LCP阵列的第一个就地算法和在$O(n + b\log^2 n)$预期时间内构建SSA和SLCP的第一个Monte Carlo就地算法。此外,我们描述了第一个在地方的解决方案的后缀选择问题:计算$i$ -第最小的文本后缀。

英文摘要:

Suffix arrays encode the lexicographical order of all suffixes of a text and are often combined with the Longest Common Prefix array (LCP) to simulate navigational queries on the suffix tree in reduced space. In space-critical applications such as sparse and compressed text indexing, only information regarding the lexicographical order of a size-$b$ subset of all $n$ text suffixes is often needed. Such information can be stored space-efficiently (in $b$ words) in the sparse suffix array (SSA). The SSA and its relative sparse LCP array (SLCP) can be used as a space-efficient substitute of the sparse suffix tree. Very recently, Gawrychowski and Kociumaka [SODA 2017] showed that the sparse suffix tree (and therefore SSA and SLCP) can be built in asymptotically optimal $O(b)$ space with a Monte Carlo algorithm running in $O(n)$ time. The main reason for using the SSA and SLCP arrays in place of the sparse suffix tree is, however, their reduced space of $b$ words each. This leads naturally to the quest for in-place algorithms building these arrays. Franceschini and Muthukrishnan [ICALP 2007] showed that the full suffix array can be built in-place and in optimal running time. On the other hand, finding sub-quadratic in-place algorithms for building the SSA and SLCP for \emph{general} subsets of suffixes has been an elusive task for decades. In this paper, we give the first solution to this problem. We provide the first in-place algorithm building the full LCP array in $O(n\log n)$ expected time and the first Monte Carlo in-place algorithms building the SSA and SLCP in $O(n + b\log^2 n)$ expected time. We moreover describe the first in-place solution for the suffix selection problem: to compute the $i$-th smallest text suffix.

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

↑