Papers
Topics
Authors
Recent
Search
2000 character limit reached

Encodings for Range Minimum Queries over Bounded Alphabets

Published 14 Apr 2026 in cs.DS | (2604.13350v1)

Abstract: Range minimum queries (RMQs) are fundamental operations with widespread applications in database management, text indexing and computational biology. While many space-efficient data structures have been designed for RMQs on arrays with arbitrary elements, there has not been any results developed for the case when the alphabet size is small, which is the case in many practical scenarios where RMQ structures are used. In this paper, we investigate the encoding complexity of RMQs on arrays over bounded alphabet. We consider both one-dimensional (1D) and two-dimensional (2D) arrays. For the 1D case, we present a near-optimal space encoding. For constant-sized alphabets, this also supports the queries in constant time. For the 2D case, we systematically analyze the 1-sided, 2-sided, 3-sided and 4-sided queries and derive lower bounds for encoding space, and also matching upper bounds that support efficient queries in most cases. Our results demonstrate that, even with the bounded alphabet restriction, the space requirements remain close to those for the general alphabet case.

Summary

  • 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 σ\sigma, it is shown that the left height of the Cartesian tree is at most σ1\sigma-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)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n) bits. This is only a marginal improvement over the 2nO(logn)2n-O(\log n) 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 σ\sigma, a data structure of size nlog(4cos2(πσ+2))+o(n)n \log (4 \cos^2(\frac{\pi}{\sigma+2})) + o(n) bits can support O(1)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(nσ1)\log {n \choose \sigma-1} bits, which can be optimal and answered in O(1)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×nm \times n arrays comprises queries of the form σ1\sigma-10.

  • Lower and upper bounds match at σ1\sigma-11 bits for general alphabets.
  • For alphabet size σ1\sigma-12, the space drops to σ1\sigma-13, reflecting the constrained combinatorics of bounded-value arrays.

2-Sided Queries

These correspond to σ1\sigma-14 rectangles.

  • For general case, both bounds are σ1\sigma-15 bits.
  • Under alphabet σ1\sigma-16, the lower bound is σ1\sigma-17 bits.
  • The paper constructs matching upper bound data structures using compact encodings of “staircase” answer sets and encoding dominance via lattice paths, supporting σ1\sigma-18 query time when exploiting bounded σ1\sigma-19. Figure 1

    Figure 1: (a) An nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)0 array over an alphabet of size nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)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)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)2 show similarly tight asymptotics:

  • Lower bound: nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)3 bits.
  • Upper bound: nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)4 bits with nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)5 time; optimal for nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)6.

Column-Spanning/Row-Spanning 2-Sided

For queries like nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)7, the structure is even more succinct: nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)8 bits suffice, supporting nlog(4cos2(πσ+2))O(σlogn)n \log (4\cos^2(\frac{\pi}{\sigma+2})) - O(\sigma \log n)9 time queries, with a matching lower bound.

4-Sided Queries

Full rectangular queries 2nO(logn)2n-O(\log n)0 are the most information-rich.

  • Lower bound: 2nO(logn)2n-O(\log n)1 bits if 2nO(logn)2n-O(\log n)2.
  • For constant 2nO(logn)2n-O(\log n)3, the authors implement a block partitioning strategy with precomputed tables and higher-level RMQ on block summaries, yielding 2nO(logn)2n-O(\log n)4 bits with 2nO(logn)2n-O(\log n)5 query time. Figure 2

    Figure 2: (a) Structure of a block of size 2nO(logn)2n-O(\log n)6, showing value placements to maximize possible distinguishable minima in encoding lower bound constructions.

Core Technical Insights

  • For 1D arrays, the reduction in encoding size with bounded alphabet is negligible beyond very small 2nO(logn)2n-O(\log n)7.
  • For 2D arrays, bounded alphabet incurs substantial encoding savings for 1-sided, 2-sided, and 3-sided queries, most pronounced when 2nO(logn)2n-O(\log n)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 2nO(logn)2n-O(\log n)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.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.