Permuting Polygons

654 views
550 views

Published on

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

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
654
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Permuting Polygons

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

×