Skip to main content

Faster, Space-Efficient Selection Algorithms in Read-Only Memory for Integers

  • Conference paper
Algorithms and Computation (ISAAC 2013)

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

Included in the following conference series:

Abstract

Starting with Munro and Paterson (1980), the selection or median-finding problem has been extensively studied in the read-only memory model and in streaming models. Munro and Paterson’s deterministic algorithm and its subsequent refinements require at least polylogarithmic or logarithmic space, whereas the algorithms by Munro and Raman (1996) and Raman and Ramnath (1999) can be made to use just O(1) storage cells but take O(n 1 + ε) time for an arbitrarily small constant ε > 0.

In this paper, we show that faster selection algorithms in read-only memory are possible if the input is a sequence of integers. For example, one algorithm uses O(1) storage cells and takes \(O(n\lg U)\) time where U is the universe size. Another algorithm uses O(1) storage cells and takes \(O(n\lg n\lg\lg U)\) time. We also describe an O(n)-time algorithm for finding an approximate median using \(O(\lg^\epsilon U)\) storage cells.

All our algorithms are simple and deterministic. Interestingly, one of our algorithms is inspired by ‘centroids’ of binary trees and finds an approximate median by repeatedly invoking a textbook algorithm for the ‘majority’ problem. This technique could be of independent interest.

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. Beame, P.: A general sequential time-space tradeoff for finding unique elements. SIAM Journal on Computing 20(2), 270–277 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  2. Blum, M., Floyd, R.W., Pratt, V., Rivest, R.L., Tarjan, R.E.: Time bounds for selection. Journal of Computer and System Sciences 7, 448–461 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  3. Borodin, A., Cook, S.A.: A time-space tradeoff for sorting on a general sequential model of computation. SIAM Journal on Computing 11, 287–297 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  4. Boyer, R.S., Moore, J.S.: MJRTY - A fast majority vote algorithm. In: Boyer, R.S. (ed.) Automated Reasoning: Essays in Honor of Woody Bledsoe. Automated Reasoning Series, pp. 105–117. Kluwer (1991)

    Google Scholar 

  5. Chakrabarti, A., Jayram, T.S., Pǎtraşcu, M.: Tight lower bound for selection in randomly ordered streams. In: Proceedings of the 19th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 720–729 (2008)

    Google Scholar 

  6. Chan, T.M.: Comparison-based time-space lower bounds for selection. ACM Transactions on Algorithms 6(2), 26 (2010)

    Article  MathSciNet  Google Scholar 

  7. Dietz, P.F.: Optimal algorithms for list indexing and subset rank. In: Dehne, F., Santoro, N., Sack, J.-R. (eds.) WADS 1989. LNCS, vol. 382, pp. 39–46. Springer, Heidelberg (1989)

    Chapter  Google Scholar 

  8. Elmasry, A., Juhl, D.D., Katajainen, J., Satti, S.R.: Selection from read-only memory with limited work space. In: Du, D.-Z., Zhang, G. (eds.) COCOON 2013. LNCS, vol. 7936, pp. 147–157. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  9. Frederickson, G.: Upper bounds for time-space trade-offs in sorting and selection. Journal of Computer and System Sciences 34(1), 19–26 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  10. Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. Journal of Computer and System Sciences 47, 424–436 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  11. Greenwald, M., Khanna, S.: Space-efficient online computation of quantile summaries. In: Proceedings of ACM SIGMOD, pp. 58–66 (2001)

    Google Scholar 

  12. Manku, G.S., Rajagopalan, S., Lindsay, B.G.: Approximate medians and other quantiles in one pass with limited memory. Proceedings of ACM SIGMOD 27(2), 426–435 (1998)

    Article  Google Scholar 

  13. Munro, J.I., Paterson, M.: Selection and sorting with limited storage. Theoretical Computer Science 12, 315–323 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  14. Munro, J.I., Raman, V.: Selection from read-only memory and sorting with optimum data movement. Theoretical Computer Science 165(2), 311–323 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  15. Raman, V., Ramnath, S.: Improved upper bounds for time-space tradeoffs for selection. Nordic Journal of Computing 6(2), 162–180 (1999)

    MathSciNet  MATH  Google Scholar 

  16. Shrivastava, N., Buragohain, C., Agrawal, D., Suri, S.: Medians and beyond: new aggregation techniques for sensor networks. In: Proceedings of the 2nd International Conference on Embedded Networked Sensor Systems, pp. 239–249 (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chan, T.M., Munro, J.I., Raman, V. (2013). Faster, Space-Efficient Selection Algorithms in Read-Only Memory for Integers. In: Cai, L., Cheng, SW., Lam, TW. (eds) Algorithms and Computation. ISAAC 2013. Lecture Notes in Computer Science, vol 8283. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-45030-3_38

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-45030-3_38

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-45029-7

  • Online ISBN: 978-3-642-45030-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics