23.
let P be a clockwise-oriented,
star-shaped polygon.
let a and b be edges of P which
are adjacent, and which form a
left-hand turn.
let k be a point in the kernel of P.
36.
The Convexification Algorithm
Traverse the polygon in the
direction it is oriented. When you
come to a turn:
• if the turn is a RHT, do nothing
and continue
• if the turn is a LHT, swap the
edges and continue
37.
Theorem: The Convexification
Algorithm will convexify any
star-shaped polygon.
38.
The Idea of the Proof:
Show that any two edges
of any star-shaped
polygon will be swapped
at most once.
39.
let P be a clockwise-oriented, star-shaped
polygon.
let a and b be edges of P which are adjacent.
let k be a point in the kernel of P.
let L be a line through k, and parallel to a.
54.
What is the worst possible
behavior of the Convexification
Algorithm?
55.
What is the worst possible
behavior of the Convexification
Algorithm?
56.
Suppose P has n sides. If the
algorithm must swap every side
with every other side, the number
of swaps is
(n - 1) + (n - 2) + ... + 2 + 1
= n(n - 1)/2
= n2 /2 - n/2
57.
Suppose P has n sides. If the
algorithm must swap every side
with every other side, the number
of swaps is
(n - 1) + (n - 2) + ... + 2 + 1
= n(n - 1)/2 2
= n2 /2 - n/2
O(n )
Be the first to comment