10
Information Processing Letters 95 (2005) 333–342 www.elsevier.com/locate/ipl Improved deterministic approximation algorithms for Max TSP Zhi-Zhong Chen a,,1 , Yuusuke Okamoto a , Lusheng Wang b a Department of Mathematical Sciences, Tokyo Denki University, Hatoyama, Saitama 350-0394, Japan b Department of Computer Science, City University of Hong Kong, Tat Chee Avenue, Kowloon, Hong Kong Received 4 October 2004; received in revised form 30 March 2005; accepted 31 March 2005 Available online 27 April 2005 Communicated by K. Iwama Abstract We present an O(n 3 )-time approximation algorithm for the maximum traveling salesman problem whose approximation ratio is asymptotically 61 81 , where n is the number of vertices in the input complete edge-weighted (undirected) graph. We also present an O(n 3 )-time approximation algorithm for the metric case of the problem whose approximation ratio is asymptotically 17 20 . Both algorithms improve on the previous bests. 2005 Elsevier B.V. All rights reserved. Keywords: Approximation algorithms; Graph algorithms; Randomized algorithms 1. Introduction The maximum traveling salesman problem (Max TSP) is to compute a maximum-weight Hamiltonian circuit (called a tour) in a given complete edge- weighted (undirected) graph. The problem is known to be Max-SNP-hard [1] and there have been a num- ber of approximation algorithms known for it [4,5, 10]. In 1984, Serdyukov [10] gave an O(n 3 )-time ap- proximation algorithm for Max TSP that achieves an approximation ratio of 3 4 . Serdyukov’s algorithm is * Corresponding author. E-mail address: [email protected] (Z.-Z. Chen). 1 Part of work done during a visit at City University of Hong Kong. very simple and elegant, and it tempts one to ask if a better approximation ratio can be achieved for Max TSP by a polynomial-time approximation algo- rithm. However, previous to our work, there was no (deterministic) polynomial-time algorithm with an ap- proximation ratio better than 3 4 . Interestingly, Hassin and Rubinstein [5] showed that with the help of ran- domization, a better approximation ratio for Max TSP can be achieved. More precisely, they gave a ran- domized O(n 3 )-time approximation algorithm (H&R- algorithm) for Max TSP whose expected approxima- tion ratio is asymptotically 25 33 . The expected approxi- mation ratio 25 33 of H&R-algorithm does not guarantee that with (reasonably) high probability (say, a con- stant), the weight of its output tour is at least 25 33 times the optimal. So, it is much more desirable to have a 0020-0190/$ – see front matter 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.ipl.2005.03.011

Improved deterministic approximation algorithms for Max TSP

Embed Size (px)

Citation preview

Page 1: Improved deterministic approximation algorithms for Max TSP

l

P

atione also

tically

Information Processing Letters 95 (2005) 333–342

www.elsevier.com/locate/ip

Improved deterministic approximation algorithms for Max TS

Zhi-Zhong Chena,∗,1, Yuusuke Okamotoa, Lusheng Wangb

a Department of Mathematical Sciences, Tokyo Denki University, Hatoyama, Saitama 350-0394, Japanb Department of Computer Science, City University of Hong Kong, Tat Chee Avenue, Kowloon, Hong Kong

Received 4 October 2004; received in revised form 30 March 2005; accepted 31 March 2005

Available online 27 April 2005

Communicated by K. Iwama

Abstract

We present an O(n3)-time approximation algorithm for the maximum traveling salesman problem whose approximratio is asymptotically61

81, wheren is the number of vertices in the input complete edge-weighted (undirected) graph. W

present an O(n3)-time approximation algorithm for the metric case of the problem whose approximation ratio is asympto1720. Both algorithms improve on the previous bests. 2005 Elsevier B.V. All rights reserved.

Keywords:Approximation algorithms; Graph algorithms; Randomized algorithms

an-wnum-5,

an

g

askforo-nop-

n-P

an--

i-en-

e a

1. Introduction

The maximum traveling salesman problem(MaxTSP) is to compute a maximum-weight Hamiltonicircuit (called a tour) in a given complete edgeweighted (undirected) graph. The problem is knoto be Max-SNP-hard [1] and there have been a nber of approximation algorithms known for it [4,10]. In 1984, Serdyukov [10] gave an O(n3)-time ap-proximation algorithm for Max TSP that achievesapproximation ratio of34. Serdyukov’s algorithm is

* Corresponding author.E-mail address:[email protected] (Z.-Z. Chen).

1 Part of work done during a visit at City University of HonKong.

0020-0190/$ – see front matter 2005 Elsevier B.V. All rights reserveddoi:10.1016/j.ipl.2005.03.011

very simple and elegant, and it tempts one toif a better approximation ratio can be achievedMax TSP by a polynomial-time approximation algrithm. However, previous to our work, there was(deterministic) polynomial-time algorithm with an aproximation ratio better than34. Interestingly, Hassinand Rubinstein [5] showed that with the help of radomization, a better approximation ratio for Max TScan be achieved. More precisely, they gave a rdomized O(n3)-time approximation algorithm (H&Ralgorithm) for Max TSP whoseexpectedapproxima-tion ratio is asymptotically25

33. The expected approxmation ratio25

33 of H&R-algorithm does not guarantethat with (reasonably) high probability (say, a costant), the weight of its output tour is at least25

33 timesthe optimal. So, it is much more desirable to hav

.

Page 2: Improved deterministic approximation algorithms for Max TSP

334 Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342

P

m).ic)i-

inastd

al-of

aved

ed

e-

n-onin--d

ox-

t-

-n-cti-tioof

plegesllel

nt

the

-

of

ent

ce-

t

t.y

In.2,mwe

-

as-

f

in

(deterministic) approximation algorithm for Max TSthat achieves an approximation ratio better than3

4(and runs at least as fast as Serdyukov’s algorithIn this paper, we give the first such (deterministapproximation algorithm for Max TSP; its approxmation ratio is asymptotically61

81 and its running timeis O(n3). While this improvement is small (as Hassand Rubinstein said about their algorithm), it at ledemonstrates that the ratio of3

4 can be improved anfurther research along this line is encouraged. Ourgorithm is basically a nontrivial derandomizationH&R-algorithm.

We note in passing that Chen and Wang [3] hrecently improved H&R-algorithm to a randomizeO(n3)-time approximation algorithm whose expectapproximation ratio is asymptotically251

331. Their newalgorithm is complicated and even more difficult to drandomize.

The metric case of Max TSP has also been cosidered in the literature. In this case, the weightsthe edges of the input graph obey the triangleequality. What is known for this case is very similar to that for Max TSP. In 1985, Kostochka anSerdyukov [8] gave an O(n3)-time approximation al-gorithm for metric Max TSP that achieves an apprimation ratio of 5

6. Their algorithm is very simpleand elegant. Tempted by improving the ratio5

6, Has-sin and Rubinstein [6] gave a randomized O(n3)-timeapproximation algorithm (H&R2-algorithm) for meric Max TSP whoseexpectedapproximation ratio isasymptotically 7

8. In this paper, by nontrivially derandomizing H&R2-algorithm, we give a (determiistic) O(n3)-time approximation algorithm for metriMax TSP whose approximation ratio is asymptocally 17

20, an improvement over the previous best ra(namely, 5

6). Our algorithm also has the advantagebeing easy to parallelize.

2. Basic definitions

Throughout this paper, a graph means a simundirected graph (i.e., it has neither parallel ednor self-loops), while a multigraph may have paraedges but no self-loops.

Let G be a graph. We denote the vertex set ofG byV (G), and denote the edge set ofG by E(G). Thede-greeof a vertexv in G is the number of edges incide

to v in G. A cyclein G is a connected subgraph ofG

in which each vertex is of degree 2. Apath in G is ei-ther a single vertex ofG or a connected subgraph ofG

in which exactly two vertices are of degree 1 andothers are of degree 2. Thelengthof a cycle or pathC is the number of edges inC. A tour (also calleda Hamiltonian cycle) of G is a cycleC of G withV (C) = V (G). A cycle coverof G is a subgraphH ofG with V (H) = V (G) in which each vertex is of degree 2. Asubtourof G is a subgraphH of G in whicheach connected component is a path. Two edgesGareadjacentif they share an endpoint. AmatchingofG is a (possibly empty) set of pairwise nonadjacedges ofG. A perfect matchingof G is a matchingMof G such that each vertex ofG is an endpoint of anedge inM . For a subsetF of E(G), G − F denotesthe graph obtained fromG by deleting the edges inF .

Throughout the rest of the paper, fix an instan(G,w) of Max TSP, whereG is a complete (undirected) graph andw is a function mapping each edgee

of G to a nonnegative real numberw(e). For a subseF of E(G), w(F) denotes

∑e∈F w(e). Theweightof

a subgraphH of G is w(H) = w(E(H)). Our goal isto compute a tour of large weight inG. We assume than = |V (G)| is odd; the case wheren is even is simplerFor a random eventA, Pr[A] denotes the probabilitthatA occurs. For a random variableX, E[X] denotesthe expected value ofX.

3. Algorithm for Max TSP

This section is divided into three subsections.Section 3.1, we sketch H&R-algorithm. In Section 3we describe our derandomization of H&R-algorithand analyze its approximation ratio. In Section 3.3,give the details that are omitted in Section 3.2.

3.1. Sketch of H&R-algorithm

H&R-algorithm starts by computing a maximumweight cycle coverC. If C is a tour ofG, then weare done. Throughout the rest of this section, wesume thatC is not a tour ofG. Suppose thatT is amaximum-weight tour ofG. Let Tint denote the set oall edges{u,v} of T such that some cycleC in C con-tains bothu andv. Let Text denote the set of edgesT but not inT . Let α = w(T )/w(T ).

int int
Page 3: Improved deterministic approximation algorithms for Max TSP

Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342 335

ht.

t toin

ss.iz-

extst of

ce

ng

them-uld

ma-

H&R-algorithm then computes three toursT1, T2,

T3 of G and outputs the one of the largest weigBased on an idea in [4],T1 is computed by modify-ing the cycles inC as follows. Fix a parameterε > 0.For each cycleC in C, if |E(C)| > ε−1, then removethe minimum-weight edge; otherwise, replaceC by amaximum-weight pathP in G with V (P ) = V (C).Then,C becomes a subtour and we can extend ia tourT1 in an arbitrary way. As observed by Hassand Rubinstein [5], we have:

Fact 3.1. w(T1) � (1− ε)w(Tint) = (1− ε)αw(T ).

Whenw(Text) is large,w(Tint) is small andw(T1)

may be small, too. The two toursT2 andT3 togetherare aimed at the case wherew(Text) is large. By modi-fying Serdyukov’s algorithm,T2 andT3 are computedas shown in Fig. 1.

3.2. Derandomization of H&R-algorithm

Only Steps 5 and 8 in Fig. 1 need randomneDerandomizing Step 8 is easy. However, derandoming Step 5 is hard, because it may need�(n) randomchoices which heavily depend on each other. We nshow that Step 5 can be derandomized at the comaking the approximation ratio slightly worse.

For clarity, we transform each edge{u,v} ∈ M ′ toan ordered pair(u, v), where the cycleC in C with

i

u ∈ V (Ci) and the cycleCj in C with v ∈ V (Cj ) sat-isfy i > j . In detail, to derandomize Step 5, we replaSteps 4 and 5 in Fig. 1 by the four steps in Fig. 2.

The details of computingA1, . . . ,A5 will be givenin Section 3.3. Since we only add the edges ofAh toNh while processingCi in Step 5′, we indeed maintainthe following invariant during Step 5′:

Invariant. At the beginning of processing eachCi

(1 � i � r) in Step 5′, we have that for eachh ∈{1, . . . ,5}, Nh ∩ M = ∅, Nh ⊆ ⋃

1�j�i−1 E(Cj ),Nh ∩ E(Cj ) �= ∅ for eachj ∈ {1, . . . , i − 1}, and thegraph(V (G),M ∪ Nh) is a subtour ofG.

Because of the above invariant, the followilemma is obvious:

Lemma 3.2. After Step5′, M ∩ Nh = ∅ and (V (G),

M ∪ Nh) is a subtour ofG for eachh ∈ {1, . . . ,5},andNh contains at least one edge ofCi for eachh ∈{1, . . . ,5} and for each cycleCi in C.

After Steps 4 and 5 in Fig. 1 are replaced byfour steps in Fig. 2, the first two assertions in the coment on Step 7 in Fig. 1 no longer hold and shobe replaced by the assertion thatw(M ′′) � w(M ′)/10(see the comment on Step 7′ in Fig. 2). This is whyour derandomization of Step 5 makes the approxition ratio slightly worse.

1. Compute a maximum-weight matchingM in G.2. Compute a maximum-weight matchingM ′ in a graphH , whereV (H) = V (G) andE(H) consists of those{u,v} ∈ E(G)

such thatu andv belong to different cycles inC.3. LetC1, . . . ,Cr be an arbitrary ordering of the cycles inC.4. Initialize a setN to be empty.5. Fori = 1,2, . . . , r (in this order), perform the following two steps:

(a) Compute two disjoint nonempty matchingsA1 andA2 in Ci such that each vertex ofCi is incident to an edge inA1 ∪ A2 and both graphs(V (G),M ∪ N ∪ A1) and(V (G),M ∪ N ∪ A2) are subtours ofG.

(b) Selecth ∈ {1,2} uniformly at random, and add the edges inAh to N .6. Complete the graph(V (G),M ∪ N) to a tourT2 of G by adding some edges ofG.7. Let M ′′ be the set of all edges{u,v} ∈ M ′ such that bothu and v are of degree at most 1 inC − N . Let G′′ be the

graph obtained fromC − N by adding the edges inM ′′. (Comment: For each edge{u,v} ∈ M ′, Pr[{u,v} ∈ M ′′] � 14. So,

E[w(M ′′)] � w(M ′)/4. Moreover,G′′ is a collection of vertex-disjoint cycles and paths; each cycle inG′′ must contain atleast two edges inM ′′.)

8. For each cycleC in G′′, select one edge inE(C) ∩ M ′′ uniformly at random and delete it fromG′′. (Comment: After thisstep, Pr[{u,v} ∈ E(G′′)] � 1

8 for each edge{u,v} ∈ M ′, and henceE[w(M ′ ∩ E(G′′))] � w(M ′)/8.)9. CompleteG′′ to a tourT3 of G by adding some edges ofG.

Fig. 1. Computation of toursT2 andT3 in H&R-algorithm.

Page 4: Improved deterministic approximation algorithms for Max TSP

336 Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342

4′. For eachh ∈ {1, . . . ,5}, initialize a setNh to be empty.5′. For i = 1,2, . . . , r (in this order), processCi by performing the following two steps:

(a′) Compute five subsetsA1, . . . ,A5 of E(Ci) − M satisfying the following four conditions:(C1) For eachh ∈ {1, . . . ,5}, Ah �= ∅.(C2) For eachh ∈ {1, . . . ,5}, Ah ∩ (M ∪ Nh) = ∅ and the graph(V (G),M ∪ Nh ∪ Ah) is a subtour ofG.(C3) Each vertex ofCi is an endpoint of at least one edge in

⋃1�j�5 Aj .

(C4) w(Si) � w(M ′i)/2, whereM ′

iis the set of all edges(u, v) ∈ M ′ with u ∈ V (Ci), andSi is the set of all edges

(u, v) ∈ M ′i

such that for at least oneh ∈ {1, . . . ,5}, Nh contains an edge incident tov andAh contains an edgeincident tou.

(b′) For eachh ∈ {1, . . . ,5}, add the edges inAh to Nh.6′. For eachh ∈ {1, . . . ,5}, let M ′′

hbe the set of all edges(u, v) ∈ M ′ such thatNh contains an edge incident tou and another

edge incident tov. (Comment: By condition (C4),w(⋃

1�h�5 M ′′h) � w(M ′)/2.)

7′. Let N be theNh with h ∈ {1, . . . ,5} such thatw(M ′′h) is the maximum amongw(M ′′

1 ), . . . ,w(M ′′5 ). (Comment: By the

comment on Step 6′, w(M ′′h) � w(M ′)/10.)

Fig. 2. Modifying Steps 4 and 5 in Fig. 1.

8′. Compute two disjoint subsetsD1 andD2 of M ′′ such thatD1 contains exactly one edge from each cycle inG′′ and sodoesD2.

9′. If w(D1) � w(D2), then remove the edges inD1 from G′′; otherwise, remove the edges inD2 from G′′.

Fig. 3. Modifying Step 8 in Fig. 1.

es

ion

is

s

n-

n

ot-ed-

h-

ng

this

g

Derandomizing Step 8 in Fig. 1 is easy; it sufficto replace it by the two steps in Fig. 3.

In the next lemma, we analyze the approximatratio of our deterministic algorithm. RecallT , Tint,Text, andα (they are defined at the beginning of thsection).

Lemma 3.3. Let δw(T ) be the total weight of edgein N (cf. Step 7′ in Fig. 2). Then, w(T2) �(0.5 − 1

2n+ δ)w(T ), and eitherw(T3) � ((1 − δ) +

140(1− α))w(T ) or w(T3) � (1− δ + 1

40 − 140n )w(T ).

Proof. SinceT2 contains the originalM (a maximum-weight matching ofG) as a subset and also cotains the edges inN , it is clear thatw(T2) � (0.5 −12n

+ δ)w(T ).Immediately after Step 7 in Fig. 1,

w(G′′) � (1− δ)w(T ) + 1

10w(M ′)

becausew(M ′′) � w(M ′)/10 (see the comment oStep 7′ in Fig. 2). So, immediately after Step 9′ inFig. 3,w(G′′) � (1− δ)w(T ) + 1

20w(M ′). Obviously,if α > 0, then

w(M ′) � 1w(T ) = 1

(1− α)w(T );

2

ext2

otherwise,

w(M ′) �(

1

2− 1

2n

)w(Text) =

(1

2− 1

2n

)w(T ).

Thus, eitherw(T3) � ((1 − δ) + 140(1 − α))w(T ) or

w(T3) � (1− δ + 140 − 1

40n )w(T ). �Now, combining Fact 3.1 and Lemma 3.3 and n

ing that the running time of the algorithm is dominatby the O(n3)-time needed for computing a maximumweight cycle cover and two maximum-weight matcings, we have:

Theorem 3.4. For any fixedε > 0, there is anO(n3)-time approximation algorithm for Max TSP achievian approximation ratio of(61− 20

n) · 1−ε

81−80ε .

3.3. Computation ofA1, . . . ,A5

We now detail the computation ofA1, . . . ,A5. Weneed some definitions and facts first. Throughoutsection, for each integeri ∈ {1, . . . , r}, the phrase“at time i” means the time at which the cycleCi−1has just been processed (in Step 5′) and the processinof C (in Step 5′) is about to begin.

i
Page 5: Improved deterministic approximation algorithms for Max TSP

Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342 337

e

(i) Compute two nonempty subsetsXh andYh of E(Ci) − M such that (1) bothXh andYh areNh-available sets at timei

and (2) each vertex ofCi is an endpoint of at least one edge inXh ∪ Yh. (Comment: By Lemma 1 in [5], this step can bdone in linear time.)

(ii) Let ah (respectively,bh) be the total weight of edges(u, v) ∈ M ′ such thatu is anNh-dependent vertex at timei andXh

(respectively,Yh) contains an edge incident tou. If ah � bh, let Zh = Xh; otherwise, letZh = Yh.(iii) ExtendZh to a maximalNh-available setAh at timei.

Fig. 4. Computation ofAh.

f the

the

-

ute

e

-

er

l-. If

3.7

of

t

Fix an i ∈ {1, . . . , r} and anh ∈ {1, . . . ,5}. An Nh-dependent vertex at timei is a vertexv of Ci such thatat timei, Nh contains an edge{x, y} with (v, x) ∈ M ′or (v, y) ∈ M ′. An Nh-available set at timei is a sub-setZ of E(Ci) such thatZ ∩ (M ∪ Nh) = ∅ and thegraph(V (G),M ∪ Nh ∪ Z) is a subtour ofG. A max-imal Nh-available set at timei is anNh-available setZ at timei such that for eache ∈ E(Ci) − Z, Z ∪ {e}is notNh-available at timei.

Lemma 3.5. Let Z be anNh-available set at timei.Suppose thate1 = {u1, u2} and e2 = {u2, u3} are twoadjacent edges inCi such that no edge inZ is inci-dent tou1, u2, or u3. Then,Z ∪ {e1} or Z ∪ {e2} is anNh-available set at timei.

Proof. SinceZ contains no edge incident tou1, u2, oru3, the degree of eachuj ∈ {u1, u2, u3} in the subtour(V (G),M ∪ Nh ∪ Z) is at most 1. So, ifZ ∪ {e1} isnot anNh-available set at timei, thenu1 andu2 be-long to the same connected component (a path) osubtour(V (G),M ∪Nh ∪Z) and henceu2 andu3 be-long to different connected components (paths) ofsubtour, implying thatZ ∪ {e2} is anNh-available setat timei. �

The following corollary is immediate from Lemma 3.5:

Corollary 3.6. If Z is a maximalNh-available set attime i, then each connected component ofCi − Z is apath of length at most3.

Now, we are ready to describe how to compA1, . . . ,A5 when processingCi . In detail, for eachh ∈ {1, . . . ,5}, Ah is computed by performing ththree steps in Fig. 4 in turn.

A Ci -settled edgeis an edge(u, v) ∈ M ′ such thatuis a vertex ofC (and sov is a vertex of someC with

i j

j < i). The following lemma is immediate from condition (C3) and the above computation ofA1, . . . ,A5,and ensures condition (C4).

Lemma 3.7. For eachh ∈ {1, . . . ,5}, we say that aCi -settled edgee = (u, v) is Ah-satisfiable at timei if u

is an Nh-dependent vertex at timei and Ah containsan edge ofCi incident tou. We say that aCi -settlededgee is satisfiable at timei if there is at least oneh ∈ {1, . . . ,5} such thate is Ah-satisfiable at timei.Let M ′

i be the set of allCi -settled edges, and letSi

be the set of all satisfiableCi -settled edges at timei.Then,w(Si) � w(M ′

i )/2.

Unfortunately, the setsA1, . . . ,A5 computed asin Fig. 4 may not satisfy condition (C3). In othwords, although the connected components ofCi −(⋃

1�j�5 Aj) are paths of length at most 3 by Corolary 3.6, some of them are indeed of length 2 or 3this bad case happens, we need to modifyA1, . . . ,A5so that conditions (C1) through (C4) and Lemmahold. The modification ofA1, . . . ,A5 is done by con-sidering three cases as follows:

Case1: Some connected componentP of Ci −(⋃

1�j�5 Aj) is a path of length 3. Let the edgesP be e1 = {u1, u2}, e2 = {u2, u3}, ande3 = {u3, u4}.Let e0 = {u0, u1} be the edge inE(Ci) − {e1} inci-dent tou1. By Corollary 3.6,e0 ∈ ⋂

1�j�5 Aj . Foreachuj ∈ {u0, u1}, if there is anh ∈ {1, . . . ,5} suchthat uj is an endpoint of anAh-satisfiableCi -settlededge at timei, then letf (uj ) be such anh; otherwise,let f (uj ) be an arbitrary integer in{1, . . . ,5}. Possi-bly, f (u0) = f (u1). In any case, leth be an arbitraryinteger in{1, . . . ,5} − {f (u0), f (u1)}. Then, by ourchoice off (u0) and f (u1), the deletion ofe0 fromAh does not cause any originally satisfiableCi -settlededge at timei to be no longer satisfiable at timei.Moreover, by Lemma 3.5, there is anek ∈ {e1, e2}such that(A − {e }) ∪ {e } is anN -available set a

h 0 k h
Page 6: Improved deterministic approximation algorithms for Max TSP

338 Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342

t thisof

te-

e

l

n

y-

in-r

Inc-2-

ec-ec-

es

ch

-

time i. So, we deletee0 from Ah, and then addek

and zero or more other edges toAh so thatAh be-comes a maximalNh-available set at timei. Clearly,after this modification ofAh, Ci − (

⋃1�j�5 Aj) has

fewer edges than before. Therefore, we can repeakind of modification until no connected componentCi − (

⋃1�j�5 Aj) is a path of length 3.

Case2: Some connected componentP of Ci −(⋃

1�j�5 Aj) is a path of length 2 and|E(Ci)| = 3.Let the edges ofP bee1 = {u1, u2} ande2 = {u2, u3}.Let e0 = {u0, u1} be the edge inE(Ci) − {e1} inci-dent tou1. Then, as in Case 1, we can find an inger h ∈ {1, . . . ,5} such that the deletion ofe0 fromAh does not cause any originally satisfiableCi -settlededge at timei to be no longer satisfiable at timei.Moreover, by Lemma 3.5, there is anek ∈ {e1, e2} suchthat(Ah −{e0})∪ {ek} is anNh-available set at timei.So, we can modifyAh as in Case 1.

Case3: Some connected componentP of Ci −(⋃

1�j�5 Aj) is a path of length 2 and|E(Ci)| � 4.This case is the bottleneck case. Let the edges ofP bee1 = {u1, u2} ande2 = {u2, u3}. Let the two edges inE(Ci) − E(P ) incident to an endpoint ofP be e0 ={u0, u1} and e3 = {u3, u4}. Note that if |E(Ci)| = 4,thenu0 = u4. By Corollary 3.6,{e0, e3} ∩ Ah �= ∅ foreachh ∈ {1, . . . ,5}. For eachuj ∈ {u0, u1, u3, u4}, ifthere is anh ∈ {1, . . . ,5} such thatuj is an endpointof an Ah-satisfiableCi -settled edge at timei, thenlet f (uj ) be such anh; otherwise, letf (uj ) be anarbitrary integer in{1, . . . ,5}. Let h be an arbitraryinteger in{1, . . . ,5} − {f (u0), f (u1), f (u3), f (u4)}.Obviously, even if we delete bothe0 ande3 from Ah,every satisfiableCi -settled edge at timei remains to besatisfiable at timei. Moreover, by Lemma 3.5, theris anek ∈ {e1, e2} such that(Ah − {e0, e3}) ∪ {ek} isan Nh-available set at timei. So, we delete bothe0and e3 from Ah, and then addek and zero or moreother edges toAh so thatAh becomes a maximaNh-available set at timei. Clearly, after this modifi-cation ofAh, Ci − (

⋃1�j�5 Aj) has fewer edges tha

before.So, as long as some connected component ofCi −

(⋃

1�j�5 Aj) is a path of length 3, we keep appling the modification in Case 1 toA1, . . . ,A5. Onceno connected component ofCi − (

⋃1�j�5 Aj) is a

path of length 3, we keep applying the modificationCase 2 or 3 toA1, . . . ,A5 until no connected component ofC − (

⋃A ) is a path of length 2. Afte

i 1�j�5 j

this, each connected component ofCi − (⋃

1�j�5 Aj)

is a path of length 0 or 1, and henceA1, . . . ,A5 satisfyconditions (C1) through (C4) and Lemma 3.7 hold.

4. Algorithm for metric Max TSP

This section is divided into three subsections.Section 4.1, we sketch H&R2-algorithm. In Setion 4.2, we describe our derandomization of H&Ralgorithm and analyze its approximation ratio. In Stion 4.3, we give the details that are omitted in Stion 4.2.

Let (G,w) be as in Section 2. Here,w satisfies thefollowing triangle inequality: For every three verticx, y, z of G, w(x,y) � w(x, z) + w(z, y). Then, wehave the following useful fact:

Fact 4.1. Suppose thatP1, . . . ,Pt are vertex-disjointpaths inG each containing at least one edge. For ea1 � i � t , let ui andvi be the endpoints ofPi . Then,we can use some edges ofG to connectP1, . . . ,Pt intoa single cycleC in linear time such that

w(C) �t∑

i=1

w(Pi) + 1

2

t∑i=1

w({ui, vi}

).

Proof. The fact is obvious ift � 2. So, assumet � 3.Define four disjoint sets of edgesE1, . . . ,E4 as fol-lows. E1 consists of{u1, vt } and all {vi, ui+1} with1� i � t − 1.E2 consists of{v1, ut } and all{ui, vi+1}with 1� i � t − 1. If t is even,E3 consists of{v1, vt },all {u2i−1, u2i} with 1 � i � t/2, and all{v2i , v2i+1}with 1 � i � (t − 2)/2; otherwise,E3 consists of{v1, ut }, all {u2i−1, u2i} with 1 � i � (t − 1)/2, andall {v2i , v2i+1} with 1� i � (t − 1)/2. If t is even,E4consists of{u1, ut }, all {v2i−1, v2i} with 1 � i � t/2,and all{u2i , u2i+1} with 1� i � (t − 2)/2; otherwise,E4 consists of{u1, vt }, all {v2i−1, v2i} with 1 � i �(t − 1)/2, and all{u2i , u2i+1} with 1 � i � (t − 1)/2.Clearly, for each 1� h � 4, the edges inEh can beused to connectP1, . . . ,Pt into a single cycle. Moreover,

4∑h=1

w(Eh) =t∑

i=1

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

+ w(u ,v ) + w(v ,u )),

i i+1 i i+1
Page 7: Improved deterministic approximation algorithms for Max TSP

Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342 339

est

ess.9 ised

an-iontioizese;gi-

h-et

e-s in

the

i-

whereut+1 = u0 and vt+1 = v0. So, by the triangleinequality,

4∑h=1

w(Eh) � 2t∑

i=1

w(ui, vi).

Now, consider theEh such thatw(Eh) is the max-imum amongw(E1), . . . ,w(E4). Let C be the cy-cle obtained by using the edges inEh to connectP1, . . . ,Pt together. Then,w(C) �

∑ti=1 w(Pi) +

12

∑ti=1 w({ui, vi}). �

4.1. Sketch of H&R2-algorithm

H&R2-algorithm assumes thatn is even. It startsby computing a maximum-weight cycle coverC. If Cis a tour ofG, then we are done. Throughout the rof this section, we assume thatC is not a tour ofG.H&R2-algorithm then computes two toursT1, T2 of G

and outputs the heavier one between them.

4.2. Derandomization of H&R2-algorithm

Only Steps 4, 5, 7, and 9 in Fig. 5 need randomnStep 5 can be derandomized using Fact 4.1. Stepsimilar to Step 8 in Fig. 1 and can be derandomiz

similarly. However, Steps 4 and 7 are hard to derdomize. Our main contribution is a derandomizatof Step 4 (without making the approximation raworse). However, we do not know how to derandomStep 7 without making the approximation ratio worso we simply letMS be a maximum-weight matchinin the subgraph(S,F ) of G. This makes the approxmation ratio slightly worse.

Unlike H&R2-algorithm, we assume thatn is odd(the case wheren is even is simpler). Then, the matcing M computed in Step 1 in Fig. 5 is not perfect. Lz be the vertex inG to which no edge inM is incident.Let ez ande′

z be the two edges incident toz in C.In detail, to derandomize H&R2-algorithm, we r

place Steps 4 through 10 in Fig. 5 by the eight stepFig. 6.

The details of computingA1 andA2 will be givenin Section 4.3. In the next theorem, we analyzeapproximation ratio of our new algorithm.

Theorem 4.2. There is anO(n3)-time approximationalgorithm for metric Max TSP achieving an approxmation ratio of17

20 − 15n

.

Proof. It suffices to prove that

max{E[w(T1)

],E

[w(T2)

]}�

(17 − 1

)opt,

20 5n

The

1. Compute a maximum-weight matchingM in G. (Comment: Sincen is even,M is perfect.)2. LetC1, . . . ,Cr be an arbitrary ordering of the cycles inC.3. Initialize a setN to be empty.4. Fori = 1,2, . . . , r (in this order), perform the following two steps:

(a) Compute two distinct edgese1 ande2 in Ci such that both graphs(V (G),M ∪ N ∪ {e1}) and(V (G),M ∪ N ∪ {e2})are subtours ofG.

(b) Selecth ∈ {1,2} uniformly at random, and add edgeeh to N .5. Complete the graphC − N to a tourT1 of G by suitablychoosing and adding some edges ofG. (Comment: Randomness

is needed in this step.)6. Let S be the set of verticesv in G such that the degree ofv in the graph(V (G),M ∪ N) is 1. (Comment: |S| is even

because each connected component in the graph(V (G),M ∪ N) is a path of length at least 1.)7. Compute a random perfect matchingMS in the subgraph(S,F ) of G, whereF consists of all edges{u,v} of G with

{u,v} ⊆ S.8. Let G′ be the multigraph obtained from the graph(V (G),M ∪ N) by adding every edgee ∈ MS even if e ∈ M ∪ N .

(Comment: Each connected component ofG′ is either a path of length 1 or more, or a cycle of length 2 or more.crucial point is that for each edgee in G′, the probability that the connected component ofG′ containinge is a cycle ofsize smaller than

√n is at most O(1/

√n).)

9. For each cycleC in G′, select one edge inC uniformly at random and delete it fromG′.10. CompleteG′ to a tourT2 of G by adding some edges ofG.

Fig. 5. Computation of toursT1 andT2 in H&R2-algorithm.

Page 8: Improved deterministic approximation algorithms for Max TSP

340 Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342

, we

h

se of

econd

4′. Compute two disjoint subsetsA1 andA2 of E(C) − M satisfying the following three conditions:(C5) Both graphs(V (G),M ∪ A1) and(V (G),M ∪ A2) are subtours ofG.(C6) For eachi ∈ {1, . . . , r}, |E(Ci) ∩ A1| = 1 and|E(Ci) ∩ A2| = 1.(C7) ez ∈ A1 ande′

z ∈ A2.5′. ChooseN from A1 andA2 uniformly at random. (Comment: This step needs one random bit. For a technical reason

allow our algorithm to use only one random bit; so we can easily derandomize it, although we omit the details.)6′. Complete the graphC − N to a tourT1 of G as described in Fact 4.1. (Comment: Immediately before this step, eac

connected component ofC − N is a path of length at least 1 because of condition (C6).)7′. Same as Step 6 in Fig. 5. (Comment: The assertion in the comment on Step 6 in Fig. 5 still holds here too becau

condition (C7).)8′. Compute a maximum-weight matchingMS in the graph(S,F ), whereF is as in Step 7 in Fig. 5. (Comment: MS is

perfect.)9′. Same as Step 8 in Fig. 5. (Comment: The first assertion in the comment on Step 8 in Fig. 5 holds here too, but the s

assertion does not hold here.)10′. Compute a subsetM ′

Sof MS such that each cycle inG′ contains exactly one edge ofM ′

S.

11′. Complete the graphG′ − M ′S

to a tourT2 of G as described in Fact 4.1.

Fig. 6. Modifying Steps 4 through 10 in Fig. 5.

d

rge

ent

ntal

-

d-

h-

m-om-mur

re.

hth

whereopt is the weight of an optimal tour inG. Letα = w(A1 ∪ A2)/w(C). By Fact 4.1,

E[w(T1)

]�

(1− α

2+ α

4

)w(C) �

(1− α

4

)opt.

Since the graph(S,F ) is a complete graph an|S| is even,F can be partitioned into|S| − 1 perfectmatchings of the graph. So,

w(MS) � 1

|S| − 1w(F).

We need to compareE[w(F)] with w(C)−w(A1∪A2).To this end, we use an idea in [6], i.e., we chathe weight of each edgee = {u,v} ∈ F to edgesin C but not in A1 ∪ A2 as follows. We call theedges inA1 ∪ A2 candidates. For eachx ∈ {u,v},if x is incident to no candidate edge inC, thenwe chargew(e)/4 to each edge incident tox in C;otherwise, exactly one of the two edges incidto x in C is a candidate (becausex ∈ S), and wechargew(e)/2 to the non-candidate edge incideto x in C. As observed in [6], the expected totweight charged to a non-candidate edge{y1, y2} of C is∑

x∈S−{y1} w(x,y1)/4 + ∑x∈S−{y2} w(x,y2)/4; so, it

is at least(|S|−1)w(y1, y2)/4 by the triangle inequality. Thus, E[w(F)] � (|S| − 1)

∑e w(e)/4, where

e ranges over all non-candidate edges ofC. Therefore,

E[w(MS)

]� 1 E

[w(F)

]� (1− α)w(C)/4.

|S| − 1

By Fact 4.1,

E[w(T2)

]� E

[w(M ∪ N)

] + E[w(MS)

]− E

[w(M ′

S)] + 1

2E[w(M ′

S)].

Since w(M ′S) � w(MS), we now haveE[w(T2)] �

(12 − 1

2n)opt + α

2w(C) + 12E[w(MS)]. Hence, by the

last inequality in the previous paragraph,E[w(T2)] �(5

8 + 38α − 1

2n)opt. Combining this with the in-

equality E[w(T1)] � (1 − α4 )opt, we finally have

max{E[w(T1)],E[w(T2)]} � (1720 − 1

5n)opt.

The running time of the algorithm is dominateby the O(n3)-time needed for computing a maximumweight cycle cover and two maximum-weight matcings. �

Since maximum-weight cycle covers, maximuweight matchings, and maximal path sets can be cputed by fast parallel algorithms [7,9,2], our algorithfor metric Max TSP is parallelizable. Indeed, using oidea of computing the setsA1 andA2, we can evenparallelize H&R2-algorithm. We omit the details he

4.3. Computation ofA1 andA2

We now detail the computation ofA1 andA2. Weneed two definitions first. Apath setin a graphH =(VH ,EH ) is a subsetQ of EH such that the grap(V ,Q) is a collection of vertex-disjoint paths. A pa

H
Page 9: Improved deterministic approximation algorithms for Max TSP

Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342 341

s

(i) Compute a maximal path setQ1 with M ∪ {ez} ⊆ Q1 in H1, whereH1 is the graph obtained fromC by adding the edgein M . (Comment: The degree of each vertex inH1 is at most 3.)

(ii) SetA1 = Q1 − M .(iii) For each cycleCi in C such thatA1 contains two or more edges ofCi , keep only one edge ofCi in A1 (the others are

deleted fromA1). (Note: In this step, we keepez in A1.)

Fig. 7. Computation ofA1.

(iv) Compute a maximal path setQ2 with M ∪ {e′z} ⊆ Q2 in H2, whereH2 is the graph obtained fromC by first deleting the

edges inA1 and then adding the edges inM . (Comment: The degree of each vertex inH2 is at most 3.)(v) SetA2 = Q2 − M .(vi) For each cycleCi in C such thatA2 contains two or more edges ofCi , keep only one edge ofCi in A2 (the others are

deleted fromA2). (Note: In this step, we keepe′z in A2.)

Fig. 8. Computation ofA2.

u-5)

ph-

.e

he

u-5)

e

ees

nceof

m-

fe,in:ina-i.,

and161

ion

foress.

SP,

setQ in H ismaximalif for everye ∈ EH −Q, Q∪{e}is not a path set inH .

Obviously, bothM ∪{ez} andM ∪{e′z} are path sets

in G. Now,A1 is computed as in Fig. 7.The following lemma together with the comp

tation of A1 in Fig. 7 ensures that conditions (Cthrough (C7) in Fig. 6 hold forA1.

Lemma 4.3. Immediately after Step(ii) in Fig. 7, A1

contains at least one edge ofCi for each cycleCi in C.

Proof. Consider an arbitrary cycleCi in C. LetP1, . . . ,Ps be the connected components of the gra(V (G),Q1). EachPj (1� j � s) is a path. For a contradiction, assume thatA1 contains no edge ofCi .Then, each vertex ofCi is an endpoint of somePj

(1 � j � s). Let e1 = {u1, u2} and e2 = {u2, u3} betwo adjacent edges inCi . Becausee1 /∈ A1 andQ1 ismaximal, eithere1 ∈ M or Q1 ∪ {e1} is not a path setIn both cases,u1 andu2 must be the endpoints of thsame pathPj for somej ∈ {1, . . . , s}. Thus,u3 is anendpoint of another pathPk with k �= j . So,e2 /∈ M

andQ1 ∪ {e2} is a path set, a contradiction against tmaximality ofQ1. �

Recall thatM ∪ {e′z} is a path set inG. Now, A2 is

computed as in Fig. 8.The following lemma together with the comp

tation of A2 in Fig. 8 ensures that conditions (Cthrough (C7) in Fig. 6 hold forA .

2

Lemma 4.4. For eachCi ∈ C, A2 contains one edgof Ci .

Proof. For each cycleCi in C, since exactly one edgof Ci is contained inA1, there are two adjacent edgin Ci that are also edges inH2. So, the proof of Lem-ma 4.3 is still valid here if we replace each occurreof “Q1” there by “Q2” and replace each occurrence“A1” there by “A2”. �

Acknowledgements

The authors thank the referee for helpful coments.

References

[1] A.I. Barvinok, D.S. Johnson, G.J. Woeginger, R. WoodrooFinding maximum length tours under polyhedral norms,Proc. 6th Internat. Conf. Integer Programming and Combtorial Optimization (IPCO), in: Lecture Notes in Comput. Scvol. 1412, Springer, Berlin, 1998, pp. 195–201.

[2] Z.-Z. Chen, Parallel constructions of maximal path setsapplications to short superstrings, Theoret. Comput. Sci.(1996) 1–21.

[3] Z.-Z. Chen, L. Wang, An improved randomized approximatalgorithm for Max TSP, submitted for publication.

[4] R. Hassin, S. Rubinstein, An approximation algorithmthe maximum traveling salesman problem, Inform. ProcLett. 67 (1998) 125–130.

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

Page 10: Improved deterministic approximation algorithms for Max TSP

342 Z.-Z. Chen et al. / Information Processing Letters 95 (2005) 333–342

ns51.ct5–

thm

(in

s.el-

25

[6] R. Hassin, S. Rubinstein, A 7/8-approximation approximatiofor metric Max TSP, Inform. Process. Lett. 81 (2002) 247–2

[7] R.M. Karp, E. Upfal, A. Wigderson, Constructing a perfematching is in random NC, Combinatorica 6 (1986) 348.

[8] A.V. Kostochka, A.I. Serdyukov, Polynomial algorithms withe estimates3

4 and 56 for the traveling salesman proble

of maximum, Upravlyaemye Sistemy 26 (1985) 55–59Russian).

[9] K. Mulmuley, U.V. Vazirani, V.V. Vazirani, Matching is aeasy as matrix inversion, Combinatorica 7 (1987) 105–113

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