AMS 345/CSE 355 (Fall, 2010)
Joe Mitchell
COMPUTATIONAL GEOMETRY
Homework Set # 4 – Solution Notes
(1).
O’Rourke, problem 5, section 3.2.3, page 68.
The algorithm as given in the text assumes that no three points are collinear.
If there are 3 or more
collinear points on the boundary of the convex hull, then it will report as “extreme” every pair of such points
that is properly oriented (forming an edge that has the other points on or to the left), whereas we really
want only to report the pair of points that define the endpoints of the corresponding edge of the convex hull.
Thus, we want to exclude a pair (
p
i
, p
j
) of points from being extreme if either (1) there is a point
p
k
strictly
to the right of the oriented line
p
i
p
j
or (2) there is a point
p
k
on the line
p
i
p
j
that does not lie between
p
i
and
p
j
. We give pseudocode below.
Algorithm:
Extreme Edges
for each
i
do
for each
j
negationslash
=
i
do
for each
k
negationslash
=
i
negationslash
=
j
do
if Left(
p
j
, p
i
, p
k
) or (Collinear(
p
i
, p
j
, p
k
) and NOT Between(
p
i
, p
j
, p
k
))
then (
p
i
, p
j
) is not extreme
(2).
O’Rourke, problem 4, section 3.4.1, page 72.
Consider the set of points
S
that consists of one point at (1
,
0), one at (
−
1
,
0), and
n
−
2 points (
p
2
, p
3
, . . .
)
on the unit circle centered at the origin, at angles
π/
2,
π/
4,
π/
8,
. . .
, respectively, with respect to the positive
x
axis. These
n
points all lie on the unit circle. If QuickHull(
a, b, S
) is called with
a
= (1
,
0) and
b
= (
−
1
,
0),
then we spend
n
steps to obtain that
c
=
p
2
, then
n
−
1 steps in the call to QuickHull(
a, p
2
, A
) to obtain that
c
=
p
3
, etc. The recursion is badly unbalanced, with all the remaining points always falling to the “right”
of
c
; this results in
n
+ (
n
−
1) + (
n
−
2) +
· · ·
= Θ(
n
2
) time in total.
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.
 Spring '08
 Mitchell,J
 Vector Space, Line segment, Convex geometry, Polytopes

Click to edit the document details