Lecture topic-BruteForce

Between each pair of points and compute identify the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 closest-pair algorithm a Closest pair • Problem: find the closest pair among n points in k-dimensional 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 closest-pair algorithm a Closest pair • Problem: find the closest pair among n points in k-dimensional 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

Ask a homework question - tutors are online