You are on page 1of 13

Decision Maths

Chapter 4: Route Inspection


Chinese Postman

Can you remember what


Traversability means?...
A

B
D

Traversability
A network is said to be Traversable if you can draw it without
removing your pen from the paper and without retracing the
same arc twice.
In order to start and end at the same node the network must be
Eularian (all nodes order/valency must be even).

If exactly two nodes have odd order/valency, the network is


still traversable, but you start and end at different nodes (and
the network is Semi-Eularian)

The Notes

The Chinese Postman algorithm was invented in 1962 and takes its name from the
Chinese mathematician Kuan Mei-Ko who considered the problem of a postman who
has to deliver mail to houses along each of the streets in a particular housing
estate and wants to minimise the distance he has to walk.

This is known as a route inspection problem and can be summarised as follows: find
a closed trail of minimum weight containing every arc.

If the graph in question is Eulerian then such a trail is easy to find. However, many
graphs are not Eulerian and this is where the problem becomes more interesting. It
is important to remember that if a graph is relatively small, trial and error may be
able to be used. However, when a large graph is involved, an algorithm is needed
and this is where the Chinese Postman algorithm is useful.

Each arc in a network adds 1 to the orders of 2 nodes. Therefore, the total of the
orders of all the nodes is twice the number of arcs. This means that in any network
there is always an even number of odd nodes. (If there was an odd number of odd
nodes, the total of the orders of all the nodes would be odd which is not possible)

Such a network can be made traversable by linking together pairs of odd nodes
with additional arcs. The effect of adding these extra arcs is to make all nodes
even and thus the network is now Eulerian and traversable. The Chinese Postman
algorithm considers all possible pairings of nodes of odd order and finds the
connecting paths of minimum weight. The grouping with the minimum weight is then
selected and these arcs are then duplicated. Finally, a trail is found containing
every arc for the new Eulerian graph.

E
1

14

12

C
9

Eulerian trail starting and ending at A not possible.


Why not?

E
1

14

12

C
9

Solution?

E
1

14

12

C
9

9
5

Best Solution?

E
1

14

A
2

12

C
2

3
5

E
1

14

A
2

12

C
2

3
5

Still not the best solution

E
1

2
2

14

A
2

12

C
2

3
5

Best solution!

E
1

2
2

14

A
2

12

C
2

3
5

Now find an Eulerian trail, starting and ending at A.

Chinese Postman Algorithm


Aim: To find the least-weight closed trail containing every arc

Step 1: Find all the nodes of odd order.


Step 2: For each pair of odd nodes find the connecting
path of minimum weight.
Step 3: Pair up all the odd nodes so that the sum of the
weights of the connecting paths from Step 2 is minimised.
Step 4: In the original graph, duplicate the minimum
weight paths found in Step 3.
Step 5: Find a trail containing every arc for the new
(Eulerian) Graph.

EXAMPLE: Calculate the Minimum Route, starting and ending at A