5
COMP670R – Hashing – Fall 2009 Closest Pair Problem: Given n points in the plane, find the pair that is closest to each other. This is also sometimes called the Nearest Neighbor Problem • We’ll discuss problems in R 2 but the algorithms will work in R d , for any d>0.

COMP670R – Hashing – Fall 2009

Embed Size (px)

DESCRIPTION

COMP670R – Hashing – Fall 2009. Closest Pair Problem: Given n points in the plane, find the pair that is closest to each other. This is also sometimes called the Nearest Neighbor Problem We’ll discuss problems in R 2 but the algorithms will work in R d , for any d>0. Closest Pair Problem. - PowerPoint PPT Presentation

Citation preview

Page 1: COMP670R – Hashing – Fall 2009

COMP670R – Hashing – Fall 2009

• Closest Pair Problem:

Given n points in the plane, find the pair that is closest to each other. This is also sometimes called the Nearest Neighbor Problem

• We’ll discuss problems in R2 but the algorithms will work in Rd, for any d>0.

Page 2: COMP670R – Hashing – Fall 2009

Closest Pair Problem

O(n log n) lower bound in comparison tree model

1976 Rabin proves that

+ floor function + randomness => O(n) expected time

1979 Steven Fortune and John E. Hopcroft+ floor function but no randomness => O(n loglog n)

1995 Samir Khuller and Yossi Matias Another O(n) algorithm that uses the floor function and

randomization.

Page 3: COMP670R – Hashing – Fall 2009

Rabin -- 1976

floor function + randomness => O(n) expected time• Possibly, first `real’ randomized algorithm• Dick Lipton http://rjlipton.wordpress.com/2009/03/01/rabin-flips-a-coin/

– Rabin may not have been the first to use randomness in algorithms, but he was the last to introduce the notion. Often in mathematics the key is not who discovers something first, but who discovers it last. Rabin discovered the power of randomness last. He used randomness to solve a geometric problem about points in the plane. His result was that with randomness the problem could be solved in linear time. He gave a series of talks based on his ideas that quickly spread the word throughout the theory community that randomness is powerful. In a short time, there were many other papers using randomness.

Page 4: COMP670R – Hashing – Fall 2009

Rabin -- 1976

– O(n) closest pair + polynomial primality testing– Closest pair uses randomness in both random

sampling + hashing• Provably O(1) hashing did not exist in 1976 when paper was

written. Carter-Wegman Universal Hashing appeared in 1979. FKS Perfect Hashing in 1984

• Rabin only says: When [hashing] is feasible, we have an O(n) algorithm for the nearest pair. Hashing is applicable in the practically arising cases of this problem.

Page 5: COMP670R – Hashing – Fall 2009

Bibliography1. Probabilistic Algorithms

Michael O. Rabin, in Algorithms and Complexity, New Directions and Recent Results, (J.F. Traub, ed.) Academic Press, New York, 1976. pp 21-39

2. A Note on Rabin's Nearest-Neighbor AlgorithmSteven Fortune and John E. HopcroftInformation Processing Letters, 8(1) (1979) 20-23

3. A simple randomized sieve algorithm for the closest-pair problemSamir Khuller and Yossi MatiasInformation and Computation 118(1) 34-37 1995