Unformatted text preview: nsional
find
dimensional
space
space
• Algorithm: Compute distance between each pair of points and
Compute
identify the pair resulting in the shortest distance
identify
• What is (or should be) the basic operation of the algorithm? Design and Analysis of Algorithms – Chapter 3 29 Brute force closestpair algorithm
a Closest pair
• Problem: find the closest pair among n points in kdimensional
find
dimensional
space
space
• Algorithm: Compute distance between each pair of points and
Compute
identify the pair resulting in the shortest distance
identify • Basic operation (squaring): d= k ∑ ( xi − yi ) 2 i =1 2 d= k ∑ ( xi − yi ) 2 i =1 Design and Analysis of Algorithms – Chapter 3 30 Brute force closestpair algorithm
a Closest pair
• Problem: find the closest pair among n points in kdimensional space
• Algorithm: Compute distance between each pair of points and
Compute
identify the pair resulting in the shortest distance
identify • Basic operation: d= k ∑ (...
View
Full Document
 Fall '12
 yinglu
 Algorithms, Graph Theory, Depthfirst search, mark w

Click to edit the document details