Introduction to algorithms
Algorithms in C
Introduction to Algorithms: A Creative Approach
Introduction to Algorithms: A Creative Approach
Hi-index | 0.89 |
An algorithm, described by Sedgewick, finds the distance between the closest pair of n given points in a plane using a variant of mergesort. This takes O(n log n) time. To prove this it is necessary to show that, in the merge phase of the algorithm, no more than a constant number of distances need to be checked for each point considered. Cormen, Leiserson and Rivest show that checking seven distances is sufficient while Sedgewick suggests that this should be four. This paper shows that checking three distances is sufficient and that a slight modification of the algorithm reduces the number to two.