Introduction - If you have any usage issues, please Google them yourself
Nearest Neighbour algorithm for a TSP with 7 cities. The solution changes as the starting point is changed
The nearest neighbour (NN) algorithm (a greedy algorithm) lets the salesperson choose the nearest unvisited city as his next move. This algorithm quickly yields an effectively short route. For N cities randomly distributed on a plane, the algorithm on average yields a path 25 longer than the shortest possible path.[17] However, there exist many specially arranged city distributions which make the NN algorithm give the worst route (Gutin, Yeo, and Zverovich, 2002). This is true for both asymmetric and symmetric TSPs (Gutin and Yeo, 2007).