Computational Geometry (35/33)

Slides:



Advertisements
Similar presentations
Computational Geometry
Advertisements

Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
2/9/06CS 3343 Analysis of Algorithms1 Convex Hull  Given a set of pins on a pinboard  And a rubber band around them  How does the rubber band look when.
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
Closest Pair Given a set S = {p1, p2,..., pn} of n points in the plane find the two points of S whose distance is the smallest. Images in this presentation.
The Divide-and-Conquer Strategy
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Convex Hull(35.3) Convex Hull, CH(X), is the smallest convex polygon containing all points from X, |X|=n Different methods: –incremental: moving from left.
Reminder: Closest-Pair Problem Given a collection P of n points in  × , obtain the two points p1 and p2 such that their distance is less or equal that.
Data Structures and Algorithms (AT70.02) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Dr. Sumanta Guha Slide Sources: CLRS “Intro.
Introduction to Algorithms Rabie A. Ramadan rabieramadan.org 6 Ack : Carola Wenk nad Dr. Thomas Ottmann tutorials.
Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Computational Geometry
8/29/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Spring 2006 Convex Hulls Carola Wenk.
Convex Hull Problem Presented By Erion Lin. Outline Convex Hull Problem Voronoi Diagram Fermat Point.
Advanced Algorithm Design and Analysis (Lecture 10) SW5 fall 2004 Simonas Šaltenis E1-215b
Computational Geometry for the Tablet PC
1 Today’s Material Computational Geometry Problems –Closest Pair Problem –Convex Hull Jarvis’s March, Graham’s scan –Farthest Point Problem.
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
ADA: 16. CG Topics1 Objective o an examination of four important CG topics o just a taster of a very large research area Algorithm Design and Analysis.
November 4, Algorithms and Data Structures Lecture XIV Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
Computational Geometry -- Voronoi Diagram
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
Voronoi Diagrams Computational Geometry, WS 2006/07 Lecture 10 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
Computational Geometry Overview from Cormen, et al. Chapter 33
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2002 Tuesday, 5/7/02 Computational Geometry Chapter 33.
Convex Hull Computation ● Applications of Convex Hull Computation ● Definitions ● Basic Math Functions ● Algorithms Algorithm Speed Discovered By Brute.
Computational Geometry
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
Computational Geometry (35/33) Line Segments and cross-product Segment intersection and Sweep Line Convex Hull and Graham’s Scan, Jarvis’s march Divide-and-Conquer.
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
C o m p u t i n g C O N V E X H U L L S. Presentation Outline 2D Convex Hulls –Definitions and Properties –Approaches: Brute Force Gift Wrapping QuickHull.
1 Closest Pair of Points (from “Algorithm Design” by J.Kleinberg and E.Tardos) Closest pair. Given n points in the plane, find a pair with smallest Euclidean.
Fundamental Data Structures and Algorithms Margaret Reid-Miller 27 April 2004 Computational Geometry.
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
Kansas State University Department of Computing and Information Sciences Friday, July 13, 2001 Mantena V. Raju Department of Computing and Information.
COMPUTATIONAL GEOMETRY AND MATRIX MULTIPLICATION Mohammed Zeeshan Farooqui Minhaj Uddin.
Convex Hull 2012/10/23. Convex vs. Concave A polygon P is convex if for every pair of points x and y in P, the line xy is also in P; otherwise, it is.
Lecture 15 Computational Geometry Geometry sweeping Geometric preliminaries Some basics geometry algorithms.
CS6234 Advanced Algorithms - Convex hull. Terminologies – ◦ Convex hull of a set Q of points is the smallest convex polygon P for which each point in.
1. For minimum vertex cover problem in the following graph give
CENG 789 – Digital Geometry Processing 03- Point Sets Asst. Prof. Yusuf Sahillioğlu Computer Eng. Dept,, Turkey.
CENG 789 – Digital Geometry Processing 03- Point Sets
CMPS 3130/6130 Computational Geometry Spring 2017
Voronoi Graph Voronoi region Vor(p) (p in set S) Voronoi Graph VOR(S)
MA/CSSE 473 Day 16 Answers to your questions Divide and Conquer
CSCE350 Algorithms and Data Structure
Algorithm design techniques Dr. M. Gavrilova
Computational Geometry Capter:1-2.1
Algorithm Design Strategy Divide and Conquer Revisit
Convex Sets & Concave Sets
Chapter 7 Voronoi Diagrams
Computational Geometry for the Tablet PC
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
CHAPTER 33 Computational Geometry
CMPS 3130/6130: Computational Geometry Spring 2017
Divide-and-Conquer The most-well known algorithm design strategy:
Convex Hulls Given a set of points (x1,y1),(x2,y2),…,(xn,yn), the convex hull is the smallest convex polygon containing all the points.
Computational Geometry
CMPS 3120: Computational Geometry Spring 2013
Introduction to Algorithms
Algorithms and Data Structures Lecture XIV
Computational Geometry
Given a list of n  8 integers, what is the runtime bound on the optimal algorithm that sorts the first eight? O(1) O(log n) O(n) O(n log n) O(n2)
Convex Hull - most ubiquitous structure in computational geometry
Presentation transcript:

Computational Geometry (35/33) Line Segments and cross-product Segment intersection and Sweep Line Convex Hull and Graham’s Scan, Jarvis’s march Divide-and-Conquer for Closest Pair.

Line Segments and cross-product (35.1/33.1) A segment is a convex combination of ends p1 = (x1,y1) and p2 = (x2,y2) x =  x1+ (1-) x2, y =  y1+ (1-) y2 p =  p1+ (1-) p2 Cross product p1  p2 = x1 y2 -x2 y1 Vectors are collinear if p1 = c p2, cross-product=0 The segment [p0p1] and [p0p2] turns left or right if (p1-p0)  (p2-p0) > 0 (<0) Segment intersection: bounding boxes straddling

Segments and Sweep Line (35.2/33.2) Sweep line is an imaginary vertical line moving from left to right a1 is above a2 and a3 is above a2 a1 a3 a2

Convex Hull(35.3/33.3) Convex Hull, CH(X), is the smallest convex polygon containing all points from X, |X|=n Different methods: incremental: moving from left to right updates CH(x1..xi). the runtime O(nlogn) divide-and-conquer divides into two subsets left and right in O(n), then combine into one convex hull in O(n) prune-and-search O(n logh), where h is the # points in CH uses pruning as for finding median to find upper chain

Graham’s Scan (35.3/33.3) O(nlogn)

Finding the Closest Pair(35.4/33.4) Brute-force: O(n2) Divide-and-conquer algorithm with recurrence T(n)=2T(n/2)+O(n) Divide: divide into almost equal parts by a vertical line which divides given x-sorted array X into 2 sorted subarrays Conquer: Recursively find the closest pair in each half of X. Let  = min{left, right} Combine: The closest pair is either in distance  or a pair of points from different halves.

Combine in D-a-C (35.4/33.4) Subarray Y’ (y-sorted) of Y with points in 2 strip pY’ find all in Y’ which are closer than in  no more than 8 in   2 rectangle no more than 7 points can be closer than in  If the closest in the strip closer then it is the answer 2 2   left right

Voronoi Graph Voronoi region Vor(p) (p in set S) Voronoi Graph VOR(S) the set of points on the plane that are closer to p than to any othe rpoint in S Voronoi Graph VOR(S) dual to voronoi region graph two points are adjacent if their voronoi regions have common contiguous boundary (segment)

Voronoi Graph Voronoi Graph in the rectilinear plane Rectilinear distance: p = (x, y); p’=(x’,y’) Voronoi region of b ab b a bc c ac

Now we will find such X-Y-path e1, e2,…,ek in VG(S) THEOREM: For any set S of points in the plane, MST is subgraph of the Voronoi Graph VG(S) PROOF Let an edge XY between two points X and Y does not belong to the Voronoi graph VG(S). We will show that there is an X-Y- path in VG(S) which contains edges e1, e2,…,ek each shorter than XY, this will imply that XY not belong to MST. Indeed, for each edge eI (I=1,…,k) there is an MST path pI connecting ends of eI consisting of MST edges each no longer than eI. The path obtained by concatenating paths p1,…,pk connects X to Y and contains MST edges each shorter than XY. Thus XY does not belong to MST. Now we will find such X-Y-path e1, e2,…,ek in VG(S)

Now we will find such X-Y-path e1, e2,…,ek in VG(S) THEOREM: For any set S of points in the plane, MST is subgraph of the Voronoi Graph VG(S) PROOF Let an edge XY between two points X and Y does not belong to the Voronoi graph VG(S). We will show that there is an X-Y- path in VG(S) which contains edges e1, e2,…,ek each shorter than XY, this will imply that XY not belong to MST. Indeed, for each edge eI (I=1,…,k) there is an MST path pI connecting ends of eI consisting of MST edges each no longer than eI. The path obtained by concatenating paths p1,…,pk connects X to Y and contains MST edges each shorter than XY. Thus XY does not belong to MST. Now we will find such X-Y-path e1, e2,…,ek in VG(S)