Skip to main content
QUICK REVIEW

[论文解读] Finger Search, Random Access, and Longest Common Extensions in Grammar-Compressed Strings.

Philip Bille, Anders Roy Christiansen|arXiv (Cornell University)|Jul 10, 2015
Algorithms and Data Compression参考文献 33被引用 3
一句话总结

本文提出了一类基于文法的新数据结构,可在文法压缩的字符串上实现高效的指纹查找、随机访问和最长公共扩展(LCE)查询。通过为文法引入一种新型的 van Emde Boas 风格分解,实现了次线性的指纹查找时间、次线性空间下的常数时间随机访问以及高效的 LCE 查询,所有情况下均显著优于先前的界限。

ABSTRACT

Grammar-based compression, where one replaces a long string by a small context-free grammar that generates the string, is a simple and powerful paradigm that captures many popular compression schemes. In this paper, we present new representations of grammars that supports efficient finger search style access, random access, and longest common extensions queries. Let $S$ be a string of length $N$ compressed into a context-free grammar $\mathcal{S}$ of size $n$. We present the following. - An $O(n)$ space representation that supports setting a finger at any position $f$ in $O(\log N)$ time, and subsequently supporting access to any position $i$ in time $O(\log |f - i|)$. - An $O(N^\epsilon n^{1-\epsilon})$ space representation that supports random access to any position in constant time. - Two representations that support longest common extensions queries in either $O(N^{\frac{1}{2}+\epsilon} n^{\frac{1}{2}-\epsilon})$ space and $O(1)$ time or $O(n)$ space and $O(\log N + \log^2 \ell)$ time where $\ell$ is the length of the longest common extension. All of the above bounds significantly improve the currently best known results. To achieve the bounds we introduce several new data structural techniques of independent interest, including a new van Emde Boas style decomposition for grammars.

研究动机与目标

  • 设计高效的数据结构以访问和比较文法压缩的字符串。
  • 支持时间复杂度依赖于与指纹位置距离的指纹查找。
  • 实现仅需次线性空间开销的常数时间随机访问。
  • 在时间与空间权衡方面,支持高效的 LCE 查询。
  • 提出适用于文法压缩之外场景的新颖数据结构技术。

提出的方法

  • 为上下文无关文法量身定制一种新型的 van Emde Boas 风格分解,以支持分层访问与分解。
  • 设计一种 $O(n)$ 空间表示,支持从任意指纹位置 $f$ 出发在 $O(\log |f - i|)$ 时间内完成指纹查找。
  • 构建一种 $O(N^\epsilon n^{1-\epsilon})$ 空间表示,实现对字符串中任意位置的常数时间随机访问。
  • 提出两种 LCE 查询结构表示:一种空间复杂度为 $O(N^{\frac{1}{2}+\epsilon} n^{\frac{1}{2}-\epsilon})$,查询时间为 $O(1)$;另一种空间复杂度为 $O(n)$,查询时间为 $O(\log N + \log^2 \ell)$。
  • 利用文法的分层结构,在解析树上高效支持秩(rank)与选择(select)操作。
  • 应用路径标签压缩与文法衍生树上的范围查询,以加速访问与扩展操作。

实验结果

研究问题

  • RQ1是否能够将文法压缩字符串中的指纹查找时间优化为与指纹位置的距离对数相关?
  • RQ2是否可能在次线性空间下实现文法压缩字符串的常数时间随机访问?
  • RQ3是否能够以次线性空间支持常数时间的 LCE 查询?
  • RQ4可以开发哪些新颖的数据结构技术来利用文法压缩字符串的分层特性?
  • RQ5如何将 van Emde Boas 风格分解适配于上下文无关文法,以实现高效的字符串操作?

主要发现

  • 本文仅使用 $O(n)$ 空间,即实现了从任意指纹位置 $f$ 出发的 $O(\log |f - i|)$ 指纹查找时间,优于先前结果。
  • 提出了一种随机访问结构,空间复杂度为 $O(N^\epsilon n^{1-\epsilon})$,查询时间为 $O(1)$,实现了显著的空间-时间权衡。
  • 引入了两种 LCE 查询结构:一种空间复杂度为 $O(N^{\frac{1}{2}+\epsilon} n^{\frac{1}{2}-\epsilon})$,查询时间为 $O(1)$;另一种空间复杂度为 $O(n)$,查询时间为 $O(\log N + \log^2 \ell)$。
  • 所提出的文法 van Emde Boas 风格分解支持高效的分层导航,是实现改进时间界限的关键技术。
  • 所有提出的数据结构在各自操作的时间与空间复杂度方面,均显著优于文法压缩字符串的最优已知结果。
  • 所提出的技术本身具有独立研究价值,可能适用于其他压缩数据结构。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。