Skip to main content
QUICK REVIEW

[论文解读] Fully dynamic data structure for LCE queries in compressed space

Hideo Bannai, I, Tomohiro|arXiv (Cornell University)|May 5, 2016
Algorithms and Data Compression参考文献 22被引用 21
一句话总结

该论文提出了首个在压缩空间中运行的完全动态最长公共扩展(LCE)数据结构,采用签名编码 G,其大小为 w = O(min(z log N log∗M, N)),支持 O(log N + log ℓ log∗M) 时间的 LCE 查询,以及 O((y + log N log∗M)fA) 时间的更新操作(插入/删除),其中 z 为 LZ77 分解的大小,ℓ 为 LCE 结果,fA 为前驱查询时间。该结构实现了对语法压缩字符串的高效处理,显著提升了构造与查询性能。

ABSTRACT

A Longest Common Extension (LCE) query on a text $T$ of length $N$ asks for the length of the longest common prefix of suffixes starting at given two positions. We show that the signature encoding $\mathcal{G}$ of size $w = O(\min(z \log N \log^* M, N))$ [Mehlhorn et al., Algorithmica 17(2):183-198, 1997] of $T$, which can be seen as a compressed representation of $T$, has a capability to support LCE queries in $O(\log N + \log \ell \log^* M)$ time, where $\ell$ is the answer to the query, $z$ is the size of the Lempel-Ziv77 (LZ77) factorization of $T$, and $M \geq 4N$ is an integer that can be handled in constant time under word RAM model. In compressed space, this is the fastest deterministic LCE data structure in many cases. Moreover, $\mathcal{G}$ can be enhanced to support efficient update operations: After processing $\mathcal{G}$ in $O(w f_{\mathcal{A}})$ time, we can insert/delete any (sub)string of length $y$ into/from an arbitrary position of $T$ in $O((y+ \log N\log^* M) f_{\mathcal{A}})$ time, where $f_{\mathcal{A}} = O(\min \{ \frac{\log\log M \log\log w}{\log\log\log M}, \sqrt{\frac{\log w}{\log\log w}} \})$. This yields the first fully dynamic LCE data structure. We also present efficient construction algorithms from various types of inputs: We can construct $\mathcal{G}$ in $O(N f_{\mathcal{A}})$ time from uncompressed string $T$; in $O(n \log\log n \log N \log^* M)$ time from grammar-compressed string $T$ represented by a straight-line program of size $n$; and in $O(z f_{\mathcal{A}} \log N \log^* M)$ time from LZ77-compressed string $T$ with $z$ factors. On top of the above contributions, we show several applications of our data structures which improve previous best known results on grammar-compressed string processing.

研究动机与目标

  • 设计一个在压缩空间中运行的完全动态 LCE 数据结构,克服静态或非压缩动态结构的局限性。
  • 支持通过签名编码表示的高度可压缩字符串的高效 LCE 查询与更新操作(插入/删除)。
  • 通过利用签名编码,改进语法压缩与 LZ77 压缩字符串的构造时间与空间效率。
  • 在压缩字符串处理的实际应用中进行演示,如回文检测与模式匹配,实现更优的时间复杂度。

提出的方法

  • 论文使用签名编码 G 作为文本 T 的压缩表示,其来源为 LZ77 分解或直线程序(SLPs),大小为 w = O(min(z log N log∗M, N))。
  • 通过在 G 上利用前驱/后继数据结构支持 LCE 查询,结合对反转字符串的 LCP 与 LCS 查询,实现 O(log N + log ℓ log∗M) 的查询时间。
  • 通过将插入与删除视为对签名编码的编辑操作,利用具有查询时间 fA 的动态前驱数据结构支持更新操作。
  • 构造过程结合了对 SLP 及其反转字符串的 LCP 与 LCS 查询,并通过在 lcp 数组上预处理常数时间 RMQ 结构进行优化。
  • 从模式构建一个压缩的 tries(PTree),通过引入层级祖先与二分查找支持高效的前缀查询。
  • 算法以流式方式处理 T,维护一个签名 p 与长度 l,以追踪 T[1..j] 的最长后缀,使其成为任意模式的前缀,通过与 p 的 LCE 比较来验证模式前缀。

实验结果

研究问题

  • RQ1能否设计一个完全动态的 LCE 数据结构,在压缩空间中运行,同时支持高效的查询与更新?
  • RQ2如何利用签名编码实现比现有随机化或非压缩结构更快的确定性 LCE 查询?
  • RQ3从各种压缩字符串表示(包括 SLP 与 LZ77)中,签名编码的最优构造时间是什么?
  • RQ4签名编码框架能否扩展以支持高效的动态模式匹配,并高效输出模式出现的位置?
  • RQ5在压缩的动态数据结构中,如何有效管理动态更新过程中的垃圾积累问题?

主要发现

  • 签名编码 G 支持 O(log N + log ℓ log∗M) 时间的 LCE 查询,当 log∗M = o(log ℓ) 时,该性能优于 Bille 等人 [6] 提出的最优随机化数据结构,而该条件在许多实际场景中成立。
  • 论文首次提出在压缩空间中运行的完全动态 LCE 数据结构,插入/删除长度为 y 的子串的更新时间为 O((y + log N log∗M)fA)。
  • 从长度为 N 的未压缩字符串 T 构造该结构的时间为 O(NfA),空间复杂度为 O(w),显著优于以往需要 O(N) 时间或更多的方法。
  • 从大小为 z 的 LZ77 压缩字符串构造的时间为 O(zfA log N log∗M),从大小为 n 的 SLP 构造的时间为 O(n log log(n log∗M) log N log∗M),空间复杂度为 O(n log∗M + w)。
  • 该框架支持改进的模式匹配:报告所有模式出现位置的时间为 O(|T| log m log N log∗M + occ),每个位置的处理时间为 O(log m + occ)。
  • 通过使用反转模式 trie(RPTree),方法可支持按结束位置输出模式,时间与空间复杂度与原始算法保持一致。

更好的研究,从现在开始

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

无需绑定信用卡

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