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

压缩空间中用于LCE查询的全动态数据结构

Fully dynamic data structure for LCE queries in compressed space

Takaaki Nishimoto, Tomohiro I, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda

摘要:

对长度为$N$的文本$T$的最长公共扩展(LCE)查询要求从给定的两个位置开始的后缀的最长公共前缀的长度。我们表明,大小为$w = O(\min(z \log N \log^* M, N))$的签名编码$\mathcal{G}$ [Mehlhorn等人,198,1997],其可以被看作是$T$的压缩表示,具有在$O(\log N + \log \ell \log^* M)$时间内支持LCE查询的能力,其中$\ell$是查询的答案,$z$是$T$的Lempel-Ziv 77(LZ 77)因子分解的大小,并且$M \geq 4N$是可以在字RAM模型下在恒定时间内处理的整数。在压缩空间中,这在许多情况下是最快的确定性LCE数据结构。此外,可以增强$\mathcal{G}$以支持高效的更新操作:在$O(w f_{\mathcal{A}})$时间中处理$\mathcal{G}$之后,我们可以在$O((y+ \log N\log^* M) f_{\mathcal{A}})$时间中将长度为$y$的任何(子)字符串插入$T$的任意位置/从$T$的任意位置删除任何(子)字符串,其中$f_{\mathcal{A}} = O(\min \{ \frac{\log\log M \log\log w}{\log\log\log M}, \sqrt{\frac{\log w}{\log\log w}} \})$。这产生第一完全动态LCE数据结构。我们还提出了有效的建设算法,从各种类型的输入:我们可以构建$\mathcal{G}$在$O(N f_{\mathcal{A}})$时间从未压缩的字符串$T$ ;在$O(n \log\log n \log N \log^* M)$时间从语法压缩字符串$T$表示的一个直线程序的大小$n$ ;并在$O(z f_{\mathcal{A}} \log N \log^* M)$时间从LZ 77压缩字符串$T$与$z$因素。在上面的贡献,我们展示了几个应用程序,我们的数据结构,提高以前最知名的结果,语法压缩字符串处理。

英文摘要:

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.

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

↑