0% found this document useful (0 votes)
75 views9 pages

A Note Concerning The Closest Point Pair Algorithm: Martin Richards Information Processing Letters 82 (2002) 193-195

Uploaded by

api-168623254
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views9 pages

A Note Concerning The Closest Point Pair Algorithm: Martin Richards Information Processing Letters 82 (2002) 193-195

Uploaded by

api-168623254
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9

A note concerning the closest point pair algorithm

Martin Richards Information Processing Letters 82 (2002) 193-195 2002/9/5

Closest Pair Problem: Given a set P of n points, find p,q belong to P such that the distance d(p,q) is minimum.

Algorithms for determining the closest pair: -Brute force O(N^2)

-Divide-and-conquer O(N log N)

An Example:

Step.1

Step.2

Step.3

There are at most 8 points.

Search the dictionary.

If all points arent the same, there are at most 7.

*But this paper shows that checking 3 distances is sufficient.

Step.4

Step.5

Step.6

Running time:
Initial sort takes O(n log n) time Each point is inserted and remove once from S -S has at most N elements, so each insertion removal take O(log n) time

-Total insertion/removal time is O(n log n)


Dictionary is searched once each time a point is inserted into S -Each range query takes O(log n+6) = O(log n) time -total time for range queries is o(n log n) Distance computations performed each time a point is inserted into S -at most 6 computations at each time -total time for distance computations is O(n)

Time Complexity: O(n log n)

This paper shows that checking three distances is sufficient.

Case 2:

Now we want to check distance from p to others, We set the next four point below p are A,B,C,q that py>Ay>By>Cy>qy. Let p in the left-hand side. If pq < d, q must be in the right-hand side and there are 4 cases for p,A,B,C,q. Case 1:

Case 3:

Case 4:

References [1] T.H. Cormen, C.E. Leiserson, R.L. Rivest, Introduction to Algorithms, MIT Press, Cambridge, MA, 1990. [2] U. Manber, Introduction to Algorithms, A Creative Approach, AddisonWesley, Reading, MA, 1990. [3] R. Sedgewick, Algorithms in C, Addison-Wesley, Reading, MA, 1990.

You might also like