a 78-approximation algorithm for metric max tsp

5
Information Processing Letters 81 (2002) 247–251 A 7 8 -approximation algorithm for metric Max TSP Refael Hassin , Shlomi Rubinstein Department of Statistics and Operations Research, School ofMathematical Sciences, Tel-Aviv University, Tel-Aviv 69978, Israel Received 11 December 2000; received in revised form 15 May 2001 Communicated by K. Iwama Abstract We present a randomized approximation algorithm for the metric version of undirected Max TSP. Its expected performance guarantee approaches 7 8 as n →∞, where n is the number of vertices in the graph. 2002 Elsevier Science B.V. All rights reserved. Keywords: Analysis of algorithms; Maximum traveling salesman problem 1. Introduction Let G = (V,E) be a complete (undirected) graph with vertex set V , |V |= n, and edge set E. For e E let w(e) 0 be its weight. For E E we denote w(E ) = eE w(e). For a random subset E E, w(E ) denotes the expected value. The MAXIMUM TRAVELING SALESMAN PROBLEM (Max TSP) is to compute a Hamiltonian circuit (a tour) with maximum total edge weight. If the weights w(e) satisfy the tri- angle inequality, we call the problem METRIC MAXI - MUM TRAVELING SALESMAN PROBLEM (metric Max TSP). The problem is max-SNP-hard [1] and there- fore there exists some constant β< 1 such that ob- taining a solution with performance guarantee better than β is NP-hard. A survey by Barvinok, Gimadi, and Serdyukov on Max TSP appears in a forthcom- ing book [2]. We denote the weight of an optimal tour by opt. In [4] a randomized polynomial algorithm is given for * Corresponding author. E-mail addresses: [email protected] (R. Hassin), [email protected] (S. Rubinstein). Max TSP that guarantees for any r< 25 33 a solution of expected weight at least r opt. A paper by Kostochka and Serdyukov [5] contains an algorithm with a performance guarantee of 5 6 for the metric Max TSP. It also contains a 3 4 -approximation for the more general metric directed case. This paper contains a randomized algorithm which builds on ideas from the 3 4 -approximation for the gen- eral case developed by Serdyukov in [7] and from the 5 6 -approximation for the metric case developed by Kostochka and Serdyukov in [5]. We start by describ- ing these two algorithms and then show how we use these ideas to construct an approximation algorithm for the metric case with expected performance guar- antee which approaches 7 8 as n →∞. A binary 2-matching (also called 2-factor or cycle cover) is a subgraph in which each vertex in V has a degree of exactly 2. A maximum binary 2-matching is one with maximum total edge weight. Hartvigsen [3] has shown how to compute a maximum binary 2- matching in O(n 3 ) time (see [6] for another O(n 2 |E|) algorithm). The problem of computing a maximum bi- nary 2-matching is a relaxation of Max TSP and there- 0020-0190/02/$ – see front matter 2002 Elsevier Science B.V. All rights reserved. PII:S0020-0190(01)00234-4

Upload: refael-hassin

Post on 02-Jul-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: A 78-approximation algorithm for metric Max TSP

Information Processing Letters 81 (2002) 247–251

A 78-approximation algorithm for metric Max TSP

Refael Hassin∗, Shlomi RubinsteinDepartment of Statistics and Operations Research, School of Mathematical Sciences, Tel-Aviv University, Tel-Aviv 69978, Israel

Received 11 December 2000; received in revised form 15 May 2001Communicated by K. Iwama

Abstract

We present a randomized approximation algorithm for the metric version of undirected Max TSP. Its expected performanceguarantee approaches7

8 asn → ∞, wheren is the number of vertices in the graph. 2002 Elsevier Science B.V. All rightsreserved.

Keywords:Analysis of algorithms; Maximum traveling salesman problem

1. Introduction

Let G = (V ,E) be a complete (undirected) graphwith vertex setV , |V | = n, and edge setE. Fore ∈ E

let w(e) � 0 be its weight. ForE′ ⊆ E we denotew(E′) = ∑

e∈E′ w(e). For a random subsetE′ ⊆ E,w(E′) denotes the expected value. TheMAXIMUM

TRAVELING SALESMAN PROBLEM (Max TSP) is tocompute a Hamiltonian circuit (atour) with maximumtotal edge weight. If the weightsw(e) satisfy the tri-angle inequality, we call the problemMETRIC MAXI -MUM TRAVELING SALESMAN PROBLEM (metric MaxTSP). The problem is max-SNP-hard [1] and there-fore there exists some constantβ < 1 such that ob-taining a solution with performance guarantee betterthan β is NP-hard. A survey by Barvinok, Gimadi,and Serdyukov on Max TSP appears in a forthcom-ing book [2].

We denote the weight of an optimal tour byopt.In [4] a randomized polynomial algorithm is given for

* Corresponding author.E-mail addresses:[email protected] (R. Hassin),

[email protected] (S. Rubinstein).

Max TSP that guarantees for anyr < 2533 a solution of

expected weight at leastr opt. A paper by Kostochkaand Serdyukov [5] contains an algorithm with aperformance guarantee of5

6 for the metric Max TSP. Italso contains a34-approximation for the more generalmetric directed case.

This paper contains a randomized algorithm whichbuilds on ideas from the34-approximation for the gen-eral case developed by Serdyukov in [7] and fromthe 5

6-approximation for the metric case developed byKostochka and Serdyukov in [5]. We start by describ-ing these two algorithms and then show how we usethese ideas to construct an approximation algorithmfor the metric case with expected performance guar-antee which approaches7

8 asn→ ∞.A binary 2-matching(also called 2-factor or cycle

cover) is a subgraph in which each vertex inV has adegree of exactly 2. Amaximum binary2-matchingisone with maximum total edge weight. Hartvigsen [3]has shown how to compute a maximum binary 2-matching in O(n3) time (see [6] for another O(n2|E|)algorithm). The problem of computing a maximum bi-nary 2-matching is a relaxation of Max TSP and there-

0020-0190/02/$ – see front matter 2002 Elsevier Science B.V. All rights reserved.PII: S0020-0190(01)00234-4

Page 2: A 78-approximation algorithm for metric Max TSP

248 R. Hassin, S. Rubinstein / Information Processing Letters 81 (2002) 247–251

fore the weight of a maximum binary 2-matching isan upper bound onopt. All the algorithms mentionedin this paper start by constructing a maximum binary2-matching. Asubtour in this paper is a subgraphwith no non-Hamiltonian cycles or vertices of degreegreater than 2. Thus by adding edges to a subtour itcan be completed to a tour.

2. Serdyukov’s algorithm

Serdyukov’s algorithm for the general Max TSP isgiven in Fig. 1. This presentation assumes thatn iseven.

Note that it is always possible to transfer an edgefromCi toM as required. The performance guaranteefollows easily using the assumption thatn is even.

w(C)� opt whilew(M) � 12opt.

Thus,

w(T1)+w(T2)� 32opt and

max{w(T1),w(T2)

}� 3

4opt.

Serdyukov also shows how to modify the algorithmso that the bound holds whenn is odd but this partis more involved and we are interested here onlyin asymptotic bounds so that the parity ofn is notimportant. For example, ifn is odd we can randomlychoose a vertex and delete it from the graph. Thenapply the algorithm, and finally insert the vertex intothe tour in an arbitrary location. The expected losscaused by this procedure is at most a fraction of 1/n

of the solution’s value.

3. The algorithm of Kostochka and Serdyukov

Kostochka and Serdyukov [5] proved the followingresult (assuming metric weights): Given a binary 2-matchingC with weightw(C) and cyclesC1, . . . ,Cs ,let K = min{|C1|, . . . , |Cs |}. There exists a tourTwith weight

w(T )� 2K − 1

2Kw(C).

To realize this bound they generate fromC a set of2K tours and pick up the longest one. AlgorithmKostochka_Serdyukov given in Fig. 2 is a randomizedversion of this algorithm.

Since|Ci | � K:

w(ui, vi)� 1

Kw(Ci).

By the triangle inequality,

w(ui, ui+1)+w(vi , vi+1)

+w(ui, vi+1)+w(vi, ui+1)� 2w(ui, vi),

w(T ) =s∑

i=1

w(Pi)

+ 1

4

s∑i=1

(w(ui, ui+1)+w(vi, vi+1)

+w(ui, vi+1)+w(vi, ui+1))

�s∑

i=1

w(Pi)+ 1

2

s∑i=1

w(ui, vi)

Serdyukov’s Algorithminput A complete undirected graphG= (V ,E) with weightswe, e ∈ E.returns A tour.begin

Compute a maximum binary 2-matchingC = {C1, . . . ,Cs}.Compute a maximum perfect matchingM .

for i = 1, . . . , r :Transfer fromCi toM an edge so thatM remains a subtour.end forCompleteC into a tourT1.CompleteM into a tourT2.

return The tour with maximum weight betweenT1 andT2.end Serdyukov’s Algorithm

Fig. 1. Serdyukov’s algorithm.

Page 3: A 78-approximation algorithm for metric Max TSP

R. Hassin, S. Rubinstein / Information Processing Letters 81 (2002) 247–251 249

Kostochka_Serdyukovinput A complete undirected graphG= (V ,E) with weightswe, e ∈ E

satisfying the triangle inequality.returns A tour.begin

Compute a maximum binary 2-matchingC = {C1, . . . ,Cs}.Delete from each cycleC1, . . . ,Cs a random edge.[Alternatively, delete from each cycle a minimum weight edge.]Let ui andvi be the ends of the pathPi that results fromCi .Give each path a random orientation and form a tourT by addingconnecting edges between the head ofPi and the tail ofPi+1 (Ps+1 ≡ P1).

return The tourT .end Kostochka_Serdyukov

Fig. 2. Kostochka_Serdyukov algorithm.

=s∑

i=1

w(Ci)− 1

2

s∑i=1

w(ui, vi)

�(

1− 1

2K

) s∑i=1

w(Ci)

=(

1− 1

2K

)w(C).

This result leads to a56-approximation by using amaximum binary 2-matching forC, noting thatK � 3,and thatw(C)� opt.

4. Improving the bound

We will show now how to compute in polynomialtime a random solution of expected weight at least78 times the optimal. As in Serdyukov’s algorithm,we move one edge from each cycle of the maximumbinary 2-matching to the maximum matching. Bythe method of Kostochka and Serdyukov, half ofthe weights lost from the binary 2-matching can bereclaimed when combining the cycles into a tour. Wetry to reclaim more when combining the matching(with the added edges) into a cycle.

The proposed algorithm is given in Fig. 3.

Theorem 1. The expected weight of the tourT re-turned by Algorithm Metric satisfies

w(T )�( 7

8 − O( 1√

n

))opt.

Proof. Since the problem of computing a binary2-matching of maximum weight is a relaxation ofMax TSP, the binary 2-matchingC computed inStep 1 satisfiesw(C) � opt. Since any tour canbe decomposed into two disjoint perfect matchings,w(M)� opt/2.

In Step 2, the algorithm selects (sequentially) a pairof edges, which we callcandidates, from each cycleof C and deletes one of them, where the selection ofthe edge to be deleted is with probability1

2. Denoteby α the relative weight inC of the edges thatwere candidates for deletion. The expected relativeweight of the edges that were actually deleted is12α. However, as explained above with respect toAlgorithm Kostochka_Serdyukov, half of this weightis regained when connecting the resulting paths to atourT1. Hence,

w(T1)�[1− α

2+ α

4

]w(C)�

(1− α

4

)opt. (1)

We now consider Step 3. The algorithm adds toM

one of the pair of candidates from each cycle ofC.The expected weight of the added edges is1

2αw(C).Note that if a vertexv is incident to two candidatesthen certainlyv /∈ S. If v is not incident to a candidatethen certainlyv ∈ S. Finally, if v is incident to onecandidate thenv ∈ S with probability 1

2 (which is theprobability that this candidate isnot chosen).

Let |S| = k + 1. For i ∈ S, exactly one edge from{(i, j) | j ∈ S \ i} is chosen toMS . Thus, for an edge(i, j) ∈E ∩ (S × S) the probability that this edge willbe selected toMS is 1/k. If (i, j) is selected, charge

Page 4: A 78-approximation algorithm for metric Max TSP

250 R. Hassin, S. Rubinstein / Information Processing Letters 81 (2002) 247–251

Metricinput A complete undirected graphG= (V ,E) with weightswe, e ∈ E

satisfying the triangle inequality.returns A tour.beginStep 1

Compute a maximum binary 2-matchingC = {C1, . . . ,Cs}.Compute a maximum perfect matchingM .end Step 1

Step 2for i = 1, . . . , s:

Identify e,f ∈ E ∩Ci such that bothM ∪ {e} andM ∪ {f } are subtours.Randomly chooseg ∈ {e,f } (each with probability 1/2).Pi :=Ci \ {g}.M :=M ∪ {g}.end for

Complete⋃s

i=1Pi into a tourT1 as in Algorithm Kostochka_Serdyukov.end Step 2

Step 3Let S :=set of end nodes of paths inM .Compute a random perfect matchingMS overS.Delete an edge from each cycle inM ∪MS .Arbitrarily completeM ∪MS into a tourT2.end Step 3

return The tourT with maximum weight betweenT1 andT2.end Metric

Fig. 3. New algorithm for metric Max TSP.

its weightw(i, j) in the following manner: Supposethat i is incident to edgese′, e′′ ∈ C. If none of theseedges was a candidate, chargew(i, j)/4 to each ofe′ and e′′. If one of them , saye′ was a candidate,chargew(i, j)/2 to e′′ (and nothing toe′). Note thatit cannot be that bothe′ ande′′ were candidates sincein such a casei /∈ S. The expected weight chargedto an edge(g,h) ∈ C that was not a candidate isthen

1

k

[ ∑r∈S\g

w(r, g)

4+

∑r∈S\h

w(r,h)

4

].

Note that the14 factor arises also in the case that

the vertex, sayg, is incident with a candidate edgeon C, since in such a caseg ∈ S with probabil-ity 1

2 and then it gets half of the weight of theedge ofMS which is incident to it. By the trian-gle inequality,w(r, g) + w(r,h) � w(g,h) so that

the above sum is at leastw(g,h)/4. We concludethat

w(MS)� w(C)1− α

4and consequently

w(M ∪MS) �(

0.5+ α

2+ 1− α

4

)w(C)

=(

3+ α

4

)opt.

Finally, the algorithm deletes edges from cycles inM ∪ MS . We claim that|S| � n/3. The reason is thatthe perfect matching computed in Step 1 had alln ver-tices ofV with degree 1. Then, one candidate fromeach cycle ofC was added toM. The number of addededges is equal to the number of cycles which is at mostn/3. Therefore, after the addition of these edges thedegrees of at most 2n/3 vertices became 2, while atleastn/3 vertices remained with degree 1. The latter

Page 5: A 78-approximation algorithm for metric Max TSP

R. Hassin, S. Rubinstein / Information Processing Letters 81 (2002) 247–251 251

vertices are precisely the setS, and this proves that|S| � n/3. SinceMS is a random matching, the prob-ability that an edge ofM ∪ MS is contained in a cy-cle whose size is smaller than

√n is at bounded from

above by

1n3

+ 1n3 − 1

+ · · · + 1n3 − √

n�

√n

n3 − √

n= O

(1√n

).

(The j th term in the left-hand side of this expressionbounds the probability that a cycle containing exactlyj edge fromMS is created.) Therefore, the expectedweight of edges deleted in this step is O(1/

√n)w(M ∪

MS) and

w(T2)�(

3+ α

4

)(1− O

(1√n

))opt. (2)

Combining (1) and (2) we get that whenα � 12,

w(T1)� 78opt

and whenα � 12,

w(T2)� 78

(1− O(1/

√n)

)opt.

Thus,

w(T ) = max{w(T1),w(T2)

}�

(7

8− O

(1√n

))opt. ✷

Acknowledgements

We thank Alexander Ageev for insightful com-ments. In particular, the definition ofα in the proof of

Theorem 1 should be modified: Given the process ofselecting candidates, then for every edgee in the cyclecover there is a probabilitype that it will be selected asa candidate, and there is an (unconditional) probabil-ity qe thate will be deleted. Defineα = ∑

e∈C pewe tobe the expected relative weight of the candidate edges.The expected relative weight of the edges deleted inStep 2 is

∑e∈C qewe. This is equal toα/2 by the ob-

vious relationqe = pe/2.

References

[1] A. Barvinok, D.S. Johnson, G.J. Woeginger, R. Woodroofe,Finding maximum length tours under polyhedral norms, in:Proceedings of IPCO VI, Lecture Notes in Computer Science,Vol. 1412, Springer, Berlin, 1998, pp. 195–201.

[2] A. Barvinok, E.Kh. Gimadi, A.I. Serdyukov, The maximumtraveling salesman problem, in: G. Gutin, A. Punnen (Eds.),The Traveling Salesman Problem and Its Variations, KluwerAcademic Publishers, Dordrecht, Netherlands, to appear.

[3] D. Hartvigsen, Extensions of matching theory, Ph.D. Thesis,Carnegie-Mellon University, Pittsburgh, PA, 1984.

[4] R. Hassin, S. Rubinstein, Better approximations for Max TSP,Inform. Process. Lett. 75 (2000) 181–186.

[5] A.V. Kostochka, A.I. Serdyukov, Polynomial algorithms withthe estimates34 and 5

6 for the traveling salesman problem ofthe maximum, Upravlyaemye Sistemy 26 (1985) 55–59 (inRussian).

[6] J.F. Pekny, D.L. Miller, A staged primal-dual algorithm forfinding a minimum cost perfect two-matching in an undirectedgraph, ORSA J. Comput. 6 (1994) 68–81.

[7] A.I. Serdyukov, An algorithm with an estimate for the travelingsalesman problem of the maximum, Upravlyaemye Sistemy 25(1984) 80–86 (in Russian).