All revision notes topics

The route inspection problemEdexcel International A Level Maths: Revision notes

Section 1

The route inspection problem

Some jobs need every road to be travelled: a postal worker, a gritting lorry or a street cleaner. The route inspection problem, also called the Chinese postman problem, asks for the shortest route around a network that travels along every arc at least once and finishes at the start vertex. If the network can be travelled using each arc exactly once and returning to the start, the shortest route is just the sum of all the arc lengths. Otherwise some arcs must be travelled twice, and the aim is to repeat the least possible length.

Key termsroute inspection problemChinese postman problem
Exam tip

The route is closed, so it can start at any vertex on it and the length is the same.

Section 2

Orders of vertices and odd vertices

The order (or degree) of a vertex is the number of arcs meeting at it. A vertex is odd if its order is odd, and even if its order is even. A closed route that uses each arc once needs every vertex to be even. This is because each time the route enters a vertex it must leave again, using up arcs in pairs. Any network has an even number of odd vertices (never 1 or 3). In this subtopic there are 00, 22 or 44 odd vertices. If all vertices are even, the shortest route has length equal to the total weight of the arcs.

Key termsorderodd vertexeven vertex
Common mistake

Counting the arcs wrongly. Check the sum of all the orders equals twice the number of arcs.

Section 3

The algorithm

  1. Find the order of every vertex and list the odd vertices.
  2. If there are none, the route length is the total weight of the arcs.
  3. Otherwise pair up the odd vertices in every possible way.
  4. For each pairing find the shortest path between the two vertices in each pair, using inspection (the shortest path may go through other vertices) and add the lengths.
  5. Choose the pairing with the least total.
  6. The shortest route length is the total weight of the arcs plus this least total. The arcs on the chosen paths are the ones travelled twice. For 22 odd vertices there is just one pairing. For 44 odd vertices PP, QQ, RR, SS there are 33 pairings: PQ+RSPQ+RS, PR+QSPR+QS and PS+QRPS+QR. Floyd's algorithm is not needed.
Key termspairinginspection
Exam tip

Write all three pairings down every time, even when one looks obviously best.

Section 4

Worked example

Streets AB=5AB=5, AC=8AC=8, BC=4BC=4, BD=7BD=7, CD=6CD=6, CE=9CE=9, DE=3DE=3. The orders are AA: 2, BB: 3, CC: 4, DD: 3, EE: 2, so BB and DD are odd. The shortest path from BB to DD is BD=7BD=7, as BB-CC-DD is 1010. Total of arcs =5+8+4+7+6+9+3=42=5+8+4+7+6+9+3=42. Shortest route =42+7=49=42+7=49, with BDBD travelled twice.

Common mistake

Using a direct arc between odd vertices when a shorter path exists through other vertices. Always check.

Section 5

Exam skills and modifying networks

State the odd vertices, show all the pairings, give their totals and say which arcs are repeated. These are method marks. The route length is always at least the total weight of the arcs, so a smaller answer shows an error. If a new arc joins two odd vertices, both become even, so the number of odd vertices falls by 22. If it joins an odd vertex to an even vertex, the even vertex becomes odd, so the number of odd vertices is unchanged. Re-do the pairing with the new odd vertices, and compare the new route length with the old one to form an inequality for the new arc's length. The start vertex is the end vertex, so the length does not depend on where you start.

Exam tip

After a modification, keep the old pairing totals: only the odd vertices change.

That's the notes covered.

Carry on to the next subtopic.

Exam questions on The route inspection problem

  1. A street cleaner must travel along every street in a small town, starting and finishing at the same junction. The junctions are AA, BB, CC, DD and EE, and the streets and their lengths in hundreds of metres are AB=5AB=5, AC=8AC=8, BC=4BC=4, BD=7BD=7, CD=6CD=6, CE=9CE=9 and DE=3DE=3.
    Find the length of the shortest route that the cleaner can take.2 marks
  2. A network has four vertices WW, XX, YY and ZZ, and every pair of vertices is joined by an arc. The lengths are WX=6WX=6, WY=9WY=9, WZ=8WZ=8, XY=7XY=7, XZ=10XZ=10 and YZ=5YZ=5. A route must traverse every arc at least once, starting and finishing at WW.
    Find the length of the shortest route.2 marks
  3. A gritting lorry must travel along every road in a village at least once, starting and finishing at the depot AA. The junctions are AA, BB, CC, DD and EE, and the roads and their lengths in km are AB=2AB=2, AC=3AC=3, BC=13BC=13, BD=8BD=8, CD=5CD=5, CE=4CE=4, DE=11DE=11 and AE=10AE=10.
    List the odd vertices. Find the three ways of pairing them, and the total length of the shortest connections for each pairing.3 marks
See the full worksheet

Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).