Skip to main content

I/O-Efficient Range Minima Queries

  • Conference paper
Algorithm Theory – SWAT 2014 (SWAT 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8503))

Included in the following conference series:

Abstract

In this paper we study the offline (batched) range minima query (RMQ) problem in the external memory (EM) and cache-oblivious (CO) models. In the static RMQ problem, given an array A, a query rmq A (i,j) returns the smallest element in the range A[i,j].

If B is the size of the block and m is the number of blocks that fit in the internal memory in the EM and CO models, we show that Q range minima queries on an array of size N can be answered in O\(({{{N}\over{B}} + {{Q}\over{B}}\log_{m}{{Q}\over{B}}}) = {\rm O}{({\rm scan}({N}) + {\rm sort}({Q}))}\) I/Os in the CO model and slightly better O\(({{\rm scan}({N}) + {{Q}\over{B}} \log_m \min\{{{Q}\over{B}}, {{N}\over{B}}\}})\) I/Os in the EM model and linear space in both models. Our cache-oblivious result is new and our external memory result is an improvement of the previously known bound. We also show that the EM bound is tight by proving a matching lower bound. Our lower bound holds even if the queries are presorted in any predefined order.

In the batched dynamic RMQ problem, the queries must be answered in the presence of the updates (insertions/deletions) to the array. We show that in the EM model we can solve this problem in O\(({{\rm sort}({N}) + {\rm sort}{Q}\log_m {{N}\over{B}}})\) I/Os, again improving the best previously known bound.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. Communications of the ACM 31, 1116–1127 (1988)

    Article  MathSciNet  Google Scholar 

  2. Arge, L., Fischer, J., Sanders, P., Sitchinava, N.: On (dynamic) range minimum queries in external memory. In: Dehne, F., Solis-Oba, R., Sack, J.-R. (eds.) WADS 2013. LNCS, vol. 8037, pp. 37–48. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  3. Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Proc. 4th Latin American Theoretical Informatics Symposium, pp. 88–94 (2000)

    Google Scholar 

  4. Brodal, G.S., Fagerberg, R.: Cache oblivious distribution sweeping. In: Proc. 29th International Colloquium on Automata, Languages, and Programming, pp. 426–438 (2002)

    Google Scholar 

  5. Chiang, Y.J., Goodrich, M.T., Grove, E.F., Tamassia, R., Vengroff, D.E., Vitter, J.S.: External-memory graph algorithms. In: Proc. 6th ACM/SIAM Symposium on Discrete Algorithms, pp. 139–149 (1995)

    Google Scholar 

  6. Demaine, E.D., Landau, G.M., Weimann, O.: On cartesian trees and range minimum queries. Algorithmica 68(3), 610–625 (2014)

    Article  MathSciNet  Google Scholar 

  7. Fischer, J., Heun, V.: Space-efficient preprocessing schemes for range minimum queries on static arrays. SIAM Journal on Computing 40(2), 465–492 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  8. Fischer, J.: Optimal succinctness for range minimum queries. In: Proc. 9th Latin American Theoretical Informatics Symposium, pp. 158–169 (2010)

    Google Scholar 

  9. Frigo, M., Leiserson, C.E., Prokop, H., Ramachandran, S.: Cache-oblivious algorithms. In: Proc. 40th IEEE Symposium on Foundations of Computer Science, pp. 285–297 (1999)

    Google Scholar 

  10. Gabow, H.N., Bentley, J.L., Tarjan, R.E.: Scaling and related techniques for geometry problems. In: Proc. 16th ACM Symposium on Theory of Computation, pp. 135–143 (1984)

    Google Scholar 

  11. Hasan, M., Moosa, T.M., Rahman, M.S.: Cache oblivious algorithms for the RMQ and the RMSQ problems. Mathematics in Computer Science 3(4), 433–442 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  12. Vuillemin, J.: A unifying look at data structures. Comm. ACM 23(4), 229–239 (1980)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Afshani, P., Sitchinava, N. (2014). I/O-Efficient Range Minima Queries. In: Ravi, R., Gørtz, I.L. (eds) Algorithm Theory – SWAT 2014. SWAT 2014. Lecture Notes in Computer Science, vol 8503. Springer, Cham. https://doi.org/10.1007/978-3-319-08404-6_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-08404-6_1

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-08403-9

  • Online ISBN: 978-3-319-08404-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics