• 沒有找到結果。

The approximability of the weighted Hamiltonian path completion problem on a tree

N/A
N/A
Protected

Academic year: 2021

Share "The approximability of the weighted Hamiltonian path completion problem on a tree"

Copied!
13
0
0

加載中.... (立即查看全文)

全文

(1)

www.elsevier.com/locate/tcs

Note

The approximability of the weighted Hamiltonian

path completion problem on a tree

Quincy Wu

a

, Chin Lung Lu

b,∗

, Richard Chia-Tung Lee

c

aGraduate Institute of Communication Engineering, National Chi-Nan University, Puli, Nantou Hsien 545, Taiwan, ROC

bDepartment of Biological Science and Technology, National Chiao Tung University, Hsinchu 300, Taiwan, ROC cDepartment of Computer Science and Information Engineering, National Chi-Nan University, Puli,

Nantou Hsien 545, Taiwan, ROC

Received 7 February 2004; received in revised form 21 February 2005; accepted 2 March 2005 Communicated by D.-Z. Du

Abstract

Given a graph, the Hamiltonian path completion problem is to find an augmenting edge set such that the augmented graph has a Hamiltonian path. In this paper, we show that the Hamiltonian path completion problem will unlikely have any constant ratio approximation algorithm unless NP = P. This problem remains hard to approximate even when the given subgraph is a tree. Moreover, if the edge weights are restricted to be either 1 or 2, the Hamiltonian path completion problem on a tree is still NP-hard. Then it is observed that this problem is strongly NP-hard, so it does not have any fully polynomial-time approximation scheme (FPTAS) unless NP= P. When the given tree is a k-tree, we give an approximation algorithm with performance ratio 1.5.

© 2005 Elsevier B.V. All rights reserved.

Keywords: Hamiltonian path completion problem; Trees; Strongly NP-hard; Approximation algorithm; Fully polynomial-time approximation scheme

Corresponding author. Tel.: +886 3 5712121x56949; fax: +886 3 5729288.

E-mail addresses:solomon@ipv6.club.tw(Q. Wu),cllu@mail.nctu.edu.tw(C.L. Lu),rctlee@ncnu.edu.tw (R.C.-T Lee).

0304-3975/$ - see front matter © 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.tcs.2005.03.043

(2)

1. Introduction

Given a graph G, a Hamiltonian path is a simple path on G which traverses each vertex exactly once. Finding a Hamiltonian path is often required in problems involving routing and the periodic updating of data structures. In the past, the Hamiltonian path completion problem was defined on unweighted graphs. For a given unweighted graphG = (V, E0), the Hamiltonian path completion problem is to find an augmenting edge setE2such that

G = (V, E

0∪ E2) has a Hamiltonian path. Such an edge set E2is called an augment. It was shown that to find an edge setE2with minimum cardinality is an NP-hard problem[9,

p. 198]. If the given graph G is a tree [6,10,11,13,16], a forest [20], an interval graph [1], a circular-arc graph [7], a bipartite permutation graph [21], a block graph [21,22,24], or a cograph [15], it was shown that there exist polynomial-time algorithms for this problem by computing the path covering number, which is the minimum number of vertex-disjoint paths covering all vertices. In general, for a complete bipartite graphK1,n, the path covering number isn − 1, and at least n − 2 edges must be added to make it have a Hamiltonian path. In other words, forK1,nto have a Hamiltonian path, any optimal augment must have exactlyn − 2 edges [6]. For example, in Fig. 1, the graph can be covered by three paths {(4, 1, 5), (2), (3)}, so two edges, say (2,3) and (3,4), may be added to make the original graph have a Hamiltonian path.

In this paper, we shall discuss the weighted Hamiltonian path completion problem, whose formal definition is given below.

Weighted Hamiltonian Path Completion Problem (WHPCP). Given a complete graph G = (V, E) with edge weights w : E → R+, and an edge subsetE

0 ⊆ E, find an

aug-mentE2 ⊆ E such that G = (V, E0∪ E2) has a Hamiltonian path and 

e∈E2w(e) is

minimized.

For example, in Fig. 2, givenE0 = {(1, 2), (3, 4), (5, 6)} and the weight of each edge assigned as in the table aside, the optimal augment isE2 = {(1, 7), (2, 5), (3, 6)} with weight 10. However, this problem is hard to solve ifE0is arbitrary. Throughout this paper, we shall assume thatE0constitutes a tree. The formal definition of the problem is given below.

1 1

2

2 3 4 5 3 4 5

(3)

1 2 3 4 5 6 7

Fig. 2. An example for the weighted Hamiltonian path completion problem, where the given edge setE0is represented by solid lines and augmentE2by dashed lines, and the weights of all the edges are shown in the table aside.

Weighted Hamiltonian Path Completion Problem on a Tree (WHPCT). Given a

com-plete graphG = (V, E) with edge weights w : E → R+, and an edge subsetE0 consti-tuting a spanning tree on G, find an augmentE2⊆ E such that G= (V, E0∪ E2) has a Hamiltonian path and the weighte∈E2w(e) is minimized.

In this paper, we shall first show that the weighted Hamiltonian path completion problem on a tree (WHPCT) will unlikely have any constant ratio approximation algorithm and it is still NP-hard even when the edge weights are restricted to be either 1 or 2. We then observe that this problem is strongly NP-hard, so it has no fully polynomial-time approximation scheme (FPTAS) unless NP = P. Furthermore, when the given tree has only one internal node, we give an approximation algorithm with performance ratio 1.5 and then extend this algorithm to trees with k internal nodes.

2. Non-approximability of WHPCT

To prove that WHPCT is hard to approximate, we adopt a technique which is similar to the one applied to prove that the traveling salesperson problem will unlikely have any

-approximation algorithm as in[19]. In our proof, we shall reduce the Hamiltonian path problem, which is a well-known NP-complete problem [9, pp. 199–200], to the WHPCT problem. Let us define the problem first.

Hamiltonian Path Problem (HPP). Given G = (V, E), where |V | = n, determine

whether G has a path of lengthn − 1.

An approximation algorithmA is said to be-approximation if for any problem instance, the weight of the approximate solution obtained byA is bounded bytimes the weight of the optimal solution. We then have the following theorem:

Theorem 2.1. For any> 1, if there exists a polynomial-time-approximation algorithm for WHPCT, then NP = P.

(4)

G G′ 0 1 1 2 2 3 3 4 4 5 5 6

Fig. 3. Reduction from G in HPP toGin WHPCT. InG, the dashed edges have weight 1 and other edges have weight 24.

Proof. Suppose there exists an approximation algorithmA of WHPCT that will find an

approximation solution of ratioin polynomial time. We then reduce HPP to WHPCT as follows: Given an instance of HPP, sayG = (V, E) with V = {v1, v2, . . . , vn}, we construct an instance of WHPCT, sayG= (V, E) and E0, as follows.

• Gis the complete graph with vertex setV= V ∪ {v0, vn+1}.

• For each e ∈ E,w(e) =1 if e ∈ E,

|E|(n − 1) otherwise. • E0= {(v0, vi) | 1in + 1}.

Let us see Fig.3 for an example of the reduction.

First, we claim that G has a Hamiltonian path if and only ifGhas an optimal augment with weightn−1. It is easy to see that if G has a Hamiltonian path, then by the construction ofG,Ghas an augment withn−1 edges, and each of these edges has weight 1. Conversely, supposeE0 has an optimal augmentE2of weightn − 1. According to the discussion in the previous section, since the givenE0constitutes a treeK1,n+1,E2 must have exactly n − 1 edges. Since E2 is of weightn − 1, each of the n − 1 edges in E2 must have weight exactly equal to 1 and henceE2 ⊆ E. Let P ⊆ E0∪ E2be a Hamiltonian path inG = (V, E0∪ E2). Since V hasn + 2 vertices, |P | = n + 1. Because the path is Hamiltonian, the vertexvn+1must be covered by the path. Since vertexvn+1is of degree 1 and adjacent tov0inG, P must pass throughv0to visitvn+1and then stop. In other words, if we deletev0andvn+1from P, we can obtain a pathP ⊆ E2which visits all vertices in{v1, v2, . . . , vn} exactly once. Since E2 ⊆ E, P is a Hamiltonian path for

G. Therefore, G has a Hamiltonian path if and only ifG has an optimal augment with weightn − 1.

Second, we claim that there is an optimal augment for G with weight n − 1 if and only ifA cannot generate a solution containing any edge with weight|E|(n − 1). If the approximate solution contains any such edge, the weight of the augment would be at least |E|(n − 1). Since (|E|(n − 1))/(n − 1) =|E| > , this violates the assumption that A is an-approximation algorithm. Conversely, ifA generates an augment with weight less than or equal to|E|, then we know this augment does not contain any edge in Gwith

(5)

weight|E|(n − 1). In other words, all the edges in this augment are contained in E of the original graph G. Since such a subset in E constitutes a Hamiltonian path in G, it leads to the conclusion that the graph G has a Hamiltonian path.

By the above discussion, G has a Hamiltonian path if and only ifA generates an augment with weight less than or equal to|E| for G. Hence we can useA to solve the HPP in polynomial time, by examining the weight of the solution returned byA. Thus, if WHPCT has a polynomial-time-approximation algorithm, then NP = P. 

3. Hardness results of (1,2)-HPCT

In this section, we shall discuss the (1,2)-HPCT problem, which is the WHPCT problem whose edge weights are restricted to be either 1 or 2.

(1,2)-Hamiltonian Path Completion Problem on a Tree ((1,2)-HPCT). Given a

com-plete graph G = (V, E) with edge weights w : E → {1, 2}, and an edge subset E0 constituting a spanning tree on G, find an augmentE2⊆ E such that G= (V, E0∪ E2) has a Hamiltonian path and the weighte∈E2w(e) is minimized.

In[3], an hard problem is defined to be strongly hard if it remains to be NP-hard even when the value of the maximum number occurring in the input is bounded by some polynomial in the length of the input. That is, for any input x, max(x)p(|x|). Since the edge weights in any instance x of (1,2)-HPCT are either 1 or 2, max(x) = 2, which is a constant and certainly bounded by any polynomial. It can also be shown that (1,2)-HPCT is NP-hard with a similar technique applied in the first part of Theorem 2.1. The only difference is that in the construction ofG, the weight of those edges not in E is set to 2, instead of |E|(n − 1). Therefore, we have the following observation immediately.

Observation 3.1. (1,2)-HPCT is strongly NP-hard.

A polynomial-time approximation scheme (PTAS) is a family of algorithms such that for any rational value> 0, there is a corresponding approximation algorithm whose solution is within ratio 1+, and the time complexity of this approximation algorithm is polynomial in the size of its input. Furthermore, when the running time of a PTAS is polynomial both in the size of the input and in 1/, the scheme is called a fully polynomial-time approximation scheme (FPTAS)[3]. Some problems, like the maximum independent set problem on planar graphs and the Euclidean traveling salesperson problem are found to have PTASs [2,4], while the 0–1 knapsack problem admits an FPTAS [12]. On the contrary, some problems, such as the maximum 3-satisfiability problem, the maximum leaves spanning tree problem, the superstring problem, and the traveling salesperson problem with distances one and two, are proven by a reduction from the MAX SNP-complete class that they do not have any PTAS unless NP = P [5,8,17,18].

The following lemma states the relationship between strongly NP-hard problems and FPTAS solutions.

(6)

Lemma 3.1 ([3], Corollary 3.19). Let P be a strongly NP-hard problem that admits a polynomial p such thatm(x)p(|x|, max(x)) for any input x, where m(x) denotes the value of any optimal solution of x and|x| denotes the length of x. If P = NP, then P does not have any FPTAS.

Theorem 3.1. If (1,2)-HPCT has an FPTAS, then NP = P.

Proof. Given any instance x of (1,2)-HPCT withG = (V, E), the optimal augment E

will not contain all edges in E, which implies thatm(x) < 2|E|. Since it is bounded by a polynomial, by Observation 3.1 and Lemma 3.1, if (1,2)-HPCT has an FPTAS, then

NP = P. 

4. A 1.5-approximation algorithm for (1,2)-hamiltonian path completion problem on 1-star

The 1-star is a complete bipartite graphK1,n, which is a tree with n leaf vertices and 1 non-leaf vertex. In this section, we shall give a 1.5-approximation algorithm for the (1,2)-Hamiltonian path completion problem on a 1-star. Before that, we would like to mention here that the minimum-weight maximal matching problem in a weighted complete graph, by which we adopt to design the approximation algorithms throughout the rest of this paper, can be solved in polynomial time, in contrast to the fact that the minimum-weight maximal matching problem is NP-hard for general graphs [9].

Lemma 4.1. The minimum-weight maximal matching problem in a weighted complete

graph can be solved in polynomial time.

Proof. Suppose that the minimum-weight maximal matching problem is given in a weighted

complete graphG = (V, E), with w(e) denoting the weight on each edge e ∈ E. Let be a positive real number greater than the weight of any edge in G. This problem can be reduced to the maximum-weight maximal matching problem in a weighted complete graph

G= (V, E) with V= V , E= E and w=− w(e). Clearly, a maximal matching in

G is also a maximal matching inG, and vice versa. Moreover, all the maximal matchings in G andGcontain exactlyn/2 edges, where n = |V |. Let w(M) =e∈Mw(e) for a maximal matching M. For any two maximum matchingsM1andM2in G, we useM1 andM2 to denote their corresponding maximal matchings in G, respectively. Then for

i ∈ {1, 2}, w(M

i) = n/2 ×− w(Mi). Consequently, w(M1)w(M2) if and only ifw(M1)w(M2). In other words, the maximal matching with maximum weight in G corresponds to a maximal matching with minimum weight in G, and vice versa. Note that the maximum-weight maximal matching problem for general graphs can be solved in O(n3) time[14, Chapter 6]. Hence, as discussed above, the minimum-weight maximal matching problem in a weighted complete graph is solvable in O(n3) time.1 

1It is worth noticing that if the considered graph is not complete, then the above reduction does not work since not all the maximal matchings have the same cardinalities.

(7)

v0 v0

v1

v1 v2 v3 v4 v5 v2 v3 v4 v5

Fig. 4. Finding the minimum-weight maximal matching on a 1-star. v0

vs vt

v1 vn

Fig. 5. A Hamiltonian path inG= (V, E0∪ E2∗).

Now, we describe our approximation algorithm for solving the (1,2)-Hamiltonian path completion problem on a 1-star. Suppose thatG = (V, E) is the given graph of the problem, whereV = {v0, v1, v2, . . . , vn} and v0is the root of the given 1-star. Our approximation algorithm will first find a minimum-weight maximal matching in the induced complete graph byV = V \ {v0}, and then add edges to concatenate these matching pairs into a Hamiltonian path. For example, in Fig.4, the matching may find{(v1, v2), (v3, v4)}, then in the second step(v4, v5) is added to form a Hamiltonian path. The formal description of our algorithm is as follows.

Algorithm 1

1. ifn2, then returnE2= ∅;

2. Perform a minimum-weight maximal matching algorithm in the induced graph byV; Suppose the matching is{(vi1, vj1), (vi2, vj2), . . . , (vin/2, vjn/2)} and denote by vin/2 the unmatched vertex if n is odd.

3. ReturnE2=n/2k=1 {(vik, vjk)}



∪n/2−1k=2 {(vjk, vik+1)} 

;

Lemma 4.2. If the optimal augmentE2contains k edges with weight 1, then our algorithm finds at leastk/2 of edges with weight 1 in the solution.

Proof. It can be seen that forK1,n, any optimal augmentE∗2 always has exactly n − 2 edges. Moreover, inG = (V, E0∪ E2), there exist two edges (v0, vs) and (v0, vt) in E0 such that they together with these n − 2 edges in E2∗ constitute a Hamiltonian path, as illustrated in Fig.5. By deleting the vertexv0from the path, we obtain two vertex-disjoint

(8)

paths to coverV= {v1, v2, . . . , vn}. (Please note that a single vertex is also regarded as a degenerated path here.) Connecting these two paths with “head to head” and “tail to tail” by adding the two corresponding edges, we obtain a cycle C. ObviouslyE2⊂ C. Without loss of generality, let us label this cycle as{(v1, v2), (v2, v3), . . . , (vn−1, vn), (vn, v1)}, where

(vs, vt) and (vn, v1) are the two added edges. Let MM be the minimum-weight maximal matching obtained in our algorithm.

Case 1. If n is even, then each maximal matching hasn/2 edges since the given graph is complete. It can be seen that M1 = {(v1, v2), (v3, v4), . . . , (vn−1, vn)} is a maximal matching andM2= {(v2, v3), (v4, v5), . . . , (vn, v1)} is also a maximal matching. Suppose MM containsk1edges with weight 1. Then bothM1andM2contain at mostk1edges with weight 1; otherwise, MM cannot be minimum. Thus,C = M1∪ M2contains at most 2k1 edges with weight 1. Ifk1 < k/2, then 2k1 < k and C contains fewer than k edges with weight 1. This contradicts the assumption that the subsetE2of C already has k edges with weight 1. Therefore,k1k/2.

Case 2. If n is odd, then each maximal matching hasn − 1/2 edges. It can be seen that

M1 = {(v1, v2), (v3, v4), . . . , (vn−2, vn−1)} is a maximal matching and M2 = {(v2, v3),

(v4, v5), . . . , (vn−1, vn)} is a maximal matching, too. Suppose MM contains k1edges with weight 1. Then with similar reasoning, bothM1andM2will have less than or equal tok1 edges with weight 1. Again,k1< k/2 implies that the path {(v1, v2), (v2, v3), . . . , (vn−1, vn)} contains fewer than k edges with weight 1. This also causes a contradiction because its subset

E

2already contains k edges with weight 1. Therefore,k1k/2.

In either case, our algorithm finds at leastk/2 edges with weight 1 in the minimum-weight maximal matching MM.

Theorem 4.1. The performance ratio of Algorithm 1 is 32.

Proof. The augmentE2obtained by our algorithm containsn/2 + n/2 − 2 = n − 2 edges, just the same as the optimal augment. Suppose the optimal solutionE2contains k edges with weight 1, and h edges with weight 2 (i.e.,k + h = n − 2). According to Lemma

4.2, our approximation algorithm which performs minimum-weight maximal matching to get a partial result will choose at leastk/2 edges with weight 1. Even in the worst case that all the other edges added later are with weight 2, the performance ratio of our approximate solution will be k 2+ 2(k2+ h) k + 2h = 3k 2 + 2h k + 2h  3 2.

Remarks. Precisely, by Lemma4.2, the above formula should be written as k2 + 2(k + h − k2)

k + 2h .

When k is odd, it becomes k+1 2 + 2(k + h − k+12 ) k + 2h = 3k−1 2 + 2h k + 2h < 3k 2 + 2h k + 2h  3 2. 

(9)

v0

v1 v2 v3 v4 Fig. 6. An example showing that ratio 1.5 is tight.

The time complexity of Algorithm 1 is analyzed as follows. Letn + 1 be the number of vertices in G. The minimum-weight maximal matching in Step 2 takes O(n3) time, as mentioned in the beginning of this section. Therefore, we obtain a 1.5-approximation algorithm to solve the (1,2)-Hamiltonian path completion problem on 1-star that runs in O(n3) time.

To show that the analysis for the performance ratio of this algorithm is tight, let us see the example in Fig.6, where the edge weights are

w(e) = 

1 if e ∈ {(v1, v2), (v1, v3)}, 2 otherwise.

Our approximation algorithm will find a minimum-weight maximal matching first, say

{(v1, v2), (v3, v4)}, and adopts this as the approximate solution. Its weight will be 3. How-ever, the optimal augment is{(v1, v2), (v1, v3)}, whose weight is 2. The performance ratio then is 32 = 1.5.

5. A 1.5-approximation algorithm for (1,2)-Hamiltonian path completion problem on k-star

A tree with k internal vertices is called a k-star. In this section, we are going to show that the approximation algorithm developed in the previous section can be extended to obtain similar results on k-stars. Let us introduce some notation first.

Definition 5.1. Suppose thatG = (V, E) is a weighted graph with weight function w(e)

defined on all edges e in E and letP = (u1, u2, · · · , uk) be a path in G. Then the new weighted graph G = (V, E) obtained from G by shrinking P into a single vertex is defined as follows, whered(u, v) = w(e) for an edge e = (u, v).

• V= V \ {u

2, u3, . . . , uk}.

• E= E \

v∈V,u∈{u2,u3,...,uk}{(u, v)}.

• w(e) =min{d(u1, v), d(uk, v)} if e = (u1, v) for some v ∈ V,

(10)

Fig. 7. The path(v1, v2, v3) of G is going to be shrunk to a vertex v1.

Fig. 8. The resulting graphG{P }, where P is the path(v1, v2, v3) of Fig.7.

LetG{P } denote the graph obtained from G by shrinking the path P. For two vertex-disjoint pathsP1andP2, the result of shrinking will be the same no matterP1is shrunk first orP2is shrunk first, because theminoperation satisfies the associative law. That is,

(G{P1}){P2}= (G{P2}){P1}. Therefore, it is sound to simply write it asG{P1,P2}. For example, consider the complete graph G as shown in Fig.7, whose distances between any two vertices are specified in the table aside. After shrinking the pathP = (v1, v2, v3) of G, the resulting graphG{P }is shown in Fig. 8.

In the rest of this section, we suppose thatG = (V, E) and E0are the instance of the (1,2)-HPCT problem, where G is a weighted complete graph andE0constitutes a k-tree of

G. In G, we call the edges in the given subsetE0thee0-edges, and edges inE \ E0with weight 1 thee1-edges, and edges inE \ E0with weight 2 thee2-edges.

Observation 5.1. Suppose that H is a Hamiltonian path in G andP1, P2, . . . , Pi are the vertex-disjoint paths inH ∩ E0. If we focus on edges in H, it can be observed that during the process of shrinkingP1, P2, . . . , Pi, onlye0-edges will be deleted, and somee2-edges may be turned toe1-edges. Therefore,H{P1,P2,...,Pi}contains at leastn1edges with weight 1 if H containsn1e1-edges.

Lemma 5.1. If a Hamiltonian path H in graph G containsn1e1-edges, then a minimum-weight maximal matching in G contains at leastn1/2 e1-edges.

Proof. The proof is similar to that of Lemma4.2. 

Theorem 5.1. If a Hamiltonian path H contains n1 e1-edges and H ∩ E0 consists of some vertex-disjoint pathsP1, P2, . . . , Pi, then a minimum-weight maximal matching on

G{P1,P2,...,Pi}contains at least n1

(11)

Proof. By Observation5.1 and Lemma 5.1. 

Informally speaking, our approximation algorithm will first find a minimum-weight max-imal matching on the shrunk complete graphG{P1,P2,...,Pi}, and then map these matching edges back to G. By our construction ofG{P1,P2,...,Pi}, each edge inG{P1,P2,...,Pi} corre-sponds to an edge in G, and each vertex inG{P1,P2,...,Pi}corresponds to either a single vertex or a path in G. Therefore, each path inG{P1,P2,...,Pi}will be mapped to a path (containing one or more edges) in G. These paths are then concatenated serially to form a Hamiltonian path. Note that if u and v are the terminals of pathPj for 1ji, the mapping of the matching edgee= (x, u) in G{P1,P2,...,Pi}back to the edge e in G is done according to the following equation.

e = 

(x, u) if d(x, u) in G is equal to d(x, u) in G{P1,P2,...,Pi}, (x, v) otherwise.

Therefore, if H containsn0e0-edges,n1 e1-edges,n2e2-edges, then the result obtained by our approximation algorithm will also contain the samen0e0-edges, and at leastn1/2 edges with weight 1 (contributed by the minimum-weight maximal matching) according to Theorem5.1. As we have seen in the previous section, the weight of this approximate result will be less than or equal ton1/2 + 2 × (n1+ n2− n1/2) = 32n1+ 2n2. Therefore, the performance ratio is

3

2n1+ 2n2

n1+ 2n2  3 2.

Now we have a natural question: How does our approximation algorithm know what paths inE0must be chosen to shrink? If we could choose the ones exactly as an optimal pathH∗contains, then the cost of the solution obtained by our approximation algorithm is guaranteed to be within 32times the one of the optimal solution. However, we do not know what edges may be contained inH∗and what may not. If we have to try each possibility, since there are O(n) e0-edges, trying all the O(2n) combinations will lead to an exponential algorithm. Fortunately, we have the following lemma:

Lemma 5.2. If H is a Hamiltonian path in G, then H contains at most 2k e0-edges.

Proof. SinceE0constitutes a k-star in G, alle0-edges must be incident to the k internal vertices of this k-star. However, in Hamiltonian path H, at most two edges are incident to each internal vertex, so at most 2k e0-edges are contained in this path. 

Therefore, we only have to test all combinations that contain 0e0-edges, 1e0-edges, 2

e0-edges,. . ., 2k e0-edges. For each combination, we apply the shrink operation and find an approximate solution of it. The minimum of these solutions will be chosen as our final approximate solution to be reported. Therefore, let us state our algorithm formally below.

Algorithm 2

1.W ← ∞, AUG ← ∅.

(12)

2.1. if the subset has 3 or more edges incident to the same vertex then /* Not vertex-disjoint paths. Do nothing. */

2.2. else

Suppose the subset consists of vertex-disjoint pathsP1, P2, . . . , Pi. 2.2.1. Shrink pathsP1, P2, . . . , Pito obtainG{P1,P2,...,Pi};

2.2.2. Find a minimum-weight maximal matching MM onG{P1,P2,...,Pi}; 2.2.3. Map these matching edges to paths in G;

/* Let MM be mapped to MM. */

2.2.4. Add edges (denoted by S) to concatenate these paths serially to form a Hamiltonian path;

2.2.5. if the weight ofS ∪ MMis smaller than W then

W ← w(S ∪ MM), AUG ← S ∪ MM;

3. Report AUG as the solution and stop;

There are O(n2k) iterations in Step 2 of Algorithm 2, and each iteration takes O(n3) time as we have seen in the previous section. Hence, we obtain a 1.5-approximation algorithm to solve the (1,2)-Hamiltonian path completion problem on k-stars that runs in O(n2k+3) time.

6. Conclusions

In this paper, we introduced the weighted Hamiltonian path completion problem and showed that this problem is hard to approximate, even if the given edge set is a tree. We also showed that the weighted Hamiltonian path completion problem remains NP-hard when the edge weights are restricted to be either 1 or 2. We then observed that this problem is strongly NP-hard, so it is unlikely to have any FPTAS. When the given tree has k internal vertices, we gave an approximation algorithm with performance ratio 32 whose time complexity is polynomial when k is fixed.

Some version of Hamiltonian completion problems finds the augment to make the given graph having a Hamiltonian circuit instead of a Hamiltonian path. It can be checked that our results can be applied to obtain the same results on Hamiltonian cycle completion problems.

Although (1,2)-HPCT is unlikely to have any FPTAS, it is still unknown whether it has a PTAS. Another variation which deserves further study is for general trees. In[23], an approximation algorithm for (1,2)-HPCT with performance ratio 2 was proposed for general trees. However, whether there exists a PTAS or an approximation algorithm with performance ratio less than 2 as we derived for k-stars is still unknown.

Acknowledgements

The authors would like to thank the anonymous referees for many constructive sugges-tions for the presentation of this paper.

(13)

References

[1]S.R. Arikati, C. Pandu Rangan, Linear algorithm for optimal path cover problem on interval graphs, Inform. Process. Lett. 35 (1990) 149–153.

[2]S. Arora, Polynomial time approximation schemes for Euclidean traveling salesman and other geometric problems, in: Proc. 37th Annual IEEE Symposium on Foundations of Computer Science, IEEE Comp. Soc. 1996, pp. 2–11.

[3]G. Ausiello, P. Crescenzi, G. Gambosi, V. Kann, A. Marchetti-Spaccamela, M. Protasi, Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties, Springer, Berlin Heidelberg, 1999.

[4]B.S. Baker, Approximation algorithms for NP-complete problems on planar graphs, J. ACM 41 (1994) 153–180.

[5]A. Blum, M. Li, J. Tromp, M. Yannakakis, Linear approximation of shortest superstrings, J. ACM 41 (1994) 630–647.

[6]F.T. Boesch, S. Chen, J.A.M. McHugh, On covering the points of a graph with point disjoint paths, in: R.A. Bari, F. Harary (Eds.), Proc. Capital Conf. on Graph Theory and Combinatorics, Lecture Notes in Math. Vol. 46, Springer, Berlin, 1974, pp. 201–212.

[7]M.A. Bonuccelli, D.P. Bovet, Minimum node disjoint path covering for circular-arc graphs, Inform. Process. Lett. 8 (1979) 159–161.

[8]G. Galbiati, F. Maffioli, A. Morzenti, A short note on the approximability of the maximum leaves spanning tree problem, Inform. Process. Lett. 52 (1994) 45–49.

[9]M. Garey, D. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, San Francisco, CA, 1979.

[10]S.E. Goodman, S.T. Hedetniemi, On the Hamiltonian completion problem, in: R.A. Bari, F. Harary (Eds.), Proc. Capital Conf. on Graph Theory and Combinatorics, Lecture Notes in Math., Vol. 46, Springer, Berlin, 1974, pp. 262–272.

[11]S.E. Goodman, S.T. Hedetniemi, P.J. Slater, Advances on the Hamiltonian completion problem, J. ACM 22 (1975) 352–360.

[12]O.H. Ibarra, C.E. Kim, Fast approximation algorithms for the knapsack and sum of subset problems, J. ACM 22 (1975) 463–468.

[13]S. Kundu, A linear algorithm for the Hamiltonian completion number of a tree, Inform. Process. Lett. 5 (1976) 55–57.

[14]E.L. Lawler, Combinatorial Optimization: Networks and Matroids, New York, 1976.

[15]R. Lin, S. Olariu, G. Pruesse, An optimal path cover algorithm for cographs, Comput. Math. Appl. 30 (1995) 75–83.

[16]J. Misra, R.E. Tarjan, Optimal chain partitions of trees, Inform. Process. Lett. 4 (1975) 24–26.

[17]C.H. Papadimitriou, M. Yannakakis, Optimization approximation and complexity classes, J. Comput. System Sci. 43 (1991) 425–440.

[18]C.H. Papadimitriou, M. Yannakakis, The traveling salesman problem with distances one and two, Math. Oper. Res. 18 (1993) 1–11.

[19]S. Sahni, T. Gonzalez, P-complete approximation problems, J. ACM 23 (1976) 555–565.

[20]Z. Skupien, Path partitions of vertices and Hamiltonicity of graphs, in: Proc. second Czechoslovakian Symposium on Graph Theory, Prague, 1974, pp. 481–491.

[21]R. Srikant, R. Sundaram, K.S. Singh, C.P. Rangan, Optimal path cover problem on block graphs and bipartite permutation graphs, Theoret. Comput. Sci. 115 (1993) 351–357.

[22]P.-K. Wong, Optimal path cover problem on block graphs, Theoret. Comput. Sci. 225 (1999) 163–169.

[23]Q. Wu, On the Complexity and Approximability of Some Hamiltonian Path Problems, Ph.D. Thesis, National Tsing Hua University, Taiwan, 2000.

數據

Fig. 1. A bipartite graph K 1 ,4 which can be covered by 3 paths.
Fig. 2. An example for the weighted Hamiltonian path completion problem, where the given edge set E 0 is represented by solid lines and augment E 2 by dashed lines, and the weights of all the edges are shown in the table aside.
Fig. 3. Reduction from G in HPP to G  in WHPCT. In G  , the dashed edges have weight 1 and other edges have weight 24  .
Fig. 4. Finding the minimum-weight maximal matching on a 1-star. v 0
+2

參考文獻

相關文件

Write the following problem on the board: “What is the area of the largest rectangle that can be inscribed in a circle of radius 4?” Have one half of the class try to solve this

We would like to point out that unlike the pure potential case considered in [RW19], here, in order to guarantee the bulk decay of ˜u, we also need the boundary decay of ∇u due to

Primal-dual approach for the mixed domination problem in trees Although we have presented Algorithm 3 for finding a minimum mixed dominating set in a tree, it is still desire to

In particular, we present a linear-time algorithm for the k-tuple total domination problem for graphs in which each block is a clique, a cycle or a complete bipartite graph,

It’s easy to check that m is a maximal ideal, called the valuation ideal. We can show that R is a

We will give a quasi-spectral characterization of a connected bipartite weighted 2-punctually distance-regular graph whose halved graphs are distance-regular.. In the case the

Miroslav Fiedler, Praha, Algebraic connectivity of graphs, Czechoslovak Mathematical Journal 23 (98) 1973,

(2007) demonstrated that the minimum β-aberration design tends to be Q B -optimal if there is more weight on linear effects and the prior information leads to a model of small size;