Traveling-Salesman Problem

 

1

 

2

 

4

 

3

 

Distance matrix

 

Step 3:

 

1

 

2

 

3

 

4

 

repeat step 2 until there is no

 

unvisited city.

 

1

 

\

 

40

 

55

 

28

 

In this case:

 

2

 

40

 

\

 

16

 

7

 

H (1, 2, 3) = 31

 

3

 

55

 

16

 

\

 

66

 

H (2, 4, 3) = 75

 

So we insert 3 between 1 and 2

 

4

 

28

 

7

 

66

 

\