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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Altman, T., Yoshihide, I.: Roughly sorting: Sequential and parallel approach. Journal of Information Processing 12(2), 154–158 (1989)
Bender, M.A., Farach-Colton, M.: The level ancestor problem simplified. Theo. Comp. Sci. 321(1), 5–12 (2004)
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)
Bent, S.W., John, J.W.: Finding the median requires 2n comparisons. In: Proc. 17th Annu. ACM Sympos. Theory Comput., pp. 213–216 (1985)
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)
Dor, D., Zwick, U.: Selecting the median. SIAM J. Comput. 28(5), 1722–1758 (1999)
Dor, D., Zwick, U.: Median selection requires (2 + ε)n comparisons. SIAM J. Discret. Math. 14(3), 312–325 (2001)
Greenwald, M., Khanna, S.: Space-efficient online computation of quantile summaries. In: Proc. 2001 ACM SIGOD Conf. Mang. Data, pp. 58–66 (2001)
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)
Krizanc, D., Morin, P., Smid, M.: Range mode and range median queries on lists and trees. Nordic J. Comput. 12(1), 1–17 (2005)
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)
Motwani, R., Raghavan, P.: Randomized Algorithms. Cambridge University Press, New York (1995)
Schönhage, A., Paterson, M., Pippenger, N.: Finding the median. J. Comput. Sys. Sci. 13(2), 184–199 (1976)
Yao, A.C.: Space-time tradeoff for answering range queries. In: Proc. 14th Annu. ACM Sympos. Theory Comput., pp. 128–136 (1982)
Yao, A.C.: On the complexity of maintaining partial sums. SIAM J. Comput. 14(2), 277–288 (1985)
Author information
Authors and Affiliations
Editor information
Rights 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)