0% found this document useful (0 votes)
51 views3 pages

Convex Hull Problem

The document discusses the convex hull problem and the quickhull algorithm. The convex hull of a set of points is the smallest convex polygon that contains all the points. The quickhull algorithm works by first finding the extreme left and right points, and then recursively computes the upper and lower hulls. It runs in average case linear time but worst case quadratic time, and other algorithms solve the convex hull problem in O(n log n) time.

Uploaded by

Anukul Gangwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views3 pages

Convex Hull Problem

The document discusses the convex hull problem and the quickhull algorithm. The convex hull of a set of points is the smallest convex polygon that contains all the points. The quickhull algorithm works by first finding the extreme left and right points, and then recursively computes the upper and lower hulls. It runs in average case linear time but worst case quadratic time, and other algorithms solve the convex hull problem in O(n log n) time.

Uploaded by

Anukul Gangwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 3

The convex hull problem

concave polygon: convex polygon:

The convex hull of a set of planar points is the smallest


convex polygon containing all of the points.
Quickhull Algorithm
Convex hull: smallest convex set that includes given points
 Assume points are sorted by x-coordinate values

 Identify extreme points P1 and P2 (leftmost and rightmost)

 Compute upper hull recursively:


• find point Pmax that is farthest away from line P1P2
• compute the upper hull of the points to the left of line P1Pmax
• compute the upper hull of the points to the left of line PmaxP2
 Compute lower hull in a similar manner
Pmax
P2

P1
Efficiency of Quickhull Algorithm
 Finding point farthest away from line P1P2 can be done in
linear time
 Time efficiency:
• worst case: Θ(n2) (as quicksort)
• average case: Θ(n) (under reasonable assumptions about
distribution of points given)

 If points are not initially sorted by x-coordinate value, this


can be accomplished in O(n log n) time

 Several O(n log n) algorithms for convex hull are known

You might also like