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

实用有效的重新配对压缩

Practical and Effective Re-Pair Compression

Philip Bille, Inge Li Gørtz, Nicola Prezza

摘要:

Re-Pair是一个高效的语法压缩器,它通过递归地用新的语法符号替换高频字符对来运行。对于任何常数$ε>0$,计算Re-Pair的最节省空间的线性时间算法在可重写文本(长度为$n$并且存储在$n$字中)之上使用$(1+ε)n+\sqrt n$字;然而,在实践中,该解决方案使用复杂的子过程,从而使其不实用。在本文中,我们提出了一个实现上述结果利用更实际的解决方案,我们的工具进一步提高了工作空间,$(1.5+ε)n$字(包括文本),一些小常数$ε$。作为第二个贡献,我们专注于紧凑表示的输出语法。存储具有$d$规则的语法的下限是$\log(d!)+2d\approx d\log d+0.557 d$位,并且文献中最有效的编码算法最多使用$d\log d + 2d$位并且在$\mathcal O(d^{1.5})$时间内运行。我们描述了一个线性时间启发式最大限度地压缩输出重新配对语法。在真实的数据集上,我们的语法编码平均只使用比信息理论最小值多$2.8\%$的比特。在一半的测试案例中,我们的压缩器在打开最大压缩率的情况下提高了7-Zip的输出大小。

英文摘要:

Re-Pair is an efficient grammar compressor that operates by recursively replacing high-frequency character pairs with new grammar symbols. The most space-efficient linear-time algorithm computing Re-Pair uses $(1+ε)n+\sqrt n$ words on top of the re-writable text (of length $n$ and stored in $n$ words), for any constant $ε>0$; in practice however, this solution uses complex sub-procedures preventing it from being practical. In this paper, we present an implementation of the above-mentioned result making use of more practical solutions; our tool further improves the working space to $(1.5+ε)n$ words (text included), for some small constant $ε$. As a second contribution, we focus on compact representations of the output grammar. The lower bound for storing a grammar with $d$ rules is $\log(d!)+2d\approx d\log d+0.557 d$ bits, and the most efficient encoding algorithm in the literature uses at most $d\log d + 2d$ bits and runs in $\mathcal O(d^{1.5})$ time. We describe a linear-time heuristic maximizing the compressibility of the output Re-Pair grammar. On real datasets, our grammar encoding uses---on average---only $2.8\%$ more bits than the information-theoretic minimum. In half of the tested cases, our compressor improves the output size of 7-Zip with maximum compression rate turned on.

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

↑