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.
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
Beame, P.: A general sequential time-space tradeoff for finding unique elements. SIAM Journal on Computing 20(2), 270–277 (1991)
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)
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)
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)
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)
Chan, T.M.: Comparison-based time-space lower bounds for selection. ACM Transactions on Algorithms 6(2), 26 (2010)
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)
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)
Frederickson, G.: Upper bounds for time-space trade-offs in sorting and selection. Journal of Computer and System Sciences 34(1), 19–26 (1987)
Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. Journal of Computer and System Sciences 47, 424–436 (1993)
Greenwald, M., Khanna, S.: Space-efficient online computation of quantile summaries. In: Proceedings of ACM SIGMOD, pp. 58–66 (2001)
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)
Munro, J.I., Paterson, M.: Selection and sorting with limited storage. Theoretical Computer Science 12, 315–323 (1980)
Munro, J.I., Raman, V.: Selection from read-only memory and sorting with optimum data movement. Theoretical Computer Science 165(2), 311–323 (1996)
Raman, V., Ramnath, S.: Improved upper bounds for time-space tradeoffs for selection. Nordic Journal of Computing 6(2), 162–180 (1999)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)