Find the least distance from A to E
A→B→E=37;\quadA→C→B→E=55;\quadA→D→E=107;\quadA→C→D→E=111 There is no direct arc from A to E, so the least distance is the length of the shortest route, A\to B\to E.
Enter the least distance AE=37 in the table of least distances
The shortest route A\to B\to E has length 37.
Find the least distance from B to D
B→C→D=52;\quadB→E→D=68;\quadB→A→D=76;\quadB→A→C→D=80 There is no direct arc from B to D, so the least distance is the length of the shortest route, B\to C\to D.
Enter the least distance BD=52 in the table of least distances
The shortest route B\to C\to D has length 52.
Find the least distance from C to E
C→B→E=32;\quadC→A→B→E=60;\quadC→D→E=88;\quadC→F→B→E=123 There is no direct arc from C to E, so the least distance is the length of the shortest route, C\to B\to E.
Enter the least distance CE=32 in the table of least distances
The shortest route C\to B\to E has length 32.
Delete vertex E and every arc joined to it
remaining vertices:A,B,C,D,F The lower bound is built from the network on the other 5 vertices.
List the arcs of the remaining network in ascending order
BC=14,AB=19,AC=23,CD=38,CF=51,BD=52,BF=54,AD=57,AF=67,DF=89 A minimum spanning tree for these 5 vertices is now needed.
Build the minimum spanning tree of the remaining network
AB=19,BC=14,CD=38,CF=51 Each arc chosen is the shortest arc joining the tree built so far to a vertex not yet in it.
Add the lengths of the arcs of the residual tree
19+14+38+51=122 The residual minimum spanning tree has total weight 122.
Add back the two shortest arcs from E
EB=18,EC=32 In any tour, vertex E is joined to exactly two other vertices, so at least the two shortest arcs at E must be used.
Note that all the distances in this network are different
distinct weights⇒the nearest neighbour is never ambiguous With no two arcs of equal length, the nearest unvisited vertex is always unique, so the algorithm has a single well-defined output.
Recall that the nearest-neighbour algorithm gives an UPPER bound
optimal tour≤any tour found by nearest neighbour The nearest-neighbour algorithm produces a genuine tour, and the optimal tour cannot be longer than a tour we have actually found.
Recall that deleting a vertex gives a LOWER bound
residual minimum spanning tree+two shortest arcs≤optimal tour Removing a vertex from any tour leaves a path through the other vertices, which is a spanning tree of them, so it is at least as long as the minimum spanning tree.
Add the two shortest arcs to the weight of the residual tree
122+18+32=172 Deleting E gives a lower bound of 172 for the length of the optimal tour.