Download - Closest Pair I

Transcript
Page 1: Closest Pair I

Divide and Conquer

Closest Pair IDesign and Analysis

of Algorithms I

Page 2: Closest Pair I

Tim Roughgarden

The Closest Pair Problem

Page 3: Closest Pair I

Tim Roughgarden

Initial Observations

Page 4: Closest Pair I

Tim Roughgarden

High-Level Approach

Page 5: Closest Pair I

Tim Roughgarden

The Divide and Conquer Paradigm

Page 6: Closest Pair I

Tim Roughgarden

ClosestPair()

Page 7: Closest Pair I

饾憘 (饾憶)饾憘 (饾憶 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.)

Page 8: Closest Pair I

Tim Roughgarden

ClosestPair()

Page 9: Closest Pair I

Tim Roughgarden

ClosestSplitPair(,)

Page 10: Closest Pair I

Tim Roughgarden

Correctness Claim