Optimal Random Access and Conditional Lower Bounds for 2D Compressed Strings
Rajat De, Dominik Kempa
Abstract
Compressed indexing is a powerful technique that enables efficient querying over data stored in compressed form, significantly reducing memory usage and often accelerating computation. While extensive progress has been made for one-dimensional strings, many real-world datasets (such as images, maps, and adjacency matrices) are inherently two-dimensional and highly compressible. Unfortunately, naively applying 1D techniques to 2D data leads to suboptimal results, as fundamental structural repetition is lost during linearization. This motivates the development of native 2D compressed indexing schemes that preserve both compression and query efficiency.
We present three main contributions that advance the theory of compressed indexing for 2D strings:
• We design the first data structure that supports optimal-time random access to a 2D string compressed by a 2D grammar. Specifically, for a 2D string T ∈ Σ r×c compressed by a 2D grammar G and any constant ϵ > 0, we achieve O log n log log n query time and O(|G| • log 2+ϵ n) space, where n = max(r, c).
• We prove conditional lower bounds for pattern matching over 2D-grammar compressed strings.
Assuming the Orthogonal Vectors Conjecture, no algorithm can solve this problem in time O(|G| 2-ϵ • |P | O( 1) ) for any ϵ > 0, demonstrating a separation from the 1D case, where optimal solutions exist.
• We show that several fundamental 2D queries, such as the 2D longest common extension, rectangle sum, and equality, cannot be supported efficiently under hardness assumptions for rank and symbol occurrence queries on 1D grammar-compressed strings. This is the first evidence connecting the complexity of 2D compressed indexing to long-standing open problems in the 1D setting.
In summary, our results provide both algorithmic advances and conditional hardness results for 2D compressed indexing, narrowing the gap between one-and two-dimensional settings and identifying critical barriers that must be overcome for further progress.
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 f1dc5de5-3d13-4a2d-a5de-8cea347bd625Builds on10
- Resolution of the Burrows-Wheeler Transform ConjectureDominik Kempa, Tomasz KociumakaFOCS 2020 · 32 citations
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed SpaceDominik Kempa, Tomasz KociumakaFOCS 2023 · 20 citations
- An Upper Bound and Linear-Space Queries on the LZ-End ParsingDominik Kempa, Barna SahaSODA 2022 · 12 citations
- Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix TreesDominik Kempa, Tomasz KociumakaSODA 2023 · 10 citations
- Pattern Matching on Grammar-Compressed Strings in Linear TimeMoses Ganardi, Pawel GawrychowskiSODA 2022 · 7 citations
Related papers
- Grammar Boosting: A New Technique for Proving Lower Bounds for Computation over Compressed DataRajat De, Dominik KempaSODA 2024 · 2 citations
- Tight Lower Bounds for Central String Queries in Compressed SpaceDominik Kempa, Tomasz KociumakaSODA 2026
- How Compression and Approximation Affect Efficiency in String Distance MeasuresArun Ganesh, Tomasz Kociumaka, Andrea Lincoln, Barna SahaSODA 2022 · 7 citations
- Near-Optimal Quantum Algorithms for Bounded Edit Distance and Lempel-Ziv FactorizationDaniel Gibney, Ce Jin, Tomasz Kociumaka, Sharma V. ThankachanSODA 2024 · 7 citations
- A Lower Bound for Jumbled IndexingPeyman Afshani, Ingo van Duijn, Rasmus Killmann, Jesper Sindahl NielsenSODA 2020 · 6 citations
