Solving TSP by Dynamic Programming
Solving TSP by Dynamic Programming
Dynamic
Programming
Programming
Regard a tour to be a simple path that starts and end at
vertex 1.
Every tour consists of an edge <1,k> for some k V {1}
and a path from k to vertex 1. The path from vertex k to
vertex 1 goes through each vertex in V {1,k} exactly
once.
Let s(i, S) be the length of a shortest path starting at
vertex i, going through all vertices in S and terminating at
vertex 1.
s(1, V- {1}) is the length of an optimal salesperson tour.
From the principle of optimality it follows that:
(1)
(2)
Example