We consider the implicit selection problem, in which we want to select the kth smallest element of a multiset of n elements using only a constant amount of additional space. We show that this problem can be solved in O(n) time in the worst case. In particular, we show that 6.7756n+o(n) comparisons are sufficient if all elements are distinct and 6.8280n+o(n) comparisons are sufficient in the general case.
KeywordsSelection Algorithm Binary Search Recursive Call Extra Space Additional Space
Unable to display preview. Download preview PDF.
- S. W. Bent and J. W. John. Finding the median requires 2n comparisons. In Proceedings of the 17th Annual ACM Symposium on Theory of Computing, pages 213–216, 1985.Google Scholar
- M. Blum, R. W. Floyd, V. Pratt, R. L. Rivest, and R. E. Tarjan. Time bounds for selection. Journal of Computer and System Sciences, 7:448–461, 1973.Google Scholar
- R. W. Floyd and R. L. Rivest. Expected time bounds for selection. Communications of the ACM, 18:165–172, 1975.Google Scholar
- L. R. Ford and S. M. Johnson. A tournament problem. American Mathematical Monthly, 66:387–389, 1959.Google Scholar
- E. Horowitz and S. Sahni. Fundamentals of Computer Algorithms, pages 131–135. Computer Science Press, 1978.Google Scholar
- T. W. Lai. Space Bounds for Selection. Master's thesis, University of Waterloo, 1987.Google Scholar
- J. I. Munro. An implicit data structure supporting insertion, deletion, and search in O (log2 n) time. Journal of Computer and System Sciences, 33:66–74, 1986.Google Scholar
- J. I. Munro and H. Suwanda. Implicit data structures for fast search and update. Journal of Computer and System Sciences, 21:236–250, 1980.Google Scholar
- A. Schönhage, M. Paterson, and N. Pippenger. Finding the median. Journal of Computer and System Sciences, 13:184–199, 1976.Google Scholar
- J. van Leeuwen and D. Wood. Interval heaps. Technical Report, Univ. of Waterloo, 1988.Google Scholar