The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds | Edexcel IAL Maths notes

Free preview: The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds

The Travelling Salesperson Problem

Unit D1 (WDM11): Decision Mathematics 1

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 or by Dijkstra's algorithm).
  • 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

What I writeWhy I do it
AD: direct road 20Start with the road.
A–C–D: 7+11=18. A–B–D: 12+9=21. A–E–D: 10+14=24Try going through one other vertex.
AD = 18A–C–D wins.
BE: no road. B–C–E: 6+8=14. B–D–E: 9+14=23. B–A–E: 12+10=22There must be some route; find the shortest.
BE = 14B–C–E wins.

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 D1.3 Route Inspection and the Travelling Salesperson

  1. Route Inspection: Eulerian Routes and Two Odd Vertices
  2. Route Inspection with Four Odd Vertices and Different Start and Finish Points
  3. The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds
  4. Lower Bounds for the Travelling Salesperson Problem: The Deleted Vertex Method

What's inside for this topic

4 teacher notes, 137 practice questions, 38 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

Previous note: Route Inspection with Four Odd Vertices and Different Start and Finish Points 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 Edexcel IAL Maths topics · A Level Maths