SlideShare a Scribd company logo
1 of 78
Permuting Polygons
      Thomas 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                           really not
                                 simple
               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.




                                        not convex
        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.
• the new polygon contains
  the old one
• the new polygon contains
  the old one
• the new polygon contains
  the old one
• the new polygon contains
  the old one
• the new polygon contains
  the old one
• the new kernel contains
  the old one
• the new polygon contains
  the old one
• the new kernel contains
  the old one
• 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:

• Make a star-shaped polygon.
• Turn it into a convex polygon.
  You may ONLY swap adjacent
  edges!
Instructions:

• 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:

 • 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


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

    = n(n - 1)/2

    = n2 /2 - n/2
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 )
2
(n - 3) + (n - 4) + ... + 2 + 1

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

   = 1/2n2 - 5/2n + 3




                                     2
                                  O(n )
Permuting Polygons

More Related Content

Similar to Permuting Polygons

11 x1 t11 08 geometrical theorems
11 x1 t11 08 geometrical theorems11 x1 t11 08 geometrical theorems
11 x1 t11 08 geometrical theoremsNigel Simmons
 
Convolution and Residue Method in Inverse Z Transform
Convolution and Residue Method in Inverse Z TransformConvolution and Residue Method in Inverse Z Transform
Convolution and Residue Method in Inverse Z TransformShivang Dubey
 
Disc Week 1.pdf
Disc Week 1.pdfDisc Week 1.pdf
Disc Week 1.pdfMishiRana5
 
11 x1 t11 08 geometrical theorems (2012)
11 x1 t11 08 geometrical theorems (2012)11 x1 t11 08 geometrical theorems (2012)
11 x1 t11 08 geometrical theorems (2012)Nigel Simmons
 
11X1 T12 08 geometrical theorems (2011)
11X1 T12 08 geometrical theorems (2011)11X1 T12 08 geometrical theorems (2011)
11X1 T12 08 geometrical theorems (2011)Nigel Simmons
 
11X1 T11 08 geometrical theorems (2010)
11X1 T11 08 geometrical theorems (2010)11X1 T11 08 geometrical theorems (2010)
11X1 T11 08 geometrical theorems (2010)Nigel Simmons
 
Root locus description in lucid way by ME IITB
Root locus description in lucid way by ME IITBRoot locus description in lucid way by ME IITB
Root locus description in lucid way by ME IITBAmreshAman
 
Polygons 100830211438-phpapp01
Polygons 100830211438-phpapp01Polygons 100830211438-phpapp01
Polygons 100830211438-phpapp01rfarinas
 
Planar projective geometry
Planar projective geometryPlanar projective geometry
Planar projective geometryWangdo Kim
 
1. circles and theorems - introduction
1. circles and theorems - introduction1. circles and theorems - introduction
1. circles and theorems - introductionLiveOnlineClassesInd
 
Transform as a vector? Tying functional parity with rotation angle of coordin...
Transform as a vector? Tying functional parity with rotation angle of coordin...Transform as a vector? Tying functional parity with rotation angle of coordin...
Transform as a vector? Tying functional parity with rotation angle of coordin...SayakBhattacharjee4
 
Characterizing the Distortion of Some Simple Euclidean Embeddings
Characterizing the Distortion of Some Simple Euclidean EmbeddingsCharacterizing the Distortion of Some Simple Euclidean Embeddings
Characterizing the Distortion of Some Simple Euclidean EmbeddingsDon Sheehy
 
01 Fundamentals of Geometry
01 Fundamentals of Geometry01 Fundamentals of Geometry
01 Fundamentals of GeometryAndreo Ayuro
 
Lesson 1: The Tangent and Velocity Problems
Lesson 1: The Tangent and Velocity ProblemsLesson 1: The Tangent and Velocity Problems
Lesson 1: The Tangent and Velocity ProblemsMatthew Leingang
 
Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...
Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...
Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...Kasun Ranga Wijeweera
 

Similar to Permuting Polygons (18)

CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
 
11 x1 t11 08 geometrical theorems
11 x1 t11 08 geometrical theorems11 x1 t11 08 geometrical theorems
11 x1 t11 08 geometrical theorems
 
Convolution and Residue Method in Inverse Z Transform
Convolution and Residue Method in Inverse Z TransformConvolution and Residue Method in Inverse Z Transform
Convolution and Residue Method in Inverse Z Transform
 
Disc Week 1.pdf
Disc Week 1.pdfDisc Week 1.pdf
Disc Week 1.pdf
 
11 x1 t11 08 geometrical theorems (2012)
11 x1 t11 08 geometrical theorems (2012)11 x1 t11 08 geometrical theorems (2012)
11 x1 t11 08 geometrical theorems (2012)
 
11X1 T12 08 geometrical theorems (2011)
11X1 T12 08 geometrical theorems (2011)11X1 T12 08 geometrical theorems (2011)
11X1 T12 08 geometrical theorems (2011)
 
11X1 T11 08 geometrical theorems (2010)
11X1 T11 08 geometrical theorems (2010)11X1 T11 08 geometrical theorems (2010)
11X1 T11 08 geometrical theorems (2010)
 
Root locus description in lucid way by ME IITB
Root locus description in lucid way by ME IITBRoot locus description in lucid way by ME IITB
Root locus description in lucid way by ME IITB
 
Polygons 100830211438-phpapp01
Polygons 100830211438-phpapp01Polygons 100830211438-phpapp01
Polygons 100830211438-phpapp01
 
Planar projective geometry
Planar projective geometryPlanar projective geometry
Planar projective geometry
 
1. circles and theorems - introduction
1. circles and theorems - introduction1. circles and theorems - introduction
1. circles and theorems - introduction
 
Curves part two
Curves part twoCurves part two
Curves part two
 
Transform as a vector? Tying functional parity with rotation angle of coordin...
Transform as a vector? Tying functional parity with rotation angle of coordin...Transform as a vector? Tying functional parity with rotation angle of coordin...
Transform as a vector? Tying functional parity with rotation angle of coordin...
 
Characterizing the Distortion of Some Simple Euclidean Embeddings
Characterizing the Distortion of Some Simple Euclidean EmbeddingsCharacterizing the Distortion of Some Simple Euclidean Embeddings
Characterizing the Distortion of Some Simple Euclidean Embeddings
 
01 Fundamentals of Geometry
01 Fundamentals of Geometry01 Fundamentals of Geometry
01 Fundamentals of Geometry
 
Lesson 1: The Tangent and Velocity Problems
Lesson 1: The Tangent and Velocity ProblemsLesson 1: The Tangent and Velocity Problems
Lesson 1: The Tangent and Velocity Problems
 
Ece4510 notes06
Ece4510 notes06Ece4510 notes06
Ece4510 notes06
 
Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...
Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...
Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Me...
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Recently uploaded (20)

TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

Permuting Polygons

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