关于有序句法分析的逼近比
On the Approximation Ratio of Ordered Parsings
摘要:
香农熵是统计压缩的一个明确的下限。对于基于字典的压缩来说,这种情况还没有得到很好的理解。一个合理的下限是$b$,这是文本的一般双向解析的最少短语数量,其中短语可以从文本中的任何其他地方复制。由于计算$b$是NP完全的,所以流行的黄金标准是$z$,即文本的Lempel-Ziv解析中的短语数量,当短语只能从左边复制时,这是最佳的。虽然$z$可以用贪婪算法在线性时间内计算,但几十年来几乎不知道它相对于$b$的近似比。在本文中,我们证明了$z=O(b\log(n/b))$,其中$n$是文本长度。我们还表明,绑定是紧作为$n$的函数,通过展示一个文本家庭,其中$z = Ω(b\log n)$。我们的上界是通过建立一个运行长度上下文无关的语法的基础上,本地一致的分析文本。我们的下界是通过将$b$与$r$(文本的Burrows-Wheeler变换中的等字母运行数)联系起来得到的。我们继续观察Lempel-Ziv只是贪婪解析的一个特殊情况,这意味着$z$的最佳值是通过扫描文本并在每一步最大化短语长度来获得的,而有序解析意味着短语和它们的源之间有一个递增的顺序。作为有序贪婪解析的一个新例子,我们引入了{ \em lexicographical}解析,其中短语只能从词典中较小的文本位置复制。我们证明了最佳词典分析的大小$v$也是在$O(n)$时间内获得的,即$v=O(b\log(n/b))$,并且存在一个文本族,其中$v = Ω(b\log n)$。
英文摘要:
Shannon's entropy is a clear lower bound for statistical compression. The situation is not so well understood for dictionary-based compression. A plausible lower bound is $b$, the least number of phrases of a general bidirectional parse of a text, where phrases can be copied from anywhere else in the text. Since computing $b$ is NP-complete, a popular gold standard is $z$, the number of phrases in the Lempel-Ziv parse of the text, which is the optimal one when phrases can be copied only from the left. While $z$ can be computed in linear time with a greedy algorithm, almost nothing has been known for decades about its approximation ratio with respect to $b$. In this paper we prove that $z=O(b\log(n/b))$, where $n$ is the text length. We also show that the bound is tight as a function of $n$, by exhibiting a text family where $z = Ω(b\log n)$. Our upper bound is obtained by building a run-length context-free grammar based on a locally consistent parsing of the text. Our lower bound is obtained by relating $b$ with $r$, the number of equal-letter runs in the Burrows-Wheeler transform of the text. We proceed by observing that Lempel-Ziv is just one particular case of greedy parses, meaning that the optimal value of $z$ is obtained by scanning the text and maximizing the phrase length at each step, and of ordered parses, meaning that there is an increasing order between phrases and their sources. As a new example of ordered greedy parses, we introduce {\em lexicographical} parses, where phrases can only be copied from lexicographically smaller text locations. We prove that the size $v$ of the optimal lexicographical parse is also obtained greedily in $O(n)$ time, that $v=O(b\log(n/b))$, and that there exists a text family where $v = Ω(b\log n)$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。