# The Chinese Postman Problem Route Planning Map Colouring

## Presentation on theme: "The Chinese Postman Problem Route Planning Map Colouring"— Presentation transcript:

The Chinese Postman Problem Route Planning Map Colouring
Graphs & Networks Route Inspection The Chinese Postman Problem Route Planning Map Colouring

Where graph theory came from…
The city of Königsberg in Prussia (now Kaliningrad, Russia) was set on both sides of the Pregel River, and included two large islands which were connected to each other and the mainland by seven bridges. The problem was to find a walk through the city that would cross each bridge once and only once. The islands could not be reached by any route other than the bridges, and every bridge must have been crossed completely every time (one could not walk half way onto the bridge and then turn around and later cross the other half from the other side).

Where graph theory came from…

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. He must return to his starting position

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. Are these Graphs Traversable?

What is the difference between the 3 graphs?
No Yes Yes

To be traversable it must have 2 or 0 odd nodes
In order to start and end at the same node the network must be Eularian (all nodes must be even). If exactly two nodes have odd order, the network is still traversable, but you start and end at different nodes (and the network is Semi-Eularian) To be route for a postman it must be closed and so have 0 odd nodes

Traversability Yes Yes Yes No Yes Yes
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. It is Closed if you can start anywhere and finish at the start point. Are these Graphs Traversable? Are they closed? Yes Yes Yes Traversable? No Yes Yes Closed?

Number of even vertices
For each network, count the number of odd vertices and the number of even vertices, then complete the table. Network Number of even vertices Number of odd vertices Traversable? Closed?

Notes… If the graph in question is closed then such a trail is easy to find. However, many graphs are not closed and this is where the problem becomes more interesting. Such a network can be made closed 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 closed. This graph has four vertices of odd order and so it is not closed or traversable.

We need to pair the vertices together by adding an extra edge to make the order of each vertex four. We can join AB and CD, or AC and BD, or AD and BC. In each case the graph is now closed. [You only need to add one arc to be traversable]

Starting and finishing at A write down one solution such as ABGC….
If the length of each road is 1 mile, find the length of an optimal Chinese postman closed route for these networks Starting and finishing at A write down one solution such as ABGC…. Draw extra line from B to C 9 miles: One route is AFEDCGBCBA Draw two extra lines B to C and E to F 12 miles: One route is: AFGEFEDCGBCBA 12 miles: One route is: ABCEDCGBFGEFA

Draw an extra route from B to E
A groundsman at a local sports centre has to mark out the lines of several five-a-side pitches using white paint. He is unsure as to the size of the goal area and he decides to paint the outline as given below, where all the distances are in metres. He starts and finishes at the point A. Find the minimum total distance that he must walk and give one of the corresponding possible routes. Draw an extra route from B to E 180 metres: One possible route: ABEBCDEFA

Draw an extra route from D to E and D to C
A local council is responsible for gritting roads. The following diagram shows the lengths of roads, in miles, that have to be gritted. He starts and finishes at the point A. Find the minimum total distance that he must drive and give one of the corresponding possible routes. Draw an extra route from D to E and D to C 80.5 miles: One possible route: ABFEBCDEDCA

43 93 Find the length of an optimal Chinese postman route for the
networks below. Start and end at C. 43 93

Directed Chinese Postman Problem
There are many variations to the Chinese Postman Problem, most notably whether the roads are one-way Taking each arc to be of equal weight, one optimal closed Chinese Postman Tour of this graph is: 0, 1, 3, 0, 1, 2, 3, 0, 2, 3, 0, traversing 10 arcs. A least cost open tour is:1 , 3, 0, 1, 2, 3, 0, 2, which traverses only 7 arcs.

Route Planning Problem
Is it possible to plan a walk in which each door is passed through exactly once? Each room is represented by a vertex point. Notice that a vertex (point P) is needed to represent the region outside the floor plan. Now we need to count the order of each of the nodes.

Is it possible to plan a walk in which each door is passed through exactly once? Can you start inside or outside the building?

Graph Coloring Problem
Your mission color the entire map of South America. 1. No country may touch another country of the same color. 2. You will be charged each time you use a color 3. You must color the map as cheaply as possible. We start with the graph representation: vertices represent countries. Two vertices are adjacent if two countries have a common boarder. So we reduce a problem to vertex coloring. Adjacent vertices must be colored in different colors.