Skip to main content

Range Medians

  • Conference paper

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

Abstract

We study a generalization of the classical median finding problem to batched query case: given an array of unsorted n items and k (not necessarily disjoint) intervals in the array, the goal is to determine the median in each of the intervals in the array. We give an algorithm that uses O(nlogk + klogk logn) comparisons and show a lower bound of Ω(nlogk) comparisons for this problem. This is optimal for k = O(n/logn).

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   149.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   189.00
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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Altman, T., Yoshihide, I.: Roughly sorting: Sequential and parallel approach. Journal of Information Processing 12(2), 154–158 (1989)

    MATH  MathSciNet  Google Scholar 

  2. Bender, M.A., Farach-Colton, M.: The level ancestor problem simplified. Theo. Comp. Sci. 321(1), 5–12 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  3. Blum, M., Floyd, R.W., Pratt, V.R., Rivest, R.L., Tarjan, R.E.: Time bounds for selection. J. Comput. Sys. Sci. 7(4), 448–461 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  4. Bent, S.W., John, J.W.: Finding the median requires 2n comparisons. In: Proc. 17th Annu. ACM Sympos. Theory Comput., pp. 213–216 (1985)

    Google Scholar 

  5. Bose, P., Kranakis, E., Morin, P., Tang, Y.: Approximate range mode and range median queries. In: Proc. 22nd Internat. Sympos. Theoret. Asp. Comp. Sci., pp. 377–388 (2005)

    Google Scholar 

  6. Dor, D., Zwick, U.: Selecting the median. SIAM J. Comput. 28(5), 1722–1758 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  7. Dor, D., Zwick, U.: Median selection requires (2 + ε)n comparisons. SIAM J. Discret. Math. 14(3), 312–325 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  8. Greenwald, M., Khanna, S.: Space-efficient online computation of quantile summaries. In: Proc. 2001 ACM SIGOD Conf. Mang. Data, pp. 58–66 (2001)

    Google Scholar 

  9. Greenwald, M., Khanna, S.: Power-conserving computation of order-statistics over sensor networks. In: Proc. 23rd ACM Sympos. Principles Database Syst., pp. 275–285 (2004)

    Google Scholar 

  10. Krizanc, D., Morin, P., Smid, M.: Range mode and range median queries on lists and trees. Nordic J. Comput. 12(1), 1–17 (2005)

    MATH  MathSciNet  Google Scholar 

  11. Korn, F., Muthukrishnan, S., Zhu, Y.: Checks and balances: Monitoring data quality problems in network traffic databases. In: Proc. 29th Intl. Conf. Very Large Data Bases, pp. 536–547 (2003)

    Google Scholar 

  12. Motwani, R., Raghavan, P.: Randomized Algorithms. Cambridge University Press, New York (1995)

    MATH  Google Scholar 

  13. Schönhage, A., Paterson, M., Pippenger, N.: Finding the median. J. Comput. Sys. Sci. 13(2), 184–199 (1976)

    MATH  Google Scholar 

  14. Yao, A.C.: Space-time tradeoff for answering range queries. In: Proc. 14th Annu. ACM Sympos. Theory Comput., pp. 128–136 (1982)

    Google Scholar 

  15. Yao, A.C.: On the complexity of maintaining partial sums. SIAM J. Comput. 14(2), 277–288 (1985)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Dan Halperin Kurt Mehlhorn

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Har-Peled, S., Muthukrishnan, S. (2008). Range Medians. In: Halperin, D., Mehlhorn, K. (eds) Algorithms - ESA 2008. ESA 2008. Lecture Notes in Computer Science, vol 5193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-87744-8_42

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-87744-8_42

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-87743-1

  • Online ISBN: 978-3-540-87744-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics