# lec19 - Introduction to Algorithms 6.046J/18.401 Lecture 19...

This preview shows pages 1–6. Sign up to view the full content.

Introduction to Algorithms 6.046J/18.401 Lecture 19 Prof. Piotr Indyk

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Introduction to Algorithms April 29, 2003 L19.2 © 2003 by Piotr Indyk Computational Geometry Algorithms for geometric problems Applications: CAD, GIS, computer vision,……. E.g., the closest pair problem: – Given: a set of points P={p 1 …p n } in the plane, such that p i =(x i ,y i ) – Goal: find a pair p i p j that minimizes ||p i – p j || We will see more examples in the next lecture
Introduction to Algorithms April 29, 2003 L19.3 © 2003 by Piotr Indyk Computational Model In the next two lectures, we will assume that – The input (e.g., point coordinates) are real numbers – We can perform (natural) operations on them in constant time, with perfect precision Advantage: simplicity Drawbacks: highly non-trivial issues: – Theoretical: if we allow arbitrary operations on reals, we can compress n numbers into a one number – Practical: algorithm designed for infinite precision sometimes fail on real computers

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Introduction to Algorithms April 29, 2003 L19.4 © 2003 by Piotr Indyk Closest Pair Find a closest pair among p 1 …p n Easy to do in O(n 2 ) time – For all p i p j , compute ||p i – p j || and choose the minimum We will aim for O(n log n) time
Introduction to Algorithms April 29, 2003 L19.5 © 2003 by Piotr Indyk

This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

### Page1 / 15

lec19 - Introduction to Algorithms 6.046J/18.401 Lecture 19...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online