Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Maths Chapter 5: Route Inspection Lesson 1: Chinese Postman.

Similar presentations


Presentation on theme: "Discrete Maths Chapter 5: Route Inspection Lesson 1: Chinese Postman."— Presentation transcript:

1 Discrete Maths Chapter 5: Route Inspection Lesson 1: Chinese Postman

2 Can you remember what Traversability means?... F D B C E A

3 Traverasbility 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 must be even). If exactly two modes have odd order, the network is still traversable, but you start and end at different nodes (and the network is Semi-Eularian)

4 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.

5 A EB C FD G Eulerian trail starting and ending at A not possible. Why not?

6 A EB C FD G Solution?

7 9 1 3 A EB C FD G Best Solution?

8 A EB C FD G

9 A EB C FD G Still not the best solution

10 A EB C FD G Best solution!

11 A EB C FD G Now find an Eulerian trail, starting and ending at A.

12 Chinese Postman Algorithm 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. Aim: To find the least-weight closed trail containing every arc

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


Download ppt "Discrete Maths Chapter 5: Route Inspection Lesson 1: Chinese Postman."

Similar presentations


Ads by Google