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

文法压缩的熵界

Entropy bounds for grammar compression

Michał Gańczorz

摘要:

语法压缩将字符串表示为上下文无关文法。实现压缩需要将这种语法编码为二进制字符串;有几种常用的编码。本文对几种常用的压缩方法,包括\RePair和\Greedy算法的编码大小进行了限制:\RePair的标准编码结合了熵编码和文法的特殊编码,实现了$1.5|S|H_k(S)$,其中$H_k(S)$是$S$的$k$阶熵。我们还表明,通过停止一些迭代后,我们可以实现$|S|H_k(S)$。这是特别有趣的,因为它解释了在实践中观察到的一个现象:引入太多的非终结符会导致比特大小的增长。我们将我们的方法推广到其他压缩方法,如\Greedy和广泛的一类不可约文法,以及其他实际使用的位编码(包括天真,它使用固定长度的代码)。我们的方法不仅证明了边界,但也部分地解释了为什么\Greedy和\RePair是更好地在实践中比其他基于语法的方法。在某些情况下,我们认为我们的估计是最优的。在我们的分析中使用的工具是独立的利益:我们证明了新的,最佳的,边界上的零阶熵解析的字符串。

英文摘要:

Grammar compression represents a string as a context free grammar. Achieving compression requires encoding such grammar as a binary string; there are a few commonly used encodings. We bound the size of practically used encodings for several heuristical compression methods, including \RePair and \Greedy algorithms: the standard encoding of \RePair, which combines entropy coding and special encoding of a grammar, achieves $1.5|S|H_k(S)$, where $H_k(S)$ is $k$-th order entropy of $S$. We also show that by stopping after some iteration we can achieve $|S|H_k(S)$. This is particularly interesting, as it explains a phenomenon observed in practice: introducing too many nonterminals causes the bit-size to grow. We generalize our approach to other compression methods like \Greedy and a wide class of irreducible grammars as well as to other practically used bit encodings (including naive, which uses fixed-length codes). Our approach not only proves the bounds but also partially explains why \Greedy and \RePair are much better in practice than other grammar based methods. In some cases we argue that our estimations are optimal. The tools used in our analysis are of independent interest: we prove the new, optimal, bounds on the zeroth order entropy of parsing of a string.

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

↑