D1 3.2–D1 3.4 - Travelling salesman bounds

D1 3.2–D1 3.4 - Travelling salesman bounds

Visit every vertex and return to the start while keeping the total journey short. D1 3.2 distinguishes practical and classical tours; D1 3.3 builds complete shortest-distance networks and spanning-tree bounds; D1 3.4 supplies the nearest neighbour algorithm. Bounds can sometimes prove an optimum without checking every tour.

Practical and classical tours and the triangle inequality

How could you prove that a delivery tour is shortest without listing every possible order of visits? Find a feasible tour giving an upper limit, and a calculation showing that no tour can be shorter than a lower limit.

This problem visits vertices. Route inspection instead covers every edge. The two demands can produce very different journeys.

Travelling salesman problems

A tour is a walk visiting every vertex and returning to its start. In the classical travelling salesman problem, visit each vertex exactly once before returning to the start. In the practical problem, vertices may be revisited, but every vertex must be visited and the walk must return to its start.

The repeated start at the end is the necessary exception to “exactly once”. The classical networks here are complete, undirected and satisfy the triangle inequality: travelling directly is no longer than travelling through another vertex. For example, lengths AB=3,BC=4,AC=7AB=3,BC=4,AC=7 satisfy AC≤AB+BCAC\le AB+BC. If a road ACAC itself has length 1010, the road weights do not satisfy that inequality, since 10>3+410>3+4. Using shortest journey distances instead replaces that entry by 77.

Bounds on the optimum

If LL is the minimum tour length, a valid lower bound bb and upper bound uu give

b≤L≤u.b\le L\le u.

A feasible tour gives an upper bound. A lower bound need not be an attainable tour. Among valid bounds, prefer the largest lower bound and the smallest upper bound. Not in the formula booklet: learn it.

A bound is not a claim that the optimum equals it. If a lower bound and a feasible tour have the same length, however, their equality proves the optimum.

Watch out

Both salesman problems return to the start. Neither requires every edge to be used. A minimum spanning tree is a set of connections, not by itself a salesman tour.

Identify the exact classical demand.

Complete shortest-distance networks

A practical road network may lack direct roads between some towns; a complete shortest-distance network records the shortest journey between every pair.

Use the pictured undirected road network: AB=2,BC=4,CD=4,DA=4,BE=4,CE=4,DE=8AB=2,BC=4,CD=4,DA=4,BE=4,CE=4,DE=8, all in kilometres. A missing direct edge does not mean the towns cannot be reached.

[DIAGRAM: asset_name: Roads and shortest journey distances; asset_slug: salesman-road-network; caption: The missing road AE becomes a shortest-distance connection of 6 km, via B.; description: A weighted undirected road network with edges AB 2 BC 4 CD 4 DA 4 BE 4 CE 4 DE 8. A blue highlighted two-edge journey follows A B E of total length 6, without adding an extra road.]
The missing road AE becomes a shortest-distance connection of 6 km, via B.

For each pair, inspect possible routes or apply Dijkstra's algorithm. Put the shortest total in the corresponding table entry. This is a distance table, not the direct-edge adjacency matrix used earlier. It is symmetric here because roads are undirected. The triangle inequality holds automatically: a journey via a third town is one available option, so the shortest journey cannot be longer than it.

Worked example 1: completing the distances

Construct the complete shortest-distance table for this road network.

Plan. Retain a direct road's weight only if no indirect route is shorter, and fill every missing pair.

The absent pairs are AC,AE,BDAC,AE,BD. Their shortest journeys are A,B,CA,B,C of length 66, A,B,EA,B,E of length 66, and B,A,DB,A,D of length 66. Direct DE=8DE=8 ties D,C,ED,C,E of length 88. The other direct roads are shortest.

ABCDEA02646B20464C64044D46408E64480\begin{array}{c|ccccc} &A&B&C&D&E\\\hline A&0&2&6&4&6\\ B&2&0&4&6&4\\ C&6&4&0&4&4\\ D&4&6&4&0&8\\ E&6&4&4&8&0 \end{array}

Answer. This table describes the complete shortest-distance network.

Check. It is symmetric, and AE=AB+BE=2+4=6AE=AB+BE=2+4=6. No table entry exceeds a two-stage journey through another town.

Change only road DEDE, reducing it from 88 to 33. A changed road can improve several pair distances, so check all affected routes.

Worked example 2: revising a distance table

Find the revised complete shortest-distance table when DE=3DE=3.

Plan. Test whether routes using the cheaper DEDE beat each former distance.

DEDE becomes 33. Possible new AEAE via DD costs 4+3=74+3=7, still greater than 66; BDBD via EE costs 4+3=74+3=7, still greater than 66; CDCD via EE costs 4+3=74+3=7, still greater than 44. The remaining pairs also keep their previous minima.

Answer. Change only the two symmetric entries DE,EDDE,ED from 88 to 33; every other entry remains as in Example 1.

Check. DE=3≤DC+CE=8DE=3\le DC+CE=8, and the unchanged values still have routes attaining them. In particular, retaining AE=6AE=6 is supported by the available journey A,B,EA,B,E.

A tour edge in the completed network may expand into several roads in reality. Expanding every edge of a classical tour produces a practical tour in the road network, possibly revisiting intermediate towns. Conversely, shortcutting repeated vertices in the complete distance network cannot increase length. This connects the two models.

Nearest-neighbour upper bounds

Nearest neighbour builds an actual tour by making a local choice from the most recently visited vertex.

Start at the specified vertex. Go to the nearest unvisited vertex; repeat from your new position until every vertex has been visited. Then return to the start and add that final distance. Unlike Prim's algorithm, do not search from all included vertices. Ties permit either nearest choice unless the question supplies a rule.

Use the original complete table from Example 1. For the examples below break a tie by alphabetical order, so that the trace can be followed exactly.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account