Divide and Conquer
Closest Pair IDesign and Analysis
of Algorithms I
Tim Roughgarden
The Closest Pair Problem
Tim Roughgarden
Initial Observations
Tim Roughgarden
High-Level Approach
Tim Roughgarden
The Divide and Conquer Paradigm
Tim Roughgarden
ClosestPair()
𝑂 (𝑛)𝑂 (𝑛 log𝑛)𝑂 ¿𝑂 (𝑛2)
Suppose we can correctly implement the ClosestSplitPair subrouine in time. What will be the overall running time of the Closest Pair algorithm? (Choose the smallest upper bound that applies.)
Tim Roughgarden
ClosestPair()
Tim Roughgarden
ClosestSplitPair(,)
Tim Roughgarden
Correctness Claim