aımnova
DashboardMy LearningCrash CoursesStudy 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
  • Crash Courses
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Teachers
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aımnova

IB study, practice and feedback built around the real exam.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.c1e448f

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

  1. 1Route inspection (Chinese postman)
  2. 2Travelling salesman: the upper bound
A gritter must drive down every road and come back: The route-inspection (Chinese postman) problem: cover every road and return to the start, with the least total distance.
The gritting lorry: Imagine a gritting lorry that must drive along every road in a town and return to the depot, covering the least total distance.

Every vertex has even degree

  • You re-enter and leave each junction an even number of times.
  • You traverse every road exactly once (an Eulerian circuit).
  • The answer is just the sum of all the edges.

Some vertex has odd degree

  • That vertex 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 odd vertices

Find every odd-degree vertex (a connected graph always has an even number of them).

2

Shortest paths

Find the shortest path between each pair of odd vertices.

3

Cheapest pairing

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

What makes it different

  • 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.
  • Upper bound: an actual route you can find.
  • Lower bound: a value the best tour cannot beat.

Nearest-neighbour algorithm → an upper bound

1

Start

Start at the given vertex.

2

Go to the nearest

Repeatedly go to the nearest vertex not yet visited.

3

Return

When all are visited, return to the start.

Why it is an upper bound: 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.

A graph has exactly two vertices of odd degree.

Write down whether an Eulerian trail exists, and where it must start. [1 mark]

Related Math AI HL Topics

Continue learning with these related topics from the same unit:

3.1.1Distance & midpoint in 2D3.1.2Distance & midpoint in 3D3.1.3Volume and Surface Area of 3D Solids3.10.1Vector definitions
View all Math AI HL topics
Improve your exam techniqueCommand terms, paper structure, and mark-scheme tips for Math AI HL
Previous3.16.1Spanning trees & shortest pathNextPopulation and Samples4.1.1

205 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