{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture topic-BruteForce

# Between each pair of points and compute identify the

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

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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern