We present a randomized algorithm for computing the kth smallest distance in a set of n points in the plane, based on the parametric search technique of Megiddo [Mel]. The expected running time of our algorithm is O(n4/3 log8/3n). The algorithm can also be made deterministic, using a more complicated technique, with only a slight increase in its running time. A much simpler deterministic version of our procedure runs in time O(n3/2 log5/2n). All versions improve the previously best-known upper bound of O(@#@ n9/5 log4/5n) by Chazelle [Ch]. A simple O(n log n)-time algorithm for computing an approximation of the median distance is also presented.
- Parametric search
ASJC Scopus subject areas
- General Computer Science
- Computer Science Applications
- Applied Mathematics