Travelling salesman Flashcards
What is a tour
A walk which visits every vertex, returning to its starting vertex. A tour which visits every vertex exactly once is a hamiltonian cycle
Diff between a tour and cycle
A tour can visit vertices multiple times, a cycle can only visit each one once (apart from starting/ending)
Travelling salesman practical vs classical
Classical - Visit each vertex exactly once
Practical - Visit each vertex at least once
before returning to starting vertex
When classical and practical are equivalent
If network is complete and edge distances are the least distance from A-B (satisfies triangle inequality)
Methods of finding upper/lower bounds
Upper - mst - prims/kruksal/nearestneighbour
Lower - residual mst
Why nn might be favourable over prims
Finding mst + shortcuts for large networks inefficient, nearest neighbour provides a hamiltonian cycle.
Nearest neighbour finds a Hamiltonian Cycle, Primm finds a minimum spanning tree.
Nearest neighbour finds the closest vertex to the vertex last chosen, Primm finds the closest vertex to any of the vertices already selected
(Nearest neighbour u do with every vertex then see lowest UB)
Explain why there must be a solution to classical travelling salesman for any complete network
In a complete graph any two vertices are connected. Hence, after fixing the start vertex,
you can visit all other vertices in arbitrary order. The tour of that type which has
minimum total weight provides the solution to the classic problem.
For example consider 4
K with vertices A,B,C,D and take A as a start vertex. Since there
is an edge between any two nodes, ABCDA, ABDCA, ACBDA, ACDBA, ADBCA and
ADCBA are all possible tours. The one of minimum weight provides a solution to
classical problems. Similarly, for any other vertex.
Note when using RMST to calculate highest upper bound
Delete arc find Mst then add on lowest weight. Only provides solution to classical problem, if u want practical then u need to apply rmst to table of shortest distances
Nearest neighbour
Diff to Prim’s in that next arc MUST come from previously chosen vertex, can lead to drawbacks as can end up “forcing” long arcs