16

Click here to load reader

Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

  • Upload
    anke

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

Discrete Applied Mathematics 161 (2013) 2142–2157

Contents lists available at SciVerse ScienceDirect

Discrete Applied Mathematics

journal homepage: www.elsevier.com/locate/dam

Deterministic approximation algorithms for the maximumtraveling salesman and maximum triangle packing problemsAnke van ZuylenMathematics Department, College of William & Mary, Williamsburg, VA, United States

a r t i c l e i n f o

Article history:Received 29 July 2011Received in revised form 27 February 2013Accepted 1 March 2013Available online 26 March 2013

Keywords:Maximum traveling salesman problemMaximum triangle packingApproximation algorithmsDerandomizationPessimistic estimators

a b s t r a c t

We give derandomizations of known randomized approximation algorithms for themaximum traveling salesman problem and the maximum triangle packing problem:we show how to define pessimistic estimators for certain probabilities, based on theanalysis of the randomized algorithms, and show that we can multiply the estimatorsto obtain pessimistic estimators for the expected weight of the solution. The methodof pessimistic estimators (Raghavan (1988) [14]) then immediately implies that therandomized algorithms can be derandomized. For themaximum triangle packing problem,this gives deterministic algorithms with better approximation guarantees than what waspreviously known.

The key idea in our analysis is the specification of conditions on pessimistic estimatorsof two expectations E [Y ] and E [Z], under which the product of the pessimistic estimatorsis a pessimistic estimator of E [YZ], where Y and Z are two random variables. Thisapproach can be useful when derandomizing algorithms for which one needs to bound theprobability of some event that can be expressed as an intersection ofmultiple events; usingour method, one can define pessimistic estimators for the probabilities of the individualevents, and then multiply them to obtain a pessimistic estimator for the probability of theintersection of the events.

© 2013 Elsevier B.V. All rights reserved.

1. Introduction

In this paper, we consider two NP-hard maximization problems: the maximum traveling salesman problem and themaximum triangle packing problem. For these two problems, there are several approximation algorithms known that arerandomized algorithms: the solution they output has an expectedweight that is at least a certain factor of the optimum. Itwasunknown whether it is possible to derandomize these algorithms. Practically, one may prefer deterministic approximationalgorithms to randomized approximation algorithms, because the approximation guarantee of a randomized algorithm onlysays something about the expected quality of the solution; it does not tell us anything about the variance in the quality.Theoretically, it is a major open question whether there exist problems that we can solve in randomized polynomial time,for which there is no deterministic polynomial time algorithm. The algorithms for the problems we consider and theiranalysis get quite complicated, so complicated, even, that two papers onmaximum triangle packing contained subtle errors,see [10,4]. A direct derandomization of these algorithms remained an open problem. Chen et al. [3] state in the conferenceversion of their paper on the maximum triangle packing problem that they believe their randomized algorithm is ‘‘toosophisticated to derandomize’’.We show that it is possible to derandomize their algorithm. Although the derandomization isinvolved, the ingredients for the derandomization are already contained in Chen et al.’s analysis of the randomized algorithm,plus a certain framework of thinking about derandomization.

E-mail address: [email protected].

0166-218X/$ – see front matter© 2013 Elsevier B.V. All rights reserved.http://dx.doi.org/10.1016/j.dam.2013.03.001

Page 2: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2143

Two powerful tools in the derandomization of randomized algorithms are the method of conditional expectation [7]and the method of pessimistic estimators, introduced by Raghavan [14]. We explain the idea of the method of conditionalexpectation and pessimistic estimators informally; we give a formal definition of pessimistic estimators in Section 2.Suppose we have a randomized algorithm for which we can prove that the expected outcome has a certain property, say,it will be a tour of length at least L. The method of conditional expectation does the following: it iterates over the randomdecisions by the algorithm, and for each such decision, it evaluates the expected length of the tour conditioned on each of thepossible outcomes of the random decision. By the definition of conditional expectation, at least one of these outcomes hasexpected length at least L; we fix this outcome and continue to the next random decision. Since we maintain the invariantthat the conditional expected length is at least L, we will finish with a deterministic solution of length at least L. It is oftendifficult to exactly compute the conditional expectations one needs to achieve this. A pessimistic estimator is a lower boundon the conditional expectation that is efficiently computable and can be used instead of the true conditional expectation.

In the algorithms we consider in this paper, it would be sufficient for obtaining a deterministic approximation algorithmto define pessimistic estimators for the probability that an edge occurs in the solution returned by the algorithm. Sincethe algorithms are quite involved, this seems non-trivial. However, the analysis of the randomized algorithm does succeedin bounding this probability, by defining several events for each edge, where the probability of the edge occurring in thealgorithm’s solution is exactly the probability of the intersection of these events.With the right definitions of events, definingpessimistic estimators for the probabilities of these individual events turns out to be relatively straightforward.We thereforegive conditions under which we can multiply pessimistic estimators to obtain a pessimistic estimator for the expectationof the product of the variables they estimate (or, in our case, the probability of the intersection of the events). This allowsus to leverage the analysis of the randomized algorithms for the two problems we consider. In the case of the algorithmsfor the maximum triangle packing problem [8,3], we also simplify a part of the analysis that is used for both the originalrandomized algorithm and our derandomization, thus making the analysis more concise.

The strength of our method is that it makes it easier to see that an algorithm can be derandomized using the method ofpessimistic estimators, by ‘breaking up’ the pessimistic estimator for a ‘complicated’ probability, into a product of pessimisticestimators for ‘simpler’ probabilities. This is useful if, as in the applications given in this paper, the analysis of the randomizedalgorithm also bounds the relevant probability by considering it as the probability of an intersection of simpler events, orput differently, the randomized analysis bounds the relevant probability by (repeated) conditioning.

1.1. Results and related work

The technique of pessimistic estimators is due to Raghavan [14]. It is straightforward to show, using linearity ofexpectation, that the sum of pessimistic estimators that estimate the expectation of two random variables, say Y and Zrespectively, is a pessimistic estimator of the expectation of Y + Z . The product of these pessimistic estimators is notnecessarily a pessimistic estimator ofE

YZ

.Wigderson and Xiao [17] consider pessimistic estimators that are upper bounds

(whereas for our applications, we need estimators that are lower bounds on the conditional expectation), and they showthat if we have pessimistic estimators for the probability of events σ and τ respectively, then the sum of the estimatorsis a pessimistic estimator for the probability of σ ∩ τ . Because we need estimators that are lower bounds, this result doesnot hold for our setting. The conditions we propose under which the product of pessimistic estimators (lower bounds) forthe probability of σ and τ is a pessimistic estimator (lower bound) for the probability of σ ∩ τ are quite straightforwardand by no means exhaustive: the strength of these conditions is that they are simple to check for the two applicationswe consider. Using our approach, we show how to obtain deterministic approximation algorithms that have the sameperformance guarantee as the randomized approximation algorithms for the maximum traveling salesman problem byHassin and Rubinstein [8] and the randomized approximation algorithms by Hassin and Rubinstein [9] and Chen, Tanahashiand Wang [3] for the maximum triangle packing problem.

In the maximum traveling salesman problem we are given an undirected weighted graph, and want to find a tour ofmaximum weight that visits all the vertices exactly once. We note that we do not assume that the weights satisfy thetriangle inequality; ifwedo assume this, better approximation guarantees are known [11]. Themaximumtraveling salesmanproblem was shown to be APX-hard by Barvinok et al. [1]. Hassin and Rubinstein [8] give a randomized approximationalgorithm for the maximum traveling salesman problemwith expected approximation guarantee ( 25

33 − ε) for any constantε > 0. Chen, Okamoto and Wang [2] propose a derandomization, by first modifying the randomized algorithm and thenusing the method of conditional expectation, thus achieving a slightly worse guarantee of ( 61

81 − ε). In addition, Chenand Wang [5] propose an improvement of the Hassin and Rubinstein algorithm, resulting in a randomized algorithm withguarantee ( 251

331−ε). The best knownapproximation algorithm for themaximumtraveling salesmanproblem is due to Paluch,Mucha and Madry [13]. Their algorithm is deterministic and achieves a guarantee of 7

9 . We show how to derandomize thealgorithm by Hassin and Rubinstein [8], which provides the easiest application of ourmethod.We do not show how to applyour method to the algorithm by Chen and Wang [5], because a better deterministic algorithm already exists, and applyingour method to their algorithm (which is quite involved and takes several pages merely to describe the algorithm) does notprovide much new insight into our method or their algorithm.

In the maximum triangle packing problem, we are again given an undirected weighted graph, and we want to find amaximumweight set of disjoint 3-cycles. Themaximum triangle packing problem cannot be approximated towithin 0.9929unless P = NP , as was shown by Chlebík and Chlebíková [6]. Hassin and Rubinstein [9] show a randomized approximation

Page 3: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2144 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

algorithmwith expected approximation guarantee ( 4383 −ε) for any constant ε > 0. Chen, Tanahashi andWang [3,4] improve

this algorithm and give a randomized algorithmwith improved guarantee of (0.523−ε). Wewill show how to derandomizeboth of these algorithms. A recent result of Tanahashi and Chen [16] shows an improved approximation ratio for the relatedmaximum 2-edge packing problem. They show how to derandomize their new algorithm using the method of pessimisticestimators. The derandomization is quite involved and many parts of the proof requires an extensive case analysis. Theirmethod also implies a deterministic algorithmwith guarantee (0.518−ε) for themaximum triangle packing problem. Usingour method, we can obtain a deterministic algorithm with a better approximation guarantee.

The remainder of this paper is organized as follows. In Section 2, we give a formal definition of pessimistic estimators,andwe introduce two conditions underwhich the product of pessimistic estimators of two random variables is a pessimisticestimator for the product of the random variables. In Section 3, we show how to obtain a very simple deterministicapproximation algorithm for themaximum traveling salesmanproblem that achieves the same guarantee as the randomizedalgorithm of Hassin and Rubinstein [8]. In Section 4, we show how to derandomize the algorithms in [9,3] to obtaindeterministic approximation algorithms for the maximum triangle problem.

2. Pessimistic estimators

Consider a randomized algorithm, which sequentially makes certain random decisions, say X1, X2, . . . , Xr , and whichresults in a solution of value Y = f (X1, . . . , Xr). Let y = E

f (X1, . . . , Xr)

. We can eliminate the randomization from

the first decision and guarantee a solution of value at least y by computing Ef (X1, . . . , Xr)|X1 = x1

for all possible

outcomes x1 of the first decision, and choosing the outcome x1 for which Ef (X1, . . . , Xr)|X1 = x1

is maximized. By the

definition of conditional expectation, the new algorithm, that chooses X1 = x1 and then continues as in the randomizedalgorithm, finds a solution of expected value at least y. We can continue this process, and, given outcomes (x1, . . . , xℓ) ofthe first ℓ random decisions, such that E

f (X1, . . . , Xr)|X1 = x1, . . . , Xℓ = xℓ

is at least y, we choose xℓ+1 that maximizes

Ef (X1, . . . , Xr)|X1 = x1, . . . , Xℓ = xℓ, Xℓ+1 = xℓ+1

. This way, we will find a set of outcomes (x1, . . . , xr) for each of the

random decisions, such that f (x1, . . . , xr) ≥ y. This is called the method of conditional expectation. Of course, this doesnot necessarily provide a polynomial time algorithm; the number of possible outcomes we need to evaluate for a givenrandom decision is not necessarily polynomial in the size of the input and the conditional expectations we need may notbe efficiently computable. Pessimistic estimators, introduced by Raghavan [14], deal with the latter issue; a pessimisticestimator is a function that estimates the conditional expectations one needs when executing the method of conditionalexpectation.

We use the following definition of a pessimistic estimator.

Definition 2.1 (Pessimistic Estimator). Given random variables X1, . . . , Xr , and a function Y = f (X1, . . . , Xr), a pessimisticestimator φ with guarantee y for E

Yis a set of functions φ(0), . . . , φ(r) where φ(ℓ) has domain Xℓ :=

(x1, . . . , xℓ) :

PX1 = x1, . . . , Xℓ = xℓ

> 0

for ℓ = 1, 2, . . . , r such that φ(0)

≥ y and:

(i) EY |X1 = x1, . . . , Xr = xr

≥ φ(r)(x1, . . . , xr) for any (x1, . . . , xr) ∈ Xr ;

(ii) φ(ℓ)(x1, . . . , xℓ) is computable in deterministic polynomial time for any ℓ ≤ r − 1 and (x1, . . . , xℓ) ∈ Xℓ;(iii) E

φ(ℓ+1)(x1, . . . , xℓ, Xℓ+1)

≥ φ(ℓ)(x1, . . . , xℓ) for any ℓ ≤ r and (x1, . . . , xℓ) ∈ Xℓ;

(iv) we can efficiently enumerate all xℓ+1 such that (x1, . . . , xℓ+1) ∈ Xℓ+1 for any ℓ < r and (x1, . . . , xℓ) ∈ Xℓ.

Lemma 2.2. Given random variables X1, . . . , Xr , a function Y = f (X1, . . . , Xr), and a pessimistic estimator φ for EYwith

guarantee y, we can find (x1, . . . , xr) such that

EY |X1 = x1, . . . , Xr = xr

≥ y.

Proof. By conditions (ii)–(iv) in Definition 2.1, we can efficiently find x1 such that φ(1)(x1) ≥ φ(0)≥ y, and by repeatedly

applying these conditions, we find (x1, . . . , xr) such that φ(r)(x1, . . . , xr) ≥ y. Then, by condition (i) in Definition 2.1, itfollows that E

Y |X1 = x1, . . . , Xr = xr

≥ y. �

We make a few remarks about Definition 2.1. It is sometimes required that condition (i) holds for all ℓ = 0, . . . , r .However, the condition we state is sufficient. Second, note that we do not require that the support of the random variablesis of polynomial size, but only that the support of Xℓ+1, conditioned on X1, . . . , Xℓ, has polynomial size. This fact may beimportant, see, for example, Section 3. Also note that we can combine (ii), (iii) and (iv) into a weaker condition, namely thatfor any ℓ < r and (x1, . . . , xℓ) ∈ Xℓ we can efficiently find xℓ+1 such that φ(ℓ+1)(x1, . . . , xℓ, xℓ+1) ≥ φ(ℓ)(x1, . . . , xℓ). Ourstricter definition will make it easier to define conditions, under which we can combine pessimistic estimators.

The following lemma is easily proved by checking the properties in Definition 2.1.

Lemma 2.3. If Y , Z are both functions of X1, . . . , Xr and φ is a pessimistic estimator for EYwith guarantee y and θ is a

pessimistic estimator for EZwith guarantee z, then φ + θ is a pessimistic estimator for E

Y + Z

with guarantee y + z. Also,

for any input parameter w ∈ R≥0, wφ is a pessimistic estimator of EwY

with guarantee wy.

Page 4: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2145

In our applications, the input is an undirected graph G = (V , E) with edge weights we ≥ 0 for e ∈ E. Let Ye be anindicator variable that is one if edge e is present in the solution returned by the algorithm, and suppose we have pessimisticestimators φe with guarantee ye for E

Ye

= P

Ye = 1

for all e ∈ E. By the previous lemma,

e∈E weφe is a pessimistic

estimator with guarantee

e∈E weye for E

e∈E weYe, the expected weight of the solution returned by the algorithm.

Hence, such pessimistic estimators are enough to obtain a deterministic solution with weight

e∈E weye.Rather than finding a pessimistic estimator for E

Ye

directly, we will define pessimistic estimators for (simpler) events

such that {Ye = 1} is the intersection of these events. We now give two sufficient conditions on pessimistic estimators sothat we can multiply them and obtain a pessimistic estimator of the expectation of the product of the underlying randomvariables. We note that our conditions are quite specific and that the fact that we can multiply the estimators easily followsfrom them. The strength of the conditions is in the fact that they are quite easy to check for the pessimistic estimators thatwe consider.

Definition 2.4 (Product of Pessimistic Estimators). Given random variables X1, . . . , Xr , and two pessimistic estimators φ, θfor the expectation of Y = f (X1, . . . , Xr), Z = g(X1, . . . , Xr) respectively, we define the product of φ and θ , denoted by φ ·θ ,as

φ · θ (ℓ)(x1, . . . , xℓ) = φ(ℓ)(x1, . . . , xℓ) · θ (ℓ)(x1, . . . , xℓ) for ℓ = 1, . . . , r.

Definition 2.5 (Uncorrelated Pessimistic Estimators).Given randomvariables X1, . . . , Xr , and two pessimistic estimatorsφ, θfor the expectation of functions Y = f (X1, . . . , Xr), Z = g(X1, . . . , Xr) respectively, we say φ and θ are uncorrelated,if for any ℓ < r and (x1, . . . , xℓ) ∈ Xℓ, the random variables φ(ℓ+1)(x1, . . . , xℓ, Xℓ+1) and θ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) areuncorrelated.

Definition 2.6 (Conditionally Non-decreasing Pessimistic Estimators).Given randomvariables X1, . . . , Xr , and two pessimisticestimators φ, θ for the expectation of functions Y = f (X1, . . . , Xr), Z = g(X1, . . . , Xr) respectively, we say that φ is non-decreasing conditioned on θ if θ only takes on non-negative values and

Eφ(ℓ+1)(x1, . . . , xℓ, Xℓ+1) | θ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) = c

≥ φ(ℓ)(x1, . . . , xℓ)

for any ℓ < r and (x1, . . . , xℓ) ∈ Xℓ and c > 0 such that Pθ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) = c

> 0.

The proof of the following two lemmas is straightforward, and is given for completeness.

Lemma 2.7. Given two uncorrelated pessimistic estimators as in Definition 2.5 which take on only non-negative values, theirproduct is a pessimistic estimator of E

YZ

with guarantee φ(0)θ (0).

Proof. By the fact thatφ, θ are uncorrelated and the fact thatφ, θ each satisfy condition (iii), it follows that their product alsosatisfies condition (iii) in Definition 2.1. The other conditions in Definition 2.1 follow from the fact that φ, θ are pessimisticestimators for E

Y, E

Z. Note that we do not need to assume anything about the correlation between Y and Z: we only

consider Y and Z when verifying condition (i), but in condition (i) we condition on the values of X1, . . . , Xr , and then Y , Zare both non-stochastic. �

Lemma 2.8. Given two pessimistic estimators as in Definition 2.6, their product is a pessimistic estimator of EYZ

with

guarantee φ(0)θ (0).

Proof. It is clear that conditions (i), (ii) and (iv) in Definition 2.1 are satisfied. For condition (iii), note that

Eφ(ℓ+1)(x1, . . . , xℓ, Xℓ+1)θ

(ℓ+1)(x1, . . . , xℓ, Xℓ+1)

=

c

cPθ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) = c

· E

φ(ℓ+1)(x1, . . . , xℓ, Xℓ+1) | θ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) = c

≥ φ(ℓ)(x1, . . . , xℓ)

c

cPθ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) = c

= φ(ℓ)(x1, . . . , xℓ)E

θ (ℓ+1)(x1, . . . , xℓ, Xℓ+1)

≥ φ(ℓ)(x1, . . . , xℓ)θ

(ℓ)(x1, . . . , xℓ).

We note that the first equation (the fact that θ (ℓ+1)(x1, . . . , xℓ, Xℓ+1) is a discrete random variable) follows from condition(iv) in Definition 2.1. �

Before we show how to use Definition 2.1 and Lemmas 2.2, 2.3, 2.7 and 2.8 to obtain deterministic algorithms for themaximum traveling salesman problem and maximum triangle packing problems, we make the following remark.

Remark 2.9 (Random Subsets Instead of Random Variables). In the algorithms we consider, the random decisions take theform of random subsets, say S1, . . . , Sr , of the edge set E. We could define random variables X1, . . . , Xr which take on

Page 5: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2146 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

n-digit binary numbers to represent these decisions, but to bypass this extra step, we allow X1, . . . , Xr in the definitionof pessimistic estimators to represent either random variables or random subsets of a fixed ground set. To denote randomsets, we will use capital letters in blackboard style, e.g. X and to denote a particular realization of a random set, we will usea capital letter with bar, e.g. X .

3. The maximum traveling salesman problem

In the maximum traveling salesman problem, we are given a complete undirected graph G = (V , E) with edge weightsw(e) ≥ 0 for e ∈ E. Our goal is to compute a Hamiltonian circuit (tour) of maximum edge weight. For a subset of edgesE ′, we denote by w(E ′) =

e∈E′ w(e). We let OPT denote the value of the optimal solution. A cycle cover (also known as

a 2-factor) of G is a subgraph in which each vertex has degree 2. We will write C = (C1, . . . , Cr) to denote a cycle cover,where C1, . . . , Cr are (the edge sets of) vertex disjoint cycles. A maximum cycle cover is a cycle cover of maximum weightand can be computed in polynomial time (see, for instance, Chapter 10 of [12]). A subtour on G is a subgraph that can beextended to a tour by adding edges, i.e., each vertex has degree at most 2 and there are no cycles on a strict subset of V . Wewill sometimes call a set of edges E ′ a subtour; in this case we mean that (V , E ′) is a subtour.

Both the algorithm of Hassin and Rubinstein [8] and the algorithm by Chen and Wang [5] start with an idea due toSerdyukov [15]: Compute a maximumweight cycle cover C and a maximumweight matchingW of G. Note that the weightof the edges in C is at least OPT and the weight ofW is at least 1

2OPT . Now, Serdyukov [15] shows that we canmove a subsetof the edges fromC to thematchingW so that we get two subtours, which are both extended to tours. The algorithm returnsthe tour with the largest weight. Since one of the two subtours has weight at least 3

4OPT , the tour output by the algorithmalso has weight at least 3

4OPT .The algorithms of Hassin and Rubinstein [8] and Chen and Wang [5] use the same idea, but are more complicated;

especially the algorithm in [5], which takes several pages to state, is quite involved. Because an improved deterministic79 -algorithm is known, due to Paluch, Mucha and Madry [13], we only consider the algorithm of Hassin and Rubinstein [8]here. The algorithm constructs three tours instead of two; the first tour is deterministic and we refer the reader to [8] forits construction. The second and third tours are constructed by a randomized algorithm which is inspired by Serdyukov’salgorithm [15]: a (random) subset X of the edges from C is moved from C to W in such a way that the edges in C \ Xand M ∪ X both form subtours. In addition to C and W , a third set of edges M is computed, which is a maximum weightmatching on edges that connect vertices in different cycles in C. In the last step of the algorithm, the algorithm adds asmany edges from M as possible to the remaining edges of C \ X while maintaining that the edges form a subtour. Finally,the two constructed subtours are extended to tours, and the algorithm returns the tour with maximum weight among thethree tours constructed.

The part of the algorithm that is difficult to derandomize is the choice of the edges X that are moved from C toW . Theseedges must be chosen so that we obtain two subtours (and hence edges that have already been chosen to be moved from Cto W will influence which edges we can move now). In order to obtain a good approximation guarantee, we need that, inexpectation, a significant fraction of the edges fromM can be added in the last step. Note that we can add an edge e fromMto the remaining edges in C \ X, while maintaining a subtour, if both endpoints of e have degree at most one in C \ X, andadding e does not create a cycle. We will call a vertex free if one of the two edges incident to it in C is in X, i.e., chosen to bemoved to W . Note that if adding an edge of M for which both endpoints are free creates a cycle, then, by the definition ofM , this cycle must each contain at least two edges fromM . Hence we know that we can add at least half the (weight of the)edges ofM for which both endpoints are free without creating cycles. We will therefore try to find a set X of edges to movefrom C toW in order to maximize the weight of the edges inM for which both endpoints are free.

We first give the following lemma, which states the resulting approximation guarantee if the weight of the edges in Mfor which both endpoints are free is at least 1

4w(M). The proof of this lemma is implied by the proof of Theorem 5 in Hassinand Rubinstein [8].

Lemma 3.1 ([8]). Given a weighted undirected graph G = (V , E), let W be a maximum weight matching on G and C =

{C1, . . . , Cr} be a maximumweight cycle cover. Let M be a maximumweight matching on edges that connect vertices in differentcycles in C. If we can find non-empty subsets X1, . . . , Xr , where Xi ⊆ Ci such that

• (V ,W ∪r

i=1 Xi) is a subtour;• the weight of the edges from M for which both endpoints are free (incident to some edge in

ri=1 Xi) is at least 1

4w(M);

then there exists a ( 2533 − ε)-approximation algorithm for the maximum traveling salesman problem.

Hassin and Rubinstein [8] succeed in finding random sets X1, . . . , Xr such that the lemma holds, where the secondcondition holds only in expectation: The algorithm considers the cycles in C one by one, and when considering cycle Ci inC, they give a (deterministic) procedure (given in the proof of Lemma 1 in [8]) for computing two non-empty candidatesets of edges in Ci, each of which may be added to (V ,W ∪

i−1ℓ=1 Xℓ) so that the resulting graph is a subtour. The basic

idea for constructing the candidate sets, say X(1)i and X(2)

i , is to consider the edges of Ci in cyclic order, starting with anarbitrary edge. We alternately add the edges to X(1)

i and X(2)i unless doing so creates a cycle in (V ,W ∪

i−1ℓ=1 Xℓ ∪ X(1)

i ) or

Page 6: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2147

(V ,W ∪i−1

ℓ=1 Xℓ ∪ X(2)i ), in which case we just proceed to the next edge. We continue until we have considered all edges

of Ci. Xi is equal to one of these two candidate sets, each with probability 12 .

Hassin and Rubinstein [8] show that it is always possible to create candidate sets such that each vertex in Ci is incidentto an edge in X(1)

i ∪ X(2)i .

The two candidate sets X(1)i and X(2)

i depend on the sets X1, . . . , Xi−1, and it is hence not clear if one can efficientlydetermine the probability distribution of Xi. Fortunately, we do not need to know this distribution when using theappropriate pessimistic estimators.

Theorem 3.2. There exists a deterministic ( 2533 − ε)-approximation algorithm for the maximum traveling salesman problem.

Proof. For each vertex v ∈ V , we define the function Yv which is 1 if v is free, and 0 otherwise. Let Ci be the cycle in C thatcontains v, and note that Yv is a function ofX1, . . . , Xi. We define a pessimistic estimator φv with guarantee 1

2 for PYv = 1

.

No matter which edges are in X1, . . . , Xi−1, the two candidate sets X (1)i and X (2)

i always have the property that each vertexin Ci is incident to an edge in at least one of the two candidate sets. We can therefore let

φv(X1, . . . , Xℓ) =

12

if ℓ < i,

1{v is incident to an edge in Xi} if ℓ ≥ i

where 1{} is the indicator function. Clearly, φv satisfies properties (i)–(iii) in Definition 2.1 with respect to PYv = 1

. For

(iv), note that given X1 = X1, . . . , Xi−1 = Xi−1, there are only two possible sets Xi (however, it is not necessarily the casethat the random variable Xi has polynomial size support if we do not condition on X1, . . . , Xi−1).

Now, note that for an edge {u, v} ∈ M, u and v are in different cycles of the cycle cover. Therefore, for any ℓ < r ,either φ

(ℓ+1)u (X1, . . . , Xℓ, Xℓ+1) or φ(ℓ+1)

v (X1, . . . , Xℓ, Xℓ+1) is non-stochastic. Hence φu and φv are uncorrelated pessimisticestimators, and by Lemma 2.7, φu · φv is a pessimistic estimator with guarantee 1

4 for PYu = 1, Yv = 1

which is exactly

the probability that both endpoints of {u, v} are free. By Lemmas 2.2 and 2.3, we can use these pessimistic estimators to findsubsets X1, . . . , Xr that satisfy the conditions in Lemma 3.1:

We iterate through the cycles C1, . . . , Cr and when considering Ci, we have already fixed X1, . . . , Xi−1 and we use theprocedure in the proof of Lemma 1 of [8] to generate two candidate sets for X (1)

i and X (2)i . We compute an estimator for the

expected weight of the edges ofM for which both endpoints are free if we choose Xi = X (1)i or Xi = X (2)

i as{u,v}∈M

φiu(X1, . . . , Xi−1, X

(1)i )φi

v(X1, . . . , Xi−1, X(1)i )w{u,v},

and {u,v}∈M

φiu(X1, . . . , Xi−1, X

(2)i )φi

v(X1, . . . , Xi−1, X(2)i )w{u,v},

and choose Xi to be either X (1)i , X (2)

i , depending on which estimated expected weight is higher. By Lemma 2.2, we will thusfind X1, . . . , Xr that satisfy the conditions in Lemma 3.1, which implies the theorem. �

4. The maximum triangle packing problem

In the maximum triangle packing problem, we are again given an undirected graph G = (V , E) with weights w(e) ≥ 0for e ∈ E. The goal is to find a maximum weight triangle packing, i.e., a maximum weight set of node disjoint 3-cycles. Weassume without loss of generality that |V | = 3n: otherwise, we can try all possible ways of removing one or two vertices sothat the remaining number of vertices is a multiple of 3.

The algorithms for the maximum triangle packing problem by Hassin and Rubinstein [9] and Chen et al. [3] are similar inspirit to the algorithms for themaximum traveling salesman problem. The algorithms both compute three triangle packings,and the first two are computed by deterministic algorithms. The third packing is computed by computing a subtour of largeweight; note that we can find a triangle packing of weight equal to at least 2/3 times the weight of any subtour. The subtouris constructed in a way that is reminiscent of the subtours constructed in the previous section. We will start by describinghow the algorithm from [9] computes this subtour, and we then show how to derandomize it while maintaining the desiredproperties.

4.1. Hassin and Rubinstein’s maximum triangle packing algorithm

Hassin and Rubinstein [9]’s algorithm starts by computing a cycle cover C, and a matchingM on the edges for which theendpoints are in different cycles of C. Next, they remove a non-empty subset of the edges from each cycle in the cycle coverC, and subsequently add edges from M for which both endpoints are free, i.e. have degree zero or one. Note that this may

Page 7: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2148 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

Fig. 1. Randomized procedure for removing edges from C.

create cycles; from each cycle, we remove the cheapest edge that is inM . The following lemma, which is proved in Theorem1 in Hassin and Rubinstein [9], gives conditions on the set of edges to be removed from the cycle cover. If these conditionsare satisfied, then the best of the three packings constructed gives the desired approximation ratio.

Lemma 4.1 ([9]). Given a weighted undirected graph G = (V , E), let C be a cycle cover and let M be a matching on edges thatconnect vertices in different cycles in C. Let α be the fraction of w(C) contained in cycles of length three. For non-empty subsetsX1, . . . , Xr , where Xi ⊆ Ci, let M ′

= M ′(X1, . . . , Xr) be the set of edges in M for which both endpoints are free (incident to someedge in

ri=1 Xi), and let M ′′

= M ′′(X1, . . . , Xr) be the subset of M ′ obtained by removing the minimum weight edge from M ′

from each cycle in (V ,r

i=1 Ci \ Xi ∪ M ′).If we can find non-empty subsets X1, . . . , Xr , where Xi ⊆ Ci such that

ri=1

w(Ci \ Xi) + w(M ′′(X1, . . . , Xr)) ≥

23α +

34(1 − α)

w(C) +

316

w(M), (1)

then there exists a ( 4383 − ε)-approximation algorithm for the maximum triangle packing problem.

Hassin and Rubinstein [9] show that the randomized procedure in Fig. 1 computes sets X1, . . . , Xr such that the conditionin Lemma 4.1 is satisfied in expectation.

Before we show how to use pessimistic estimators to derandomize the procedure in Fig. 1, we repeat two lemmas provedbyHassin and Rubinstein [9]. The first lemma is easily verified.We give an alternative proof of the second lemma, Lemma4.3,which is similar in spirit to the proof given in [9] but quite a bit simpler: our proof needs to check only two different cases,rather than the long proof in [9] which checks six cases and, in addition, does an exhaustive analysis of all small cycles.

Intuitively, the first lemma shows that the probability that the endpoints of an edge e ∈ M are both free, and hence thate ∈ M′, is relatively large. We will see in the proof of Theorem 4.4, that the second lemma, Lemma 4.3, implies that theprobability that e ∈ M′′, given that e ∈ M′, is large.

Lemma 4.2 ([9]). Let C be a cycle cover of G = (V , E), and let X1, . . . , Xr be the random set of edges computed by the procedurein Fig. 1. Then the probability that edge e ∈ Ci is contained in Xi is 1

3 if |Ci| = 3 and 14 if |Ci| > 3. The probability that a vertex u

has degree one in (V ,r

i=1 Ci \ Xi) is at least 12 .

Lemma 4.3. Let C be a cycle cover of G = (V , E), and let X1, . . . , Xr be the random set of edges computed by the procedurein Fig. 1. Let z1, z2 be incident to edges in Cj and let PC be the probability that Xj contains an edge incident to z1 and an edgeincident to z2 and Cj \ Xj contains a path connecting z1 to z2. Let PN be the probability Xj has an edge incident to z1 and no edgeincident to z2. Then PC ≤ PN .

Proof. We will show a mapping N of each outcome Xj = Xj in which both z1, z2 are incident to an edge in Xj and Cj \ Xj

contains a path between z1 and z2, to an outcome N(Xj) such that PXj = Xj

= P

Xj = N(Xj)

where z1 is incident to an

edge in N(Xj) but z2 is not. By ensuring that N(Xj) = N(X ′

j ) if Xj = X ′

j , we prove the lemma.Let δ be the number of edges of the shortest path between z1 and z2 using edges of Cj. If δ ≥ 2, suppose without loss

of generality that Xj contains the edge incident to z1 in clockwise direction. Note that the fact that C \ Xj contains a pathbetween z1 and z2 means that the edge in clockwise direction from z2 cannot be in Xj. We now define outcome N(Xj) fromXj by shifting the edges in counterclockwise direction.

If δ = 1, we consider two cases. If Xj contains the edge {z1, z2}, then the fact that z1, z2 are connected in Cj \ Xj implies thatXj contains only the edge {z1, z2}. We can thus let N(Xj) be the other edge in Cj incident to z1. If Xj does not contain the edge{z1, z2}, then Xj contains at least two edges, and hence |Cj| > 4. Suppose without loss of generality that z2 is z1’s neighbor inclockwise direction. We define N(Xj) from Xj by shifting the edges twice in counterclockwise direction, then z1 is incident

Page 8: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2149

Fig. 2. An example illustrating G′(X1, X2, X3). The cycles C1, C2, C3 are shown by black edges, where the edges in the sets X1, X2, X3 are dashed. The dashededges do not belong to G′(X1, X2, X3). The edges e1, e2 and e3 are edges in M that belong to G′(X1, X2, X3), i.e., those edges in M for which both endpointsare free. IfM contains the edge {w, y}, or ifM contains no edge incident to w, then we say that e1 is in a dead end path. Edges e2 and e3 are in a short cycle.

to an edge in N(Xj). However, z2 cannot be incident to an edge in N(Xj), as Cj would then have a sequence of adjacent edgese1, e2, e3, e4, e5, where Xj contains the edges e1, e3 and e5, which is not a possible outcome of the procedure in Fig. 1.

Note that for any fixed cycle Cj and vertices z1, z2, we have defined the outcome N(Xj) from outcome Xj in such a waythat if Xj = X ′

j then N(Xj) = N(X ′

j ). Also, since N(Xj) is always just a cyclic shift of Xj, by symmetry, PXj = Xj

= P

Xj =

N(Xj). �

Theorem 4.4. There exists a deterministic ( 4383 − ε)-approximation algorithm for the maximum triangle packing problem.

Proof. Wewill show that we can efficiently find sets X1, . . . , Xr that satisfy Lemma 4.1. Given the setM ′= M ′(X1, . . . , Xr)

as defined in the lemma, suppose we remove a randomly chosen edge from M ′ from each cycle in (V ,r

i=1 Ci \ Xi ∪ M ′),and let M ′′

= M ′′(X1, . . . , Xr) be the subset of M ′ that remains. If we have Ew(M ′′)

316w(M), then, clearly, this is also

the case if instead of a random edge, we remove the cheapest edge from M ′ from each cycle. Hence, from now on, we willassume M ′′ is obtained fromM ′ by removing a randomly chosen edge fromM ′ in each cycle in (V ,

ri=1 Ci \ Xi ∪ M ′).

For each cycle Ci in the cycle cover, we have a random subset Xi corresponding to the edges that are removed by theprocedure in Fig. 1. We want to define pessimistic estimators φe for the probability that e contributes to the left-handside of (1). In other words, we want to lower bound the probability that an edge occurs in

ri=1 Ci \ Xi (if e ∈ Ci) or

in M ′′(X1, . . . , Xr) (if e ∈ M). For an edge e = {u, v} ∈ Ci, we can directly define φ(ℓ)e (X1, . . . , Xℓ) as the probability,

conditioned on X1 = X1, . . . , Xℓ = Xℓ, that edge e is not in Xi. Using Lemma 4.2, these probabilities can easily be computed:they are either 2

3 (if |Ci| = 3) or 34 (if |Ci| > 3) for ℓ < i, and 0 or 1 if ℓ ≥ i, depending on whether e ∈ Xi or not.

For an edge e = {u, v} ∈ M , we want to find a pessimistic estimator φ(ℓ)e (X1, . . . , Xℓ) for the conditional probability that

e ∈ M ′′(X1, . . . , Xr), given that X1 = X1, . . . , Xℓ = Xℓ.Since the event that e ∈ M ′′ is the intersection of the independent events that u and v are free, and the event that e ∈ M ′′

given that e ∈ M ′, we define the following pessimistic estimators:

1. Pessimistic estimator for the probability that u is free. Let u ∈ Ci, then, by Lemma 4.2, we can let φ(ℓ)u (X1, . . . , Xℓ) =

12 for

ℓ < i, and otherwise 0 if u is not incident to any edge in Xi or 1 if u is incident to an edge in Xi.2. Pessimistic estimator for the probability that e ∈ M′′, given that e ∈ M′. Let G′(X1, . . . , Xℓ) be the graph on V containing

the edges in C1 \ X1, . . . , Cℓ \ Xℓ and those e ∈ M for which both endpoints are free (have degree one in(ℓ)

i=1 Ci \ Xi). Wesay e is part of a dead end path in G′(X1, . . . , Xℓ) if e is part of a path in G′(X1, . . . , Xℓ) and this path has some endpoint wsuch that either there exists no edge incident to w inM , or the edge is an edge {w, y} with y ∈ Cj with j ≤ ℓ (and, hence,y is not free, since otherwise {w, y} would be in G′(X1, . . . , Xℓ)). We say e is in a short cycle in G′(X1, . . . , Xℓ) if e is in acycle in G′(X1, . . . , Xℓ) and this cycle has at most three edges from M . Fig. 2 gives an illustration of an edge e1 ∈ M in adead end path, and two edges e2, e3 ∈ M that are in a short cycle in G′(X1, . . . , Xℓ). We let φ

(ℓ)qe (X1, . . . , Xℓ) be 1

2 if e is ina short cycle in G′(X1, . . . , Xℓ), 1 if it is in a dead end path in G(X1, . . . , Xℓ), and 3

4 in all other cases.

For edge e = {u, v} ∈ M , we claim that φe = φu · φv · φqe is a pessimistic estimator for the probability that e ∈

M ′′(X1, . . . , Xr).Note that condition (iv) in Definition 2.1 is satisfied, since the deletion procedure has at most 4|Ci| different outcomes

on cycle Ci. By the same arguments as in the proof of Theorem 3.2, φu · φv is a pessimistic estimator for the probability thatboth u and v are free (and hence the probability that {u, v} ∈ M ′(X1, . . . , Xr)).

We now show that φqe is a pessimistic estimator for Pe ∈ M′′

|e ∈ M′. It clearly satisfies conditions (ii) and (iv) of

Definition 2.1. To see that condition (iii) is satisfied, note that if e is in a short cycle or in a dead endpath inG′(X1, . . . , Xℓ), thenthiswill also be the case forG′(X1, . . . , Xℓ, Xℓ+1). Hencewe only need to verify condition (iii) if e is neither in a short cycle nora dead end path in G′(X1, . . . , Xℓ) and there exists some outcome Xℓ+1 such that e is in a short cycle in G′(X1, . . . , Xℓ, Xℓ+1).

Let e = {u, v} where u ∈ Ci, v ∈ Cj and i < j. First, suppose that j < ℓ+ 1, and hence e ∈ G′(X1, . . . , Xℓ), since otherwisethere exists no outcome for which Xℓ+1 such that e is in a short cycle in G′(X1, . . . , Xℓ, Xℓ+1). Let w1, w2 be the endpoints of

Page 9: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2150 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

Fig. 3. Illustration of the two possible cases when an edge e ∈ M is neither in a short cycle nor a dead end path in G′(X1, . . . , Xℓ) and there exists someoutcome Xℓ+1 such that e is in a short cycle in G′(X1, . . . , Xℓ, Xℓ+1). The graph G′(X1, . . . , Xℓ) is shown in non-dashed edges. The black dashed cycle is Cℓ+1 ,and the red dashed edges {w1, z1} and {w2, z2} are edges inM that may appear in G′(X1, . . . , Xℓ, Xℓ+1).

the path containing u (and hence e) in G′(X1, . . . , Xℓ), and let {w1, z1} and {w2, z2} be edges in M . If there is some outcomeXℓ+1 such that e is in a cycle in G′(X1, . . . , Xℓ+1), then it must be the case that the edges {w1, z1}, {w2, z2} are added toG′(X1, . . . , Xℓ+1) and this can happen only if both z1, z2 ∈ Cℓ+1. Moreover, if the cycle is a short cycle, then it must be thecase that Xℓ+1 is such that z1, z2 are connected in Cℓ+1 \ Xℓ+1. See Fig. 3 for an illustration.

If e is not in G′(X1, . . . , Xℓ), then we can still define w1, w2 as the endpoints of the path in G′(X1, . . . , Xℓ) containing u,and the same observations hold (where in this case, w1 = u and e = {w1, z1}).

Hence, a short cycle is formed only if Xℓ+1 is such that z1, z2 are free and connected in Cℓ+1 \ Xℓ+1. Note that if Xℓ+1 is suchthat z1 is free, but z2 is not free, i.e. not incident to an edge in Xℓ+1, then e is in a dead end path in G′(X1, . . . , Xℓ, Xℓ+1). Usingthe terminology from Lemma 4.3, we see that the probability that e is in a short cycle in G′(X1, . . . , Xℓ, Xℓ+1) is thus equalto PC and the probability that e is in a dead end path is at least equal to PN . So we have that E

φ

(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1)

12PC + PN +

34 (1 − (PC + PN)) =

34 +

14 (PN − PC ), and by Lemma 4.3, this is at least 3

4 = φ(ℓ)qe (X1, . . . , Xℓ).

The estimator φqe is not uncorrelated with φu · φv , however, φqe is conditionally non-decreasing with respect to φu · φv:We need to show that,

Eφ(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1)|φu · φ(ℓ+1)

v (X1, . . . , Xℓ, Xℓ+1) = c

≥ φ(ℓ)qe (X1, . . . , Xℓ), (2)

for c > 0 such that Pφu · φ(ℓ+1)

v (X1, . . . , Xℓ, Xℓ+1) = c

> 0.It again suffices to consider ℓ such that e is not in a short cycle or dead end path in G′(X1, . . . , Xℓ) and there exist

outcomes Xℓ+1 such that e is in a short cycle or dead end path in G′(X1, . . . , Xℓ, Xℓ+1), as this is the only case whenφ

(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1) can be less than φ

(ℓ)qe (X1, . . . , Xℓ).

Let w1, w2, z1, z2 be defined as before, i.e. w1, w2 are the endpoints of the path containing u in G′(X1, . . . , Xℓ) and{w1, z1}, {w2, z2} are inM (see Fig. 3).

Now, if u = w1, then e must already be in G′(X1, . . . , Xℓ), as in the left case in Fig. 3, since otherwise e cannot be in ashort cycle or dead end path in G′(X1, . . . , Xℓ, Xℓ+1). Then φu ·φ(ℓ+1)

v (X1, . . . , Xℓ, Xℓ+1) is non-stochastic and equal to 1. Thefact that φqe is conditionally non-decreasing with respect to φu · φv follows because φqe is a pessimistic estimator.

Otherwise, u = w1, and note that v = z1 (see the right case in Fig. 3 for an illustration). Conditioning on φu ·

φ(ℓ+1)v (X1, . . . , Xℓ, Xℓ+1) = c > 0 is equal to conditioning on the event that v = z1 is incident to an edge in Xℓ+1.

Let PC |z1 be the conditional probability that e is in a short cycle, i.e., it is the probability that Xℓ+1 contains an edgeincident to z2, and z1, z2 are connected in Cℓ+1 \ Xℓ+1, conditioned on the event that z1 is incident to an edge in Xℓ+1.Let PN|z1 be the conditional probability that e is in a dead end path, i.e., PN|z1 is the probability that Xℓ+1 contains no edgeincident to z2, conditioned on the event that z1 is incident to an edge in Xℓ+1. Then the left-had side of (2) is equal to12PC |z1 + PN|z1 +

34 (1 − (PC |z1 + PN|z1)) =

34 +

12 (PN|z1 − PC |z1). If we let Pz1 = P

z1 is incident to an edge in Xℓ+1

, then by

Lemma 4.3, PC |z1Pz1 ≤ PN|z1Pz1 , and since Pz1 > 0 also PC |z1 ≤ PN|z1 . Hence, (2) holds, since φ(ℓ)qe (X1, . . . , Xℓ) =

34 .

Hence φqe is indeed conditionally non-decreasing with respect to φu · φv . From Lemma 2.8, we get that φu · φv · φqe is apessimistic estimator.

We have thus found pessimistic estimators φe with guarantee φ(0)u · φ(0)

v · φ(0)qe =

12 ·

12 ·

34 =

316 for the probability

that e = {u, v} ∈ M is in the set M ′′(X1, . . . , Xr). We have also defined pessimistic estimators φe with guarantee 23 or

34 for the probability that e ∈ Ci \ Xi (where the guarantee is 3

4 unless |Ci| = 3). Hence

e∈C φ(0)e we +

e∈M φ

(0)e we = 2

3α +34 (1 − α)

w(C) +

316w(M). We can now find the sets X1, . . . , Xr iteratively: given the choices X1, . . . , Xi−1, we

evaluatee∈C

φ(i)e (X1, . . . , Xi−1, Xi)we +

e∈M

φ(i)e (X1, . . . , Xi−1, Xi)we

for each possible outcome Xi from the procedure in Fig. 1, and we choose the set Xi for which this quantity is maximal. ByLemma 2.2 we will find a solution that has

ri=1 w(Ci \ Xi) + w(M ′′(X1, . . . , Xr)) ≥

23α +

34 (1 − α)

w(C) +

316w(M), and

by Lemma 4.1, this suffices to obtain a deterministic ( 4383 − ε)-approximation algorithm. �

Page 10: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2151

Fig. 4. Randomized procedure for adding edges from M .

4.2. The Chen–Tanahashi–Wang algorithm for the maximum triangle packing problem

The algorithmbyChen et al. [3] is a substantial refinement of the algorithmbyHassin andRubinstein [9]. It also constructsthree triangle packings and the first two are the same as those constructed by [9]. The last triangle packing is constructedin a similar manner as well, by (basically) creating a subtour of large weight and then noting that we can find a trianglepacking of weight at least 2

3 of the weight of this subtour. The construction of the subtour follows similar ideas as in [9]: westart with a cycle cover C and a set of edges M (where in Chen et al. [3]’s algorithm, M is a maximum weight 2-matchingon the edges for which the endpoints are in different cycles of C). We remove some edges from each cycle in C (at least onefrom each cycle, unless the cycle is a triangle), and we then try to add as many edges from M as possible without creatingvertices of degree more than two and without creating any new cycles.

We give more details on the main differences in the two algorithms. First of all, Chen et al. [3] treat cycles of length threein C differently from Fig. 1: each edge in it is deleted independently with probability p where p is approximately 0.277 (pis defined as the smallest positive real value such that 3p2 − 2p3 ≥

316 ). Cycles with length four or more are treated the

same as before, i.e. as in Fig. 1. Note that it is possible that no edge from a cycle of length three is removed. Second, sinceMis a maximum weight 2-matching (or cycle cover) on the edges with endpoints in different cycles of C, we cannot just addall edges from M for which the endpoints are free (and then remove an edge from each cycle created), as this could createvertices with degree three. In Fig. 4, we show (a small variation of) the randomized procedure used by Chen et al. [3,4] tofind a subset ofM to add to (V ,

ri=1 Ci \ Xi).

The proof of the following lemma is given in Section 4 of [3] (see also the correction in [4]).

Lemma 4.5 ([3]). Given a weighted undirected graph G = (V , E), let C be a cycle cover, let α be the fraction of w(C) containedin cycles of length three, and let p be the smallest positive real value such that 3p2 − 2p ≥

316 . Let M be a 2-matching on the

edges that have endpoints in different cycles of C. If we can find in polynomial time subsets X1, . . . , Xr , where Xi ⊆ Ci, andM ′′

= M ′′(X1, . . . , Xr) ⊆ M, such that the connected components of (V ,r

i=1 Ci \ Xi ∪ M ′′) consist of paths and triangles, andr

i=1

w(Ci \ Xi) + w(M ′′(X1, . . . , Xr)) ≥

(1 − p)α +

34(1 − α)w(C)

+

340

w(M),

then there exists a (0.523 − ε)-approximation algorithm for the maximum triangle packing problem.

Chen et al. [3] show that the sets X1, . . . , Xr that result by applying the procedure in Fig. 1 for cycles Ci with |Ci| > 3, andby including e ∈ Xi independently with probability p for cycles Ci with |Ci| = 3, combined with the set M′′(X1, . . . , Xr) weobtain from the procedure in Fig. 4 satisfies the conditions in Lemma 4.5 in expectation.

We will show how to determine the sets X1, . . . , Xr , and how to find a deterministic set M ′′(X1, . . . , Xr) that satisfiesLemma 4.5. The first task is similar to, but somewhat more complicated than, the algorithm by Hassin and Rubinstein [9] inthe previous subsection. We begin with the second task, of determining M ′′, given that we have chosen X1, . . . , Xr .

4.2.1. A deterministic way of choosing M ′′

Given X = (X1, . . . , Xr), let B = B(X) be the edges inM∗ ∪MT for which both endpoints are free. For each edge in B, wewill define a pessimistic estimator for the probability that the edge is in M′′

= M′′(X). Let T1, . . . , Tt be the triangles inMT

Page 11: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2152 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

for which at least one edge is in B, and let Eℓ ⊂ Tℓ be the random set that contains the edge from Tℓ chosen to be includedin M′, where we note that Eℓ may be empty. For each e ∈ B, we want to define a pessimistic estimator q(ℓ)

e (E1, . . . , Eℓ) forthe probability that edge e is in M′′, conditioned on E1 = E1, . . . , Eℓ = Eℓ (where each Ei is either an edge in Ti or it is theempty set).

To define the estimator, we define the graph G′= G′(X, E1, . . . , Eℓ) on V , which contains the edges in

ri=1 Ci \ Xi, the

edges in B \ MT and the edges in E1, . . . , Eℓ. Informally, G′ keeps track of the graph (V ,r

i=1 Ci \ Xi ∪ M ′) we create in Step1(b) in Fig. 4; the edges inM∗ for which both endpoints are free have already been added, and we decide which edge (if any)to add from each triangle in MT by considering the triangles one by one.

Call a cycle in G′ a short cycle if it contains at most three edges from B. We call a path in G′ a dead end path, if at least oneof its endpoints is not incident to an edge that we may still add to G′, i.e. if it is not incident to an edge in B ∩

ti=ℓ+1 Ti.

For an edge e ∈ B\MT , we let q(ℓ)e (E1, . . . , Eℓ) be 1 if e is in a dead end path in G′, 1

2 if it is in a short cycle, and 34 otherwise.

For an edge e ∈ B∩MT , we define q(ℓ)e (E1, . . . , Eℓ) as the product of two values. The first value is equal to the probability

that ewill be added in Step 1(b), conditioned on E1 = E1, . . . , Eℓ = Eℓ. The second value is equal to 1, 12 or 3

4 , depending onwhether e is in a dead end path, a short cycle, or neither, in the graph G′

∪ {e}.

Lemma 4.6. Given C = (C1, . . . , Cr) and X = (X1, . . . , Xr), one can efficiently find a set M ′′(X) ⊆ B(X) such that theconnected components in (V ,

ri=1 Ci \ Xi ∪ M ′′(X)) consist of paths and triangles, and

w(M ′′(X)) ≥

e∈B(X)

q(0)e we.

Proof. We will show that q(ℓ)e (E1, . . . , Eℓ) as defined above, satisfy conditions (ii)–(iv) of the definition of pessimistic

estimators. The random variable that we are estimating is q(t)e (E1, . . . , Et). Note that this random variable is equal to either

0, 12 ,

34 or 1: it is 0 if the edge e is not in M′, and it is 1

2 ,34 or 1 if e is in a short cycle (containing at most three edges fromM ′),

a long cycle, or a path in the graph (V ,r

i=1 Ci \ Xi ∪ M′) in Step 2 of Fig. 4.Clearly, conditions (ii) and (iv) of Definition 2.1 are satisfied. We now check condition (iii), i.e.

Eq(ℓ+1)e (E1, . . . , Eℓ, Eℓ+1)

≥ q(ℓ)

e (E1, . . . , Eℓ).

Eℓ+1 contains one or zero edges from the edges of Tℓ+1 for which both endpoints are free. If e ∈ Tℓ+1, then q(ℓ+1)e (E1, . . . ,

Eℓ, Eℓ+1) can only be less than q(ℓ)e (E1, . . . , Eℓ) if q

(ℓ)e (E1, . . . , Eℓ) =

34 and there are choices of Eℓ+1 such that adding Eℓ+1

to the graph G′(X, E1, . . . , Eℓ) will form a short cycle containing e. If the number of edges in Tℓ+1 for which both endpointsare free is one, then Eℓ+1 = ∅ with probability 1

2 and e is in a dead end path if Eℓ+1 = ∅. Hence, q(ℓ+1)e (E1, . . . , Eℓ, Eℓ+1)

is 1 with probability 12 , and with the remaining probability, it is at least 1

2 . Hence, it is equal to at least 34 in expectation. If

the number of edges in Tℓ+1 for which both endpoints are free is three, then there can be only one edge in Tℓ+1 such thatadding the edge to G′ forms a short cycle containing e, since G′ is a collection of paths and cycles. In addition, there is at leastone edge in Tℓ+1 such that choosing this edge as Eℓ+1 will create a dead end path containing e: if both endpoints of the pathcontaining e in G′, say u and v, are incident to edges in Tℓ+1, then e is in a dead end path unless Eℓ+1 = {u, v}. If only oneendpoint of the path containing e is incident to edges in Tℓ+1 then e is in a dead end path if Eℓ+1 is the edge in Tℓ+1 that isnot incident to this endpoint. Hence E

q(ℓ+1)e (E1, . . . , Eℓ, Eℓ+1)

13 ·

12 +

13 · 1 +

13 ·

34 =

34 .

If e ∈ Tℓ+1, and the endpoints of e are free (if this is not the case, then q(ℓ)e ≡ 0 for all ℓ ≤ t), then let a be 1

2 or 13

depending on whether Tℓ+1 has one or three edges for which both endpoints are free and let b be 12 , 1 or 3

4 , depending onwhether e is in a short cycle, a dead end path or neither in G′(X, E1, . . . , Eℓ) ∪ {e}. Note that q(ℓ)

e (E1, . . . , Eℓ) = ab and thatq(ℓ+1)e (E1, . . . , Eℓ, Eℓ+1) is equal to 0 if Eℓ+1 = {e}, which happens with probability 1−a, and equal to b if Eℓ+1 = {e}, which

happens with probability a. Hence Eq(ℓ+1)e (E1, . . . , Eℓ, Eℓ+1)

= ab = q(ℓ)

e (E1, . . . , Eℓ). �

4.2.2. A deterministic way of choosing X1, . . . , Xr

Using the notation developed in the arguments on how to chooseM ′′, we state the following lemma.

Lemma 4.7. Given a cycle cover C = (C1, . . . , Cr) and a 2-matching M on the edges for which the endpoints are in differentcycles of C, we can efficiently find X = X1, . . . , Xr , where Xi ⊆ Ci and |Xi| > 1 if |Ci| > 3, such that

ri=1

w(Ci \ Xi) +

e∈B(X)

q(0)e we ≥ (1 − p)αw(C) +

34(1 − α)w(C) +

340

w(M).

Proof. In the Appendix, we will prove the following two lemmas. Their proof uses similar arguments as the proof ofTheorem 4.4.

Page 12: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2153

Lemma 4.8. There exists a pessimistic estimator φe for e ∈ M∗ such that φ(0)e ≥

316 and φ

(r)e (X1, . . . , Xr) is equal to q(0)

e ife ∈ B(X1, . . . , Xr), and 0 otherwise.

Lemma 4.9. There exists a pessimistic estimator φe for e ∈ MT such that φ(0)e ≥

340 and φ

(r)e (X1, . . . , Xr) is equal to q(0)

e if e ∈

B(X1, . . . , Xr), and 0 otherwise.

In addition, we define φ(ℓ)e (X1, . . . , Xℓ) for e ∈ Ci to be the probability that e ∈ Xi, conditioned on X1 = X1, . . . , Xℓ = Xℓ,

which is polynomially computable and has φ(0)e = 1 − p if |Ci| = 3 and φ

(0)e =

34 otherwise.

Hence we have estimators φe for every e ∈ C ∪ M∗ ∪ MT and by Lemmas 4.8 and 4.9, these satisfye∈C∪M∗∪MT

φ(0)e we ≥ (1 − p)αw(C) +

34(1 − α)w(C) +

316

w(M∗) +340

w(MT ).

Further, note that it is clear from the definition ofM∗ in Fig. 4 that w(M∗) ≥25w(M \ MT ), and hence

e∈C∪M∗∪MT

φ(0)e we ≥ (1 − p)αw(C) +

34(1 − α)w(C) +

340

w(M).

By using the method of pessimistic estimators, we can therefore find sets X1, . . . , Xr such thate∈C∪M∗∪MT

φ(r)e (X1, . . . , Xr)we ≥

e∈C∪M∗∪MT

φ(0)e we.

Now, for e ∈ M∗ ∪ MT , the value of the estimator φ(r)e (X1, . . . , Xr) is equal to q(0)

e if e ∈ B(X1, . . . , Xr), and 0 otherwise, andfor e ∈ Ci, the value of φ

(r)e (X1, . . . , Xr) is either 1 or 0, depending on whether e ∈ Ci \ Xi or not. Hence we can find sets

X = X1, . . . , Xr such thatr

i=1

w(Ci \ Xi) +

e∈B(X)

q(0)e we ≥ (1 − p)αw(C) +

34(1 − α)w(C) +

340

w(M),

which proves the lemma. �

Combining Lemma 4.7 with Lemma 4.6, we find that we can efficiently find (X1, . . . , Xr) ⊆ (C1, . . . , Cr) and M ′′=

M ′′(X1, . . . , Xr) ⊆ M that satisfy the conditions in Lemma 4.5. Hence we have the following theorem.

Theorem 4.10. There exists a deterministic (0.523 − ε)-approximation algorithm for the maximum triangle packing problem.

Acknowledgments

This work was done in part while the author was a postdoctoral researcher at the Institute for Theoretical ComputerScience at Tsinghua University, and was supported in part by the National Natural Science Foundation of China Grant60553001, and the National Basic Research Program of China Grant 2007CB807900, 2007CB807901.

Appendix. Proofs from Section 4.2

Lemma A.1. There exists a pessimistic estimator φe for e ∈ M∗ such that φ(0)e ≥

316 and φ

(r)e (X1, . . . , Xr) is equal to q(0)

e if e ∈

B(X1, . . . , Xr), and 0 otherwise.

Proof. We define several estimators, and show how to combine them to give φe for e ∈ M∗.

• Estimators for the probability that an endpoint is free. If u ∈ Ci with |Ci| = 3, thenwe define two pessimistic estimators:φu1

andφu0 for the probability that u has degree one and zero in (V ,r

i=1 Ci\Xi). We letφ(ℓ)u1 (X1, . . . , Xℓ) = 2p(1−p) if ℓ < i,

and otherwise 1 or 0 depending onwhether or not u is incident to exactly one edge in Xi, andwe letφ(ℓ)u0 (X1, . . . , Xℓ) = p2

if ℓ < i, and otherwise 1 or 0 depending on whether or not u is incident to exactly two edges in Xi. For ease of exposition,we also define these pessimistic estimators for u ∈ Ci with |Ci| > 3: We let φu0 ≡ 0, and define φu1 to be the same asφu in the analysis of the Hassin–Rubinstein algorithm: φ

(ℓ)u1 (X1, . . . , Xℓ) =

12 if ℓ < i, and otherwise 0 if u is not incident

to any edge in Xi or 1 if u is incident to an edge in Xi. It is easily verified that φu0 and φu1 are equal to the conditionalprobability that uwill have degree zero or one in (V ,

ri=1 Ci \ Xi).

• Estimators for the expected value of q(0)e . We let G′(X1, . . . , Xℓ) be the graph that contains the edges Ci \ Xi from each cycle

i = 1, . . . , ℓ plus the edges from M∗ for which both endpoints are free. Note that G′(X1, . . . , Xℓ) consists of paths andcycles.

Page 13: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2154 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

We call a cycle in G′(X1, . . . , Xℓ) a short cycle if it contains at most three edges from M∗, and we call a path inG′(X1, . . . , Xℓ) a dead end path, if it ends in a vertex v such that either v is incident to two edges of X1, . . . , Xℓ (whichmeans that v was in some triangle Ci for i ≤ ℓ and both the edges incident to v in Ci are in Xi), or if the edges{u, v} ∈ M∗ ∪ MT incident to v have probability 0 of being added to M′, i.e. if u ∈ Ci for some i ≤ ℓ and u is notfree.For an edge e ∈ M∗, we define φ

(ℓ)qe (X1, . . . , Xℓ) as 1

2 if e is in a short cycle in G′(X1, . . . , Xℓ), 1 if it is in a dead end path inG′(X1, . . . , Xℓ), and 3

4 otherwise.

We claim that the estimator

φe = φu1 · φv1 · φqe + φu0 · φv1 + φu1 · φv0 + φu0 · φv0

has φ(0)e ≥

316 , and φ(r)(X1, . . . , Xr) = q(0)

e if e ∈ B(X1, . . . , Xr) and 0 otherwise, and that φe satisfies conditions (ii)–(iv) ofDefinition 2.1.

Let u ∈ Ci, v ∈ Cj. If |Ci| > 3, |Cj| > 3, then φ(0)e = φ

(0)u1 φ

(0)v1 φ

(0)qe =

316 . If |Ci| = 3, |Cj| = 3, then φ

(0)e = 2p(1 − p) ·

2p(1 − p) ·34 + 2p(1 − p) · p2 + p2 · 2p(1 − p) + p2 · p2 = 3p2 − 2p3 ≥

316 , by the choice of p. Finally, if |Ci| = 3, |Cj| > 3,

then φ(0)e = 2p(1 − p) ·

12 ·

34 + p2 ·

12 + 0 =

34p −

14p

2≥

316 .

Let X = (X1, . . . , Xr). Note that φ(r)e (X) > 0 only if u, v are both free, i.e. if e ∈ B(X). If one of u, v has degree zero in

(V ,r

ℓ=1 Cℓ \ Xℓ) then φ(r)e (X) = 1 and indeed q(0)

e = 1. Otherwise, φ(r)e (X) = φ

(r)qe (X), and it is easily verified that the

definition of q(0)e is the same as the definition of φqe(X).

It is clear that conditions (ii) and (iv) of Definition 2.1 are satisfied, hence we only need to verify condition (iii). If {u, v} ∈

M , then u, v are in different cycles in C, hence φ(ℓ+1)ub (X1, . . . , Xℓ, Xℓ+1) and φ

(ℓ+1)vb′ (X1, . . . , Xℓ, Xℓ+1) are uncorrelated

random variables for any b, b′∈ {0, 1} and ℓ < r . Moreover, they are exactly the conditional expectations that u has

degree b and v has degree b′ in (V ,r

i=1 Ci \ rXi). By Lemma 2.7, φub · φvb′ is a pessimistic estimator for the joint probabilitythat u has degree b and v has degree b′ in (V ,

ri=1 Ci \ rXi).

Next, we show that φqe satisfies condition (iii), and, finally, that this is also true for the product φu1 · φv1 · φqe .Note that φqe can only take on three different values. Once e is in a short cycle or a dead end path in G′(X1, . . . , Xℓ), then

this is the case in G′(X1, . . . , Xℓ, Xℓ+1) for any choice of Xℓ+1. Hence we only need to consider ℓ such that e is not in a shortcycle or dead end path in G′(X1, . . . , Xℓ) and there are outcomes Xℓ+1 such that e is in a short cycle or dead end path inG′(X1, . . . , Xℓ, Xℓ+1).

Suppose that u ∈ Ci, v ∈ Cj and i < j. Let w1, w2 be the endpoints of the path containing u in G′(X1, . . . , Xℓ) (where itmay be the case that w1 = u). Then e is in a short cycle in G′(X1, . . . , Xℓ, Xℓ+1) if there are edges {w1, z1} and {w2, z2} inM∗

with z1, z2 ∈ Cℓ+1 and (I) both z1, z2 are incident to exactly one edge in Xℓ+1 and (II) z1, z2 are connected in Cℓ+1 \ Xℓ+1.If |Cℓ+1| > 3, thenwe have from Lemma 4.3 that the probability of (I) and (II) happening, conditioned on the event that z1

is free, is atmost the probability that z2 is not free, again conditioned on the event that z1 is free. Thismeans that conditionedon the event that z1 is free, the probability of a short cycle containing e is atmost the probability of a dead endpath containinge. If z1 is not free, then e is in a short cycle with probability zero, hence this inequality also holds unconditionally. Therefore,Eφ

(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1)

34 , as required.

If |Cℓ+1| = 3, then the probability of (I) and (II) happening is the probability thatXℓ+1 = {z1, z2} orXℓ+1 = Cℓ+1\{z1, z2}.Note that for any other outcome of Xℓ+1, the path containing e in G′(X1, . . . , Xℓ, Xℓ+1) is a dead end path. Now, P

Xℓ+1 =

{z1, z2}+P

Xℓ+1 = Cℓ+1\{z1, z2}

= p(1−p)2+p2(1−p) = p(1−p) < 1

4 , soEφ

(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1)

14 ·

12 +

34 ·1 >

34 = φ

(ℓ)qe (X1, . . . , Xℓ).

It remains to show that φqe is conditionally non-decreasing with respect to φu1 · φv1. We again only need to consider ℓ

such that e is not in a short cycle or dead end path in G′(X1, . . . , Xℓ) and there are outcomes Xℓ+1 such that e is in a shortcycle or dead end path in G′(X1, . . . , Xℓ, Xℓ+1). Let w1, w2, z1, z2 be defined as before, i.e. w1, w2 are the endpoints of thepath containing u in G′(X1, . . . , Xℓ) (where it may be the case that u = w1) and {w1, z1}, {w2, z2} are inM∗.

If u = w1, then either e is already in G′(X1, . . . , Xℓ), or u is not free. Hence, φu1 · φ(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) is non-

stochastic, and φqe is conditionally non-decreasing with respect to φu1 · φv1, because φqe is non-decreasing according to(iii) in Definition 2.1. Otherwise, suppose u = w1, and note that v = z1. Note that conditioning on a positive value ofφu1 · φ

(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) is equal to conditioning on whether v is incident to exactly one edge in Xℓ+1.

If |Cℓ+1| > 3, then we have from Lemma 4.3 that the probability that e is in a short cycle, conditioned on the event thatz1 = v is free, is at most the probability that e is in a dead end path, conditioned on the event that v is free. Hence φqe isindeed conditionally non-decreasing with respect to φu1 · φv1.

If |Cℓ+1| = 3, then we already saw that e is in a short cycle if Xℓ+1 is either {z1, z2} or Cℓ+1 \ {z1, z2}. Note that, sinceCℓ+1 is a triangle, e is either in a short cycle or in a dead end path in G′(X1, . . . , Xℓ, Xℓ+1). Hence it suffices to show that theprobability of e being in a short cycle, conditioned on v = z1 being incident to exactly one edge in Xℓ+1, is at most 1

2 .We show that this is true for every possible value of |Xℓ+1|. Let z3 be the third vertex in Cℓ+1. If |Xℓ+1| = 1, then

the probability that e is in a short cycle, conditioned on the probability that z1 is incident to the edge in Xℓ+1 is equal tothe probability that Xℓ+1 = {z1, z2} conditioned on Xℓ+1 being either {z1, z2} or {z1, z3}. By symmetry, this probability is

Page 14: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2155

exactly 12 . If |Xℓ+1| = 2, then the probability that e is in a short cycle, conditioned on the probability that z1 is incident to

an edge in Xℓ+1 is equal to the probability that Xℓ+1 = Cℓ+1 \ {z1, z2} conditioned on Xℓ+1 being either {{z1, z2}, {z2, z3}}or {{z1, z3}, {z3, z2}}. Again, by symmetry, this probability is exactly 1

2 . If |Xℓ+1| = 3, then the path containing e becomes adead end path ending in z1 and z2, so the probability of a short cycle is 0. �

Lemma A.2. There exists a pessimistic estimator φe for e ∈ MT such that φ(0)e ≥

340 and φ

(r)e (X1, . . . , Xr) is equal to q(0)

e ife ∈ B(X1, . . . , Xr), and 0 otherwise.

Proof. The definition of φe will combine several pessimistic estimators. The first kind, φub for b ∈ {0, 1} is the same as in theproof of Lemma A.1. We extend the definition of φqe in the proof of Lemma A.1 to e ∈ MT , as follows. Recall the definition ofG′(X1, . . . , Xℓ) as the graph that contains the edges Ci \ Xi for i = 1, . . . , ℓ plus the edges fromM∗ for which both endpointsare free, i.e. incident to an edge in

(ℓ)i=1 Xi. When computing φ

(ℓ)qe (X1, . . . , Xℓ) for e ∈ MT we use the same definition for

G′(X1, . . . , Xℓ), except that it also contains the edge e if both its endpoints are free. We denote this graph as G′e(X1, . . . , Xℓ).

We set φ(ℓ)qe (X1, . . . , Xℓ) to 1

2 , 1 or 34 depending onwhether e is in a short cycle, a dead end path, or neither, in G′

e(X1, . . . , Xℓ).In addition, we define the estimator φTe as the conditional probability that e is added to M′ in Step 1(a) in Fig. 4 if both

its endpoints are free. Let e = {u, v}, and let w be the other vertex in the triangle in MT containing e. Suppose w ∈ Ck. Welet φ

(ℓ)Te (X1, . . . , Xℓ) =

512 if k > ℓ, and we set it to either 1

3 or 12 , depending on whether Xk contains an edge incident to w, if

k ≤ ℓ.We claim that the estimator

φe =φu1 · φv1 · φqe + φu0 · φv1 + φu1 · φv0 + φu0 · φv0

φTe

has φ(0)e ≥

340 , and φ

(r)e (X1, . . . , Xr) is q

(0)e if e ∈ B(X1, . . . , Xr) and 0 otherwise, and that φe satisfies conditions (ii)–(iv) of

Definition 2.1.Using the proof of Lemma A.1, we see that φ

(0)u1 · φ

(0)v1 · φ

(0)qe + φ

(0)u0 · φ

(0)v1 + φ

(0)u1 · φ

(0)v0 + φ

(0)u0 · φ

(0)v0 ≥

316 . Since φ

(0)Te =

512 ,

we get that φ(0)e ≥

340 . It is also easy to see that φ

(r)e (X1, . . . , Xr) is q

(0)e if e ∈ B(X1, . . . , Xr) and 0 otherwise.

Note that φub for b ∈ {0, 1} and φTe are conditional probabilities, and hence they are valid pessimistic estimators.Moreover, their product is a pessimistic estimator: Let u ∈ Ci, v ∈ Cj, i < j and suppose u, v are in a triangle with vertex win MT , where w ∈ Ck. Since i, j, k are distinct, φTe , φub and φvb′ for any b, b′

∈ {0, 1} are uncorrelated estimators. Therefore,by Lemma 2.7, φub · φvb′ · φTe is a pessimistic estimator.

Hence, it remains to show that φqe is a pessimistic estimator, and that it is conditionally non-decreasing with respectto φTe · φu1 · φv1. The fact that φqe is a pessimistic estimator follows by the same argument as in the proof of Lemma A.1.To show that it is conditionally non-decreasing with respect to φTe · φu1 · φv1, we only need to consider ℓ such that e isnot in a short cycle or dead end path in G′

e(X1, . . . , Xℓ), and there exists an outcome Xℓ+1 such that e is in a short cycle inG′e(X1, . . . , Xℓ, Xℓ+1).Suppose that e = {u, v} and u ∈ Ci, v ∈ Cj with j > i. Note that ℓ + 1 ≥ j, since otherwise the endpoints of e are not

both incident to an edge in(ℓ)

k=1 Xk and hence e ∈ G′e(X1, . . . , Xℓ, Xℓ+1) for any outcome Xℓ+1. Let w again be the vertex

such that u, v, w are in a triangle inMT , and suppose w ∈ Ck.Then, for ℓ + 1 ∈ {j, k}, the value φTe · φu1 · φ

(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) is non-stochastic and equal to φTe · φu1 ·

φ(ℓ+1)v1 (X1, . . . , Xℓ). Hence for ℓ+1 ∈ {j, k}, conditioning on the only possible value ofφTe ·φu1 ·φ

(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) does

not change the expected value of φ(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1), and hence the fact that it is at least φ

(ℓ+1)qe (X1, . . . , Xℓ) follows

from the fact that φqe is a pessimistic estimator.If ℓ + 1 = j, then we can use the same argument we used to show that φqe is conditionally non-decreasing with respect

to φu1 · φv1 in the proof of Lemma A.1.Hence, it remains to consider the case that ℓ + 1 = k. Note that j = k, and that we can therefore assume that both

endpoints of e are free in G′e(X1, . . . , Xℓ). Let w1, w2 be the endpoints of the path containing e in G′

e(X1, . . . , Xℓ). Since thereexists some outcome Xℓ+1 such that e is in a short cycle in G′

e(X1, . . . , Xℓ, Xℓ+1), it must be the case that M∗ contains edges{w1, z1}, {w2, z2} with z1, z2 ∈ Ck = Cℓ+1. We also have that w ∈ Ck, where w is the node that is in a triangle with {u, v}

in MT .Now, φTe · φu1 · φ

(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) ∈ {

13 ,

12 }, where the first outcome corresponds to an outcome Xℓ+1 that has at

least one edge incident tow. LetW be the event that Xℓ+1 has at least one edge incident tow, and letW c be the complementof W .

Let F C be the event that z1, z2 are both free and connected in Cℓ+1 \ Xℓ+1 (and hence, G′e(X1, . . . , Xℓ, Xℓ+1) has a short

cycle containing e), and let N represent the event that one of z1, z2 is not free (and hence, G′e(X1, . . . , Xℓ, Xℓ+1) has a dead

end path containing e). Then we claim the following:

Claim A.3. PF C ∩ W

≤ P

N ∩ W

and P

F C ∩ W c

≤ P

N ∩ W c

.

Page 15: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

2156 A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157

Suppose the claim holds, then also PF C|W

≤ P

N |W

and P

F C|W c

≤ P

N |W c

. Therefore,

Eφ(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1)|φTe · φu1 · φ

(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) =

13

=

12

PF C|W

+ P

N |W

+

34

1 − P

F C|W

− P

N |W

=

34

−14

PF C|W

+

14

PN |W

34

= φ(ℓ)qe (X1, . . . , Xℓ),

and, similarly, one can show that

Eφ(ℓ+1)qe (X1, . . . , Xℓ, Xℓ+1)|φTe · φu1 · φ

(ℓ+1)v1 (X1, . . . , Xℓ, Xℓ+1) =

12

≥ φ(ℓ)

qe (X1, . . . , Xℓ).

To prove the claim, first note that if w coincides with either z1 or z2, then the second part follows trivially, sincePF C ∩ W c

= 0. The first part follows from Lemma 4.3 if |Cℓ+1| > 3. If |Cℓ+1| = 3, and w = z1, then P

F C ∩ W

=

PF C

= p2(1 − p) + p(1 − p)2 = p(1 − p) and P

N ∩ W

= P

W

− P

F C ∩ W

= 1 − (1 − p)2 − p(1 − p) = p.

To prove the claim if w does not coincide with either z1 or z2, we first consider the case that |Cℓ+1| = 3. Then,PF C ∩ W

= P

Xℓ+1 = {{z1, w}, {w, z2}}

= p2(1 − p), and P

N ∩ W

> P

Xℓ+1 = {{z1, w}, {z1, z2}}

= p2(1 − p).

Also, PF C ∩ W c

= P

Xℓ+1 = {z1, z2}

= p(1 − p)2, and P

N ∩ W c

= P

Xℓ+1 = ∅

= (1 − p)3 > p(1 − p)2 since

p < 0.277.For the case that |Cℓ+1| > 3, we need a similar proof as the proof of Lemma 4.3.We first show that for X ∈ F C ∩ W , there exists N(X) ∈ N ∩ W , where P

Xℓ+1 = N(X)

≥ P

Xℓ+1 = X

. N(X) will

be defined from X in such a way, that X ′= X implies that N(X ′) = N(X). Let δ be the number of edges of the shortest

path between z1 and z2 using edges of Cℓ+1. If δ ≥ 2, then we define an outcome N(X) ∈ N ∩ W by shifting the edgesof X one position in either clockwise or counterclockwise direction, so that w is incident to an edge in N(X). Now, sinceCℓ+1 \ X contained a path from z1 to z2, it must be the case that one of z1, z2 is not incident to an edge in N(X), and henceN(X) ∈ N ∩ W−. If δ = 1, then X ∈ F C ∩ W implies that X does not contain the edge {z1, z2}, since the other pathconnecting z1, z2 in Cℓ+1 goes through w, and hence this path will not exist in Cℓ+1 \ X . So, X must contain an edge incidentto z1 and on z2 and these edges are only one edge apart in Cℓ+1. Hence, these edges were the edges e1 and ec−1 in Fig. 1.We consider two cases: if w is a neighbor of z1 or z2, then we define N(X) by shifting the edges of X two positions in eitherclockwise or counterclockwise direction, so that w is incident to an edge in N(X), and either z1 or z2 is not. Otherwise, wedefine N(X) as X \ {ec−1}. Note that in all the cases, P

Xℓ+1 = N(X)

≥ P

Xℓ+1 = X

, and N(X) has a unique pre-image X ,

hence, PF C ∩ W

≤ P

N ∩ W

.

We use a similar strategy to show that PF C ∩ W c

≤ P

N ∩ W c

for |Cℓ+1| > 3. We first show that for ‘most’

X ∈ F C ∩ W c , there exists N(X) ∈ N ∩ W c , where PXℓ+1 = N(X)

≥ P

Xℓ+1 = X

and where N(X) has a unique pre-

image X . For the remaining outcome X ∈ F C ∩ W c (which turns out to be unique), we will demonstrate three outcomesN1(X),N2(X),N3(X) such that P

Xℓ+1 = X

= P

Xℓ+1 ∈ {N1(X),N2(X),N3(X)}

, and for these three outcomes Ni(X), there

exists no X ′ such that N(X ′) = Ni(X).Given X ∈ F C ∩ W c , we attempt to find N(X) ∈ N ∩ W c from X by shifting the edges one position in either clockwise

or counterclockwise direction, where the direction is chosen so that N(X) does not contain an edge incident to w. If suchN(X) exists, note that it has the property that exactly one of z1, z2 is incident to an edge in N(X), and that z1 and z2 are partof different paths in Cℓ+1 \ N(X).

If we cannot define N(X) this way, it must be the case that there are four consecutive edges e1, e2, e3, e4 on Cℓ+1, suchthat w is incident to the middle two edges e2 and e3, and X contains the remaining two edges, e1 and e4. Since X is the resultof Fig. 1, it must be the case that |Cℓ+1| = 4k+3 for some integer k ≥ 1. Also note that this outcome X is the unique outcomeof Fig. 1 such that both e1 and e4 are in Xℓ+1.

Note that X contains k + 1 edges, and that outcomes Y with k edges have non-zero probability (in fact, probability13P

Xℓ+1 = X

) of being the result of Fig. 1 exactly if Cℓ+1 \ Y consists of k − 1 paths of length 3 and one path of

length 6. The first outcome N1(X) is obtained by starting with X , removing e1, and then shifting the edges two positionsin counterclockwise direction. Note that neither z1, z2 nor w are incident to an edge in this outcome, so N1(X) ∈ N ∩ W c

and N1(X) = N(X ′) for any X ′= X . The outcomes N2(X),N3(X) are the outcomes Y such that the path of length 6 in Cℓ+1 \Y

contains both of z1 and z2, and one of them is an endpoint of the path. The outcomes N2(X),N3(X) cannot be the imageN(X ′) of some X ′

= X , since we note above that it would then have to be the case that z1 and z2 are part of different pathsin Cℓ+1 \ N(X ′).

It is clear that N2(X),N3(X) ∈ N , so it remains to show that N2(X),N3(X) ∈ W c . Consider N2(X), and suppose withoutloss of generality it has an edge incident to z1. Label the edges of the cycle a1, . . . , a4k+3 in clockwise or counterclockwisedirection, so that the edge in N2(X) that is incident to z1 is labeled a1, and the other edge incident to z1 is labeled a4k+3. Thenthe edges in N2(X) are a1, a5, . . . , a4(k−1)+1. On the other hand, the fact that X ∈ F C ∩ W c and both of w’s neighbor’s areincident to an edge in X , implies that the path along Cℓ+1 from w to z1 that does not go through z2 must have 4ℓ + 2 edges,

Page 16: Deterministic approximation algorithms for the maximum traveling salesman and maximum triangle packing problems

A. van Zuylen / Discrete Applied Mathematics 161 (2013) 2142–2157 2157

for some integer ℓ ≥ 0 : X contains every fourth edge on this path, starting from the second edge (since, by definition, Xcontains an edge incident to each neighbor of w), and X also contains the last edge on the path (since X ∈ F C). Hence, thepath must have 4ℓ + 2 edges for some integer ℓ ≥ 0. Hence, the edges incident to w have label a4ℓ+2 and a4ℓ+3, and neitherof these are in N2(X). An analogous proof shows that N3(X) ∈ W c . �

References

[1] A. Barvinok, D.S. Johnson, G.J. Woeginger, R. Woodroofe, The maximum traveling salesman problem under polyhedral norms, in: IPCO’98, in: LectureNotes in Comput. Sci., vol. 1412, 1998, pp. 195–201.

[2] Z.-Z. Chen, Y. Okamoto, L. Wang, Improved deterministic approximation algorithms for Max TSP, Inform. Process. Lett. 95 (2) (2005) 333–342.[3] Z.-Z. Chen, R. Tanahashi, L. Wang, An improved randomized approximation algorithm for maximum triangle packing, Discrete Appl. Math. 157 (7)

(2009) 1640–1646. Preliminary version appeared in AAIM’08.[4] Z.-Z. Chen, R. Tanahashi, L.Wang, Erratum to ‘An improved randomized approximation algorithm formaximum triangle packing’ [Discrete Appl.Math.

157 (2009) 1640–1646], Discrete Appl. Math. 158 (9) (2010) 1045–1047.[5] Z.-Z. Chen, L. Wang, An improved randomized approximation algorithm for Max TSP, J. Comb. Optim. 9 (4) (2005) 401–432.[6] M. Chlebík, J. Chlebíková, Approximation hardness for small occurrence instances of NP-hard problems, in: CIAC’03, in: Lecture Notes in Comput. Sci.,

vol. 2653, 2003, pp. 152–164.[7] P. Erdős, J. Spencer, Probabilistic Methods in Combinatorics, in: Probability and Mathematical Statistics, vol. 17, Academic Press, New York, London,

1974.[8] R. Hassin, S. Rubinstein, Better approximations for Max TSP, Inform. Process. Lett. 75 (4) (2000) 181–186.[9] R. Hassin, S. Rubinstein, An approximation algorithm formaximum triangle packing, Discrete Appl. Math. 154 (6) (2006) 971–979. Preliminary version

appeared in ESA 2004.[10] R. Hassin, S. Rubinstein, Erratum to: ‘An approximation algorithm for maximum triangle packing’ [Discrete Appl. Math. 154(6) (2006) 971–979],

Discrete Appl. Math. 154 (18) (2006) 2620.[11] L. Kowalik, M. Mucha, Deterministic 7/8-approximation for the metric maximum TSP, Theoret. Comput. Sci. 410 (2009) 5000–5009. Preliminary

version appeard in APPROX-RANDOM’08.[12] L. Lovász, M.D. Plummer, Annals of Discrete Mathematics, Vol. 29, in: North-Holland Mathematics Studies, vol. 121, North-Holland Publishing Co.,

Amsterdam, 1986.[13] K.E. Paluch, M.Mucha, A. Madry, A 7/9—approximation algorithm for themaximum traveling salesman problem, in: APPROX-RANDOM’09, in: Lecture

Notes in Computer Science, vol. 5687, 2009, pp. 298–311.[14] P. Raghavan, Probabilistic construction of deterministic algorithms: approximating packing integer programs, J. Comput. System Sci. 37 (2) (1988)

130–143.[15] A.I. Serdyukov, An algorithm with an estimate for the travelling salesman problem of the maximum, Upravlyaemye Sistemy (25) (1984) 80–86, 89.[16] R. Tanahashi, Z.-Z. Chen, A deterministic approximation algorithm for maximum 2-path packing, IEICE Trans. 93-D (2) (2010) 241–249.[17] A. Wigderson, D. Xiao, Derandomizing the Ahlswede–Winter matrix-valued Chernoff bound using pessimistic estimators, and applications, Theory

Comput. 4 (1) (2008) 53–76.