Photo AI

Last Updated Sep 27, 2025

The Travelling Salesman Problem Simplified Revision Notes

Revision notes with simplified explanations to understand The Travelling Salesman Problem quickly and effectively.

user avatar
user avatar
user avatar
user avatar
user avatar

346+ students studying

10.6.1 The Travelling Salesman Problem

The Travelling Salesman Problem (TSP) involves finding the shortest possible route that visits every vertex in a graph exactly once and returns to the starting vertex. It is a fundamental optimisation problem with many practical applications, such as logistics, manufacturing, and delivery systems.

Types of Travelling Salesman Problems

Classical TSP

  • The graph is complete, meaning there is a direct route between every pair of vertices.
  • The objective is to find a Hamiltonian cycle with the minimum total weight (distance or cost).
  • The weights satisfy the triangle inequality, which states:
Weight of (AC)Weight of (AB)+Weight of (BC)\text{Weight of } (A \to C) \leq \text{Weight of } (A \to B) + \text{Weight of } (B \to C)

This ensures that direct routes are never longer than indirect routes.

Practical TSP

  • The graph may not be complete, and some vertices may not have direct connections.
  • Missing edges are assigned a weight of infinity (\infty)

Algorithms for Solving TSP

Nearest Neighbour Algorithm

This heuristic provides a quick, though not always optimal, solution to the TSP. It generates an upper bound for the minimum route.

Steps:

  1. Start at the initial vertex.
  2. Move to the nearest unvisited vertex.
  3. Repeat step 2 until all vertices are visited.
  4. Return to the starting vertex.

Advantages:

  • Simple and fast.
  • Useful for generating an initial solution to improve upon.

Disadvantages:

  • May not give the optimal solution.
  • Heavily influenced by the starting vertex.

Improving the Solution

To refine the upper bound, shortcuts can be used:

  • Revisit the route generated by the nearest neighbour algorithm.
  • Replace segments of the route with shorter connections while ensuring a valid Hamiltonian cycle.

Worked Example

infoNote

Question Solve the TSP for the complete graph below using the nearest neighbour algorithm:

ABCD
A101520
B103525
C153530
D202530

Step 1: Nearest Neighbour Algorithm

  1. Start at AA
  2. Nearest vertex to A:BA:B (AB=10A \to B =10)
  3. Nearest unvisited vertex to B:DB:D (BD=25B \to D = 25)
  4. Nearest unvisited vertex to D:CD:C (DC=30D \to C = 30)
  5. Return to AA (CA=15C \to A = 15) Route: ABDCAA \to B \to D \to C \to A

Total Weight:

10+25+30+15=:highlight[80]10 + 25 + 30 + 15 = :highlight[80]

Step 2: Improving the Upper Bound

Check for shortcuts that reduce the total weight. In this example, no better shortcut exists, so the upper bound remains 80.

Note Summary

infoNote

Common Mistakes

  1. Incorrect Implementation of Nearest Neighbour Forgetting to revisit the starting vertex or failing to consider all unvisited vertices.

  2. Misinterpreting the Triangle Inequality Applying shortcuts that violate the triangle inequality can result in invalid routes.

  3. Missing Edge Cases Not accounting for infinite weights in practical TSP, which may lead to invalid or incomplete routes.

  4. Overlooking Improvement Steps Failing to refine the upper bound after the initial solution.

  5. Dependence on Starting Point Not attempting the nearest neighbour algorithm from different starting vertices to explore better solutions.

infoNote

Key Formulas/Theorems

  1. Triangle Inequality:
Weight of (AC)Weight of (AB)+Weight of (BC)\text{Weight of } (A \to C) \leq \text{Weight of } (A \to B) + \text{Weight of } (B \to C)
  1. Nearest Neighbour Selection:
Next Vertex=argmin(Weight from Current Vertex to Unvisited Vertices)\text{Next Vertex} = \arg\min(\text{Weight from Current Vertex to Unvisited Vertices})
  1. Total Route Weight:
Total Weight=Sum of Weights in Hamiltonian Cycle\text{Total Weight} = \text{Sum of Weights in Hamiltonian Cycle}
Books

Only available for registered users.

Sign up now to view the full note, or log in if you already have an account!

500K+ Students Use These Powerful Tools to Master The Travelling Salesman Problem

Enhance your understanding with flashcards, quizzes, and exams—designed to help you grasp key concepts, reinforce learning, and master any topic with confidence!

20 flashcards

Flashcards on The Travelling Salesman Problem

Revise key concepts with interactive flashcards.

Try Further Maths Decision Maths 1 Flashcards

2 quizzes

Quizzes on The Travelling Salesman Problem

Test your knowledge with fun and engaging quizzes.

Try Further Maths Decision Maths 1 Quizzes

29 questions

Exam questions on The Travelling Salesman Problem

Boost your confidence with real exam questions.

Try Further Maths Decision Maths 1 Questions

27 exams created

Exam Builder on The Travelling Salesman Problem

Create custom exams across topics for better practice!

Try Further Maths Decision Maths 1 exam builder

50 papers

Past Papers on The Travelling Salesman Problem

Practice past papers to reinforce exam experience.

Try Further Maths Decision Maths 1 Past Papers

Other Revision Notes related to The Travelling Salesman Problem you should explore

Discover More Revision Notes Related to The Travelling Salesman Problem to Deepen Your Understanding and Improve Your Mastery

96%

114 rated

The Travelling Salesman Problem

Upper & Lower Bounds for the Travelling Salesman Problem

user avatar
user avatar
user avatar
user avatar
user avatar

251+ studying

200KViews
Load more notes

Join 500,000+ A-Level students using SimpleStudy...

Join Thousands of A-Level Students Using SimpleStudy to Learn Smarter, Stay Organized, and Boost Their Grades with Confidence!

97% of Students

Report Improved Results

98% of Students

Recommend to friends

500,000+

Students Supported

50 Million+

Questions answered