7.travelling Salesman Problem
7.travelling Salesman Problem
From/To A B C D E
A ∞ 0 2 0 0
B 0 ∞ 1 0 0
C 2 1 ∞ 3 0
D 0 0 3 ∞ 4
E 0 0 0 4 ∞
•In the case of the first alternative, the
optimum assignment is A D A, but
this is not the solution of the travelling
salesman problem.
•In the case of the second alternative, the
optimum assignment is
A E C B D A
This is the complete solution for the
problem as starting from A, the salesman
returns to A visiting all the other cities.
The minimum time taken by him to travel to
all the cities is 5 + 6 + 7 + 4 + 4 = 26 hrs.
Summary – 1…