Download - Permuting Polygons
![Page 1: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/1.jpg)
Permuting PolygonsThomas Henderson
Under the direction of Dr. Paul Latiolais
Second reader
Dr. Bin Jiang
![Page 2: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/2.jpg)
types of polygons
![Page 3: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/3.jpg)
a polygon is simple if it does not self-intersect.
simple
![Page 4: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/4.jpg)
a polygon is simple if it does not self-intersect.
simple
not simple
![Page 5: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/5.jpg)
a polygon is simple if it does not self-intersect.
simple
not simple
really not simple
![Page 6: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/6.jpg)
a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.
![Page 7: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/7.jpg)
a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.
convex
![Page 8: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/8.jpg)
a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.
convex
![Page 9: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/9.jpg)
a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.
convex
![Page 10: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/10.jpg)
a polygon is convex if, given two points in the polygon, the line segment joining them is also in the polygon.
convexnot convex
![Page 11: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/11.jpg)
a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.
![Page 12: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/12.jpg)
a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.
k
![Page 13: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/13.jpg)
a polygon is star-shaped if all points in the polygon can be seen from some point in the polygon's interior.
k
![Page 14: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/14.jpg)
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.
![Page 15: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/15.jpg)
this polygon is NOT star-shaped.
![Page 16: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/16.jpg)
this polygon is NOT star-shaped.
![Page 17: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/17.jpg)
this polygon is NOT star-shaped.
![Page 18: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/18.jpg)
this polygon is NOT star-shaped. the kernel is empty.
![Page 19: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/19.jpg)
a polygon can be oriented by adding a direction to every edge.
![Page 20: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/20.jpg)
a polygon can be oriented by adding a consistent direction to every edge.
![Page 21: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/21.jpg)
a polygon can be oriented by adding a consistent direction to every edge.
the polygon is oriented (clockwise).
![Page 22: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/22.jpg)
edge swaps
![Page 23: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/23.jpg)
![Page 24: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/24.jpg)
![Page 25: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/25.jpg)
![Page 26: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/26.jpg)
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.
![Page 27: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/27.jpg)
![Page 28: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/28.jpg)
![Page 29: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/29.jpg)
![Page 30: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/30.jpg)
![Page 31: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/31.jpg)
1. the new polygon contains the old one
![Page 32: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/32.jpg)
1. the new polygon contains the old one
![Page 33: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/33.jpg)
1. the new polygon contains the old one
![Page 34: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/34.jpg)
1. the new polygon contains the old one
![Page 35: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/35.jpg)
1. the new polygon contains the old one
2. the new kernel contains the old one
![Page 36: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/36.jpg)
1. the new polygon contains the old one
2. the new kernel contains the old one
3. the new polygon is star-shaped
![Page 37: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/37.jpg)
convexification
![Page 38: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/38.jpg)
Problem: Given a star-shaped polygon, can you make it a convex polygon by swapping edges?
![Page 39: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/39.jpg)
Problem: Given a star-shaped polygon, can you make it a convex polygon by swapping edges?
no, seriously: can you?
![Page 40: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/40.jpg)
Instructions: 1. Make a star-shaped polygon.• Turn it into a convex polygon.
You may ONLY swap adjacent edges!
![Page 41: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/41.jpg)
Instructions: 1. Make a star-shaped polygon.• Turn it into a convex polygon.
You may ONLY swap adjacent edges!
go!
![Page 42: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/42.jpg)
![Page 43: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/43.jpg)
![Page 44: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/44.jpg)
The Convexification Algorithm
![Page 45: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/45.jpg)
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
![Page 46: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/46.jpg)
Theorem: The Convexification Algorithm will convexify any star-shaped polygon.
![Page 47: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/47.jpg)
The Idea of the Proof: Show that any two edges of any star-shaped polygon will be swapped at most once.
![Page 48: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/48.jpg)
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.
![Page 49: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/49.jpg)
Case 1: a and b form a RHT
![Page 50: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/50.jpg)
Case 1: a and b form a RHT
![Page 51: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/51.jpg)
Case 1: a and b form a RHT
ZERO SWAPS
![Page 52: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/52.jpg)
Case 2: a and b form a LHT
![Page 53: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/53.jpg)
Case 2: a and b form a LHT
![Page 54: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/54.jpg)
Case 2: a and b form a LHT
![Page 55: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/55.jpg)
ONE SWAP
![Page 56: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/56.jpg)
?????
??
![Page 57: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/57.jpg)
?????
??
impossible!
![Page 58: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/58.jpg)
![Page 59: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/59.jpg)
![Page 60: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/60.jpg)
![Page 61: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/61.jpg)
![Page 62: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/62.jpg)
![Page 63: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/63.jpg)
if a encounters any RHTs along the way, it stops.
![Page 64: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/64.jpg)
if a encounters any RHTs along the way, it stops.
what if there are ONLY LHTs?
![Page 65: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/65.jpg)
![Page 66: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/66.jpg)
![Page 67: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/67.jpg)
contradiction!
![Page 68: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/68.jpg)
contradiction!(the polygon was assumed to be star-shaped)
![Page 69: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/69.jpg)
analysis of algorithms
![Page 70: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/70.jpg)
What is the worst possible behavior of the Convexification Algorithm?
![Page 71: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/71.jpg)
![Page 72: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/72.jpg)
What is the worst possible behavior of the Convexification Algorithm?
![Page 73: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/73.jpg)
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
![Page 74: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/74.jpg)
(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
![Page 75: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/75.jpg)
![Page 76: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/76.jpg)
2
![Page 77: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/77.jpg)
(n - 3) + (n - 4) + ... + 2 + 1
= (n - 3)(n - 2)/2
= 1/2n - 5/2n + 32
2O(n )
![Page 78: Permuting Polygons](https://reader034.vdocuments.us/reader034/viewer/2022052601/558b4cefd8b42a272a8b4761/html5/thumbnails/78.jpg)