Example #1.
Here are the weights for a complete graph with 6 vertices.
Scroll down for the analysis.
| A B |
C D | E F
--+------------+---------------------
A
| 8 |
6 5 | 2 9
B |
8 | 14
11 | 10 17
--+------------+-----------+---------
C |
6 14
| 3 |
5 6
D |
5 11 |
3 |
4 9
--+------------+-----------+---------
E |
2 10 | 5 4
| 7
F |
9 17 | 6 9
| 7
DISTANCES BY
NEAREST NEIGHBOR BEGINNING AT:
A
40
B
40
C
40
D
44
E
43
F
40
BEST ROUTE BY REPETITIVE NEAREST
NEIGHBOR:
A
40
ROUTE BY NEAREST NEIGHBOR:
A
->
E
2
E
->
D
4
D
->
C
3
C
->
F
6
F
->
B
17
B
->
A
8
------
DISTANCE:
40
ROUTE FOUND BY CHEAPEST LINK:
A
->
E
2
E
->
D
4
D
->
C
3
C
->
F
6
F
->
B
17
B
->
A
8
------
DISTANCE:
40
ROUTE FOUND BY BRUTE FORCE:
B
->
D
11
D
->
C
3
C
->
F
6
F
->
E
7
E
->
A
2
A
->
B
8
------
DISTANCE:
37