DB3 - Route inspection

DB3 - Route inspection

A route inspector must cover every road, rather than merely reach every junction. You will use odd vertex degrees to identify the necessary repetition, compare pairings of shortest paths and find minimum closed or open inspection routes. You will also justify that a proposed walk really attains the calculated minimum.

Odd vertices and repeated roads

What is the shortest closed walk covering every road in the network AB 2, BC 3, CD 2, DA 4, AC 5, BD 6 kilometres? The roads work both ways and the inspector may repeat roads. A crossing of drawn roads is not a junction unless a node is marked.

[DIAGRAM: asset_name: Four odd junctions in an inspection network; asset_slug: aqa7367-route-network; caption: Each of the four junctions has degree 3, and the total road length is 22 kilometres; description: A weighted undirected four-node network has square boundary AB 2 BC 3 CD 2 DA 4 and crossing diagonals AC 5 BD 6. Only the four corner nodes are junctions. A note says the diagonal crossing is not a junction. Nodes A B C D are labelled degree 3. The sum of all six road weights is 22 kilometres.]
Each of the four junctions has degree 3, and the total road length is 22 kilometres

At each intermediate visit to a junction, a walk uses one road to enter and another to leave. In a closed walk, this pairing also applies at the start. Therefore a connected undirected graph has a closed walk using each arc exactly once precisely when all vertex degrees are even. Such a walk is an Eulerian circuit. With exactly two odd vertices, an Eulerian trail can start at one and finish at the other.

Route inspection

A route inspection problem asks for a minimum-weight walk covering every arc at least once. In the closed version it returns to its start. Here the network is finite, connected and undirected, with nonnegative weights which add along a walk.

The original graph has four odd vertices, so a closed walk must repeat something. Think of each repeated road as adding a parallel copy of its arc. Duplicating a path changes the parity of its two endpoints: they gain one incident arc each. Each internal vertex gains two, so its parity stays unchanged. We need to make every degree even as cheaply as possible.

The number of odd vertices is even, because the sum of all degrees is twice the number of arcs. This is why odd vertices can be paired. If the graph is disconnected, one continuous walk cannot inspect all its components without additional links.

Key idea

Covering every arc is different from visiting every node. For a closed inspection route, repeated paths must change every original odd degree to even.

Check parity without needing a picture.

Pairing odd vertices by shortest paths

For a closed inspection route, add the total weight of all original arcs to the least extra weight needed to pair the odd vertices. For each pair use a shortest path in the original network, not necessarily a direct arc. With four odd vertices A, B, C, D there are three pairings: AB with CD, AC with BD, or AD with BC. With six odd vertices there are 15 pairings: fix the first vertex's partner in five ways, then pair the remaining four in three ways. Compare every possible pairing, unless a valid argument eliminates some.

For a small network, find shortest paths by comparing possible simple paths. With nonnegative weights, including a cycle cannot improve a path, so only paths without repeated vertices need consideration. Record the actual paths as well as their lengths: those are the roads to duplicate.

Worked example 1: choosing a pairing

Question. Find the shortest closed inspection length for AB 2, BC 3, CD 2, DA 4, AC 5, BD 6 kilometres.

Plan. Identify the odd nodes, compare pairings using shortest-path distances, and add the cheapest repetition to the road total.

All four nodes have degree 3. The original total is 2+3+2+4+5+6=222+3+2+4+5+6=22. The shortest pair distances are AB 2, AC 5, AD 4, BC 3, BD 5 via C, and CD 2. For AC, the direct arc and A–B–C tie at 5.

PairingExtra distance
AB and CD2+2=42+2=4
AC and BD5+5=105+5=10
AD and BC4+3=74+3=7

Answer. Duplicate AB and CD. The minimum length is 22+4=2622+4=26 kilometres.

Check. The walk A–B–C–D–A–C–D–B–A uses AB and CD twice and every other arc once. Its length is 2+3+2+4+5+2+6+2=262+3+2+4+5+2+6+2=26, and all augmented degrees are 4.

Change only AB from 2 to 7. Pairing the same letters automatically would now give the wrong minimum.

Worked example 2: the best pairing changes

Question. Find the shortest closed inspection length for AB 7, BC 3, CD 2, DA 4, AC 5, BD 6 kilometres.

Plan. Recalculate both the original total and shortest pair distances before comparing pairings.

The original total is 27. All four degrees remain odd. The shortest distances are AB 7, AC 5, AD 4, BC 3, BD 5 via C, CD 2. For example, alternative A–C–B has length 8, so AB itself is still shortest.

The three pairing totals are 7+2=97+2=9, 5+5=105+5=10, and 4+3=74+3=7. Choose AD and BC.

Answer. Duplicate AD and BC; minimum length 27+7=3427+7=34 kilometres.

Check. A–B–C–D–A–C–B–D–A covers every arc, repeating BC and DA. Its length is 7+3+2+4+5+3+6+4=347+3+2+4+5+3+6+4=34.

A pairing may have several equally short realisations. Any shortest path for each selected pair is acceptable, including overlapping paths; count every duplicated arc with its multiplicity.

Watch out

Wrong: “BD costs 6 because the diagram labels BD with 6.” The route B–C–D costs 3+2=53+2=5. Pair shortest path distances, then duplicate the roads on those paths. Do not replace the original road total by a spanning-tree weight.

Use a complete shortest-path table in a new case.

Open routes and prescribed endpoints

An open inspection route starts at ss and ends at a different node tt. The augmented graph must have exactly these two odd nodes. For every vertex, ask whether its original parity already matches that target. Duplicate paths pairing the vertices whose parity must change.

If OO is the set of original odd vertices, the set to pair is O△{s,t}O\mathbin{\triangle}\{s,t\}: remove an endpoint already in OO, and add an endpoint not in OO. This notation means “in exactly one of the two sets”. It handles even endpoints too. The closed case s=ts=t instead requires all original odd vertices to change parity.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account