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

小空间中的快速最长公共扩张

Fast Longest Common Extensions in Small Space

Alberto Policriti, Nicola Prezza

摘要:

在本文中,我们解决的最长公共扩展(LCE)问题:计算长度$\ell$的任何两个后缀之间的$T\in Σ^n$与$ Σ= \{0, \ldots σ-1\} $的最长公共前缀。我们提出了两个快速和空间有效的解决方案的基础上(Karp-Rabin)\textit{fingerprinting}和\textit{sampling}。我们的第一个数据结构利用梅森素数的属性时,使用的卡普-拉宾哈希函数的模数,并采取$n\lceil \log_2σ\rceil$位的空间。我们的第二种结构适用于任何素数模,并占用$n\lceil \log_2σ\rceil + n/w + w\log_2 n$位空间($ w $存储器字大小)。这两种结构都支持$\mathcal O\left(m\logσ/w \right)$ -时间提取任意长度的$m$文本子串,$\mathcal O(\log\ell)$ -时间LCE查询的高概率,并可以建立在最佳的$\mathcal O(n)$时间。在第一种情况下,我们是第一个结果,表明它是可能的回答LCE查询在$o(n)$时间,而只使用$\mathcal O(1)$字的顶部所需的空间来存储文本。我们的研究结果提高了空间使用率,查询时间和预处理时间的最新技术水平,并且非常实用:我们提出了一个C++实现,在实践中非常快速和节省空间。

英文摘要:

In this paper we address the longest common extension (LCE) problem: to compute the length $\ell$ of the longest common prefix between any two suffixes of $T\in Σ^n$ with $ Σ= \{0, \ldots σ-1\} $. We present two fast and space-efficient solutions based on (Karp-Rabin) \textit{fingerprinting} and \textit{sampling}. Our first data structure exploits properties of Mersenne prime numbers when used as moduli of the Karp-Rabin hash function and takes $n\lceil \log_2σ\rceil$ bits of space. Our second structure works with any prime modulus and takes $n\lceil \log_2σ\rceil + n/w + w\log_2 n$ bits of space ($ w $ memory-word size). Both structures support $\mathcal O\left(m\logσ/w \right)$-time extraction of any length-$m$ text substring, $\mathcal O(\log\ell)$-time LCE queries with high probability, and can be built in optimal $\mathcal O(n)$ time. In the first case, ours is the first result showing that it is possible to answer LCE queries in $o(n)$ time while using only $\mathcal O(1)$ words on top of the space required to store the text. Our results improve the state of the art in space usage, query times, and preprocessing times and are extremely practical: we present a C++ implementation that is very fast and space-efficient in practice.

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

↑