Grammar Boosting: A New Technique for Proving Lower Bounds for Computation over Compressed Data
Rajat De, Dominik Kempa
Abstract
Computation over compressed data is a new paradigm in the design of algorithms and data structures, that can reduce the space usage and speed up the computation by orders of magnitude. One of the most frequently employed compression frameworks, capturing many practical compression methods (such as the Lempel-Ziv family, dictionary methods, and others) is grammar compression. In this framework, a string T of length N is represented as a context-free grammar of size n whose language contains only the string T . In this paper, we focus on studying the limitations of these techniques. Previous work focused on proving lower bounds for algorithms and data structures operating over grammars constructed using algorithms that achieve the approximation ratio ρ = O(polylog N ) (since finding the smallest such grammar is NP-hard, every polynomial time grammar compressor can be viewed as an approximation algorithm). Unfortunately, for the majority of grammar compressors, ρ is either unknown or satisfies ρ = ω(polylog N ): In their seminal paper, Charikar et al. [IEEE Trans. Inf. Theory 2005] studied seven popular grammar compression algorithms: RePair, Greedy, LongestMatch, Sequential, Bisection, LZ78, and α-Balanced. Only one of them (α-Balanced) is known to achieve ρ = O(polylog N ).
In this paper, we develop the first technique for proving lower bounds for data structures and algorithms on grammars that is fully general and does not depend on the approximation ratio ρ of the used grammar compressor. Our first set of results concerns compressed data structures. In 2013, Verbin and Yu proved that implementing random access to T using a grammar constructed by an algorithm with ρ = O(polylog N ) requires Ω(log N/ log log N ) time in the worst case. This lower bound applies to any structure using O(n polylog N ) space and matches the existing upper bounds. We prove that this lower bound holds also for RePair, Greedy, LongestMatch, Sequential, and Bisection, while Ω(log log N ) time is required for random access to LZ78. Our lower bounds apply to any structure using O(n polylog N ) space and match the existing upper bounds. Moreover, our technique generalizes to classes of algorithms. Most notably, we tackle the notoriously hard to analyze class of global algorithms (that includes, e.g., the RePair algorithm) and show that the lower bound Ω(log N/ log log N ) applies to the whole class. This makes a significant step forward in a long-standing open problem of analyzing global algorithms; in the words of Charikar et al.: "Because they are so natural and our understanding is so incomplete, global algorithms are one of the most interesting topics related to the smallest grammar problem that deserves further investigation."
Our second set of results concerns compressed computation, i.e., computation that runs in time that depends on the size of the input in compressed form. Recently, Abboud, Backurs, Bringmann, and Künnemann [FOCS 2017 and NeurIPS 2020] proved numerous limitations of compressed computation under popular conjectures (such as SETH, k-Clique, k-OV, and k-SUM). Similarly as above, however, their framework also displays a dependence on ρ. For example, their results imply that, assuming the Combinatorial k-Clique Conjecture, there is no combinatorial algorithm to solve CFG Parsing (for which the best classical algorithm has a time complexity of O(N 3 )) on grammars constructed using Bisection (which satisfies ρ = Θ(N 1/2 )) that runs in O(n 3 • N ) or O(n 3/2 • N 2 ) time. The same is not known, however, for an algorithm running in O(n 5 • N ) or O(n 3 • N 2 ) time. Using our new techniques, we improve these and other conditional lower bounds. For example, for the CFG parsing on Bisection, we rule out an algorithms with runtime O(n c • N 3-ϵ ) for all constants c > 0 and ϵ > 0.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ae93c093-59d3-43fd-880f-5dcb6f55c5a2Cited by top-tier papers2
- Morphing-based Compression for Data-centric ML PipelinesSebastian Baunsgaard, Matthias BoehmVLDB 2026
- Optimal Random Access and Conditional Lower Bounds for 2D Compressed StringsRajat De, Dominik KempaSODA 2026
Builds on8
- Resolution of the Burrows-Wheeler Transform ConjectureDominik Kempa, Tomasz KociumakaFOCS 2020 · 32 citations
- Impossibility Results for Grammar-Compressed Linear AlgebraAmir Abboud, Arturs Backurs, Karl Bringmann, Marvin KünnemannNeurIPS 2020 · 19 citations
- Improving Matrix-vector Multiplication via Lossless Grammar-Compressed MatricesPaolo Ferragina, Giovanni Manzini, Travis Gagie, Dominik Köppl et al.VLDB 2022 · 17 citations
- An Upper Bound and Linear-Space Queries on the LZ-End ParsingDominik Kempa, Barna SahaSODA 2022 · 12 citations
- Pattern Matching on Grammar-Compressed Strings in Linear TimeMoses Ganardi, Pawel GawrychowskiSODA 2022 · 7 citations
Related papers
- How Compression and Approximation Affect Efficiency in String Distance MeasuresArun Ganesh, Tomasz Kociumaka, Andrea Lincoln, Barna SahaSODA 2022 · 7 citations
- Tight Lower Bounds for Central String Queries in Compressed SpaceDominik Kempa, Tomasz KociumakaSODA 2026
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed SpaceDominik Kempa, Tomasz KociumakaFOCS 2023 · 20 citations
- Locally Consistent Parsing for Text Indexing in Small SpaceOr Birenzwige, Shay Golan, Ely PoratSODA 2020 · 16 citations
- Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix TreesDominik Kempa, Tomasz KociumakaSODA 2023 · 10 citations
