Example TSP problem
|
A B
C | D E
|
F G
---------------+-------------------+-----------+------------
Philadelphia A
|
267 162 |
188 283 | 149 98
Pittsburgh B
|
267 179 |
357 183 | 241 237
Mansfield
C
| 162
179 |
179 121 | 62
79
---------------+-------------------+-----------+------------
Albany
D
| 188
357 179 | 259
| 117 130
Buffalo
E
| 283
183 121 | 259
| 160 196
---------------+-------------------+-----------+------------
Binghamton F
| 149 241 62 |
117 160
| 51
Scranton
G
| 98
237 79 | 130 196
|
51
| A
B
C | D E
|
F G
--+-------------------+-----------+------------
A
|
267 162 |
188 283 | 149 98
B
|
267 179 |
357 183 | 241 237
C
| 162
179 |
179 121 | 62
79
--+-------------------+-----------+------------
D |
188
357 179 | 259
| 117 130
E |
283
183 121 | 259
| 160 196
--+-------------------+-----------+------------
F
| 149 241 62 |
117 160
| 51
G |
98
237 79 | 130 196
|
51
DISTANCES BY NEAREST
NEIGHBOR
BEGINNING AT:
A
1060
B
1020
C
1020
D
1006
E
1060
F
1006
G
1002
BEST ROUTE BY REPETITIVE
NEAREST
NEIGHBOR:
G
1002
ROUTE BY NEAREST NEIGHBOR:
G
->
F 51
F
->
C 62
C
->
E 121
E
->
B 183
B
->
A 267
A
->
D 188
D
->
G 130
------
DISTANCE:
1002
ROUTE FOUND BY CHEAPEST
LINK:
A
->
G 98
G
->
F 51
F
->
C 62
C
->
E 121
E
->
B 183
B
->
D 357
D
->
A 188
------
DISTANCE:
1060
ROUTE FOUND BY BRUTE
FORCE:
B
->
E 183
E
->
C 121
C
->
F 62
F
->
D 117
D
->
G 130
G
->
A 98
A
->
B 267
------
DISTANCE:
978