Divide-Conquer-Glue Algorithms
Closest Pair Tyler Moore
CSE 3353, SMU, Dallas, TX
Lecture 12
Some slides created by or adapted from Dr. Kevin Wayne. For more information see http://www.cs.princeton.edu/~wayne/kleinberg-tardos. Some code reused from Python Algorithms by Magnus Lie Hetland.
- 5. DIVIDE AND CONQUER
- mergesort
- counting inversions
- closest pair of points
- randomized quicksort
- median and selection
2 / 19
21
- Closest pair problem. Given points in the plane, find a pair of points
with the smallest Euclidean distance between them. Fundamental geometric primitive.
Graphics, computer vision, geographic information systems,
molecular modeling, air traffic control.
Special case of nearest neighbor, Euclidean MST
, Voronoi.
fast closest pair inspired fast algorithms for these problems
3 / 19
22
- Closest pair problem. Given points in the plane, find a pair of points
with the smallest Euclidean distance between them. Brute force. Check all pairs with Θ distance calculations. 1d version. Easy algorithm if points are on a line. Nondegeneracy assumption. No two points have the same -coordinate.
4 / 19