323 views

1 Answer

2 votes
2 votes

They are similar in the sense that both traverse a graph and try to find out the shortest path with minimum cost (sum of the weights).

They are different because the shortest-path problem finds a path between two points such that the sum of the weights is minimized. At the same time, the traveling-salesman problem finds a way to cover all the points (the start and end point is the same) such that the sum of the weights is minimized. Also, the shortest-path problem is P complex, and the traveling salesman is NP-complete.

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
0 answers
3