The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds | AQA A Level Further Maths notes
Free preview: The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds
The Travelling Salesperson Problem
AS or A level depending on your board: check your own specification for when this is taught.
Let's start with a delivery driver. She leaves the depot, must call at every shop on her list, and returns to the depot. In which order should she visit them to drive the least distance? It sounds simple. It is one of the most famous hard problems in mathematics.
- The travelling salesperson problem (TSP) asks for the shortest closed route that visits every vertex and returns to the start.
- A cycle visiting every vertex exactly once is a Hamiltonian cycle, so in a complete network the TSP asks for the Hamiltonian cycle of least weight.
- A closed route visiting every vertex is often called a tour.
Classical or practical?
| Classical problem | Practical problem | |
|---|---|---|
| Each vertex visited | Exactly once | At least once |
| Can pass through a town twice? | No | Yes, if that is shorter |
| Use it when | The question says each vertex only once | Real journeys (the usual case) |
Why we settle for bounds
- A complete network on n vertices has different Hamiltonian cycles (from the note on Hamiltonian graphs). For 5 vertices that is 12, but for 15 vertices it is over 43 billion.
- No efficient algorithm is known that always finds the best tour.
- Instead we find an upper bound (the length of a tour we know is possible) and a lower bound (a length no tour can beat). The optimal tour lies between them.
💡 In plain words
- Upper bound: "I've found a tour this long, so the best is no longer than this."
- Lower bound: "No tour can possibly be shorter than this." (Next note.)
- The closer the two, the better we know the answer.

Following the diagram
- There is no road from B to E, so the network is not complete.
- The road A to D is 20 km, but going A–C–D is only km. In the practical problem we would always use the shorter way.
- So before finding tours, we replace every distance by the shortest distance between the two vertices.
✏️ YOUR TURN 1
Try this first:
A tour of some towns is known to be 85 km long, and it has been proved that no tour can be shorter than 72 km. (a) What can you say about the optimal tour? (b) Another tour of 79 km is found. Which upper bound is better?
Answer:
- (a) km.
- (b) 79 km: the smaller upper bound gives the tighter interval, .
The Table of Least Distances
- The table of least distances gives the shortest route between every pair of vertices (by inspection, Dijkstra or Floyd).
- It makes the network complete, and it satisfies the triangle inequality: for any X, Y, Z, the distance XZ is at most XY + YZ.
- Solving the classical problem on this table solves the practical problem on the original network.
The recipe
- Start with the direct road lengths.
- For each pair, look for a shorter way round through other vertices. Why: in the practical problem the driver would take it.
- Fill gaps (pairs with no road) with the shortest route.
- Check the table is symmetric (for two-way roads).
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | – | 12 | 7 | 18 | 10 |
| B | 12 | – | 6 | 9 | 14 |
| C | 7 | 6 | – | 11 | 8 |
| D | 18 | 9 | 11 | – | 14 |
| E | 10 | 14 | 8 | 14 | – |
- Changed or new entries: AD is 18 (A–C–D) instead of 20, and BE is 14 (B–C–E) where there was no road. DE stays 14, since D–C–E is 19.
👀 Watch me do it: check two entries of the table
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
All notes in Travelling Salesperson Problem
- The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds
- Lower Bounds for the Travelling Salesperson Problem: The Deleted Vertex Method
What's inside for this topic
2 teacher notes, 53 practice questions, 40 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Next note: Lower Bounds for the Travelling Salesperson Problem: The Deleted Vertex Method
The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds on other exam boards
All AQA A Level Further Maths topics · A Level Further Maths