Library Further Decision Mathematics 1 WDM11 The Route Inspection Algorithm
AS Level · Further Decision Mathematics 1 WDM11

The Route Inspection Algorithm

Revise The Route Inspection Algorithm for Further Decision Mathematics 1 WDM11 (AS Level) — revision notes and instant AI marking. Free to start.

📖 Revision notes · preview
  Edexcel A Level Further Maths — Decision 1

The Route Inspection Algorithm

The big idea: Imagine you're a postman who has to walk down every single street in a neighbourhood and get back to where you started. If some streets have to be walked twice because the network of roads doesn't "join up nicely," this chapter is all about finding the smart way to figure out which streets to repeat so your total walking distance is as small as possible.
Summary — What This Chapter Covers
  • The Route Inspection Problem (a.k.a. the Chinese Postman Problem) asks for the shortest route that travels along every edge of a graph and returns to the start.
  • Whether you need to repeat any edges depends entirely on the degree (order) of each vertex — specifically, how many vertices have an odd degree.
  • 0 odd vertices → the graph is Eulerian → no repeats needed at all.
  • 2 odd vertices → the graph is semi-Eulerian → you must repeat the shortest path connecting those two odd vertices.
  • More than 2 odd vertices (always an even number of them) → you must test every possible way of pairing them up, and repeat whichever pairing gives the smallest total.
  • The final answer = (sum of all edge weights in the original graph) + (sum of the weights of the repeated edges).
1. What Actually Is the Chinese Postman Problem?

Picture a real postman. Every morning he has to walk down every road on his route to deliver letters. He starts at the depot, and he has to end back at the depot. Naturally, he wants to walk the shortest possible total distance while still covering every road at least once.

The catch: road networks are messy. Sometimes the layout of roads means it's mathematically impossible to walk every road exactly once and return to the start — some roads will have to be walked twice. The question the algorithm answers is: which roads should be repeated to keep the extra distance as small as possible?

Formal definition

Given a weighted graph, find the route of least total weight that:

  • Traverses every edge in the graph at least once, and
  • Starts and finishes at the same vertex.
Key phrase to remember Minimise the total weight of repeated edges — you can't avoid walking every edge once, so the only thing you're actually optimising is which edges get walked twice.

Common variations you might be asked about

  • Different start and finish vertices — e.g. a delivery van starts at the depot but ends its shift at home.
  • Edges disregarded — e.g. a particular road is closed for roadworks, so it's removed from the graph entirely.
  • Routes that require deliberate repetition — e.g. a road-sweeping lorry that has to sweep both sides of every road, meaning every edge is effectively walked twice on purpose (this doubles every edge weight rather than looking for odd vertices).
Quick analogy Think of it like tracing a shape without lifting your pencil and without going over any line twice. Some shapes you can trace perfectly (like a figure-8 or a triangle) — others you simply can't, no matter how hard you try, because of how the lines meet at each point. That "can I trace it cleanly?" question is exactly what checking vertex degrees tells you.
2. The Golden Rule: Count the Odd Vertices

Everything in this chapter hinges on one very simple first step: for every vertex in the graph, count how many edges are connected to it. This number is called the degree (or order) of the vertex. Then sort vertices into two piles: even degree and odd degree.

Why does this matter so much? Because of a beautiful piece of graph theory (first worked out by Euler himself, hence "Eulerian"): a route that uses every edge exactly once and returns to its start point (called an Eulerian circuit) is only possible if every single vertex has an even degree. If even one vertex has an odd degree, you literally cannot draw that route without retracing a line — it's a mathematical impossibility, not just something that's hard to find.

Useful fact — always true In any graph, the number of odd-degree vertices is always even (never 1, 3, 5...). This is because the sum of all vertex degrees = 2 × (number of edges), which must be even — so the odd degrees must always "pair up" to keep the total even.

Why odd vertices force a repeat

Think about walking through a vertex: every time you arrive along one edge, you must leave along a different edge — arrivals and departures use up edges in pairs. If a vertex has an even degree, every visit pairs up perfectly and you can leave the way you haven't been before, right up until the last edge, which brings you home. But if a vertex has an odd degree, at some point you'll arrive and find every other edge already used — except the one that brought you there. You get "stuck" needing to reuse an edge. That's the mathematical root of why odd vertices cause the problem.

Practice Question 1

A graph has 6 vertices. Four of them have odd degree, two have even degree. Is it possible to find an Eulerian circuit in this graph? Explain your answer.

Practice Question 2

Explain briefly why the total sum of all vertex degrees in a graph is always double the number of edges.

3. Solving It: Graphs With 0 or 2 Odd Vertices

Case A — 0 odd vertices (the graph is Eulerian)

This is the easy, best-case scenario. If every vertex has even degree, an Eulerian circuit exists — a route that travels along every edge exactly once and returns to the start. No edges need to be repeated at all.

Shortest route (0 odd vertices) Shortest route = sum of the weights of ALL edges in the network

Case B — 2 odd vertices (the graph is semi-Eulerian)

This is where the real "route inspection" thinking kicks in. If exactly two vertices have odd degree, the graph is called semi-Eulerian. This means there's a route that travels every edge exactly once, but it can only do so if it starts at one odd vertex and finishes at the other — not a closed loop.

Two situations can arise here, and it's crucial you spot which one a question is actually asking:

  • If the route must start and finish at the SAME vertex (the standard Chinese Postman setup): you cannot avoid repeating something, because a closed route needs every vertex to be even. You must find the shortest path between the two odd vertices and repeat every edge along that path.
  • If the route is allowed to start at one odd vertex and finish at the other: no repetition is needed at all! The Eulerian path already exists between those two points.
Shortest route (2 odd vertices, same start/finish) Shortest route = sum of ALL edge weights + weight of the shortest path between the 2 odd vertices
Shortest route (2 odd vertices, different start & finish = the two odd vertices) Shortest route = sum of ALL edge weights  (no repeats needed!)
Don't mix these up! The single most common exam slip-up is repeating an edge when you didn't need to (or vice versa) because you didn't check whether the start and finish points are supposed to be the same vertex or the two odd vertices. Always re-read the question's wording carefully.

Worked Example — Cable Network (2 Odd Vertices)

A network shows the distance, in metres, of cables between connection points A, B, C, D, E and F. Every cable must be inspected, and the engineer must start and finish at connection point E.

Step 1 — Inspect the degree of every vertex

VertexABCDEF
Degree5 (odd)2 (even)3 (odd)2 (even)4 (even)2 (even)

Step 2 — Find the shortest path between the odd vertices

There's exactly one pair of odd vertices: A and C. The direct edge AC = 16, but going via B (A→B→C = 9 + 5 = 14) is shorter. So the shortest path between A and C is A–B–C, weight 14, meaning edges AB and BC must be repeated.

Step 3 — Write down an Eulerian circuit of the adjusted graph

One possible route: E F A E D A B A C B C E

Step 4 — Calculate the total

Working Sum of all original edges = 3+4+4+5+8+9+11+13+16 = 73
Plus repeated edges (AB + BC) = 9 + 5 = 14
Total shortest route = 73 + 14 = 87 metres
Try It Yourself

Using the same cable network above, suppose the engineer is now allowed to start at A and finish at C (rather than starting and finishing at the same point). What is the length of the shortest route that inspects every cable?

4. Solving It: Graphs With More Than 2 Odd Vertices

Real road networks are messy, and it's very common for a graph to have 4 (or more) odd vertices. Remember: it will always be an even number (2, 4, 6...) — never odd — because of the rule from Section 2. When there are more than 2 odd vertices, you can't just pick the obvious pairing — you have to be systematic.

The core idea

With 4 odd vertices — call them P, Q, R and S — you need to pair them up into two pairs, and there are exactly 3 different ways to do this:

  • PQ and RS
  • PR and QS
  • PS and QR

For each of these 3 pairings, you find the shortest path for each pair and add the two path lengths together. Whichever pairing gives the smallest combined total tells you which edges to repeat.

Why only 3 pairings, not more? With 4 vertices P, Q, R, S: fix P — it can pair with Q, R, or S (3 choices). Once P's partner is chosen, the remaining two vertices automatically form the second pair. So there are only 3 distinct pairings, not 4! × or anything scarier.
Shortest route (more than 2 odd vertices) Shortest route = sum of ALL edge weights + weight of the smallest-total pairing of repeated paths

What if there are 6 odd vertices?

In theory you'd need to check 15 different pairings — which is a lot of work by hand! In practice, exam questions with more than 4 odd vertices almost always give you extra information (like specifying different start and end points) that effectively reduces the problem back down to 4 odd vertices, so you rarely need to actually do all 15.

Worked Example — Pothole Inspection (4 Odd Vertices)

The network below shows distances, in km, of main roads between towns A, B, C, D and E. Every road must be inspected for potholes, starting and finishing at town A.

(AE curved top edge = 17 km — labelled above the arc)

Step 1 — Inspect the degree of each vertex

VertexABCDE
Degree3 (odd)3 (odd)3 (odd)3 (odd)2 (even)

There are 4 odd vertices: A, B, C, D. So the network does not contain an Eulerian circuit.

Step 2 — List all 3 possible pairings

PairingShortest path 1Shortest path 2Total
AB & CDA–B–D = 12CD = 1022
AC & BDA–D–C = 18BD = 422
AD & BCAD = 8BC = 917 ✅ smallest

The smallest combined total comes from pairing AD and BC, so these edges get repeated.

Step 3 — Eulerian circuit of the adjusted graph

One valid route starting and ending at A: A D A B D C B C E A

Step 4 — Calculate the total

Working Sum of all original edges = 15+17+8+4+9+10+6 = 69 km
Plus repeated edges (AD + BC) = 8 + 9 = 17 km
Total shortest route = 69 + 17 = 86 km
Try It Yourself

Why wasn't the pairing "AC & BD" (total 22 km) chosen instead of "AD & BC" (total 17 km), even though both are valid ways to pair up the four odd vertices?

5. Extra Variations to Watch For

Variation A — Choosing your own start and finish points

Sometimes with 4 odd vertices, a question says the route can start and finish at any two of the odd vertices — you get to choose which two, in order to minimise distance. The method changes slightly:

1

Find the shortest-path length for all 3 possible pairings as before.

2

Pick the pairing with the smallest length to be the pair that gets repeated.

3

The other two odd vertices (the ones NOT repeated) become your start and finish points for the route.

Why this works Repeating a pair of odd vertices' path makes both of those vertices even again (since you've added one more edge-visit to each). The two vertices you don't touch stay odd — and a graph with exactly 2 odd vertices left is semi-Eulerian, meaning a route exists starting at one and ending at the other, with zero further repeats needed.

Variation B — Different weight for first pass vs. repeat pass

In some real-world contexts (e.g. inspecting a pipeline for defects), travelling an edge for the first time might take longer than travelling it again just to "pass through" it (perhaps because the first pass involves careful inspection, while the second pass is just transit). If a question gives you two different weights for an edge — one for "first traversal" and one for "repeat traversal" — make sure you use the correct one at the correct stage of your working. Don't just double the same number if the question specifies otherwise!

Variation C — Roads that must be doubled deliberately

A road-sweeper or line-painter often has to cover both sides of every road. In this case, every edge is effectively duplicated from the start — you're not looking for odd vertices at all, because after duplicating every edge, every vertex's degree automatically doubles and becomes even. The route length is simply 2 × (sum of all edge weights).

What to Memorise

Key Terms

TermMeaning
Route Inspection Problem / Chinese Postman ProblemFinding the shortest closed route that covers every edge of a graph at least once.
Degree (Order) of a vertexThe number of edges connected to that vertex.
Eulerian graphA graph where every vertex has even degree (0 odd vertices) — has a closed route using every edge exactly once.
Eulerian circuitA route that starts and ends at the same vertex, using every edge exactly once (only possible in Eulerian graphs).
Semi-Eulerian graphA graph with exactly 2 odd vertices — has an open route (not closed) using every edge exactly once, between the two odd vertices.
Odd vertex / Odd nodeA vertex with an odd number of edges connected to it — the "problem points" of the graph.

Formulas at a Glance

0 odd verticesShortest route = sum of all edge weights
2 odd vertices, same start/finishShortest route = sum of all edges + shortest path between the 2 odd vertices
2 odd vertices, start & finish AT the odd verticesShortest route = sum of all edges (no repeat needed)
4+ odd verticesShortest route = sum of all edges + smallest total from testing all possible pairings

The 4-Step Method (memorise this order!)

1

Inspect the degree of every vertex; identify the odd ones.

2

If 0 odd → skip to Step 4. If 2 odd → find shortest path between them. If 4+ odd → list all possible pairings.

3

Find the shortest route (by inspection) for each pairing; add the cheapest set of repeated edges to the graph.

4

Write down an Eulerian circuit of the adjusted graph; sum all edges traversed (original + repeats) for the total weight.

Concepts Checklist
Exam Tips
Trap #1 — Direct edge isn't always the shortest path Examiners love to include a direct edge between two vertices that is longer than going via a third vertex. Never assume the direct connection is the shortest path between two odd vertices — always check alternative routes, just like in the cable example above (A–B–C beat the direct A–C edge).
Trap #2 — Forgetting to check ALL pairings With 4 odd vertices, you MUST calculate all 3 pairings, even if the first one "looks" obviously short. Marks are often awarded specifically for showing the working of each pairing, not just the final answer.
Trap #3 — Repeating edges vs. adding new edges When you "repeat" an edge, you are not deleting or replacing anything — you are adding an extra copy of that edge weight to your final total. The original edge is still walked once as part of your normal route; the repeat is on top of that.
Trap #4 — Different start/finish confusion Always check: does the question want the SAME start and finish vertex (needs repeats even with only 2 odd vertices), or is it happy for the route to start at one odd vertex and end at the other (no repeats needed)? This single detail completely changes your answer.
What examiners are looking for
  • Clearly stated degree/order of every vertex (show your working, don't just state "4 odd vertices").
  • All possible pairings tested explicitly when there are more than 2 odd vertices.
  • A valid Eulerian circuit written out as a sequence of vertices (there's usually more than one correct answer — any valid one gets the marks).
  • A final numeric answer with correct units, clearly showing (sum of edges) + (sum of repeats).
What's inside
📖 Revision notes ✦ AI flashcards ✓ Instant AI marking

Read the full The Route Inspection Algorithm notes free

That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.

Unlock the full notes free →

More Further Decision Mathematics 1 topics