Prove an algorithm is finite ,removing intersecting lines between dots and adding non intersecting lines

53 Views Asked by At

We have 2n dots in 2D space and each 2 dots are connected randomly (for each dot in the space we have a straight line to another dot ) .because these dots are connected randomly we will have some intersecting lines . Consider this algorithm : for each 4 dots that have 2 intersecting lines , name the dots a, b,c,d (we assume the lines ,ab and cd are intersecting ) , in order to remove the intersection we disconnect the two lines and form ac and bd .Is this algorithm finite ?

1

There are 1 best solutions below

1
On BEST ANSWER

Using the triangle inequality we deduce that the sum of the lines between the 4 points always decreases after the algorithm .

after that we can deduce the sum won't be negative or zero hence the algorithm will stop at a point .