Nearest Neighbor Algorithm: The Traveling Salesman Problem
Apply the Nearest Neighbor Algorithm to solve the Traveling Salesman Problem for the given weighted graph in the interactive figure.
- Start and end at the designated vertex.
- Click on a segment to select it. The length of the segment will be added to the running path total.
- Click on the segment again to un-select it. The length of the segment will be subtracted from the running path total.
- Click on the RESET button to create a new problem.
- Before you click on the RESET button, un-select all your segments and see if you can find a better (shorter) path!