Practical application – solving the TSP

Let's first look at the problem statement for the TSP, which is a well-known problem that was coined as a challenge in the 1930s. The TSP is an NP-hard problem. To start with, we can randomly generate a tour that meets the condition of visiting all of the cities without caring about the optimal solution. Then, we can work to improve the solution with each iteration. Each tour generated in an iteration is called a candidate solution (also called a certificate). Proving that a certificate is optimal requires an exponentially increasing amount of time. Instead, different heuristics-based solutions are used that generate tours that are near to optimal but are not optimal.

A traveling salesman needs to visit a given list of cities to get their job done:

INPUT A list of n cities (denoted as V) and the distances between each pair of cities, d ij (1 ≤ i, j ≤ n)
OUTPUT The shortest tour that visits each city exactly once and returns to the initial city

 

Note the following:

  • The distances between the cities on the list are known,
  • Each city in the given list needs to be visited exactly once.

Can we generate the travel plan for the salesman? What will be the optimal solution that can minimize the total distance traveled by the traveling salesman?

The following are the distances between five Canadian cities that we can use for the TSP:

Ottawa Montreal Kingston Toronto Sudbury
Ottawa - 199 196 450 484
Montreal 199 - 287 542 680
Kingston 196 287 - 263 634
Toronto 450 542 263 - 400
Sudbury 484 680 634 400 -

 

Note that the objective is to get a tour that starts and ends in the initial city. For example, a typical tour can be Ottawa–Sudbury–Montreal–Kingston–Toronto–Ottawa with a cost of 484 + 680 + 287 + 263 + 450 = 2,164. Is this the tour in which the salesman has to travel the minimum distance? What will be the optimal solution that can minimize the total distance traveled by the traveling salesman? I will leave this up to you to think about and calculate.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.44.108