SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie 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 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
 
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
 
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
 

Ähnlich wie 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 T11 08 geometrical theorems (2010)
11X1 T11 08 geometrical theorems (2010)11X1 T11 08 geometrical theorems (2010)
11X1 T11 08 geometrical theorems (2010)
 
11X1 T12 08 geometrical theorems (2011)
11X1 T12 08 geometrical theorems (2011)11X1 T12 08 geometrical theorems (2011)
11X1 T12 08 geometrical theorems (2011)
 
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...
 

Kürzlich hochgeladen

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Kürzlich hochgeladen (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

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 )