Graphs and NetworksSalesman

The Greedy Algorithm (or Nearest Neighbour Algorithm) is very simple: you start in a random city and consecutively move to the closest city you haven’t visited before. Once you have visited all cities, you stop.

Animation coming soon…

You can show that, on average, paths found using the greedy algorithm are 25% longer than the shortest possible path.