Travelling Salesperson
Problem
Presented By:- Akshay Ingole(M.Sc II)
Date:- 11-2-2019
(TSP)
What is TSP?
 Design the shortest, or minimal cost,
route for a salesman who wants to
travel EVERY cities ONLY ONCE
and ,lastly, backs to home city.
 In graph, we need to find a tour that
starts at a node, visits every other
node exactly once, and returns to the
starting node.
What is TSP
 Definition: Find a path through a
weighted graph which starts and ends
at the same vertex, includes every
other vertex exactly once, and
minimizes the total cost of edges.
 Easy to State
 Difficult to Solve
 A route returning to the beginning is
known as a Hamiltonian Circuit
 A route not returning to the beginning is
known as a Hamiltonian Path
Travelling Salesman Problem
Example :-
The following list of cities and want to visit each
city once, return back to home:

 Pune (Home)(A)
 Bangalore(B)
 Chennai(C)
 Delhi(D)
 Kolkata(E)
 Shri Nagar(F)
Let say that , These are the distances from the cities and want
to go from Home-city(Pune) to Shri Nagar with minimum cost. In
which order/path he do these?
Travelling Salesman Problem Explanation :
We visit Cities As follows Using Above algorithm,
 A → E = 20
 E → C = 42
 C → B = 22
 B → D = 58
 D → F = 92
 F → A = 40
 Total Cost = 20 + 42 + 22 + 58 + 92 + 40 = 274
We Solve the problem using Nearest neighbor algorithm:
Algorithm:
1. Select a city as current city.
2. Find out the shortest edge connecting the current city and an
unvisited city.
3. Set the new city as current city.
4. Mark the previous current city as visited.
5. If all the cities are visited, then terminate.
6. Go to step 2
Thank
You….

Travelling salesperson problem

  • 1.
    Travelling Salesperson Problem Presented By:-Akshay Ingole(M.Sc II) Date:- 11-2-2019 (TSP)
  • 2.
    What is TSP? Design the shortest, or minimal cost, route for a salesman who wants to travel EVERY cities ONLY ONCE and ,lastly, backs to home city.  In graph, we need to find a tour that starts at a node, visits every other node exactly once, and returns to the starting node.
  • 3.
    What is TSP Definition: Find a path through a weighted graph which starts and ends at the same vertex, includes every other vertex exactly once, and minimizes the total cost of edges.  Easy to State  Difficult to Solve
  • 4.
     A routereturning to the beginning is known as a Hamiltonian Circuit  A route not returning to the beginning is known as a Hamiltonian Path
  • 5.
    Travelling Salesman Problem Example:- The following list of cities and want to visit each city once, return back to home:   Pune (Home)(A)  Bangalore(B)  Chennai(C)  Delhi(D)  Kolkata(E)  Shri Nagar(F)
  • 6.
    Let say that, These are the distances from the cities and want to go from Home-city(Pune) to Shri Nagar with minimum cost. In which order/path he do these?
  • 7.
    Travelling Salesman ProblemExplanation : We visit Cities As follows Using Above algorithm,  A → E = 20  E → C = 42  C → B = 22  B → D = 58  D → F = 92  F → A = 40  Total Cost = 20 + 42 + 22 + 58 + 92 + 40 = 274
  • 8.
    We Solve theproblem using Nearest neighbor algorithm: Algorithm: 1. Select a city as current city. 2. Find out the shortest edge connecting the current city and an unvisited city. 3. Set the new city as current city. 4. Mark the previous current city as visited. 5. If all the cities are visited, then terminate. 6. Go to step 2
  • 9.