Search code examples
graph-theoryshortest-pathtraveling-salesman

Difference between Shortest Path and Djikstra's Algorithm and Travelling Salesman


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.


Solution

  • "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.