The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds | OCR 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 problemPractical problem
Each vertex visitedExactly onceAt least once
Can pass through a town twice?NoYes, if that is shorter
Use it whenThe question says each vertex only onceReal journeys (the usual case)

Why we settle for bounds

  • A complete network on n vertices has (n−1)!2 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.

lower bound⩽optimal tour length⩽upper bound

💡 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.

Network of five stops A to E. Roads AB 12, AC 7, AE 10, BC 6, BD 9, CD 11, CE 8, DE 14 and a long curved road AD 20. There is no road from B to E

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 7+11=18 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) 72⩽optimal⩽85 km.
  • (b) 79 km: the smaller upper bound gives the tighter interval, 72⩽optimal⩽79.

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

  1. Start with the direct road lengths.
  2. For each pair, look for a shorter way round through other vertices. Why: in the practical problem the driver would take it.
  3. Fill gaps (pairs with no road) with the shortest route.
  4. Check the table is symmetric (for two-way roads).
ABCDE
A–1271810
B12–6914
C76–118
D18911–14
E1014814–
  • 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.

Log in · Subscribe · Start free trial

All notes in Travelling Salesperson Problem

  1. The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds
  2. Lower Bounds for the Travelling Salesperson Problem: The Deleted Vertex Method

What's inside for this topic

2 teacher notes, 67 practice questions, 40 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Next note: Lower Bounds for the Travelling Salesperson Problem: The Deleted Vertex Method

All OCR A Level Further Maths topics · A Level Further Maths