The Chinese postman problem

Một phần của tài liệu Introduction to logistics systems planning and control (Trang 306 - 311)

The CPP is to determine a minimum-cost route traversing all arcs and all edges of a graph at least once. Its main applications arise in garbage collection, mail delivery, network maintenance, snow removal and meter reading in urban areas.

The CPP is related to the problem of determining whether a graphG(V , A, E)is Eulerian, i.e. whether it contains a tour traversing each arc and each edge of the graph exactly once. Obviously, in an Eulerian graph with nonnegative arc and edge costs, each Eulerian tour constitutes an optimal CPP solution. In a nonEulerian graph, an optimal CPP solution must traverse at least one arc or edge twice.

Necessary and sufficient conditions for the existence of an Eulerian tour depend on the type of graphGconsidered (directed, undirected or mixed), as stated in the following propositions, whose proofs are omitted for brevity.

Property. A directed and strongly connected graphGis Eulerian if and only if it is symmetric, i.e. for any vertex the number of incoming arcs (incoming semi-degree) is equal to the number of outgoing arcs (outgoing semi-degree) (symmetricvertex).

282 SHORT-HAUL FREIGHT TRANSPORTATION

i j

Figure 7.21 A mixed Eulerian graph which is not symmetric.

Property. An undirected and connected graphGis Eulerian if and only if it iseven, i.e. each vertex has an even degree (evenvertex).

Property. A mixed and strongly connected graphGis Eulerian if and only if (a) the total number of arcs and of edges incident to any vertex is even (evengraph);

(b) for each set S of vertices (SV andS = ∅), the difference between the number of the arcs traversing the cut (S,V \S) in the two directions is less than or equal to the number of edges of the cut (balancedgraph).

Furthermore, since an even and symmetric graph is balanced, the following propo- sition holds.

Property. A mixed, strongly connected, even and symmetric graphGis Eulerian.

This condition is sufficient, but not necessary, as illustrated in the example reported in Figure 7.21.

The solution of the CPP can be decomposed in two steps.

Step 1. Define a least-cost set of arcsA(a)and of edgesE(a)such that the multigraph G(a)=(V , AA(a), EE(a))is Eulerian (ifGis itself Eulerian, thenA(a)= ∅ andE(a)= ∅and, therefore,G=G(a)).

Step 2. Determine an Eulerian tour inG(a).

The first step of the procedure can be executed in polynomial time ifGis a directed or undirected graph, while it results in an NP-hard algorithm ifGis mixed. The second step can be performed inO(|AE|)time with the followingend-pairingprocedure.

Step 1. Determine a covering of the edges and arcs ofG(a)through a setCof tours, in such a way that an edge/arc is traversed exactly once.

Step 2. If|C| =1,STOP, the tour obtained is Eulerian.

Step 3. Determine two tours inCwhich contain at least one common vertex. Merge the two tours, updateCand go back to step 1.

In step 1, a tour inG(a)can be obtained by visiting the multigraph randomly until the initial vertex is included twice. Then, the edges/arcs of the tour are removed. In the new multigraph a new tour can be looked for.

In the sequel it is shown how to determineG(a)in the cases whereGis directed or undirected.

SHORT-HAUL FREIGHT TRANSPORTATION 283 Directed Chinese postman problem. WhenGis directed, in an optimal solution the arcs inA(a)form a set of least-cost paths connecting the asymmetric vertices.

ThereforeA(a)can be obtained by solving a minimum-cost flow problem (a trans- portation problem, see Section 3.4) on a bipartite directed graph suitably defined.

LetV+ andV−be the subsets ofV whose vertices have a positive and a negative difference between the incoming semi-degree and the outgoing semi-degree, respec- tively. The bipartite directed graph isGT(V+∪V, AT), whereAT = {(i, j ):iV+, jV−}.

With each arc (i, j )AT is associated a costwij equal to that of a least-cost path inGfrom vertexito vertexj. Let alsooi(>0), iV+, be the supply of the vertexi, equal to the difference between its incoming semi-degree and its outgoing semi-degree. Similarly, let di(> 0), iV−, be the demand of vertex i, equal to the difference between its outgoing semi-degree and its incoming semi-degree.

Furthermore, letsij,(i, j )AT, be the decision variable associated with the flow along arc(i, j ). The transportation problem is as follows.

Minimize

minimize

(i,j )AT

wijsij (7.27)

subject to

jV

sij =oi, iV+, (7.28)

iV+

sij =dj, jV+, (7.29)

sij ⩾0, (i, j )AT. (7.30)

Of course,

iV+oi =

jVdj,so that problem (7.27)–(7.30) is feasible. Let sij∗,(i, j )AT, be an optimal (integer) solution of the transportation problem.A(a) is formed by the arcs(r, s)Abelonging to the least-cost paths associated with the arcs(i, j )AT such thatsij >0 ((r, s)is takensijtimes).

In the directed graphG(V , A)shown in Figure 7.22, the differences between the incoming and outgoing semi-degrees of vertices 0, 1, 2, 3, 4 and 5 are−1, 0, 1, 0, 1,−1, respectively. The least-cost paths from vertex 2 to vertex 0 and from vertex 2 to vertex 5 are given by the sequences of arcs{(2,3), (3,4), (4,5), (5,0)}(of cost equal to 109) and{(2,3), (3,4), (4,5)}(of cost equal to 86), respectively. Similarly, the least-cost path from vertex 4 to vertex 0 is formed by{(4,5), (5,0)}, of cost 51, while the least-cost path from vertex 4 to vertex 5 is given by arc (4,5) whose cost is equal to 28. We can therefore formulate the transportation problem on the bipartite directed graphGT(V+∪V, AT)represented in Figure 7.23. The optimal solution to the transportation problem is

s20∗ =0, s25∗ =1, s40∗ =1, s45∗ =0.

284 SHORT-HAUL FREIGHT TRANSPORTATION

i j

5 0

1

3

4 2

18

10

37

21 43

26 23

28 25

cij

0

Figure 7.22 A directed graphG(V , A).

i j

dj

4 2

5 0

1 −1

1 −1

109

86 51

28

wij oi

0

Figure 7.23 Bipartite directed graphGT(V+∪V, AT)associated with graphGin Figure 7.22.

Therefore, setA(a) is formed by the arcs of the least-cost paths from vertex 2 to vertex 5 and from vertex 4 to vertex 0. Adding such arcs to the directed graphG, a least-cost Eulerian multigraph is obtained (Figure 7.24). Hence, an optimal CPP solution of cost 368 is defined by the following arcs:

{(0,1), (1,2), (2,3), (3,4), (4,5), (5,0), (0,4),

(4,2), (2,3), (3,4), (4,5), (5,4), (4,5), (5,0)}.

In this solution some arcs are traversed more than once (for example, arc (4,5)), but on these arcs it is performed only once.

SHORT-HAUL FREIGHT TRANSPORTATION 285

i j

5 0

1

3

4 2

18

10

37

21 43

26

23

28

25

cij

0

Figure 7.24 Least-cost Eulerian multigraph associated with the directed graphGin Figure 7.22.

Undirected Chinese postman problem. WhenGis undirected, the setE(a)can be obtained as a solution of a matching problem on an auxiliary graphGD(VD, ED).

VDis the set of odd vertices inG(VDis formed by an even number of vertices) and ED= {(i, j ):iVD, jVD, i=j}. With each edge(i, j )EDis associated a costwijequal to that of a least-cost chain inGbetween verticesiandj. The setE(a) is therefore obtained as the union of the edges which are part of the least-cost chains associated with the edges of the optimal matching onGD.

Welles is in charge of maintaining the road network of Wales (Great Britain).Among other things, the company has to monitor periodically the roads in order to locate craps and potholes in the asphalt. To this purpose, the road network has been divided into about 10 subnetworks, each of which has to be visited every 15 days by a dedicated vehicle. The graph representing one such subnetwork is shown in Figure 7.25. In order to determine the optimal undirected CPP solution, a minimum-cost matching problem between the odd-degree vertices (vertices 2, 3, 6, 7, 9 and 11) is solved. The optimal matching is 2–3, 6–7, 9–11. The associated set of chains inGis (2,3), (6,7) and (9,11) (total cost is 7.5 km). Adding these edges toG, the Eulerian multigraph in Figure 7.26 is obtained.

Finally, by using the end-pairing procedure, the optimal undirected CPP solution is obtained:

{(0,1), (1,3), (3,2), (2,5), (5,4), (4,3), (3,2), (2,0),

(0,6), (6,7), (7,8), (8,5), (5,6), (6,7), (7,9), (9,11),

(11,10), (10,8), (8,9), (9,11), (11,12), (12,9), (9,0)} (total cost is 52.8 km, the cost of the edges ofG, plus 7.5 km). In this solution, edges (2,3), (6,7)and(9,11)are traversed twice.

286 SHORT-HAUL FREIGHT TRANSPORTATION

0

i j

1

3

9 4

2

7

8 5

6

10

11

12 3.5

1.0

1.0

2.7

1.3 2.5

2.4

2.7 1.5

2.4

3.5

1.5

1.6 5.3

1.5

1.5

4.1 2.9

1.1

1.3 cij

Figure 7.25 Graph representation used in the Welles problem.

Costscij,(i, j )E, are in kilometres.

0

i j

1

3

9 4

2

7

8 5

6

10

11

12 3.5

1.0

1.0 1.0

2.7 1.3 2.5

2.4

2.7 1.5

2.4 2.4

3.5

1.5

1.6 5.3

1.5

1.5

4.1 4.1 2.9

1.1

1.3 cij

Figure 7.26 Least-cost Eulerian multigraph in the Welles problem.

Một phần của tài liệu Introduction to logistics systems planning and control (Trang 306 - 311)

Tải bản đầy đủ (PDF)

(377 trang)