Abstract
The two dimensional range minimum query problem is to preprocess a static m by n matrix (two dimensional array) A of size N=m⋅n, such that subsequent queries, asking for the position of the minimum element in a rectangular range within A, can be answered efficiently. We study the trade-off between the space and query time of the problem. We show that every algorithm enabled to access A during the query and using a data structure of size O(N/c) bits requires Ω(c) query time, for any c where 1≤c≤N. This lower bound holds for arrays of any dimension. In particular, for the one dimensional version of the problem, the lower bound is tight up to a constant factor. In two dimensions, we complement the lower bound with an indexing data structure of size O(N/c) bits which can be preprocessed in O(N) time to support O(clog 2 c) query time. For c=O(1), this is the first O(1) query time algorithm using a data structure of optimal size O(N) bits. For the case where queries can not probe A, we give a data structure of size O(N⋅min {m,log n}) bits with O(1) query time, assuming m≤n. This leaves a gap to the space lower bound of Ω(Nlog m) bits for this version of the problem.
Similar content being viewed by others
References
Abouelhoda, M.I., Kurtz, S., Ohlebusch, E.: Replacing suffix trees with enhanced suffix arrays. J. Discrete Algorithms 2(1), 53–86 (2004)
Aho, A., Hopcroft, J., Ullman, J.: On finding lowest common ancestors in trees. In: Proc. 5th Annual ACM Symposium on Theory of Computing, pp. 253–265. ACM, New York (1973)
Alstrup, S., Gavoille, C., Kaplan, H., Rauhe, T.: Nearest common ancestors: a survey and a new distributed algorithm. In: Proc. 14th Annual ACM Symposium on Parallel Algorithms and Architectures, pp. 258–264. ACM, New York (2002)
Amir, A., Fischer, J., Lewenstein, M.: Two-dimensional range minimum queries. In: Proc. 18th Annual Symposium on Combinatorial Pattern Matching. Lecture Notes in Computer Science, vol. 4580, pp. 286–294. Springer, Berlin (2007)
Atallah, M.J., Yuan, H.: Data structures for range minimum queries in multidimensional arrays. In: Proc. 20th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 150–160. SIAM, Philadelphia (2010)
Bender, M., Farach-Colton, M.: The LCA problem revisited. In: Proc. 4th Latin American Theoretical Informatics Symposium. Lecture Notes in Computer Science, vol. 1776, pp. 88–94. Springer, Berlin (2000)
Bender, M.A., Farach-Colton, M., Pemmasani, G., Skiena, S., Sumazin, P.: Lowest common ancestors in trees and directed acyclic graphs. J. Algorithms 57(2), 75–94 (2005)
Bentley, J.L.: Decomposable searching problems. Inf. Process. Lett. 8(5), 244–251 (1979)
Berkman, O., Galil, Z., Schieber, B., Vishkin, U.: Highly parallelizable problems. In: Proc. 21st Annual ACM Symposium on Theory of Computing, pp. 309–319. ACM, New York (1989)
Chazelle, B., Rosenberg, B.: Computing partial sums in multidimensional arrays. In: Proc. 5th Annual Symposium on Computational Geometry, pp. 131–139. ACM, New York (1989)
Chen, G., Puglisi, S.J., Smyth, W.F.: Lempel-Ziv factorization using less time and space. Math. Comput. Sci. 1, 605–623 (2008)
Demaine, E.D., Landau, G.M., Weimann, O.: On Cartesian trees and range minimum queries. In: Proc. 36th International Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 5555, pp. 341–353. Springer, Berlin (2009)
Fischer, J.: Optimal succinctness for range minimum queries. In: Proc. 9th Latin American Theoretical Informatics Symposium. Lecture Notes in Computer Science, vol. 6034, pp. 158–169. Springer, Berlin (2010)
Fischer, J., Heun, V.: Theoretical and practical improvements on the rmq-problem, with applications to lca and lce. In: Proc. 17th Annual Symposium on Combinatorial Pattern Matching. Lecture Notes in Computer Science, vol. 4009, pp. 36–48. Springer, Berlin (2006)
Fischer, J., Heun, V.: A new succinct representation of rmq-information and improvements in the enhanced suffix array. In: Proc. 1st International Symposium on Combinatorics, Algorithms, Probabilistic and Experimental Methodologies. Lecture Notes in Computer Science, vol. 4614, pp. 459–470. Springer, Berlin (2007)
Fischer, J., Mäkinen, V., Navarro, G.: An(other) entropy-bounded compressed suffix tree. In: Proc. 19th Annual Symposium on Combinatorial Pattern Matching. Lecture Notes in Computer Science, vol. 5029, pp. 152–165. Springer, Berlin (2008)
Gabow, H.N., Bentley, J.L., Tarjan, R.E.: Scaling and related techniques for geometry problems. In: Proc. 16th Annual ACM Symposium on Theory of Computing, pp. 135–143. ACM, New York (1984)
Gál, A., Miltersen, P.B.: The cell probe complexity of succinct data structures. Theor. Comput. Sci. 379(3), 405–417 (2007)
Georgiadis, L., Tarjan, R.E.: Finding dominators revisited: extended abstract. In: Proc. 15th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 869–878. SIAM, Philadelphia (2004)
Golynski, A.: Optimal lower bounds for rank and select indexes. Theor. Comput. Sci. 387(3), 348–359 (2007)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)
Iliopoulos, C.S., Crochemore, M., Kubica, M., Rahman, M.S., Walen, T.: Improved algorithms for the range next value problem and applications. In: Proc. 25th International Symposium on Theoretical Aspects of Computer Science. Leibniz International Proceedings in Informatics, vol. 1, pp. 205–216. Schloss Dagstuhl—Leibniz-Zentrum fuer Informatik, Leibniz (2008)
Miltersen, P.B.: Cell probe complexity—a survey. Advances in Data Structures Workshop (Pre-conference Workshop of Foundations of Software Technology and Theoretical Computer Science) (1999). http://www.daimi.au.dk/~bromille/Papers/survey3.ps
Muthukrishnan, S.: Efficient algorithms for document retrieval problems. In: Proc. 13th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 657–666. SIAM, Philadelphia (2002)
Poon, C.K.: Dynamic orthogonal range queries in OLAP. Theory Comput. Syst. 296(3), 487–510 (2003)
Sadakane, K.: Compressed suffix trees with full functionality. Theory Comput. Syst. 41(4), 589–607 (2007)
Sadakane, K.: Succinct data structures for flexible text retrieval systems. J. Discrete Algorithms 5(1), 12–22 (2007)
Saxena, S.: Dominance made simple. Inf. Process. Lett. 109(9), 419–421 (2009)
Schieber, B., Vishkin, U.: On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput. 17(6), 1253–1262 (1988)
Välimäki, N., Mäkinen, V.: Space-efficient algorithms for document retrieval. In: Proc. 18th Annual Symposium on Combinatorial Pattern Matching. Lecture Notes in Computer Science, vol. 4580, pp. 205–215. Springer, Berlin (2007)
Vuillemin, J.: A unifying look at data structures. Commun. ACM 23(4), 229–239 (1980)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Brodal, G.S., Davoodi, P. & Rao, S.S. On Space Efficient Two Dimensional Range Minimum Data Structures. Algorithmica 63, 815–830 (2012). https://doi.org/10.1007/s00453-011-9499-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-011-9499-0