arXiv:1803.09517

Paper record

W2794582549

On the Approximation Ratio of Ordered Parsings

Gonzalo Navarro, Carlos Ochoa, Nicola Prezza

Year
2020
Venue
IEEE Transactions on Information Theory
References
60
Cited by
50

Details and counts from OpenAlex.

Abstract

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 isb\boldsymbol {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 computingb\boldsymbol {b}is NP-complete, a popular gold standard isz\boldsymbol {z}, the number of phrases in the Lempel-Ziv parse of the text, which is computed in linear time and yields the least number of phrases when those can be copied only from the left. Almost nothing has been known for decades about the approximation ratio ofz\boldsymbol {z}with respect tob\boldsymbol {b}. In this paper we prove thatz=O(blog⁡(n/b))z=O(b\log (n/b)), wherennis the text length. We also show that the bound is tight as a function ofnn, by exhibiting a text family wherez=Ω(blog⁡n)z = \Omega (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 relatingb\boldsymbol {b}withrr, the number of equal-letter runs in the Burrows-Wheeler transform of the text. We continue by observing that Lempel-Ziv is just one particular case ofgreedyparses–meaning that it obtains the smallest parse by scanning the text and maximizing the phrase length at each step–, and oforderedparses–meaning that phrases are larger than their sources under some order. As a new example of ordered greedy parses, we introducelexicographicalparses, where phrases can only be copied from lexicographically smaller text locations. We prove that the sizevvof the optimal lexicographical parse is also obtained greedily inO(n)O(n)time, thatv=O(blog⁡(n/b))v=O(b\log (n/b)), and that there exists a text family wherev=Ω(blog⁡n)v = \Omega (b\log n). Interestingly, we also show thatv=O(r)v = O(r)becauserralso induces a lexicographical parse, whereasz=Ω(rlog⁡n)z = \Omega (r\log n)holds on some text families. We obtain some results on parsing complexity and size that hold on some general classes of greedy ordered parses. In our way, we also prove other relevant bounds between compressibility measures, especially with those related to smallest grammars of various types generating (only) the text.