...

/

Solution to Exercise 3: Finding the Best Way to Travel

Solution to Exercise 3: Finding the Best Way to Travel

Solve Exercise 3 of this chapter.

We'll cover the following...

This exercise is a modified version of the famous traveling salesman problem. Let’s solve it.

Exercise 3

The matrix GG tells us the time required to go from one city to another. As the salesman has to visit all the cities, we need to figure out how to sort them in a way that minimizes the total time spent on travel. We need to keep in mind that the salesman wants to finish in the same city he starts in.

A solution is an arrangement of the NN ...