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

语法压缩文本的高效LZ78因子分解

Efficient LZ78 factorization of grammar compressed text

Hideo Bannai, Shunsuke Inenaga, Masayuki Takeda

摘要:

我们提出了一个有效的算法计算LZ78分解的文本,其中的文本表示为一个直线程序(SLP),这是一个上下文无关的语法在乔姆斯基范式,生成一个单一的字符串。给定大小为$n$的SLP表示长度为$N$的文本$S$,我们的算法计算$T$在$O(n\sqrt{N}+m\log N)$时间和$O(n\sqrt{N}+m)$空间中的LZ 78因子分解,其中$m$是产生的LZ 78因子的数量。我们还展示了如何改进算法,使$n\sqrt{N}$长期的时间和空间复杂性成为$nL$,其中$L$是最长的LZ 78因子的长度,或$(N - α)$,其中$α\geq 0$是一个数量,这取决于SLP捕获相对于一定长度的$S$的子串的冗余量。由于$m = O(N/\log_σN)$,其中$σ$是字母表大小,当$σ$是常数时,后者至少与在未压缩字符串上运行的线性时间算法一样快,并且当文本是可压缩的时,即当$m$和$n$很小时,可以更有效。

英文摘要:

We present an efficient algorithm for computing the LZ78 factorization of a text, where the text is represented as a straight line program (SLP), which is a context free grammar in the Chomsky normal form that generates a single string. Given an SLP of size $n$ representing a text $S$ of length $N$, our algorithm computes the LZ78 factorization of $T$ in $O(n\sqrt{N}+m\log N)$ time and $O(n\sqrt{N}+m)$ space, where $m$ is the number of resulting LZ78 factors. We also show how to improve the algorithm so that the $n\sqrt{N}$ term in the time and space complexities becomes either $nL$, where $L$ is the length of the longest LZ78 factor, or $(N - α)$ where $α\geq 0$ is a quantity which depends on the amount of redundancy that the SLP captures with respect to substrings of $S$ of a certain length. Since $m = O(N/\log_σN)$ where $σ$ is the alphabet size, the latter is asymptotically at least as fast as a linear time algorithm which runs on the uncompressed string when $σ$ is constant, and can be more efficient when the text is compressible, i.e. when $m$ and $n$ are small.

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

↑