aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Stay in the loop

Study tips, product updates, and early access to new features.

aimnova.

AI-powered IB study platform with personalised plans, instant feedback, and examiner-style marking.

IB Subjects
  • All IB Subjects
  • IB Diploma
  • IB ESS
  • IB Economics
  • IB Business Management
  • IB Math AI
  • IB Math AA
Question Banks
  • ESS Question Bank
  • Economics Question Bank
  • Business Management Question Bank
  • Math AI Question Bank
  • Math AA Question Bank
Predicted Topics 2026
  • ESS Predictions 2026
  • Economics Predictions 2026
  • Business Management Predictions 2026
  • Math AI Predictions 2026
  • Math AA Predictions 2026

Study Resources

  • Free Study Notes
  • Mock Exams
  • Revision Guide
  • Flashcards
  • Exam Skills
  • Command Terms
  • Past Paper Feedback
  • Grade Calculator
  • Exam Timetable 2026

Company

  • Features
  • Pricing
  • About Us
  • Blog
  • Contact
  • Terms
  • Privacy
  • Cookies

© 2026 Aimnova. All rights reserved.

Made with 💜 for IB students worldwide

v0.1.900
NotesMath AI HLTopic 3.16Route inspection & travelling salesman
Back to Math AI HL Topics
3.16.22 min read

Route inspection & travelling salesman

IB Mathematics: Applications and Interpretation • Unit 3

IB exam ready

Study like the top scorers do

Access a smart study planner, AI tutor, and exam vault — everything you need to hit your target grade.

Start Free Trial

Contents

  • Route inspection (Chinese postman)
  • Travelling salesman: the upper bound
A gritter must drive down every road and come back: Imagine a gritting lorry that must drive along every road in a town and return to the depot, covering the least total distance.

If you could re-enter and leave each junction an even number of times, you'd traverse every road exactly once (an Eulerian circuit) and the answer would just be the sum of all the edges. That works precisely when every vertex has even degree.

A vertex with odd degree is the problem: you must walk along some roads twice to come back to it. The route-inspection (Chinese postman) algorithm decides which roads to repeat.
The recipe: 1. Find every odd-degree vertex (a connected graph always has an even number of them).

2. Find the shortest path between each pair of odd vertices.

3. Pair the odd vertices so the total repeated distance is least, and add that to the sum of all the edges.

Shortest closed walk = (sum of all edges) + (cheapest pairing of the odd vertices).
Repeat the shortest paths between the best-paired odd-degree vertices.

IB-style question — Chinese postman

A park-keeper must inspect every path and return to the start. Path lengths (m): AB = 4, AC = 5, BC = 3, BD = 6, CE = 7, DE = 4, DF = 5, EF = 6.

The sum of all the paths is 40 m. Find the length of the shortest closed inspection walk.

Step by step

  1. Find the degree of each vertex.
  2. Odd-degree vertices: B, C, D, E (four of them).
  3. Shortest paths between the odd pairs: BC = 3, BD = 6, BE = 10 (B–D–E), CD = 9 (C–B–D), CE = 7, DE = 4.
  4. Compare the 3 ways to pair all four: (BC + DE) = 7, (BD + CE) = 13, (BE + CD) = 19. Cheapest is BC + DE = 7.
  5. Repeat those shortest paths on top of every edge.

Final answer

Shortest closed inspection walk = 47 m (repeat the B–C and D–E paths). Every path is covered, ending back at the start.

Visit every city once and come home — as short as possible: The travelling salesman problem (TSP) asks for the shortest closed route that visits every vertex exactly once and returns to the start (a Hamiltonian cycle). Unlike the postman, here you care about the vertices, not every edge.

There is no quick formula for the exact best tour, so the exam asks you to trap it between two bounds: an upper bound (an actual route you can find) and a lower bound (a value the best tour cannot beat).
Nearest-neighbour algorithm → an upper bound: Start at the given vertex. Repeatedly go to the nearest vertex not yet visited. When all are visited, return to the start. This gives a genuine route, so its length is an upper bound for the best tour (the best tour is at most this long).

It needs the complete graph (a distance between every pair) — fill any gap with the shortest path first.

IB-style question — nearest-neighbour upper bound

Five towns A, B, C, D, E have these distances (km):

AB = 20, AC = 35, AD = 42, AE = 28, BC = 34, BD = 30, BE = 25, CD = 12, CE = 40, DE = 22.

Use the nearest-neighbour algorithm starting at A to find an upper bound for the travelling-salesman tour.

Step by step

  1. From A, the nearest is B (20).
  2. From B, nearest unvisited is E (25).
  3. From E, nearest unvisited is D (22).
  4. From D, the only one left is C (12).
  5. Return from C to A (35).
  6. Add the five legs.

Final answer

Upper bound = 114 km (route A → B → E → D → C → A). The best possible tour is at most 114 km.

Try an IB Exam Question — Free AI Feedback

Test yourself on Route inspection & travelling salesman. Write your answer and get instant AI feedback — just like a real IB examiner.

Four cities P, Q, R, S have distances (km): PQ = 8, PR = 5, PS = 9, QR = 6, QS = 7, RS = 4. Use the nearest-neighbour algorithm starting at P to find an upper bound for the travelling-salesman tour. [2 marks]

Related Math AI HL Topics

Continue learning with these related topics from the same unit:

3.1.1Distance & midpoint in 2D
3.1.2Distance & midpoint in 3D
3.1.3Volume and Surface Area of 3D Solids
3.10.1Vector definitions
View all Math AI HL topics

Improve your exam technique

Command terms, paper structure, and mark-scheme tips for Math AI HL

Previous
3.16.1Spanning trees & shortest path
Next
Population and Samples4.1.1

11 questions to test your understanding

Reading is just the start. Students who tested themselves scored 82% on average — try IB-style questions with AI feedback.

Start Free TrialView All Math AI HL Topics