1 / 13

Discrete Maths

Discrete Maths. Chapter 5: Route Inspection Lesson 1: Chinese Postman. A. F. B. D. E. C. Can you remember what Traversability means?. Traverasbility.

jbranch
Télécharger la présentation

Discrete Maths

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  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. B E 1 2 3 5 14 6 12 A G C 9 2 8 3 5 D F Eulerian trail starting and ending at A not possible. Why not?

  6. B E 1 2 3 5 14 6 12 A G C 9 2 8 3 5 D F Solution?

  7. B E 1 1 2 3 5 14 6 12 A G C 9 2 8 3 3 9 5 D F Best Solution?

  8. B E 1 1 6 2 3 5 14 6 12 A G 2 C 9 2 8 3 3 5 D F

  9. B E 1 1 6 2 3 5 14 6 12 A G 2 C 9 2 8 3 3 5 D F Still not the best solution

  10. 2 B E 1 1 3 2 3 5 14 6 12 A G 2 C 9 2 8 3 3 5 D F Best solution!

  11. 2 B E 1 1 3 2 3 5 14 6 12 A G 2 C 9 2 8 3 3 5 D F Now find an Eulerian trail, starting and ending at A.

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

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

More Related