- The paper establishes tight lower and upper bounds for RMQ encodings in both one-dimensional and two-dimensional arrays under bounded alphabets.
- It shows that while bounded alphabets yield minimal gains in 1D RMQs, they provide significant space savings for multidimensional queries through novel combinatorial and block-based techniques.
- The study introduces practical data structures that support constant or logarithmic query times, impacting applications in text indexing, databases, and computational biology.
Succinct Encodings for Range Minimum Queries over Bounded Alphabets
Introduction and Motivation
Range Minimum Queries (RMQs) are a core primitive in a wide array of algorithmic fields, including succinct data structures, text indexing, and computational biology. Historically, RMQ has been extensively studied for arbitrary alphabets, but practical applications often involve bounded (but non-binary) alphabets, such as rankings or quantized attributes. This work addresses the encoding complexity of RMQs under the bounded alphabet model, providing both tight lower and upper bounds for one-dimensional (1D) and two-dimensional (2D) arrays, and considering multiple types of query ranges in 2D.
The study carefully delineates the distinction between encoding data structures (which do not retain the original input) and traditional indexing data structures, focusing on the minimum space required to support all valid RMQ queries. The investigation encompasses both the base case (1D) and higher dimensions, with particular attention to how much the bounded alphabet restriction allows practical gains, and for which queries.
One-Dimensional RMQ: Bit Complexity under Bounded Alphabets
The 1D RMQ problem is deeply linked to the structure of Cartesian trees, and the cardinality of such trees becomes the key to establishing encoding lower bounds. For alphabet size σ, it is shown that the left height of the Cartesian tree is at most σ−1, and recent advances in enumerating compacted binary trees with bounded height allow the derivation of a tight lower bound.
Lower Bound: Any RMQ encoding must use at least nlog(4cos2(σ+2π))−O(σlogn) bits. This is only a marginal improvement over the 2n−O(logn) bits required for arbitrary alphabets, demonstrating that bounded alphabets help minimally for 1D RMQ unless the alphabet is very small (e.g., binary or ternary).
Upper Bound: For constant σ, a data structure of size nlog(4cos2(σ+2π))+o(n) bits can support O(1)-time queries, matching the lower bound up to lower order terms.
In the 1-sided case (prefix queries), the encoding can be achieved in log(σ−1n) bits, which can be optimal and answered in O(1) time using succinct bitvector techniques.
Two-Dimensional RMQ: Query Types and Encoding Bounds
In 2D, the query landscape is richer, with the literature and this paper identifying four natural classes: 1-sided, 2-sided, 3-sided, and 4-sided queries. The authors develop a systematic framework for deriving upper and lower bounds for each case, for both general and bounded alphabets.
1-Sided Queries
A 1-sided RMQ in m×n arrays comprises queries of the form σ−10.
- Lower and upper bounds match at σ−11 bits for general alphabets.
- For alphabet size σ−12, the space drops to σ−13, reflecting the constrained combinatorics of bounded-value arrays.
2-Sided Queries
These correspond to σ−14 rectangles.
- For general case, both bounds are σ−15 bits.
- Under alphabet σ−16, the lower bound is σ−17 bits.
- The paper constructs matching upper bound data structures using compact encodings of “staircase” answer sets and encoding dominance via lattice paths, supporting σ−18 query time when exploiting bounded σ−19.
Figure 1: (a) An nlog(4cos2(σ+2π))−O(σlogn)0 array over an alphabet of size nlog(4cos2(σ+2π))−O(σlogn)1, with green positions forming staircases for each value, and associated lattice paths (red and gray lines). (b) Example lattice paths in a restricted region, corresponding to possible answer sets.
3-Sided Queries
Queries of the form nlog(4cos2(σ+2π))−O(σlogn)2 show similarly tight asymptotics:
- Lower bound: nlog(4cos2(σ+2π))−O(σlogn)3 bits.
- Upper bound: nlog(4cos2(σ+2π))−O(σlogn)4 bits with nlog(4cos2(σ+2π))−O(σlogn)5 time; optimal for nlog(4cos2(σ+2π))−O(σlogn)6.
Column-Spanning/Row-Spanning 2-Sided
For queries like nlog(4cos2(σ+2π))−O(σlogn)7, the structure is even more succinct: nlog(4cos2(σ+2π))−O(σlogn)8 bits suffice, supporting nlog(4cos2(σ+2π))−O(σlogn)9 time queries, with a matching lower bound.
4-Sided Queries
Full rectangular queries 2n−O(logn)0 are the most information-rich.
Core Technical Insights
- For 1D arrays, the reduction in encoding size with bounded alphabet is negligible beyond very small 2n−O(logn)7.
- For 2D arrays, bounded alphabet incurs substantial encoding savings for 1-sided, 2-sided, and 3-sided queries, most pronounced when 2n−O(logn)8.
- The methods pivot on counting and encoding valid staircase/answer positions, leveraging properties of Cartesian and compacted trees in 1D, and lattice path combinatorics in 2D.
- Block-based and hierarchical approaches are pivotal to achieving 2n−O(logn)9 query time in high-dimensional, constant-alphabet settings, despite the information-theoretic lower bound matching the naive representation size in asymptotics for larger alphabets.
Implications and Future Directions
Theoretical:
This work establishes near-tight lower and upper bounds for the space required by RMQ encoding structures over bounded alphabets, clarifying the circumstances under which restricting the alphabet provides meaningful asymptotic savings. For 1D, even small alphabets provide only limited savings, but in higher dimensions and for some query classes, the complexity of the answer space can be significantly reduced by alphabet constraints.
Practical:
In implementations needing fast queries and space efficiency on quantized or categorical data (e.g., in databases, bioinformatics, text indices), these findings may guide developers toward parameter choices that trade off preprocessing and space optimizations. Especially, practitioners should recognize that only for very small alphabets and for multidimensional/partial-prefix queries do space gains become substantial.
Future Work:
This line of research suggests several fruitful directions, including compressed representations tailored to empirically compressible matrices, or exploring how alternative tie-breaking rules (such as rightmost or random) could alter the upper bounds for RMQs (as is the case in nearest-larger-value encodings). Another promising avenue would be universal compressed encodings parameterized jointly by the entropy of the input data and the structure of minima.
Conclusion
This work offers a comprehensive and fine-grained characterization of the space complexity for RMQ encodings on arrays with bounded alphabets, matching lower and upper bounds across several query classes and alphabet size regimes. The findings supply explicit data structures with optimal or near-optimal bit usage and efficient query time, and refine our understanding of the limits of succinctness in both theory and practice for foundational query problems.