Abstract
It is shown that 5n/4 plus-minus lower order terms comparisons on average are necessary and sufficient to solve the problem of finding the values of ranks immediately above and below a specified element x in a set X of size n>1. When x turns out to be the median of X, 1.5n+√πn/8+O(lg n) comparisons are proven to be sufficient. n+min(k, n−k)+3 ln n+O(1) comparisons are sufficient if k, the rank of x in X, differs from n/2 by Θ(n).
Preview
Unable to display preview. Download preview PDF.
References
M. Blum, R.W. Floyd, V.R. Pratt, R.L. Rivest and R.E. Tarjan, Time Bounds for Selection, J. Compt. and Sys. Sci., 7, 1973, pp. 448–461.
W. Cunto and J.I. Munro, Closest Neighbor Problem, Proceedings 22-nd Allerton Conference, Urbana, Illinois, 1984, pp. 510–515.
W. Cunto and J.I. Munro, Average Case Selection, JACM, 36, 1989, pp. 270–279.
R.W. Floyd and R.L. Rivest, Expected Time Bounds for Selection, CACM, 18, 1975, pp. 165–172.
R.W. Floyd and R.L. Rivest, Algorithm 489: The Algorithm SELECT for Finding the ith Smallest of n elements, CACM, 18, 1975, pp. 173.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cunto, W., Munro, J.I., Poblete, P.V. (1991). A case study in comparison based complexity: Finding the nearest value(s). In: Dehne, F., Sack, JR., Santoro, N. (eds) Algorithms and Data Structures. WADS 1991. Lecture Notes in Computer Science, vol 519. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0028244
Download citation
DOI: https://doi.org/10.1007/BFb0028244
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54343-5
Online ISBN: 978-3-540-47566-8
eBook Packages: Springer Book Archive