English

Near-Optimal and Efficient Encoding for Two-Dimensional Range Minimum Queries

Data Structures and Algorithms 2026-07-05 v1

Abstract

We consider the 2D RMQ encoding problem: given an m×nm\times n array of mnmn elements over a total order, encode it such that, for any query rectangle, the position of its maximum element can be reported without accessing the original array. For mnm \le n, it is known how to encode the array in O(mnmin{m,logn})O(mn \min\{m, \log n\}) bits with O(1)O(1)-time queries [Brodal et al., Algorithmica 2012], and also how to obtain an asymptotically optimal encoding consisting of O(mnlogm)O(mn \log m) bits [Brodal et al., ESA 2013]. However, the latter approach does not prove any guarantee on the query time, and it appears to be inherently sequential: it requires scanning the whole encoding to answer a query. We design a different encoding that uses near-optimal space while allowing for efficient queries. More concretely, for every parameter κ[1,loglogn]\kappa\in[1, \log\log n], our encoding uses O(κmn(logm+loglogn))O(\kappa mn(\log m+\log\log n)) bits and answers 2D RMQ queries in O(log1/κn)O(\log^{1/\kappa}n) time.

Cite

@article{arxiv.2607.04509,
  title  = {Near-Optimal and Efficient Encoding for Two-Dimensional Range Minimum Queries},
  author = {Paweł Gawrychowski and Adam Górkiewicz and Srinivasa Rao Satti},
  journal= {arXiv preprint arXiv:2607.04509},
  year   = {2026}
}

Comments

to appear in ESA 2026