This preview shows pages 1–12. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CSE 4101/5101 Convex Hull Prof. Andy Mirzaian CONVEX HULL Example 1 : S infinite Example 2 : S finite The rubberband analogy : Place a rubberband around S and let it tighten. Given S d (d = 1,2,3, ) ConvexHull of S: CH(S) = the set of all convex combinations of points in S = the smallest convex set that contains S = the intersection of all convex sets that contain S 2 The Convex Hull Problem supporting line extreme point Dimenension d=2 : Given a set S={p1,p2, , pn} of n points in d , compute CH(S). In general, CH(S) will be a convex polytope whose vertices are a subset of S, called extreme points of S. min max Dimension d=1 : trivial, O(n) time. 3 2D Convex Hull: Early development O(n4) is too slow. Caratheodorys Theorem : p is NOT an extreme point p is a convexcombination of up to 3 (=d+1 ) other points. p An O(n4) time algorithm: Eliminate nonextreme points by checking each 4point subset. Then order the extreme points around the convexhull. (How?) 4 2D CH: An O(n3) time algorithm p q O(n3) still too slow! Algorithm CH(P) E (* edgelist of CH(P) *) for all ordered pairs (p,q) PP, p q do supporting true for all points r P{p,q} do if r is on the right side of pq then supporting false if supporting then add directed edge pq to E From the (unordered) edgelist E, construct the list of vertices of CH(P) in CCW order in O(n) time. (How?) end 5 QUICK HULL S (similar to QuickSort  see AAW) 6 S2 S1 A B leftmost rightmost A & B are extreme points (admit vertical supporting lines) S1 points to the right of AB S2 points to the right of BA Initialize CH to AB followed by BA. (uninflated baloon) Call FindHull (S1,A,B) and FindHull(S2, B,A) QUICK HULL 7 FindHull(P,A,B): If P is empty, then return. Find (extreme) point CP orthogonally farthest from AB. CH update: replace AB with AC followed by CB. (inflate baloon) Partition P{C} into Q0, Q1, Q2 as shown. Discard Q0 inside triangle ABC (by Caratheodory). Recursively call FindHull(Q1,A,C) and FindHull(Q2,C,B). max Q0 Q1 Q2 C A B supporting line at C (C is extreme point) 8 QuickHull animation 9 T(n) = Time Complexity of FindHull(P,A,B), where n=P Worst Case: T(n) = max { T(q) + T(n1q) + O(n)  0 q n1 } = T(0) + T(n1) + O(n) = O(n2) Average Case: On many realistic point distributions Avg[T(n)] = O(n) or close to it. Find C, Q0, Q1, Q2: O(n) time  FindHull(Q1,A,C): T(q) time. (  Q1 = q ) FindHull(Q2,C,B): T(n1q) time. (  Q2 n1q ) 10 { giftwrapping method, generalizes to higher dimensions} Step 1: Let p1 be the point with minimum ycoordinate (lex.) Step 2: Anchor ray at current point and rotate to next anchor point....
View Full
Document
 Winter '12
 Mirzaian
 Data Structures

Click to edit the document details