Why triangulation algorithms takes quadratic time in worst case?

76 Views Asked by At

enter image description here

The book says triangulation algorithm takes quadratic time in worst case. but why? The book says - take leftmost vertex and try to connect its neighbors. If you succeed - you get triangle and polygon enter image description here

and therefore as the consequence you get quadratic time algo. But why? I made this procedure and for a polygon of 7 vertices I performed 4 divisions... enter image description here

In general I do not see how quadratic time is possible... cannot come up with an instance.

1

There are 1 best solutions below

1
On

Your diagrams are of convex polygons. The algorithm is for a polygon which may be decidedly concave, with hundreds of edges crossing the $uw$ line.