Chinese Postman Problem

Introduction

In the 18th century, there is a town called Königsberg, in which there were seven bridges that spanned a forked river that flows past an island. One day a man who wish to walk along each bridge, but that bridge must only traverse exactly once. The man think: "Do there exist such a continuous tour which satifiy the requirement?" This long-standing problem was solved in 1735 in an ingenious way by the Swiss mathematician Leonhard Euler (1707-1782). His solution, and his generalisation of the problem to an arbitrary number of islands and bridges, gave rise to a very important branch of mathematics called Graph Theory [1]

A similar problem is called Chinese Postman Problem (after the
Chinese mathematician, Kwan Mei-Ko, who discovered it in early 1960's).
The background of Chinese postman problem is interesting. It is the
problem that the Chinese Postman faces: he wishes to travel along every
road in a city in order to deliver letters, with the least possible
distance. The problem is how to find a shortest closed walk of the
graph in which each edge is traversed __at least once__, rather
than exactly once. In graph theory, an Euler cycle in a connected,
weighted graph is called the Chinese Postman problem.

Graph theory

Graph theory is very useful in solving the
Chinese Postman Problem. A graph consists of a non-empty set of points
(vertices) and a set of lines (edges) connecting the vertices. The
number of edges linked to a vertex is called the __degree__ of that vertex. A walk, which starts at a vertex, traces each edge __exactly once__ and ends at the starting vertex, is called an __Euler Trail__. If it ends at some other vertex, it is called an __open Euler trail__. The Königsberg Bridges problem was an attempt to find an open Euler trail.

An __open Euler trail__ is possible if and only if there are exactly two vertices of odd degree. An __Euler trail__ is possible if and only if every vertex is of even degree.

For the practical situation, the problems like delivery of mail or newspaper, trash pick-up, and snow removal can be modeled by Chinese Postman Problem. The problem can be solved in polynomial time if all edges of the graph are undirected.

Solution to Chinese Postman Problem

In case that there are exactly two odd-degree vertices, as shown in figure 1, the problem gets somewhat more difficult. We have to construct a shortest path between the two odd-degree vertices.

Figure 1

Let's consider the graph in figure 1. The problem we shall consider for this graph is how do we start at vertex A, cover every edge in the graph at least once and end at A? An Euler trail does not exist for this graph because there are two odd-degree vertices (i.e. Open Euler trail). Notice that connecting the odd degree vertices B and F by the additional edge is not allowed. Just like we cannot just build the roads or bridges in here and there in real situation. We have to try to minimize cost or distance here, rather than building the new roads. What we can do is retrace steps though; we can go down the same edge more than once.

We cannot add an edge between the two odd-degree vertices, but we can construct a path between them using existing edges in the graph. If we can find the shortest path between these two edges, we will have found the edges that we will want to retrace in our tour, because we want the path that makes us cover edges more than once to be as short as possible.

It is quite easy to find a shortest path from B to F by simple inspection. Let's list all the possible paths below:

E-A-D :15

E-A-B-D :15

E-F-D :11

E-C-F-D :10

E-C-B-D :11

It looks like we'll be considering the path given by: E-C-B-D for adding to the graph. It is the shortest path from vertex e to d. We shall call this path m.

Figure 2

In Figure 2 the edges of m in P is doubled. That means that E and F are now both of even degree.

Figure 3

Figure 4

Now it's time to construct an Euler tour from A. The algorithm will consider the double paths between the vertices in path m and produce a tour that can start and end at A. The tour will just cover the edges in m twice instead of once. Let's calculate the total weight of the tour. To begin with, the total weight of all the edges of graph P was 62. The weight of m (the minimal path connecting E and F) is 13. Therefore the shortest postman tour has a weight of 75

Application of Chinese Postman Problem

The practical example is planning of bus routing. In order to save the cost on the fuel, the bus company have modelled the bus stop as the vertix and the road as the edge in the bus route, then using the graph theory to obtain the optimal route that can meet the target of using the minimal fuel but across every road, at least once.

Other application includes trash collection, road sweeping, snow-plows, highway lawnmowers, transmission line inspections, school bus routing, etc.