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

最优子串-等式变换及其在稀疏文本索引中的应用

Optimal Substring-Equality Queries with Applications to Sparse Text Indexing

Nicola Prezza

摘要:

我们考虑的问题编码的字符串长度$n$从一个整数字母表的大小$σ$,以便访问和子串的平等查询(即,确定任何两个子串的平等)可以有效地回答。任何支持访问的可解码编码都必须采用$n\logσ+ Θ(\log (n\logσ))$位。我们描述了一个新的数据结构匹配这个下限时,$σ\leq n^{O(1)}$,同时支持查询的最佳$O(1)$的时间。此外,我们表明,该字符串可以被覆盖在这个结构的地方。$Θ(\log n)$位的冗余和恒定的查询时间以指数方式打破了已知在只读模型中保持的下限。使用我们的新字符串表示,我们获得了第一个到位次二次(事实上,在某些情况下,甚至次线性)算法的几个字符串处理问题的恢复模型:输入字符串是重复的,必须在计算终止前恢复。特别是,我们描述了第一次到位次二次蒙特卡罗解决方案的稀疏后缀排序,稀疏LCP阵列建设,后缀选择问题。唯一例外的后缀选择,我们的算法也是第一次运行在次线性时间足够小的输入后缀集。结合这些解决方案,我们得到了第一个次线性时间的Monte Carlo算法在紧空间中建立稀疏后缀树。我们还展示了如何使用小空间去随机化我们的算法。这导致了第一个Las Vegas就地算法在$O(n\log n)$时间内计算完整的LCP阵列,并导致了第一个Las Vegas就地算法在$O(n^{1.5}\sqrt{\log σ})$时间内解决稀疏后缀排序和稀疏LCP阵列构造问题。这些拉斯维加斯算法的运行时间在最坏的情况下具有很高的概率。

英文摘要:

We consider the problem of encoding a string of length $n$ from an integer alphabet of size $σ$ so that access and substring equality queries (that is, determining the equality of any two substrings) can be answered efficiently. Any uniquely-decodable encoding supporting access must take $n\logσ+ Θ(\log (n\logσ))$ bits. We describe a new data structure matching this lower bound when $σ\leq n^{O(1)}$ while supporting both queries in optimal $O(1)$ time. Furthermore, we show that the string can be overwritten in-place with this structure. The redundancy of $Θ(\log n)$ bits and the constant query time break exponentially a lower bound that is known to hold in the read-only model. Using our new string representation, we obtain the first in-place subquadratic (indeed, even sublinear in some cases) algorithms for several string-processing problems in the restore model: the input string is rewritable and must be restored before the computation terminates. In particular, we describe the first in-place subquadratic Monte Carlo solutions to the sparse suffix sorting, sparse LCP array construction, and suffix selection problems. With the sole exception of suffix selection, our algorithms are also the first running in sublinear time for small enough sets of input suffixes. Combining these solutions, we obtain the first sublinear-time Monte Carlo algorithm for building the sparse suffix tree in compact space. We also show how to derandomize our algorithms using small space. This leads to the first Las Vegas in-place algorithm computing the full LCP array in $O(n\log n)$ time and to the first Las Vegas in-place algorithms solving the sparse suffix sorting and sparse LCP array construction problems in $O(n^{1.5}\sqrt{\log σ})$ time. Running times of these Las Vegas algorithms hold in the worst case with high probability.

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

↑