This revision note discusses more complex situations for the?travelling salesman problem?and you may wish to refer to the revision note?3.10.5 Travelling Salesman Problem.
In some real-life contexts a graph may not be?complete?nor satisfy the?triangle inequality, for example, when looking at a rail network, not every stop will be connected to every other stop and it may be quicker to travel from stop A to stop B via stop C rather than to travel from A to B directly. Thus, the problem is considered to be a?practical travelling salesman problem.
Finding the?table of least distances?(or weights) can convert a?practical travelling salesman problem?into a?classical travelling salesman problem?that can then be analysed.
The graph?G?below contains six vertices representing villages and the roads that connect them. The weighting of the edges represents the time, in minutes, that it takes to walk along a particular road between two villages.
A | B | C | D | E | F | |
A | ||||||
B | ||||||
C | ||||||
D | ||||||
E | ||||||
F |
As the number of vertices in a graph increases, so does the number of possible Hamiltonian cycles and it can become impractical to solve. The?nearest neighbour algorithm?can be used to find the?upper bound?for the?minimum?weight?Hamiltonian cycle.
The table below contains six vertices representing villages and the roads that connect them. The weighting of the edges represents the time in minutes that it takes to walk along a particular road between two villages.
A | B | C | D | E | F | |
A | - | 14 | 7 | 11 | 13 | 21 |
B | 14 | - | 13 | 18 | 13 | 9 |
C | 7 | 13 | - | 5 | 6 | 14 |
D | 11 | 18 | 5 | - | 10 | 18 |
E | 13 | 13 | 6 | 10 | - | 8 |
F | 21 | 9 | 14 | 18 | 8 | - |
Starting at village A, use the nearest neighbour algorithm to find the upper bound of the time it would take to visit each village and return to village A.
The?deleted vertex algorithm?can be used to find the?lower bound?for the?minimum?weight?Hamiltonian cycle.
The table below contains six vertices representing villages and the roads that connect them. The weighting of the edges represents the time in minutes that it takes to walk along a particular road between two villages.
A | B | C | D | E | F | |
A | - | 14 | 7 | 11 | 13 | 21 |
B | 14 | - | 13 | 18 | 13 | 9 |
C | 7 | 13 | - | 5 | 6 | 14 |
D | 11 | 18 | 5 | - | 10 | 8 |
E | 13 | 13 | 6 | 10 | - | 8 |
F | 21 | 9 | 14 | 18 | 8 | - |
转载自savemyexams
? 2025. All Rights Reserved. 沪ICP备2023009024号-1