Permuting Polygons

Post on 25-Jun-2015

504 views 0 download

Tags:

description

On a problem of polygons, convexity, and computational complexity.

Transcript of Permuting Polygons

Permuting PolygonsThomas Henderson

Under the direction of Dr. Paul Latiolais

 Second reader

Dr. Bin Jiang

types of polygons

a polygon is simple if it does not self-intersect.

simple

a polygon is simple if it does not self-intersect.

simple

not simple

a polygon is simple if it does not self-intersect.

simple

not simple

really not simple

a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.

a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.

convex

a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.

convex

a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.

convex

a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.

convexnot convex

a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.

a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.

k

a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.

k

a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.

k k is in the kernel of the polygon.

this polygon is NOT star-shaped.

this polygon is NOT star-shaped.

this polygon is NOT star-shaped.

this polygon is NOT star-shaped. the kernel is empty.

a polygon can be oriented by adding a direction to every edge.

a polygon can be oriented by adding a consistent direction to every edge.

a polygon can be oriented by adding a consistent direction to every edge.

the polygon is oriented (clockwise).

edge swaps

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.

1. the new polygon contains the old one

1. the new polygon contains the old one

1. the new polygon contains the old one

1. the new polygon contains the old one

1. the new polygon contains the old one

2. the new kernel contains the old one

1. the new polygon contains the old one

2. the new kernel contains the old one

3. the new polygon is star-shaped

convexification

Problem: Given a star-shaped polygon, can you make it a convex polygon by swapping edges?

Problem: Given a star-shaped polygon, can you make it a convex polygon by swapping edges?

no, seriously: can you?

Instructions: 1. Make a star-shaped polygon.• Turn it into a convex polygon.

You may ONLY swap adjacent edges!

Instructions: 1. Make a star-shaped polygon.• Turn it into a convex polygon.

You may ONLY swap adjacent edges!

go!

The Convexification Algorithm

The Convexification Algorithm

Traverse the polygon in the direction it is oriented. When you come to a turn:

1. if the turn is a RHT, do nothing and continue

• if the turn is a LHT, swap the edges and continue

Theorem: The Convexification Algorithm will convexify any star-shaped polygon.

The Idea of the Proof: Show that any two edges of any star-shaped polygon will be swapped at most once.

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.

Case 1: a and b form a RHT

Case 1: a and b form a RHT

Case 1: a and b form a RHT

ZERO SWAPS

Case 2: a and b form a LHT

Case 2: a and b form a LHT

Case 2: a and b form a LHT

ONE SWAP

?????

??

?????

??

impossible!

if a encounters any RHTs along the way, it stops.

if a encounters any RHTs along the way, it stops.

what if there are ONLY LHTs?

contradiction!

contradiction!(the polygon was assumed to be star-shaped)

analysis of algorithms

What is the worst possible behavior of the Convexification Algorithm?

What is the worst possible behavior of the Convexification Algorithm?

Suppose P has n sides. If the algorithm must swap every side with every other side, the number of swaps is

2

(n - 1) + (n - 2) + ... + 2 + 1       = n(n - 1)/2

      = n /2 - n/2

(n - 1) + (n - 2) + ... + 2 + 1

      = n(n - 1)/2

      = n /2 - n/22O(n )

2

Suppose P has n sides. If the algorithm must swap every side with every other side, the number of swaps is

2

(n - 3) + (n - 4) + ... + 2 + 1

     = (n - 3)(n - 2)/2

     = 1/2n  - 5/2n + 32

2O(n )