Traveling Salesman Problem - Nearest Neighbor Heuristic

I can agree with you that I do not want to “pollute” the output. It is only about the second closest point from each point.

First Component (A) has an output of 13 points
Second Component (B) has an output of 11 points.
There must be 12 lines drawn between A & B , but the component outputs only 11 possible line connections.

I can agree with you that point (12) has no closest and no second closest and as well that point (0) has a second closest point, but can not be the second closest point of any other point.

So what would the twelth line be, from where to where?

Haha, I got it: Point (11) has no second closest point as well, because there is just point (12) in order for comparing and point (12) is the closest point.

1 Like