AN IMPROVED HEURISTIC ALGORITHM FOR THE MAXIMUM BENEFIT CHINESE POSTMAN PROBLEM

. The maximum benefit Chinese postman problem (MBCPP) is a practical generalization of the Chinese postman problem. A distinctive feature of MBCPP is that the postman can traverse each edge arbitrary times and obtains a benefit for each traversal of an edge, which depends on the number of times that the edge has been traversed. (Pearn and Wang, Omega 31 (2003) 269–273) discussed MBCPP under the assumption that the benefits of each edge is a non-increasing function of the number of traversals. They showed that MBCPP under this assumption is NP-hard, and proposed a heuristic algorithm which applies the minimum spanning tree and the minimal-cost 𝑇 -join algorithms. (Corber´an, Plana, Rodr´ıguez-Ch´ıa and Sanchis, Math. Program. 141 (2013) 21–48) presented an integer programming formulation and a branch-and-cut algorithm for MBCPP without the assumption on the benefits. This is based on the idea of integrating the benefits of each edge into two benefits, each representing that the edge is traversed an odd or even number of times. In this paper, by applying the idea of Corber´an et al. , we improve the heuristic algorithm of Pearn and Wang. Our algorithm applies to the general case with no assumption on the benefits, and can perform better even if the benefits are non-increasing. We then analyze the efficiency of our heuristic algorithm in theory and in practice, and prove that it finds the optimal solution when the benefits satisfy a certain property.


Introduction
The Chinese postman problem [6,9] is a problem well known to be solved in polynomial time, and many generalizations are proposed.One of such generalizations is the maximum benefit Chinese postman problem (MBCPP ), which was proposed by Malandraki and Daskin [13] in directed graphs.In this paper, we deal with MBCPP in undirected graphs, which was first studied by Pearn and Wang [14].service.Namely, the postman obtains a net benefit, which is the benefit minus the service cost at a traversal with service, or the negative of the deadhead cost at a traversal without service.The objective of MBCPP is to find a postman tour starting from a depot vertex and returning to the depot that maximizes the total net benefit.A distinctive feature of MBCPP is that there is no limit to the number of times each edge can be traversed.In other words, an edge may be traversed multiple times, or not at all.Furthermore, the benefit obtained at each traversal of an edge depends on the number of services that have been offered to the edge.The MBCPP finds its applications in the design of street cleaning, snow-plowing, snow-salting, and so on.
Formally, MBCPP is defined in the following way.Let  = (, ) be a connected undirected graph with vertex set  and edge set , and let  0 ∈  be a specified vertex, representing the depot.Each edge  ∈  is associated with an integer   ∈ Z + representing the number of services offered to .Services are offered for the first   traversals, and no service is offered afterwards.Thus, for the th traversal on , we obtain a benefit   () ≥ 0 for  = 1, 2, . . .,   , and no benefit for  ≥   + 1.
Costs are also associated with each traversal of an edge: service cost associated with a traversal with service; and deadhead cost associated with a traversal without service.The service cost of an edge  varies with the number of traversals with service on .For  = 1, 2, . . .,   , let   () denote the cost of the th traversal of .The deadhead cost of  does not depend on the number of traversals and is denoted by   .We assume that   () ≥ 0 ( = 1, 2, . . .,   ) and   ≥ 0.
In summary, the net benefit   () of the th traversal of an edge  is described as The objective of MBCPP is to find a spanning Eulerian multi-subgraph (,  ) of  with depot  0 ∈  maximizing the total net benefit where   () ∈ Z + is the multiplicity of an edge  in the multiset  .

Related work
The two studies most related to this paper are due to Pearn and Wang [14] and Corberán, Plana, Rodríguez-Chía, and Sanchis [4].
Pearn and Wang [14] proved that MBCPP is NP-hard even when the benefit   () is a monotone non-increasing function of the number  of traversals and   () is constant for each  ∈ , by reducing the rural postman problem, which had been proved to be NP-hard [12].Pearn and Wang [14] further proposed a heuristic algorithm for MBCPP with the above benefits, while its complexity is not analyzed and only a small computational example is provided.
This heuristic algorithm uses a minimum spanning tree and a minimum-weight  -join algorithms (see, e.g., [10,16]), and has some similarity to the algorithm for the Chinese postman problem [7] and Christofides' approximation algorithm for the traveling salesman problem [3].In a graph  = (, ) and its vertex subset  ⊆  , an edge subset  ⊆  is a T-join if the set of vertices of odd degree in the subgraph (, ) is  .Note that, if  is equal to the set of vertices of odd degree in the original graph , then adding a  -join  to  results in a Eulerian (multi)graph.
Corberán et al. [4] presented an integer programming formulation and a branch-and-cut algorithm for MBCPP without any assumption on the benefits.A key idea is to integrate the net benefits of each edge into only two benefits, each representing that the edge is traversed in an odd or even number of times.
Theorem 1.1 (Corberán et al. [4]).Solving an arbitrary instance  of MBCPP is equivalent to solving an instance  ′ , where each edge  has only two net benefits  odd  and  even  for the first and the second traversals of each edge , respectively, where Theorem 1.1 implies that, by integrating the net benefits on each edge, any instance of MBCPP can be transformed into an instance with only zero, one or two traversals on each edge.Namely, we do not need to define the net benefit of the th traversal with  ≥ 3.While this integer programming approach does not have an effective bound on the complexity, Corberán et al. [4] empirically demonstrated its practical efficiency, by showing that it can solve instances with up to 1,000 vertices and 3,000 edges within one hour.
Other related work includes the following.As mentioned before, Malandraki and Daskin [13] dealt with MBCPP in directed graphs.They modeled it as a minimum-cost flow problem with subtour elimination constraints, and proposed a branch-and-bound procedure.Pearn and Chiu [15] also proposed a heuristic algorithm for MBCPP in directed graphs.The prize-collecting arc routing problem [1,2] is a special case of MBCPP, where   = 1 for each edge  in some edge subset  ⊆  and   = 0 for each  ∈  ∖ .Shafahi and Haghani [18] proposed a common generalization of MBCPP and the vehicle routing problem, and presented a mixed integer programming formulation.

Our contribution
In this paper, by applying the idea of Corberán et al. [4] (Thm.1.1), we extend the heuristic algorithm of Pearn and Wang [14] to the general case where the net benefit   () is not necessarily a monotone non-increasing function of the number  of traversals.We show that, even when   () is monotone non-increasing, in some cases our algorithm performs better than the previous algorithm; see Section 3.1.2.
While there already exists a computational method [4], our heuristic algorithm is of interest in a sense that it builds upon fundamental concepts in combinatorial optimization such as minimum spanning trees and minimumweight  -joins.This fact provides the ease of implementation and estimation of the efficiency in theory and in practice: given the integrated benefits  odd  and  even  of each edge , our algorithm runs in ( 3 ) time, where  is the number of vertices.This is the first algorithm for MBCPP with effective complexity bound.
Furthermore, we prove that the extended heuristic algorithm finds the optimal solution when the integrated net benefit for the first traversal is larger than or equal to that for the second traversal, and the sum of these two integrated net benefits is non-negative (Assumption 3.3 in Sect.3.3).This property is satisfied, for instance, when   () is monotone non-increasing for each edge .
We summarize the aforementioned features of the algorithms in Table 1.

Organization of the paper
The organization of this paper is as follows.We describe our extended heuristic algorithm in Section 2. Section 3 provides the detail of its improvements: improvements in the heuristics in Section 3.1; theoretical and practical efficiency in Section 3.2; and the optimality when the benefits obey the above assumption in Section 3.3.Section 4 concludes this paper by a summary and future work.

Improved heuristic algorithm
In this section, we describe our heuristic algorithm, which extends the algorithm by Pearn and Wang [14], by using the idea of the integration of the net benefits by Corberán et al. [4] (Thm.1.1).We begin with a brief sketch to provide an intuition of the algorithm in Section 2.1, followed by its detailed description in Section 2.2.

Algorithm sketch
For each edge  ∈ , make two copies  ′ and  ′′ , and associate the benefits   ′ and   ′′ by   ′ =  odd Now the objective is to find a subset  ⊆  ′ ∪  ′′ which forms a connected Eulerian subgraph including  0 and maximizes the total benefit ∑︀  ∈   .A remarkable feature is that  must satisfy for every  ∈ .
We initialize  to be the set of the edges  ∈  ′ ∪  ′′ with non-negative benefit   , except for edges  ′′ with   ′ < 0. That is, Next we modify the edge set  so that it induces a connected and Eulerian subgraph.If the subgraph induced by  is not connected, we connect the components by adding some edges with negative benefit, with the aid of a minimum spanning tree algorithm.We then add a minimum-weight  -join to  , where  is the set of vertices of odd degree in (,  ), to obtain an Eulerian graph.We remark that, the weights of the edges in finding the minimum spanning tree and the  -join are carefully defined, based on  odd  and  even  .Finally, we remove cycles of negative benefit from  as many as possible, while maintaining the condition (2.1) and the connectivity of  .

Algorithm description
We exhibit a pseudocode of our algorithm in Algorithm 1, followed by its detailed description.Line 1 (Collecting non-negative benefits).For each edge  ∈ , define  odd  ,  even  ∈ R in the same way as Theorem 1.1.According to the values of  odd  and  even  , partition the edge set  into four sets  1 ,  2 ,  3 , and  4 by Let  ′ and  ′′ be two copies of .Denote the copy of  ∈  in  ′ by  ′ , and its benefit   ′ =  odd  .Similarly, let  ′′ be the copy of  ∈  in  ′′ and let   ′′ =  even  .Then, define  ⊆  ′ ∪  ′′ by Algorithm 1 Extended heuristic algorithm. ←  ∖  13: Output  Lines 2-4 (Connecting the components).Suppose that (,  ) is not connected.Let  denote the set of connected components in (,  ), and let G = (, Ẽ) be a graph with vertex set , whose edge set Ẽ and edge-length function c are defined as follows.The edge set Ẽ is defined by For every edge  ∈  connecting two components in , define its weight   ∈ R by representing that  ∈  3 is traversed twice, while  ∈  4 once.Now the edge-length function c on Ẽ is defined by c( 1 ,  2 ) = max{  :  ∈  is an edge between  1 ,  2 ∈ }. (2.3) Then, find a minimum spanning tree S in G with respect to −c, and let  ⊆  be the set of edges corresponding to S. Finally, define  ′ ⊆  ′ and  ′′ ⊆  ′′ by and update  by  :=  ∪  ′ ∪  ′′ .
Lines 5-8 (Correcting the parity).Suppose that the graph (,  ) is not Eulerian.Let  ⊆  be the set of vertices with odd degree in (,  ).For each  ∈ , define a new weight   ∈ R by (2.4) Then, find a maximum-weight  -join  ⊆  with respect to , and update  by ′ 2 ,  ′′ 2 ∈  in Line 5, which means that at this point  2 is traversed four times.Suppose further that  2 ∈ .Then Algorithm 1 cancels the fourth traversal to obtain total net benefit 9 from  2 , while the algorithm in [14] adds the fifth traversal, resulting in total net benefit 7.
Let us mention one more difference.In the algorithm of Pearn and Wang [14], the addition of the last traversal may create a negative cycle consisting of two parallel edges.Indeed, in Example 3.1, the third and fourth traversals of  1 and the fourth and fifth traversals of  2 result in negative cycles of two edges.Such negative cycles may be removed in the next step if it is detected, or may not if some other negative cycle including one of these two edges is detected.In other words, Algorithm 1 removes such negative cycles of two edges in advance.

Theoretical and practical efficiency
This section provides how to implement Algorithm 1 by combining basic graph algorithms.This enables us to give a theoretical bound on the time complexity, and discuss practical efficiency compared to the integer programming approach by Corberán et al. [4].
Recall that the number of the vertices in the original graph  = (, ) is denoted by .Algorithm 1 mainly consists of the following three procedures: Lines 2-4 finding a minimum spanning tree; Lines 5-8 finding a maximum-weight  -join; and Lines 9-12 finding negative cycles.
As is well known, all of these three procedures can be performed in polynomial time.First, a standard implementation of Prim's minimum spanning tree algorithm runs in ( 2 ) time, and many algorithms with better theoretical complexity bound are in the literature; see [10,16,17].
To find a maximum-weight  -join, it suffices to have implementations of an all-pairs shortest paths algorithm with nonnegative length and a maximum-weight matching algorithm [10,16].For the former, the Warshall-Floyd method is standard and runs in in ( 3 ) time [10,16,17].For the latter, an ( 3 )-time implementation [8,11] of Edmonds' algorithm [5] is famous.
Finally, a family of negative cycles can also be found by one execution of a minimum-weight  -join algorithm in the following way.For two sets  and  , denote their symmetric difference ( ∖  ) ∪ ( ∖ ) by △ .Let  − ⊆  be a set of the edges in  with negative benefit, i.e.,  − = { ∈  |   < 0}.Let  − ⊆  be the set of vertices of odd degree in the subgraph (,  − ).Then, find a minimum-weight  − -join  − with respect to weights |  |.It is straightforward to see that  − △ − is a collection  of cycles with minimum total benefit.Therefore, we conclude that Algorithm 1 can be implemented to run in ( 3 ) time.
For the details of the implementations and the practical performance of the above algorithms, we refer the readers to, e.g., [10,17].We remark that the above complexity bounds do not involve large hidden constants and are often pessimistic: the algorithms are much faster for practical instances.For example, for instances on dense graphs with 1,000 vertices, all of the procedures can be done within one minute.
Recall that  ⊆  is the set of vertices with odd degree in (,  (5) ) and  * is an Eulerian edge set.It then follows that J is a  -join.Since  is a maximum-weight  -join with respect to , it holds that ( J) ≤ ().

Conclusion
We have presented an improved heuristic algorithm for MBCPP (Algorithm 1), putting emphasis on the improvements upon the previous heuristic algorithm [14] and the theoretical and practical efficiency compared to the exact branch-and-cut method [4].We have also proved that our heuristic algorithm finds an optimal solution under a certain assumption (Assumption 3.3).
Directions of future research would include designing approximation algorithms with guaranteed approximation ratio for MBCPP, and extending our approach to MBCPP in digraphs [15] and the common generalization of MBCPP and the vehicle routing problem [18].

Table 1 .
Summary of the algorithms for MBCPP.