1

What is the difference between Shortest Path algorithm and Djikstras Algorithm and Travelling Salesman? As per what I know is in Shortest Path We do not travel through all the vertex with shortest path. In Travelling Salesman Problem we travel through all the vertices only once. and about Djikstra's Algorithm what I learnt is it is same as Travelling Salesmen. but the video tutorials (VIDEO) says something different.

Please Explain.

vishalkin
  • 1,175
  • 2
  • 12
  • 24

2 Answers2

1

"Shortest Path Problem" defines the problem of finding the shortest (or least cost) path from one source (start) node to one sink (end) node of a graph.

"Djikstras Algorithm" is an algorithm to solve the "Shortest Path Problem".

"Travelling Salesman Problem" defines the problem of finding the shortest (or least cost) path to navigate ALL "customer" NODES of a graph starting from one source node and finally return to this source node.

Travelling Salesman Problem is known to be a NP-hard problem.

Ken Cheung
  • 1,778
  • 14
  • 13
0

Well with the dijkstra algorithm you find the shortest way. lets say from A to G. I think traveling salesman is about the find the shortest way for traveling every point and than arrive at the start point again like a circle. A => B => C => D => A

Pascal
  • 122
  • 5