aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aimnova.

AI-powered study platform for smarter revision, past-paper analysis and examiner-style feedback.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.8afc4e3

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesMath AI HLTopic 3.16Route inspection & travelling salesman
Back to Math AI HL Topics
3.16.24 min read

Route inspection & travelling salesman (Math AI HL)

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

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.

Free preview

This is the free notes preview

You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:

  • FlashcardsLock in vocabulary and key terms with spaced repetition.
  • Practice questionsAnswer exam-style questions and get instant AI marking.
  • Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
  • Personalised study planA daily plan built around your exam date and weak areas.
Start Studying Free Full access to Aimnova Pro · cancel anytime
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 FreeView All Math AI HL Topics