Algorithmica

, Volume 63, Issue 4, pp 815–830 | Cite as

On Space Efficient Two Dimensional Range Minimum Data Structures

  • Gerth Stølting Brodal
  • Pooya Davoodi
  • S. Srinivasa Rao
Article

Abstract

The two dimensional range minimum query problem is to preprocess a static m by n matrix (two dimensional array) A of size N=mn, 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≤cN. 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 mn. This leaves a gap to the space lower bound of Ω(Nlog m) bits for this version of the problem.

Keywords

Range minimum query Cartesian tree Time-space trade-off Indexing model Encoding model 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abouelhoda, M.I., Kurtz, S., Ohlebusch, E.: Replacing suffix trees with enhanced suffix arrays. J. Discrete Algorithms 2(1), 53–86 (2004) MathSciNetMATHCrossRefGoogle Scholar
  2. 2.
    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) CrossRefGoogle Scholar
  3. 3.
    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) Google Scholar
  4. 4.
    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) CrossRefGoogle Scholar
  5. 5.
    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) Google Scholar
  6. 6.
    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) Google Scholar
  7. 7.
    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) MathSciNetMATHCrossRefGoogle Scholar
  8. 8.
    Bentley, J.L.: Decomposable searching problems. Inf. Process. Lett. 8(5), 244–251 (1979) MathSciNetMATHCrossRefGoogle Scholar
  9. 9.
    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) Google Scholar
  10. 10.
    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) CrossRefGoogle Scholar
  11. 11.
    Chen, G., Puglisi, S.J., Smyth, W.F.: Lempel-Ziv factorization using less time and space. Math. Comput. Sci. 1, 605–623 (2008) MathSciNetMATHCrossRefGoogle Scholar
  12. 12.
    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) CrossRefGoogle Scholar
  13. 13.
    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) Google Scholar
  14. 14.
    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) CrossRefGoogle Scholar
  15. 15.
    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) CrossRefGoogle Scholar
  16. 16.
    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) CrossRefGoogle Scholar
  17. 17.
    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) Google Scholar
  18. 18.
    Gál, A., Miltersen, P.B.: The cell probe complexity of succinct data structures. Theor. Comput. Sci. 379(3), 405–417 (2007) MATHCrossRefGoogle Scholar
  19. 19.
    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) Google Scholar
  20. 20.
    Golynski, A.: Optimal lower bounds for rank and select indexes. Theor. Comput. Sci. 387(3), 348–359 (2007) MathSciNetMATHCrossRefGoogle Scholar
  21. 21.
    Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984) MathSciNetMATHCrossRefGoogle Scholar
  22. 22.
    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) Google Scholar
  23. 23.
    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
  24. 24.
    Muthukrishnan, S.: Efficient algorithms for document retrieval problems. In: Proc. 13th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 657–666. SIAM, Philadelphia (2002) Google Scholar
  25. 25.
    Poon, C.K.: Dynamic orthogonal range queries in OLAP. Theory Comput. Syst. 296(3), 487–510 (2003) MathSciNetMATHCrossRefGoogle Scholar
  26. 26.
    Sadakane, K.: Compressed suffix trees with full functionality. Theory Comput. Syst. 41(4), 589–607 (2007) MathSciNetMATHCrossRefGoogle Scholar
  27. 27.
    Sadakane, K.: Succinct data structures for flexible text retrieval systems. J. Discrete Algorithms 5(1), 12–22 (2007) MathSciNetMATHCrossRefGoogle Scholar
  28. 28.
    Saxena, S.: Dominance made simple. Inf. Process. Lett. 109(9), 419–421 (2009) MATHCrossRefGoogle Scholar
  29. 29.
    Schieber, B., Vishkin, U.: On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput. 17(6), 1253–1262 (1988) MathSciNetMATHCrossRefGoogle Scholar
  30. 30.
    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) CrossRefGoogle Scholar
  31. 31.
    Vuillemin, J.: A unifying look at data structures. Commun. ACM 23(4), 229–239 (1980) MathSciNetMATHCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2011

Authors and Affiliations

  • Gerth Stølting Brodal
    • 1
  • Pooya Davoodi
    • 1
  • S. Srinivasa Rao
    • 2
  1. 1.MADALGO (Center for Massive Data Algorithmics, a Center of the Danish National Research Foundation), Department of Computer ScienceAarhus UniversityAarhus NDenmark
  2. 2.School of Computer Science and EngineeringSeoul National UniversitySeoulSouth Korea

Personalised recommendations