Travelling Salesman Problem Solution
Step 1: Define the Problem
The Travelling Salesman Problem (TSP) involves finding the shortest possible route that
visits each city exactly once and returns to the starting city. The given cost matrix is:
C1 C2 C3 C4 C5
C1 ∞ 10 13 11 12
C2 10 ∞ 12 10 11
C3 14 13 ∞ 13 11
C4 11 10 14 ∞ 10
C5 12 11 12 10 ∞
Step 2: List All Permutations
To solve the TSP, all possible permutations of the cities are generated. Each permutation
represents a potential route. For example:
C1 -> C2 -> C3 -> C4 -> C5
C1 -> C2 -> C3 -> C5 -> C4
C1 -> C2 -> C4 -> C3 -> C5
C1 -> C2 -> C4 -> C5 -> C3
C1 -> C2 -> C5 -> C3 -> C4
Step 3: Calculate the Total Cost for Each Permutation
For each route, the total cost is calculated by summing up the costs of traveling between
consecutive cities in the route, including returning to the starting city.
Step 4: Identify the Optimal Route
After calculating the total cost for all possible routes, the route with the minimum cost is
identified as the optimal route.
Solution
The optimal path is: C1 -> C2 -> C3 -> C5 -> C4
The minimum cost is: 54