Hardness of Frequency-Related Queries on Compressed Strings
Abstract
Compressed indexing aims to support fundamental string queries in space proportional to compressed input size. For grammar compression, a length- string represented by a grammar of size can support random access in space and time, and the same bounds are known for many other queries, including pattern matching, longest common extension, lexicographic predecessor/successor, the Burrows-Wheeler transform, suffix arrays, and suffix trees. Frequency-related queries remain less understood. These include rank queries, which report the number of occurrences of a symbol in a substring , and symbol occurrence queries, which ask whether occurs in . No fully general data structure is known for these queries with space and query time. We establish new conditional lower bounds for such problems. First, we show that answering rank and symbol occurrence queries on grammar-compressed texts in polylogarithmic time using an -space structure constructible in time would imply an -time algorithm for Boolean Matrix Multiplication. The proof uses a more general lower bound for efficiently answering a batch of such queries. Second, we extend the exact lower bounds from straight-line programs to LZ78-compressed strings, a weaker compression model. Third, independently, we show that even additive approximations of rank queries on straight-line grammars would imply faster Boolean Matrix Multiplication algorithms. Finally, assuming the Orthogonal Vectors conjecture, we show that other frequency-related problems, including range distinct counting and range mode frequency, also cannot be efficiently supported in compressed space.
Cite
@article{arxiv.2607.07366,
title = {Hardness of Frequency-Related Queries on Compressed Strings},
author = {Rajat De and Dominik Kempa},
journal= {arXiv preprint arXiv:2607.07366},
year = {2026}
}
Comments
Full version of an ESA 2026 paper