Example: quiz answers

CHAPTER 3 Chinese postman problem

IntroductionIn 1962, a Chinese mathematician called Kuan Mei-Ko wasinterested in a postman delivering mail to a number of streetssuch that the total distance walked by the postman was as shortas possible. How could the postman ensure that the distancewalked was a minimum?In the following example a postman has to start at A, walk alongall 13 streets and return to A. The numbers on each edgerepresent the length, in metres, of each street. The problem is tofind a trail that uses all the edges of a graph with will return to solving this actual problem later, but initiallywe will look at drawing various 3 Chinese postman problemLearning objectivesAfter studying this CHAPTER , you should be able to: understand the Chinese postman problem apply an algorithm to solve the problem understand the importance of the order of vertices of postman Traversable graphsIf we try dr

46 Chinese postman problem Graph 3 When the order of all the vertices is even, the graph is traversable and we can draw it. When there are two odd vertices …

Tags:

  Problem, Chinese, Postman, Chinese postman problem

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of CHAPTER 3 Chinese postman problem

1 IntroductionIn 1962, a Chinese mathematician called Kuan Mei-Ko wasinterested in a postman delivering mail to a number of streetssuch that the total distance walked by the postman was as shortas possible. How could the postman ensure that the distancewalked was a minimum?In the following example a postman has to start at A, walk alongall 13 streets and return to A. The numbers on each edgerepresent the length, in metres, of each street. The problem is tofind a trail that uses all the edges of a graph with will return to solving this actual problem later, but initiallywe will look at drawing various 3 Chinese postman problemLearning objectivesAfter studying this CHAPTER , you should be able to: understand the Chinese postman problem apply an algorithm to solve the problem understand the importance of the order of vertices of postman Traversable graphsIf we try drawing the three graphs shown above we find.

2 It is impossible to draw Graph 1 without either taking the penoff the paper or re-tracing an edge we can draw Graph 2, but only by starting at either A or D ineach case the path will end at the other vertex of D or A Graph 3 can be drawn regardless of the starting position andyou will always return to the start is the difference between the three graphs?In order to establish the differences, we must consider the orderof the vertices for each graph. We obtain the following:Graph 1 Graph 2 BBCEEFG raph 3 Graph 2 Graph 1 CADADBCADV ertexOrderA3B3C3D3 VertexOrderA3B4C4D3E2A traversablegraph is one that can be drawn withouttaking a pen from the paper and without retracing thesame edge.

3 In such a case the graph is said to have anEulerian trails are dealt with indetail in CHAPTER postman problemGraph 3 When the order of all the vertices is even, the graph istraversable and we can draw it. When there are two odd verticeswe can draw the graph but the start and end vertices aredifferent. When there are four odd vertices the graph can t bedrawn without repeating an draw the graph with odd vertices, edges need to be repeated. Tofind such a trail we have to make the order of each vertex graph 1 there are four vertices of odd order and we need topair the vertices together by adding an extra edge to make theorder of each vertex four.

4 We can join AB and CD, or AC and BD,or AD and each case the graph is now example of the graphs below is traversable?(a)(b)(c)BCADBCADBCADAn Euleriantrail uses all the edges of a graph. For a graphto be Eulerian all the vertices must be of even a graph has two odd vertices then the graph is said to besemi-Eulerian. A trail can be drawn starting at one of theodd vertices and finishing at the other odd (a)and (c)are traversable as all the vertices are of evenorder. Graph (b)is not traversable as there are vertices of 3 AWhich of the graphs below are traversable? Pairing odd verticesIf there are two odd vertices there is only one way of pairingthem there are four odd vertices there are three ways of pairingthem many ways are there of pairing six or more odd verticestogether?

5 If there are six odd vertices ABCDEF, then consider the vertex can be paired with any of the other five vertices and still leavefour odd vertices. We know that the four odd vertices can bepaired in three ways; therefore the number of ways of pairing sixodd vertices is 5 3 1 postman problem47348 Chinese postman problemSimilarly, if there are eight odd vertices ABCDEFGH, thenconsider the first odd vertex A. This could be paired with any ofthe remaining seven vertices and still leave six odd vertices. Weknow that the six odd vertices can be paired in 15 ways thereforethe number of ways of pairing eight odd vertices is 7 5 3 1 105 can continue the process in the same way and the results aresummarised in the following Chinese postman algorithmWorked example we now apply the algorithm to the original problem :Number of odd verticesNumber of possible pairings2143 1 365 3 1 1587 5 3 1 105109 7 5 3 1 945n(n 1) (n 3) (n 5).

6 1 Exam questions will not be setwhere candidates will have topair more than four odd verticesbut students do need to beaware of the number of ways ofpairing more than four find a minimum Chinese postman route we must walkalong each edge at least once and in addition we must alsowalk along the least pairings of odd vertices on one algorithm for finding an optimal Chinese postmanroute is:Step 1 List all odd 2 List all possible pairings of odd 3 For each pairing find the edges that connect thevertices with the minimum 4 Find the pairings such that the sum of the weightsis 5On the original graph add the edges that have beenfound in Step 6 The length of an optimal Chinese postman route isthe sum of all the edges added to the total foundin Step 7A route corresponding to this minimum weightcan then be easily postman problem493 Step 1 The odd vertices are A and 2 There is only one way of pairing these odd vertices.

7 Namely 3 The shortest way of joining A to H is using the path AB,BF, FH, a total length of 4 Draw these edges onto the original 5 The length of the optimal Chinese postman route is thesum of all the edges in the original network, which is840 m, plus the answer found in Step 4, which is 160 the length of the optimal Chinese postman routeis 1000 6 One possible route corresponding to this length isADCGHCABDFBEFHFBA, but many other possibleroutes of the same minimum length can be 3B1 Find the length of an optimal Chinese postman route for thenetworks below.(a)(b)(c) Finding a routeThe method for finding the length of the Chinese postman route isquite straightforward, but to find the list of edges correspondingto this route can be quite tricky, especially in complicatednetworks.

8 It is useful to calculate how many times each vertex willappear in a Chinese postman route. The following method shouldbe applied before trying to find the 1On the original diagram add the extra edges to make thegraph postman problemStep 2 List the order of each vertex. At this stage each vertexwill have an even 3 The number of times each edge will appear in a Chinesepostman route will be half the order of its vertex, withthe exception being vertex A (the start/finish vertex), asthis will appear on one extra to the diagram below, the orders of the vertices are asfollows:This indicates that the number of times each vertex will appearin the Chinese postman route is.

9 A 42 2 1 3B 62 3C 42 2D 42 2E 22 1F 62 3G 22 1H 42 2 The number of vertices in the optimal Chinese postman route is may be in a different order than in the example above butthey must have the number of vertices as indicated in the postman problem513 EXERCISE 3 CFind a route corresponding to an optimal Chinese postman routefor the questions in Exercise Variations of the Chinese postmanproblemOccasionally problems may be set where the start vertex and thefinish vertex do not have to be the same. Any graph with twoodd vertices is this type of graph the length of the Chinese postman route isthe sum of all the edges of a a network with four vertices, the graph is semi-Eulerian plustwo odd edges.

10 In addition to the start and finish vertices thereare two other odd shortest Chinese postman route is the sum of all the edgesplus the shortest distance connecting the two remaining example county council is responsible for maintaining the followingnetwork of roads. The number on each edge is the length of theroad in council office is based at A.(a)A council worker has to inspect all the roads, starting andfinishing at A. Find the length of an optimal Chinesepostman postman problem (b)A supervisor, based at A, also wishes to inspect all the , the supervisor lives at H and wishes to start hisroute at A and finish at H.


Related search queries