Title: Convex Hull Problem I
1Convex Hull Problem I
- S. Y. Shin
- Computer Science Div.
- KAIST
2Contents
- Problem Definition
- Background
- 2.1 Historical Review
- 2.2 Examples
- Mathematical Preliminaries
- Lower bound in time complexity
- Algorithm
31. Problem Definition
41. Problem Definition (cont.)
52. Background
2.1 Historical Review
- R. Graham, IPL, (1972) O(n logn)
- F. Preparata S. Hong, CACM, (1977)
- Divide and Conquer
- O(n logn)
- Extanded to 3D.
62.1 Historical Review (cont.)
- J. Sklansky, IEEE Trans. Comput, (1972)
- M. Shamos, (1975)
- O(n) algorithm for finding HULL(P), where P is a
polygon. - A. Bykat, IPL, (1978) O(n)
- Counter-examples to Sklanskys algorithm
72.1 Historical Review (cont.)
- D. McCallum D. Avis, IPL, (1979) O(n)
- using two stacks
- very complicated
- D. Lee, Intl J. of Computer and Information
Science, (1983) - O(n)
- Lobe(pocket)
- Forward and Backward Tests
- R. Graham F. Yao, J. of Algorithms, (1983) O(n)
82.1 Historical Review (cont.)
92.2 Example
Farthest distance problem
102.2 Example (cont.)
Observation (Farthest distance problem)
112.2 Example (cont.)
122.2 Example (cont.)
Intersection problem
- Given two nonconvex polygons, A and B, find
132.2 Example (cont.)
Observation (Intersection problem)
142.2 Example (cont.)
Observation (Intersection problem)
Can you give a counter-example?
152.2 Example (cont.)
Counter example (Intersection problem)
An algorithm for finding the convex hull of a
polygon can be used as a preprocessing step to
possibly avoid an expensive step for computing
162.2 Example (cont.)
Optimization
172.2 Example (cont.)
Optimization
183. Mathematical Preliminaries
Defn Convex set
A set S is said to be convex if and only if the
line segment joining every pairs of points lies
entirely within S.
Notes How can you algebraically express an
interior point x of a convex polygon?
193. Mathematical Preliminaries (cont.)
algebraic expression
203. Mathematical Preliminaries (cont.)
Convex Hull
213. Mathematical Preliminaries (cont.)
Simple Curve
Defn Simple Curve (Jordan Curve)
A sequence of connected line is said to be a
simple curve if they satisfy the following
conditions (1) No pair of line segments
intersects except at their endpoints (2)
No more than two line segments intersects
at an endpoint.
223. Mathematical Preliminaries (cont.)
Example (Simple Curve)
233. Mathematical Preliminaries (cont.)
Polygon
243. Mathematical Preliminaries (cont.)
Polygon
253. Mathematical Preliminaries (cont.)
Presenting a Simple Polygon
263. Mathematical Preliminaries (cont.)
Characterization
minimality
The convex hull of S is the intersection of all
convex sets containing S.
convexity
273. Mathematical Preliminaries (cont.)
Characterization (cont.)
A sequence of vertices in the order appearing on
the boundary of HULL(S)
283. Mathematical Preliminaries (cont.)
Characterization (cont.)
293. Mathematical Preliminaries (cont.)
Characterizing the solution
303. Mathematical Preliminaries (cont.)
Check of Convexity
313. Mathematical Preliminaries (cont.)
Check of Convexity (cont.)
323. Mathematical Preliminaries (cont.)
Cross product
333. Mathematical Preliminaries (cont.)
Cross product (cont.)
344. Lower bound in Time Complexity
P1 Given a set S of n points in ,
construct its convex hull.
P2 Given a set S of n points in ,
identify all extreme points in S.
354. Lower bound in Time Complexity (cont.)
well,
In fact,
(next lecture)
364. Lower bound in Time Complexity (cont.)
Simple Polygon
374. Lower bound in Time Complexity (cont.)
Simple Polygon (cont.)
384. Lower bound in Time Complexity (cont.)
Simple Polygon (cont.)
well,
394. Lower bound in Time Complexity (cont.)
For Simple Curve Construction
404. Lower bound in Time Complexity (cont.)
For Simple Curve Construction (cont.)
414. Lower bound in Time Complexity (cont.)
For Simple Curve Construction (cont.)
425. Algorithms
435. Algorithms (cont.)
Unfortunately, such a device is not
available. Constructive but not computationally
feasible
445. Algorithms (cont.)
algorithm
455. Algorithms (cont.)
algorithm (cont.)
465. Algorithms (cont.)
Grahams algorithm
475. Algorithms (cont.)
Grahams algorithm (cont.)
485. Algorithms (cont.)
Grahams algorithm (cont.)
Algorithm
495. Algorithms (cont.)
Grahams algorithm (cont.)
VPTR
505. Algorithms (cont.)
Grahams algorithm (cont.)
Time complexity
- Choose an internal point Sort and
Construct a polygonFind convex hull
Optimal
515. Algorithms (cont.)
Any problems with Grahams algorithm?
Akl and Toussaint, efficient convex hull
algorithm for pattern recognition applications,
Proc. 4th Intl joint Conf. on Pattern
Recognition, Kyoto, Japan, 483-487, (1978).
525. Algorithms (cont.)
Akl and Toussaints Algorithm
535. Algorithms (cont.)
Akl and Toussaints Algorithm
Akl and Toussaints algorithm is specialization
of Grahams algorithm!!
545. Algorithms (cont.)
Jarvis March
- Choose an extreme point How?
- Choose next extreme point in sequences
555. Algorithms (cont.)
Jarvis March (cont.)
A point with the max. x coordinate is
extreme?Why ? Homework
of extreme pointsIf , then
Jarvis outperforms Graham.