Top Banner
Divide and Conquer Closest Pair I Design and Analysis of Algorithms I
10

Closest Pair I

Feb 22, 2016

Download

Documents

Wyatt

Divide and Conquer. Closest Pair I. Design and Analysis of Algorithms I. The Closest Pair Problem. Initial Observations. High-Level Approach. The Divide and Conquer Paradigm. ClosestPair ( ). - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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