Traveling Salesman Problem (TSP)

What is TSP?

There are brute force way and dynamic programing way.

The brute force way to solve TSP is to compute the cost of every possible tour. O(n!) time complexity.

Dynamic Programing (DP) is to compute each node utilizing the computed value for node N-1. So there are two sets of values to store, one is the set of visited nodes in the subpath, the other is the index of the last visited node in the path.

to be added…

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.