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.
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 , or odd vertices. If all vertices are even, the shortest route has length equal to the total weight of the arcs.
Counting the arcs wrongly. Check the sum of all the orders equals twice the number of arcs.
Section 3
The algorithm
- Find the order of every vertex and list the odd vertices.
- If there are none, the route length is the total weight of the arcs.
- Otherwise pair up the odd vertices in every possible way.
- 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.
- Choose the pairing with the least total.
- 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 odd vertices there is just one pairing. For odd vertices , , , there are pairings: , and . Floyd's algorithm is not needed.
Write all three pairings down every time, even when one looks obviously best.
Section 4
Worked example
Streets , , , , , , . The orders are : 2, : 3, : 4, : 3, : 2, so and are odd. The shortest path from to is , as -- is . Total of arcs . Shortest route , with travelled twice.
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 . 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.
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
- A street cleaner must travel along every street in a small town, starting and finishing at the same junction. The junctions are , , , and , and the streets and their lengths in hundreds of metres are , , , , , and .Find the length of the shortest route that the cleaner can take.2 marks
- A network has four vertices , , and , and every pair of vertices is joined by an arc. The lengths are , , , , and . A route must traverse every arc at least once, starting and finishing at .Find the length of the shortest route.2 marks
- A gritting lorry must travel along every road in a village at least once, starting and finishing at the depot . The junctions are , , , and , and the roads and their lengths in km are , , , , , , and .List the odd vertices. Find the three ways of pairing them, and the total length of the shortest connections for each pairing.3 marks
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).