The internal Steiner tree problem: Hardness and approximations

The internal Steiner tree problem: Hardness and approximations

Journal of Complexity 29 (2013) 27–43 Contents lists available at SciVerse ScienceDirect Journal of Complexity journal homepage: www.elsevier.com/lo...

834KB Sizes 0 Downloads 85 Views

Journal of Complexity 29 (2013) 27–43

Contents lists available at SciVerse ScienceDirect

Journal of Complexity journal homepage: www.elsevier.com/locate/jco

The internal Steiner tree problem: Hardness and approximations✩, ✩✩ Chao-Wen Huang, Chia-Wei Lee, Huang-Ming Gao, Sun-Yuan Hsieh ∗ Department of Computer Science and Information Engineering, National Cheng Kung University, No. 1, University Road, Tainan 701, Taiwan

article

info

Article history: Received 3 February 2012 Accepted 21 August 2012 Available online 31 August 2012 Keywords: VLSI routing Approximation algorithms MAX SNP-hardness Steiner trees The internal Steiner tree problem Design and analysis of algorithms

abstract Given a graph G = (V , E ) with a cost function c : E → R+ and a vertex subset R ⊂ V , an internal Steiner tree is a Steiner tree that contains all the vertices in R, and such that each vertex in R must be an internal vertex. The internal Steiner tree problem involves finding  an internal Steiner tree T whose total cost (u,v)∈E (T ) c (u, v) is the minimum. In this paper, we first show that the internal Steiner tree problem is MAX SNP-hard. We then present a (2ρ + 1)approximation algorithm for solving the problem on complete graphs, where ρ is an approximation ratio for the Steiner tree problem. Currently, the best-known ρ is ln 4 +ϵ < 1.39. Moreover, for the case where the cost of each edge is restricted to being either 1 or 2, we present a 79 -approximation algorithm for the problem. © 2012 Elsevier Inc. All rights reserved.

1. Introduction Given a graph G = (V , E ) with a cost (or distance) function c : E → R+ , and a vertex subset R ⊆ V , a Steiner tree is a connected and acyclic subgraph of G that contains all the vertices in R. The vertices in R are terminals, and the vertices in V \ R are Steiner (or optional) vertices. The cost of a Steiner tree equals the sum of the costs of all the edges in the tree. The Steiner tree problem (STP) involves finding a Steiner tree with the minimum cost in G [10,13,22]. It has been shown that the decision version of this problem

✩ An extended abstract of this paper appeared in Proceedings of the 4th International Conference on Theory and Applications of Models of Computation (TAMC), Lecture Notes in Computer Science 4484, pp. 274–283, 2007, under the title ‘‘On the internal Steiner tree problem’’. ✩✩ This work was supported in part by the National Science Council under grant NSC 94-2213-E-006-073.



Corresponding author. E-mail addresses: [email protected] (C.-W. Huang), [email protected] (C.-W. Lee), [email protected] (H.-M. Gao), [email protected] (S.-Y. Hsieh). 0885-064X/$ – see front matter © 2012 Elsevier Inc. All rights reserved. doi:10.1016/j.jco.2012.08.005

28

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

a

b

c

Fig. 1. A graph and its Steiner trees in which the black vertices represent the terminals: (a) a graph, (b) a non-internal Steiner tree, (c) an internal Steiner tree.

is NP-complete [24]. Numerous variants of the Steiner tree problem are proposed in the literature: for example, the Steiner tree problem over a special metric space (the Euclidean metric [16] and the rectilinear metric [17]), the terminal Steiner tree problem [9,11,15,28–30], and the partial terminal Steiner tree problem [20]. Interested readers may refer to [3–6,12,19,24,28,32] for some algorithmic results, including hardness proofs and approximation algorithms with their performance analyses. The Steiner tree problem and its variants have been the focus of a great deal of research because they have applications in many practical problems, such as VLSI global and local routing, network routing, telecommunications, wireless communications, and transportation [8,10,13,14,18,22,23,25]. Given a complete graph G = (V , E ) with a cost function c : E → Q≥ 1 and two proper subsets R ⊂ V and R′ ⊆ R, Hsieh and Gao [20] studied the partial terminal Steiner tree problem. This problem involves finding a minimum-cost Steiner tree that contains all the vertices in R, and such that all the vertices in R′ must be leaves. In the special case where R = R′ , i.e., all the vertices of R must be leaves, the problem is exactly the same as the terminal Steiner tree problem or the full Steiner tree problem [9,29]. On the other hand, given a complete graph G = (V , E ) with a cost function c : E → R+ and two subsets R and R′ satisfying R′ ⊂ R ⊆ V , the selected internal Steiner tree problem (SISTP) involves finding a minimum-cost Steiner tree that contains all the vertices in R, such that each vertex in R′ must be an internal vertex and each vertex in R \ R′ can be an internal vertex or a leaf. Hsieh and Yang [21] presented a 2ρ -approximation algorithm for SISTP, where ρ is the best-known approximation ratio of the Steiner tree problem. Li et al. [27] presented a (ρ + 1)-approximation algorithm for solving SISTP; however, an additional constraint |R \ R′ | ≥ 2 is required for this method. In this paper, we study the following variant of the Steiner tree problem. Given a graph G = (V , E ) with a cost function c : E → R+ and a subset R ⊂ V with |V \ R| ≥ 2, an internal Steiner tree is a Steiner tree that contains all the vertices in R, and such that each vertex in R must be an internal vertex. The internal Steiner tree problem (ISTP) involves finding an internal Steiner tree T whose cost  (u,v)∈E (T ) c (u, v) is the minimum. We call such an optimal tree a minimum internal Steiner tree. Note that if |R| = 1 and |V | ≤ 2, each vertex v ∈ V has at most one neighbor; hence, there is no solution to the problem because an internal vertex must have two or more neighbors. If |R| = 1 and |V | ≥ 3, there is a trivial solution that finds the first two smallest cost edges incident to the unique terminal in G. Hereafter, we assume that |R| ≥ 2 and |V \ R| ≥ 2 because, under this assumption, at least one internal Steiner tree is a path whose internal vertices are all in R and whose end-vertices are two vertices in V \ R (Steiner vertices). Fig. 1 illustrates a graph and its Steiner trees. Fig. 1(a) shows a weighted complete graph K5 with R = {c , e}; Fig. 1(b) shows a Steiner tree of the graph in (a), which is not an internal Steiner tree; and Fig. 1(c) illustrates an internal Steiner tree of the given graph. The internal Steiner tree problem has the following practical application. In the later stages of VLSI design, an engineering change order (ECO) is issued to request design changes in order to adapt a new specification, meet design constraints (e.g., timing), or correct logical and/or technological problems in the circuit. Engineers usually try to modify the existing solution incrementally and keep the design as close as possible to the existing one. In Fig. 2(a), the gray rectangles (viewed as terminals) are the main functional units of the original design. There are also some ancillary functional units (spare cells)

1 Q is a set of non-negative rational numbers. ≥

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

a

b

29

c

Fig. 2. Illustration of the proposed approach for ECO. The layout is updated by several ECO methods with different costs. The goal is to find an optimum solution at the minimum cost.

and hollow rectangles (viewed as Steiners) that can help in updating the design. Ancillary functional units can be moved into or out of the chip arbitrarily, as shown in Fig. 2(b) and (c), respectively. Different designs incur different routing costs; therefore, solving the internal Steiner tree problem would help VLSI designers find the minimum routing cost in the ECO step [26,34]. There are some other practical applications. For example, in some network resource allocation strategies, the specified servers (terminals) are only allowed to act as transmitters; and in a sensor network, some nodes might be very cheap devices that can receive, but cannot transmit. Therefore, the terminals in a Steiner tree for the above applications are restricted to being used as internal vertices. Currently, the best-known approximation algorithm for the Steiner tree problem has an approximation ratio ρ = ln 4 + ϵ < 1.39 [7]. In this paper, we first show that ISTP is MAX SNP-hard. We then present an O(n2 log n + f (n, m))-time (2ρ + 1)-approximation algorithm for solving the problem, where f (n, m) is the time complexity of the best-known approximation algorithm for the Steiner tree problem on an input graph with n vertices and m edges. In addition, for the case where the cost of each edge is restricted to being either 1 or 2, we present a polynomial-time 79 -approximation algorithm for solving the problem. The remainder of this paper is organized as follows: In Section 2, some necessary definitions and notation are introduced. In Section 3, we show that ISTP is MAX SNP-hard. An approximation algorithm for solving the problem is presented in Section 4. In Section 5, we describe a 9 -approximation algorithm when the cost of each edge is restricted to being either 1 or 2. We then 7 summarize our conclusions in Section 6. 2. Preliminaries This paper considers finite, simple, and loopless graphs G = (V , E ), where V and E are the vertex and edge sets of G, respectively. We also use the notation V (G) and E (G) to denote the vertex and edge sets of G, respectively. For an edge e = (u, v), u and v are end-nodes of e. When u and v are the end-nodes of an edge, they are adjacent to (neighbors of) each other. If a vertex v is an endnode of e, then v is incident to e. The degree of a vertex v in G, denoted by degG (v), is the number of incident edges. A path PG [v0 , vk ] = ⟨v0 , v1 , . . . , vk ⟩ is a sequence of distinct vertices in which any two consecutive vertices are adjacent. We call v0 and vk the end-vertices of the path. The length of a path is the number of edges on the path. The cost of the path is the sum of the cost of the edges on the path. A path may contain a subpath, denoted as ⟨v0 , v1 , . . . , vi , PG [vi , vj ], vj , vj+1 , . . . , vk ⟩, where PG [vi , vj ] = ⟨vi , vi+1 , . . . , vj−1 , vj ⟩. Hereafter, for convenience, we sometimes regard a path as a graph. A subgraph of G = (V , E ) is a graph H = (V ′ , E ′ ) such that V ′ ⊆ V and E ′ ⊆ E. A subgraph of G = (V , E ) induced by V ′ , denoted by G[V ′ ], is an edge-preserving subgraph (V ′ , E ′ ) with V ′ ⊆ V and E ′ = {(x, y) ∈ E |x, y ∈ V ′ }. For graph-theoretic terminologies and notation not mentioned here, please refer to [33]. A tree is a connected graph that has no cycles (i.e., an acyclic graph), and a leaf of a tree is a vertex of degree 1. A non-leaf vertex is called an internal vertex. For a tree T , a subtree of T is a connected subgraph (V ′ , E ′ ) of T , where V ′ ⊆ V and E ′ ⊆ E.

30

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

Definition 1. The cost function c for a graph G = (V , E ) is metric if it satisfies the following four conditions: 1. c (u, u) = 0 for every vertex u ∈ V . 2. c (u, v) ≥ 0 for two arbitrary vertices u and v in V . 3. c (u, v) = c (v, u) for two arbitrary vertices u and v in V . 4. c (u, v) + c (v, w) ≥ c (u, w) for any u, v, w in V (the triangle inequality). Hereafter, we assume that the cost function associated with the given graph is metric. Papadimitrious and Yannakakis [31] introduced natural variants of NP, namely MAX NP and MAX SNP, which are defined syntactically and consist of optimization (rather than decision) problems. MAX SNP is comprised of problems that can be formulated as follows: find a structure S (such as a subgraph) on an input instance G (such as a graph) that maximizes |{x : ψ(x, G, S )}|, where ψ is a first-order expression.2 The authors also showed that all problems in MAX NP and MAX SNP can be solved by constant-factor approximation algorithms. Furthermore, MAX SNP contains problems that are ‘‘complete’’ with respect to some type of polynomial reduction, called the L-reduction, which preserves their approximability. The reduction is formally defined as follows: Definition 2. Let Π1 and Π2 be two optimization problems, and let δ and ω be two positive constants. We say that Π1 L-reduces to Π2 if there are polynomial-time algorithms A1 and A2 (described in detail in (a) and (b), respectively), where A1 is used to transform the instance from Π1 to Π2 , and A2 is used to produce some solution for Π1 such that, for any instance I1 of Π1 , the following conditions are satisfied: (a) Algorithm A1 produces an instance A1 (I1 ) for Π2 such that OPT(A1 (I1 )) ≤ δ · OPT(I1 ), where OPT(I1 ) and OPT(A1 (I1 )) represent the costs of the optimal solutions of I1 and A1 (I1 ), respectively. (b) Given any solution of A1 (I1 ) with cost2 , Algorithm A2 produces a solution for I1 of Π1 with cost1 in polynomial time such that |cost1 − OPT(I1 )| ≤ ω · |cost2 − OPT(A1 (I1 ))|. A problem is said to be MAX SNP-hard if it satisfies one of the following conditions:

• Every MAX SNP problem L-reduces to the problem, but the problem itself may not be MAX SNP. • A MAX SNP-hard problem can L-reduce to the problem. Therefore, we can show that a problem is MAX SNP-hard by providing an L-reduction from some MAX SNP-hard problem to it. Arora et al. [1] proved that P = NP if any MAX SNP-hard problem can be solved by a polynomial-time approximation scheme3 (PTAS). In other words, it is very unlikely that a MAX SNP-hard problem can be solved by a PTAS. Consider an NP-complete optimization problem Π and an algorithm A that, for any instance I of Π , returns a feasible solution S of I. Let C be the cost of S , C ∗ be the cost of an optimal solution of I, and ∗ n be the input size of I. We say that A has an approximation ratio of r (n) if max( CC∗ , CC ) ≤ r (n). We also call an algorithm that achieves an approximation ratio of r (n) an r (n)-approximation algorithm; and we say that Π can be approximated with ratio r (n) > 1 if there exists an r (n)-approximation algorithm for Π .

2 Let Π be a set of relation symbols. If R ∈ Π is a k-ary relation symbol and t , . . . , t are terms, then the expression 1 k R(t1 , . . . , tk ) is called an atomic expression. A first-order expression is defined inductively as follows. First, any atomic expression is a first-order expression. If φ and ψ are expressions, then so are ¬φ, (φ∨ψ), and (φ∧ψ). Finally, if φ is a first-order expression, and x is any variable, then (∀xφ) is also a first-order expression. 3 A polynomial-time approximation scheme is a family of polynomial-time algorithms in which, for each ϵ > 0, there is a member of the family that achieves an approximation ratio of 1 + ϵ .

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

a

31

b

Fig. 3. An execution of Algorithm A1 : (a) an instance I1 of STP(1, 2); (b) A1 (I1 ).

Fig. 4. An algorithm for transforming the input instance from STP(1, 2) to ISTP.

3. The MAX SNP-hardness result In the Steiner tree problem, if we restrict the co-domain of the cost function to {1, 2}, then the restricted Steiner tree problem is called a (1, 2)-Steiner tree problem (STP(1, 2)). Lemma 1 ([5]). STP(1, 2) is MAX SNP-hard. Given a graph G = (V , E ) with a cost function c : E → R+ , define c (G) = e∈E c (e). A vertex v in a Steiner tree T is said to be a leaf-terminal if v ∈ R and v is also a leaf in T , i.e., degT (v) = 1. Given a Steiner tree T , a vertex v ∈ V \ T is called an auxiliary vertex. Next, we prove that ISTP is MAX SNP-hard by providing an L-reduction from STP(1, 2) to ISTP (see Fig. 3). For the L-reduction, we present two polynomial-time algorithms, A1 and A2 , as shown in Figs. 4 and 5, respectively.



Lemma 2. OPT(A1 (I1 )) ≤ 2OPT(I1 ). Proof. Let TS∗ be a minimum Steiner tree of I1 , and let r1 , r2 , . . . , rq , where q ≤ k, be the leaf-terminals of TS∗ . According to Algorithm A1 (I1 ), there are q auxiliary edges incident to r1 , r2 , . . . , rq in TS∗ , so we obtain an internal Steiner tree of A1 (I1 ) (=I2 ) because each terminal is now an internal vertex of the

32

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

Fig. 5. The algorithm for generating a feasible solution of I1 from a feasible solution of I2 .

resulting tree. Therefore, OPT(A1 (I1 )) ≤ OPT(I1 ) +

≤ OPT(I1 ) + ≤ OPT(I1 ) +

q n2 k n2 1 n OPT(I1 )

≤ OPT(I1 ) + n   1 OPT(I1 ) = 1+ n

≤ 2OPT(I1 )

◃ by n ≥ 2.



(1)

For an acyclic subgraph T in A1 (I1 ) (=I2 ), let AV (T ) = AV ∩ V (T ), and let av(T ) = |AV (T )|. We also use the symbol ‘‘⊕’’ to represent an operation that adds an edge to the given tree. The following lemmas are useful for L-reduction. Lemma 3. If TI∗ is a minimum internal Steiner tree of I2 , then TI∗ contains at least one auxiliary vertex, i.e., AV (TI∗ ) ̸= ∅, and each auxiliary vertex must be a leaf in TI∗ . Proof. Suppose, by contradiction, that TI∗ is a minimum internal Steiner tree of I2 and AV (TI∗ ) = ∅. Let v be a leaf of TI∗ . Since TI∗ is an internal Steiner tree, v is not a terminal. Moreover, the neighbor of v in TI∗ must be a terminal; otherwise, we could delete v from TI∗ to obtain another internal Steiner tree with a lower cost than c (TI∗ ). Let rj be the terminal adjacent to v in TI∗ . Then, (TI∗ − (v, rj )) ⊕ (aj , rj ) is an internal Steiner tree with a lower cost than c (TI∗ ) because c (aj , rj ) = n12 < 1 ≤ c (v, rj ). However, since this contradicts the assumption that TI∗ is a minimum internal Steiner tree, TI∗ must contain at least one auxiliary vertex. Moreover, according to Step 2 of Algorithm A1 (I1 ), each auxiliary vertex must be a leaf in TI∗ .  Lemma 4. If TS∗ is a minimum Steiner tree of I1 , then TS∗ contains at least one leaf-terminal. Proof. Suppose, by contradiction, that TS∗ does not contain a leaf-terminal. Then, every leaf in TS∗ is non-terminal. By simply deleting an arbitrary leaf from TS∗ , we can obtain a Steiner tree with a lower cost, which leads to a contradiction. 

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

33

Lemma 5. Suppose that TI∗ is a minimum internal Steiner tree of I2 . If we delete each auxiliary vertex from TI∗ , the resulting graph will be a minimum Steiner tree of I1 . Proof. By Lemma 3, AV (TI∗ ) ̸= ∅. Let AV (TI∗ ) = {ai1 , ai2 , . . . , aip }, and let ai1 , ai2 , . . . , aip be leaves of TI∗ . Then, TI∗ can be represented by T ⊕ (ai1 , ri1 ) ⊕ (ai2 , ri2 ) ⊕ · · · ⊕ (aip , rip ), where T is a Steiner tree of I1 . Suppose, by contradiction, that T is not a minimum Steiner tree. Let TS∗ be a minimum Steiner tree of I1 . By Lemma 4, TS∗ contains at least one leaf-terminal. Let rj1 , rj2 , . . . , rjq be leaf-terminals in TS∗ , and let TI = TS∗ ⊕ (aj1 , rj1 ) ⊕ (aj2 , rj2 ) ⊕ · · · ⊕ (ajq , rjq ). Clearly, TI is an internal Steiner tree of I2 . Thus, since the cost of each edge in T and TS∗ belongs to {1, 2} and c (TS∗ ) < c (T ), we have c (T ) − c (TS∗ ) ≥ 1.

(2)

Moreover, according to Algorithm A1 ,



c (e) =

e∈AE

k n2



1 n

.

(3)

According to Inequalities (2) and (3), c (TI ) = c (TS∗ ) + c (aj1 , rj1 ) + c (aj2 , rj2 ) + · · · + c (ajq , rjq ) =

q

c (TS∗ ) + l=1 c (ajl , rjl ) ≤ c (TS∗ ) + e∈AE c (e) ≤ c (TS∗ ) + 1n < c (T ) < c (T ) + c (ai1 , ri1 ) + c (ai2 , ri2 ) + · · · + c (aip , rip ) = c (TI∗ ). However, this contradicts the assumption that TI∗ is a minimum internal Steiner tree of I2 . 



Lemma 6. Algorithm A2 has the following two properties. 1. Given any internal Steiner tree TI (a feasible solution) of I2 = A1 (I1 ), the A2 (TI , I2 ) algorithm will generate a Steiner tree TS (a feasible solution) of I1 . 2. If c (TI ) = cost2 and c (TS ) = cost1 , then cost1 = cost2 − n12 av(TI ). Proof. First, we show that Statement 1 holds. By Algorithm A1 (I1 ), any auxiliary vertex must be a pendent vertex (a vertex with the degree 1) that is not in R. Therefore, if an internal Steiner tree TI of A1 (I1 ) contains an auxiliary vertex, that vertex must be a leaf. After deleting all the auxiliary vertices (if any exist) using the A2 (TI , I2 ) algorithm, the resulting tree must also be a tree which contains all vertices in R. Hence, it is a Steiner tree. Next, we show that Statement 2 holds according to the following cases. Case 1. AV (TI ) = ∅. According to lines 1–2 of Algorithm A2 , TI will be returned as a feasible solution of I1 . In this case, cost2 = c (TI ) = cost1 − 0, so the result holds. Case 2. AV (TI ) ̸= ∅. In this case, TI contains at least one auxiliary vertex. According to lines 3–5 of Algorithm A2 , a Steiner tree TS of I1 is obtained. Note that TS is obtained from TI by deleting av(TI ) auxiliary edges with the cost n12 . Therefore, cost1 = cost2 − n12 av(TI ).  The hardness of ISTP is shown by Theorem 1. Theorem 1. ISTP is MAX SNP-hard. Proof. We prove the theorem by providing an L-reduction from STP(1, 2) to ISTP. Figs. 4 and 5 detail, respectively, two polynomial-time algorithms A1 and A2 for the L-reduction. Next, we find two constants, δ and ω, to satisfy the conditions of Definition 2. By Lemma 2, we have OPT(A1 (I1 )) ≤ 2OPT(I1 ).

(4)

According to Lemma 6, given any feasible solution TI in A1 (I1 ) with c (TI ) = cost2 , we can get a feasible solution TS in I1 with c (TS ) = cost1 such that cost1 = cost2 − n12 av(TI ). If cost2 = OPT(A1 (I1 )) (i.e., the given feasible solution is a minimum internal Steiner tree TI∗ in A1 (I1 ), then Algorithm A2 will delete all auxiliary vertices of TI∗ and return a Steiner tree of I1 ). According to Lemma 5, this Steiner tree is also a minimum Steiner tree TS∗ in I1 , i.e., cost1 = OPT(I1 ). In this special case, we have |cost1 − OPT(I1 )| = 0 = |cost2 − OPT(A1 (I1 ))| and OPT(I1 ) = OPT(A1 (I1 )) −

1 n2

av(TI∗ ).

(5)

34

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

Therefore,

    1  |cost1 − OPT(I1 )| = cost2 − 2 av(TI ) − OPT(I1 ) ◃ by Lemma 6 n     1 1 = cost2 − 2 av(TI ) − (OPT(A1 (I1 )) − 2 av(TI∗ )) ◃ by (5) n n     1 1 = cost2 − OPT(A1 (I1 )) + 2 av(TI∗ ) − 2 av(TI ) n n   1  1 ∗  ≤ |cost2 − OPT(A1 (I1 ))| +  2 av(TI ) − 2 av(TI ) n n   1  1 ∗   = |cost2 − OPT(A1 (I1 ))| +  2 av(TI ) − 2 av(TI ) n n     1 = |cost2 − OPT(A1 (I1 ))| + cost2 − cost1 − 2 av(TI∗ ) ◃ by Lemma 6 n = |cost2 − OPT(A1 (I1 ))| + |cost2 − cost1 − (OPT(A1 (I1 )) − OPT(I1 ))| ◃ by (5) = |cost2 − OPT(A1 (I1 ))| + |cost2 − OPT(A1 (I1 )) + (OPT(I1 ) − cost1 )| ≤ |cost2 − OPT(A1 (I1 ))| + |cost2 − OPT(A1 (I1 ))| ◃ byOPT(I1 ) ≤ cost1 = 2|cost2 − OPT(A1 (I1 ))|. According to (4) and (6), we can set δ = ω = 2. Therefore, the result holds.

(6)



4. An approximation algorithm In this section, we present an approximation algorithm, called AISTP , for solving ISTP. Let ASTP denote the best-known approximation algorithm for STP with the approximation ratio ρ = ln 4 + ϵ < 1.39 [7], and let SA = (VA , EA ) be the Steiner tree returned by ASTP . Recall that |V (G) \ R| ≥ 2 to ensure that the solution of ISTP exists. Our algorithm first applies ASTP to obtain a Steiner tree SA = (VA , EA ), and then transforms it into an internal Steiner tree. Let T be a Steiner tree of the instance I = (G, R, c ) in ISTP. The following property helps our approximation algorithm transform SA into an internal Steiner tree. Lemma 7. Suppose that T is a Steiner tree of the instance I = (G, R, c ) for ISTP in which |V (T ) \ R| ≥ 2. If v is a leaf-terminal of T , then there exists an internal vertex αv ∈ V (T ) such that one of the following two conditions holds: (1) degT (αv ) = 2 and αv ̸∈ R; or (2) degT (αv ) ≥ 3. Proof. If neither Condition (1) nor Condition (2) holds, then the resulting tree T is a path ⟨v, v1 , v2 , . . . , vt −1 ⟩ such that v, v1 , v2 , . . . , vt −2 are all in R. Then, |V (T ) \ R| ≤ 1 < 2, which contradicts the assumption that |V (T ) \ R| ≥ 2.  Our approximation algorithm for the internal Steiner tree problem is presented in Fig. 6. The two vertices αv and βv selected by the algorithm for each leaf-terminal v are called the critical vertex of v and the target vertex of v , respectively. These vertices help us transform a leaf-terminal into an internal vertex by adding (v, βv ) and deleting (αv , βv ). Next, we prove several properties derived by executing Algorithm AISTP . They are useful for the analysis of the approximation ratio. Lemma 8. Assume that v is a leaf-terminal of the current tree T selected for processing in an iteration of the for-loop of Step 2. Then, the following statements hold: 1. degT (αv ) will be reduced by 1 after the iteration. 2. degT (βv ) will be unchanged after the iteration. 3. degT (v) will be increased by 1, and fixed at 2 until the algorithm terminates.

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

35

Fig. 6. The approximation algorithm for the internal Steiner tree problem.

Proof. In the for-loop of Step 2 of the AISTP algorithm, we determine the critical vertex αv and the target vertex βv . Since edge (αv , βv ) is deleted, degT (αv ) is reduced by 1. Moreover, because edge (v, βv ) is added and edge (αv , βv ) is deleted, degT (βv ) remains unchanged. Note that degT (v) is increased by 1 because edge (v, βv ) is added. Since v ∈ R and the current degree of v is 2, by (a1) of the algorithm, v will not be selected as a critical vertex of the other vertices in the remaining iterations. However, if v is selected as a target vertex of some vertex, then according to statement 2, the degree of v will be unchanged and fixed at 2 until the algorithm terminates.  A path PG [v0 , vk ] is said to be extended from a path P ′ G [v0 , vk ] = ⟨v0 , v1 , v2 , . . . , vk ⟩ if PG [v0 , vk ] = ⟨v0 , PG0 [v0 , v1 ], v1 , PG1 [v1 , v2 ], v2 , PG2 [v2 , v3 ], v3 , . . . , vk−1 , PGk−1 [vk−1 , vk ], vk ⟩, where PGi−1 [vi−1 , vi ] for 1 ≤ i ≤ k is a subpath of PG [v0 , vk ]; i.e., the path PG [v0 , vk ] contains all vertices of P ′ G [v0 , vk ]. The path also retains the relative order of the vertices in P ′ G [v0 , vk ] as v0 v1 v2 ··· vk when traversing PG [v0 , vk ] from v0 to vk . Two paths are said to be edge-disjoint if they do not have a common edge. A set of paths is said to be pairwise edge-disjoint if any two of them are edge-disjoint. Lemma 9. Suppose that v0 is a leaf-terminal of SA , and vk is the critical vertex of v0 selected by Algorithm AISTP , i.e., αv0 = vk . Let PSA [v0 , vk ] = ⟨v0 , v1 , . . . , vk ⟩ be a path of SA . Then, during the execution of

36

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

Algorithm AISTP , before v0 is processed, there always exists a path PT [v0 , vk ] in the current tree T , which is extended from PSA [v0 , vk ] such that the following properties hold4 : 1. The length of PT [v0 , vk ] is at least k. 2. If V (PT [v0 , vk ]) \ V (PSA [v0 , vk ]) ̸= ∅, then the vertices in V (PT [v0 , vk ]) \ V (PSA [v0 , vk ]) are all in R, and each vertex in V (PT [v0 , vk ]) \ V (PSA [v0 , vk ]) has a fixed degree of 2 until the algorithm terminates. Proof. We prove the lemma by induction on the number of leaf-terminals h, which the algorithm processes before v0 . The base case for h = 0 clearly holds. Assume that the result also holds when h = l. We now consider the current tree T with h > l leaf-terminals and the (l + 1)th leaf-terminal w0 (̸=v0 ), which is now ready for processing by the algorithm. By the induction hypothesis, there is a path connecting v0 and vk in T , denoted by PT [v0 , vk ] = ⟨u0 , u1 , u2 , . . . , uq−1 , uq ⟩, where u0 = v0 and uq = vk , such that PT [v0 , vk ] is extended from PSA [v0 , vk ] and Properties 1 and 2 both hold. By the algorithm, the condition under which the structure of PT [v0 , vk ] will be modified is that ui for some i ∈ {1, 2, . . . , q} is the critical vertex of w0 , and one of its neighbors in PT [v0 , vk ] is the target vertex of w0 . Therefore, if no vertex in {u1 , u2 , . . . , uq } is selected as the critical vertex of w0 , then the result holds trivially. Otherwise, PT [v0 , vk ] contains the critical vertex of w0 . Assume that ui is the critical vertex of w0 . According to the algorithm, there must be a path PT [w0 , ui ] = ⟨w0 , w1 , . . . , wt , ui ⟩ such that degT (w1 ) = degT (w2 ) = · · · = degT (wt ) = 2 and w0 , w1 , . . . , wt ∈ R. Moreover, it is not difficult to verify that PT [w0 , ui ] and PT [v0 , vk ] are edge-disjoint and only share one common vertex ui . We have the following two cases: Case 1. ui is the critical vertex and ui−1 is the target vertex of w0 . Then, a new path ⟨u0 , u1 , . . . , ui−1 , w0 , w1 , w2 , . . . , wt , ui , ui+1 , . . . , uq ⟩ can be obtained after w0 is processed. Case 2. ui is the critical vertex and ui+1 is the target vertex of w0 . Then, a new path ⟨u0 , u1 , . . . , ui , w0 , w1 , w2 , . . . , wt , ui+1 , ui+2 , . . . , uq ⟩ can be obtained after w0 is processed. According to the above cases, PT [v0 , vk ] is clearly a path extended from PSA [v0 , vk ] with a length at least k. Note that the added vertices w0 , w1 , w2 , . . . , wt are all in R. Moreover, by Lemma 8, wi for 0 ≤ i ≤ t has a fixed degree of 2 until the algorithm terminates. Therefore, the result holds.  During the execution of Algorithm AISTP , the SA tree is modified in each iteration. Recall that the critical vertex αv is selected by some leaf-terminal v in each iteration. Therefore, all leaf-terminals have corresponding critical vertices. Lemmas 10 and 11 state that the paths PSA [v, αv ] between v and αv in SA for all leaf-terminals v are pairwise edge-disjoint. Lemma 10. Suppose that u and v are two leaf-terminals of SA such that u is selected before v for processing by the AISTP algorithm. Then, the two paths PSA [u, αu ] and PSA [v, αv ] are edge-disjoint. Proof. We prove this lemma by contradiction. Assume that there exist common edges on PSA [u, αu ] and PSA [v, αv ] in SA . Let w be the nearest vertex to u among all the end-vertices of those common edges. There are in total seven situations depending on the locations of u, v, αu , and αv in SA , as shown in Fig. 7. Note that w ̸= αu ; otherwise, PSA [u, αu ] and PSA [v, αv ] are edge-disjoint. Case 1. w ̸= αv (see also Fig. 7(a)–(e)). Note that it is possible for αu = αv in (a)–(d). According to Lemma 9, the paths PSA [u, αu ] and PSA [v, αv ] can be extended such that the properties described in Lemma 9 hold. This implies that the degree of w is at least 3 (thereby satisfying Condition (2) of Lemma 7) just before u is processed; thus, the critical vertex for u should be w . However, this contradicts the fact that αu (̸=w) is the critical vertex for u. Case 2. w = αv (see Fig. 7(f) and (g)). Suppose that T is the current tree just before v is processed. Since w is the critical vertex of v , then either degT (w) = 2 and w ̸∈ R (satisfying Condition (1) of Lemma 7) or degT (w) ≥ 3 (satisfying Condition (2) of Lemma 7). Since the degree of each non-leaf terminal cannot be increased during the execution of the algorithm and u is handled before v , vertex w must satisfy either Condition (1) or Condition (2) of Lemma 7 at the time

4 Note that P [v , v ] is a path in S and P [v , v ] is a path in T . SA 0 k A T 0 k

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

37

u

u

v

u

v

v

v

u

u

v

v

u

v

u

Fig. 7. An illustration of the proof of Lemma 10.

at which u is processed. Therefore, according to the algorithm, αu should be w because u is processed before v . This contradicts the fact that w ̸= αu . By combining the above two cases, we conclude that PSA [u, αu ] and PSA [v, αv ] are edge-disjoint.



We can generalize Lemma 10 to obtain the following lemma. Lemma 11. Let v1 , v2 , . . . , vl be the order of the leaf-terminals of SA selected for processing by the AISTP algorithm. Then, the paths PSA [v1 , αv1 ], PSA [v2 , αv2 ], . . . , PSA [vl , αvl ] are pairwise edge-disjoint. Lemma 12. Suppose that v is a leaf-terminal of SA . Then, the target vertex βv cannot belong to PSA [v, αv ]. Proof. Let T be the current tree just before v is processed by the AISTP algorithm. According to Step 2(b) of the algorithm, it is clear that βv does not belong to PT [v, αv ]. Assume that PT [v, αv ] = ⟨v0 , v1 , v2 , . . . , vk ⟩, where v0 = v and vk = αv . By Lemma 9(2), the vertices of PSA [v, αv ] are contained in PT [v, αv ] and the relative order of the vertices in PSA [v, αv ] is retained in PT [v, αv ], i.e., PSA [v, αv ] = ⟨v0 , vi1 , vi2 , . . . , vij , vk ⟩, where 0 < i1 < i2 < · · · < ij < k. Therefore, βv is not a vertex in PSA [v, αv ].  Lemma 13. Let P = ⟨v1 , v2 , . . . , vk−1 , vk ⟩ be a path of a graph G = (V , E ) with a metric cost function c : E → R+ , and let P ′ = ⟨v1 , v2 , . . . , vk−2 , vk−1 ⟩ be a subpath of P. Then, c (v1 , vk ) − c (vk−1 , vk ) ≤ k−2 c (P ′ ), where c (P ′ ) = j=1 c (vj , vj+1 ). Proof. Since c is metric, we have c (v1 , vk ) − c (vk−1 , vk ) ≤ c (v1 , vk−1 ), c (v1 , vk−1 ) − c (vk−2 , vk−1 ) ≤ c (v1 , vk−2 ), c (v1 , vk−2 ) − c (vk−3 , vk−2 ) ≤ c (v1 , vk−3 ),

.. . c (v1 , v4 ) − c (v3 , v4 ) ≤ c (v1 , v3 ),

and

c (v1 , v3 ) − c (v2 , v3 ) ≤ c (v1 , v2 ). Please see Fig. 8 for an illustration. We sum all the inequalities and obtain the following inequality: c (v1 , vk ) − c (vk−1 , vk ) ≤ c (v1 , v2 ) + c (v2 , v3 ) + · · · + c (vk−3 , vk−2 ) + c (vk−2 , vk−1 ) = c (P ′ ). 

38

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

v3

vk-1

v2

vk

v1 Fig. 8. An illustration of the proof of Lemma 13.

We now prove the correctness and the approximation ratio of the AISTP algorithm. Theorem 2. Algorithm AISTP is a (2ρ + 1)-approximation algorithm for the internal Steiner tree problem on complete graphs, where ρ is the approximation ratio of the best-known algorithm for the Steiner tree problem. Proof. If SA is an internal Steiner tree, Step 1 of the algorithm will return it as the solution. Otherwise, Step 2 will transform SA into a tree T with |V (T ) \ R| ≥ 2 so that Lemma 7 can be applied to transform each leaf-terminal into an internal vertex. Hence, the algorithm is correct. We now analyze the approximation ratio of the AISTP algorithm. Let TI∗ and TS∗ be a minimum internal Steiner tree and a minimum Steiner tree of G, respectively. Since we use a ρ -approximation algorithm to find a Steiner tree SA and transform it into an internal Steiner tree, we have c (SA ) ≤ ρ c (TS∗ ).

(7)

Since TI∗ is also a Steiner tree for R, c (TS∗ ) ≤ c (TI∗ ).

(8)

By Eqs. (7) and (8), c (SA ) ≤ ρ c (TI∗ ).

(9)

Recall that in Step 2 of Algorithm AISTP , we add the edges to E (SA ) when |V (SA ) \ R| ≤ 1. Let µ denote the total cost of the added edges. If no edge is added in this case, then µ = 0. Let TI be an internal Steiner tree returned by Algorithm AISTP , and let c (PSA [v, αv ]) be the sum of the costs of the edges in PSA [v, αv ]. By the construction of TI using the algorithm, we have the following inequalities: c (TI ) ≤ c (SA ) +

 (c (v, βv ) − c (αv , βv )) + µ

◃ by the construction of Algorithm AISTP

v∈R

≤ c (SA ) +

 (c (PSA [v, αv ])) + µ

◃ by Lemmas 12 and 13

v∈R

≤ c (SA ) + c (SA ) + µ ◃ by Lemma 11 = 2c (SA ) + µ ≤ 2ρ c (TI∗ ) + µ ◃ by Eq. (9). c (T )

µ

Hence, c (T ∗I ) ≤ 2ρ + c (T ∗ ) . I I µ µ We now bound the value c (T ∗ ) . If |V (T ) \ R| ≥ 2, then µ = 0 = c (T ∗ ) . Otherwise, if |V (T ) \ R| ≤ I I ∗ 1, then µ > 0. Obviously, a minimum internal Steiner tree TI must contain at least one edge (respectively, two edges) between V (T )\R and V (T ) when |V (T )\R| = 1 (respectively, |V (T )\R| = 0); otherwise, an internal Steiner tree cannot be constructed. Since µ is the lowest cost for the added µ edges, µ ≤ c (TI∗ ). Therefore, c (T ∗ ) ≤ 1 and the approximation ratio of the algorithm is equal to 2ρ + 1.

I



C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

39

In the remainder of this section, we analyze the time complexity of our approximation algorithm. Clearly, Step 1 can be implemented to run in f (n, m) time, where f (n, m) is the time complexity of the best-known approximation algorithm for the Steiner tree problem; and n and m are the numbers of vertices and edges, respectively, of the given graph. In Step 2, adding the needed vertices and edges to T can be implemented to run in O(m log n) time by sorting the costs of m edges. Furthermore, substep (a) can be implemented to run in O(|V (T )| + |E (T )|) time using a depth-first search, so the overall time complexity of this substep is O(|R|(|V (T )| + |E (T )|)) = O(n2 ). Substep (b) can be implemented  to run in O(degT (v)) time, so the overall time complexity of this substep is O(n) because O( v∈R degT (v)) (=O(|E (T )|)) and |E (T )| = O(n). Similarly, the overall time complexity of substeps (c) and (d) is O(n). Therefore, Algorithm AISTP can be implemented to run in O(m log n) + O(n2 ) + f (n, m) time. Since an input graph is a complete graph, the time complexity is thus O(n2 log n) + f (n, m). Theorem 3. Algorithm AISTP can be implemented to run in O(n2 log n) + f (m, n) time, where f (n, m) is the time complexity of the best-known approximation algorithm for the Steiner tree problem in an input graph with n vertices and m edges. 5. A 97 -approximation algorithm for ISTP(1, 2) We restrict the co-domain of the cost function to the range R+ to {1, 2}. Then, the internal Steiner tree problem is called the (1, 2)-Internal Steiner Tree Problem (ISTP(1, 2)). A (1, 2)-internal Steiner tree with the minimum cost is called a minimum (1, 2)-internal Steiner tree. For any instance I of ISTP(1, 2), the approximation ratio of an approximation solution is clearly within 2. In this section, we present a 79 -approximation algorithm for ISTP(1, 2) using the heuristics of the Traveling Salesman Problem (TSP). The following lemmas are useful to our method. Lemma 14. Let T be a minimum (1, 2)-internal Steiner tree and let v be an internal vertex in T . Then, the following statements hold. 1. If v is a terminal (i.e., v ∈ R), then at most one leaf will be adjacent to v . 2. If v is a Steiner vertex, then no leaf will be adjacent to it. Proof. Note that if there is a leaf adjacent to v , then it cannot be a terminal because T is an internal Steiner tree. First, we show that Statement 1 holds. Suppose, by contradiction, that there are l ≥ 2 leaves adjacent to v ∈ R. By deleting any l − 1 leaves, we can obtain an internal Steiner tree T ′ with c (T ′ ) < c (T ) because the cost of each edge is 1 or 2, which contradicts the fact that c (T ) is the minimum. Next, we show that Statement 2 holds. Suppose, by contradiction, that there are l ≥ 1 leaves adjacent to v . By deleting all l leaves, we can obtain an internal Steiner tree T ′ with c (T ′ ) < c (T ), which contradicts the fact that c (T ) is the minimum.  Lemma 15. Let T be a minimum (1, 2)-internal Steiner tree and let v be an internal vertex in T . If v is a Steiner vertex, then there exists a minimum (1, 2)-internal Steiner tree T ′ that does not contain v . Proof. Suppose that degT (v) = m, where m ≥ 2. If we regard v as the root of T , then v has m children t1 , t2 , . . . , tm . Let T1 , T2 , . . . , Tm be m subtrees of T rooted at t1 , t2 , . . . , tm , respectively. We first show that each Ti contains at least two vertices. Suppose, by contradiction, that there is a Tj for some 1 ≤ j ≤ m with |V (Tj )| = 1. Let u be a unique node in Tj . If u is a terminal, then this assumption contradicts the fact that T is an internal Steiner tree. However, if u is a Steiner vertex, then, by deleting u from T , we can obtain another internal Steiner tree with a lower cost because c (u, v) ̸= 0. This contradicts the fact that c (T ) is the minimum. Therefore, each Ti must contain at least two vertices. Since each subtree contains at least one leaf, we can arbitrarily select a leaf li from each Ti , and let ui be the parent of li for 1 ≤ i ≤ m. By deleting 2m − 2 edges (v, ti ) for 1 ≤ i ≤ m and (ui , li ) for 2 ≤ i ≤ m − 1, and adding m − 1 edges (tm−1 , tm ) and (ti , ui+1 ) for 1 ≤ i ≤ m − 2, we obtain a (1, 2)-internal Steiner tree T ′ (see Fig. 9). Since the increased cost of adding edges to T is at most 2(m − 1) and the reduced cost of deleting edges from T is at least 2(m − 1), c (T ′ ) cannot be increased, which implies that T ′ is a minimum (1, 2)-internal Steiner tree that does not contain v . 

40

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

v

Fig. 9. An illustration of the proof of Lemma 15.

v

Fig. 10. An illustration of the proof of Lemma 16.

Lemma 16. If T is a minimum (1, 2)-internal Steiner tree with k ≥ 3 leaves, then there exists a minimum (1, 2)-internal Steiner tree T ′ with k − 1 leaves. Proof. Let l1 , l2 , and l3 be three arbitrary leaves in T , and let u1 , u2 , and u3 be three vertices adjacent to l1 , l2 , and l3 , respectively. By Lemma 14, u1 , u2 , and u3 are three distinct vertices (ui ̸= uj for 1 ≤ i, j ≤ 3 and i ̸= j) and they are all terminals. Hence, there exists a vertex v with degT (v) ≥ 3 such that if we regard v as the root of T , then there are three subtrees T1 , T2 , and T3 rooted at three children t1 , t2 , and t3 of v , respectively, where l1 ∈ V (T1 ), l2 ∈ V (T2 ), and l3 ∈ V (T3 ). By deleting two edges, (v, t1 ) and (u2 , l2 ), and adding one edge (t1 , u2 ), we can obtain another (1, 2)-internal Steiner tree T ′ (see Fig. 10). Because the increased cost c (t1 , u2 ) is at most 2 and the reduced cost c (v, t1 ) + c (u2 , l2 ) is at least 2, T ′ is a minimum (1, 2)-internal Steiner tree with k − 1 leaves.  By Lemmas 15 and 16, we have the following result. Lemma 17. There is an optimal solution for ISTP(1, 2), which is a minimum cost path whose internal vertices are all terminals in G and whose end-vertices are two Steiner vertices in G. Before describing our method for approximating ISTP(1, 2), we provide some definitions and notation. Recall that, for a set S ⊂ V (G), G[S ] is the subgraph of G = (V , E ) induced by S. A Hamiltonian cycle (Hamiltonian path) in a graph is a cycle (path) that passes through every vertex of the graph exactly once. For a weighted graph Q and two vertices u and v in Q , let HP Q [u, v] denote a minimum Hamiltonian path (a Hamiltonian path with the minimum cost) in Q with end-vertices u and v ; and let HC Q denote a minimum Hamiltonian cycle (a Hamiltonian cycle with the minimum cost) in Q . Let ri and rj be two arbitrary terminal vertices in R = {r1 , r2 , . . . , rk }, and let u and v be two arbitrary Steiner vertices in G. For convenience, let G′ = G[R ∪ {u, v}]. Then, we have c (HP G[R] [ri , rj ]) + c (u, ri ) + c (v, rj ) ≥ c (HP G′ [u, v]).

(10)

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

41

Fig. 11. Algorithm ISTP(1, 2).

a

b

Fig. 12. An illustration of how lines 3–5 of the AISTP(1,2) algorithm operate: (a) traveling along a Hamiltonian cycle A′G in the clockwise direction; (b) the resulting path PG′ generated after executing lines 3–5 of the algorithm.

Moreover, c (HP G′ [u, v]) + c (u, v) ≥ c (HC G′ ) ⇔ c (HP G′ [u, v]) ≥ c (HC G′ ) − c (u, v).

(11)

Lemma 18. Let T ∗ be a minimum (1, 2)-internal Steiner tree of G. Then, c (T ∗ ) ≥ c (HC G′ ) − 2. Proof. By Lemmas 15 and 16, c (T ∗ ) = c (HP G′ [u, v]). Let ri and rj be two arbitrary vertices in R. Then, c (HP G′ [u, v]) ≥ c (HP G[R] [ri , rj ]) + c (u, ri ) + c (v, rj )

≥ c (HP G′ [u, v]) ◃ by Eq. (10) ≥ c (HC G′ ) − c (u, v) ◃ by Eq. (11) ≥ c (HC G′ ) − 2. Hence, the result holds.



Next, we present an approximation algorithm, called AISTP(1,2) , for ISTP(1, 2), as shown in Fig. 11. Fig. 12 illustrates how lines 3–5 of the AISTP(1,2) algorithm work. The following property obtained from the AISTP(1,2) algorithm is useful for the analysis of the approximation ratio. Lemma 19. c (PG′ ) ≤ c (AG′ ).

42

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

Proof. According to lines 4 and 5 of the AISTP(1,2) algorithm, c (PG′ ) = c (AG′ ) − c (u, u′ ) − c (v, v ′ ) + c (u′ , v ′ )

≤ c (AG′ ).  Theorem 4. Algorithm AISTP(1,2) is a 79 -approximation algorithm for ISTP(1, 2). Proof. Let T ∗ be a minimum (1, 2)-internal Steiner tree of a given instance of ISTP(1, 2). According to Lemmas 18 and 19 and line 2 of the algorithm, we have c (PG′ ) c (T ∗ )

≤ ≤

c (AG′ ) c (HC G′ ) − 2

(HC G′ ) . c (HC G′ ) − 2 8 c 7

Let n′ be the number of vertices in G′ . Clearly, 3 ≤ n′ ≤ c (HC G′ ). Therefore, c (PG′ ) c (T ∗ )

≤ ≤

(HC G′ ) c (HC G′ ) − 2 8 c 7

8 7

·

n′ n′ − 2



9 7

for n′ ≥ 18.

Since n′ = |R| + 2, the approximation ratio of the algorithm is

9 7

for |R| ≥ 16.



Finally, we analyze the time complexity of the AISTP(1,2) algorithm. The time complexity of the algorithm is clearly dominated by line 2, which finds a Hamiltonian cycle of a graph with |R| + 2 vertices. In [2], line 2 of the algorithm is implemented in polynomial time. Hence, the time complexity of the AISTP(1,2) algorithm is polynomial. 6. Concluding remarks In this paper, we prove that the internal Steiner tree problem is MAX SNP-hard. We present a

(2ρ + 1)-approximation algorithm for solving the problem under the metric space. For the case where the cost of each edge is restricted to being either 1 or 2, we also propose a 97 -approximation algorithm for ISTP(1, 2). It would be interesting to find a better (approximation) algorithm for the internal Steiner tree problem. In a future work, we will apply our strategy to some other variants of the classic Steiner tree problem. Acknowledgments The authors would like to thank the anonymous reviewers for their constructive comments and suggestions for improving the quality of this paper. We also thank one reviewer who pointed out that a (1 + ρ)-approximation algorithm [27] for the selected internal Steiner tree problem (SISTP) can be applied to the internal Steiner tree problem. References [1] S. Arora, C. Lund, R. Motwani, M. Sudan, M. Szegedy, Proof verification and the hardness of approximation problems, Journal of the Association for Computing Machinery 45 (1998) 501–555. [2] P. Berman, M. Karpinski, 78 -approximation algorithm for (1, 2)-TSP, in: Proceedings of the Seventeenth Annual ACM–SIAM Symposium on Discrete Algorithm, 2006, pp. 641–648. [3] P. Berman, V. Ramaiyer, Improved approximations for the Steiner tree problem, Journal of Algorithms 17 (3) (1994) 381–408. [4] M. Bern, Faster exact algorithms for Steiner tree in planar networks, Networks 20 (1990) 109–120. [5] M. Bern, P. Plassmann, The Steiner problem with edge lengths 1 and 2, Information Processing Letters 32 (4) (1989) 171–176.

C.-W. Huang et al. / Journal of Complexity 29 (2013) 27–43

43

[6] A. Borchers, D.Z. Du, The k-Steiner ratio in graphs, SIAM Journal on Computing 26 (3) (1997) 857–869. [7] J. Byrka, F. Grandoni, T. Rothvoß, L. Sanità, An improved LP-based approximation for Steiner tree, in: Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, Cambridge, Massachusetts, USA, 5–8 June 2010, pp. 583–592. [8] A. Caldewll, A. Kahng, S. Mantik, I. Markov, A. Zelikovsky, On wirelength estimations for row-based placement, in: Proceedings of the 1998 International Symposium on Physical Design, ISPD, pp. 4–11. [9] Y.H. Chen, C.L. Lu, C.Y. Tang, On the full and bottleneck full Steiner tree problems, in: Proceedings of the 9th Annual International Conference on Computing and Combinatorics, COCOON, in: LNCS, vol. 2697, 2003, pp. 122–129. [10] X. Cheng, D.Z. Du, Steiner Trees in Industry, Kluwer Academic Publishers, Dordrecht, Netherlands, 2001. [11] D.E. Drake, S. Hougardy, On approximation algorithms for the terminal Steiner tree problem, Information Processing Letters 89 (1) (2004) 15–18. [12] D.Z. Du, On component-size bounded Steiner trees, Discrete Applied Mathematics 60 (1995) 131–140. [13] D.Z. Du, J.M. Smith, J.H. Rubinstein, Advance in Steiner Tree, Kluwer Academic Publishers, Dordrecht, Netherlands, 2000. [14] L. Foulds, R. Graham, The Steiner problem in phylogeny is NP-complete, Advances in Applied Mathematics 3 (1982) 43–49. [15] B. Fuchs, A note on the terminal Steiner tree problem, Information Processing Letters 87 (2003) 219–220. [16] M. Garey, R. Graham, D. Johnson, The complexity of computing Steiner minimal trees, SIAM Journal on Applied Mathematics 32 (1977) 835–859. [17] M. Garey, D. Johnson, The rectilinear Steiner problem is NP-complete, SIAM Journal on Applied Mathematics 32 (1977) 826–834. [18] D. Graur, W.H. Li, Fundamentals of Molecular Evolution, second ed., Sinauer Publishers, Sunderland, MA, 2000. [19] S. Hougardy, H.J. Prömel, A 1.598 approximation algorithm for the Steiner tree problem in graphs, in: Proceedings of the 10th Annual ACM–SIAM Symposium on Discrete Algorithms, SODA, 1999, pp. 448–453. [20] S.Y. Hsieh, Huang-Ming Gao, On the partial terminal Steiner tree problem, The Journal of Supercomputing 41 (1) (2007) 41–52. [21] S.Y. Hsieh, S.C. Yang, Approximating the selected-internal Steiner tree, Theoretical Computer Science 381 (1–3) (2007) 288–291. [22] F.K. Hwang, D.S. Richards, P. Winter, The Steiner Tree Problem, in: Annuals of Discrete Mathematics, vol. 53, Elsevier Science Publishers, Amsterdam, 1992. [23] A.B. Kahng, G. Robins, On Optimal Interconnections for VLSI, Kluwer Publishers, 1995. [24] R. Karp, Reducibility among combinatorial problems, in: R.E. Miller, J.W. Thatcher (Eds.), Complexity of Computer Computations, Plenum Press, New York, 1972, pp. 85–103. [25] J. Kim, T. Warnow, Tutorial on phylogenetic tree estimation, Manuscript, Department of Ecology and Evolutionary Biology, Yale University, 1999. [26] Y.L. Li, J.Y. Li, W.B. Chen, An efficient tile-based ECO router using routing graph reduction and enhanced global routing flow, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 26 (2) (2007) 345–358. [27] X. Li, F. Zou, Y. Huang, D. Kim, W. Wu, A better constant-factor approximation for selected-internal Steiner minimum tree, Algorithmica 56 (2010) 333–341. [28] G.H. Lin, G.L. Xue, On the terminal Steiner tree problem, Information Processing Letters 84 (2) (2002) 103–107. [29] C.L. Lu, C.Y. Tang, R.C.T. Lee, The full Steiner tree problem, Theoretical Computer Science 306 (1–3) (2003) 55–67. [30] F.V. Martinez, J.C. de Pina, J. Soares, Algorithms for terminal Steiner trees, in: Proceedings of the 11th Annual International Conference on Computing and Combinatorics, COCOON, in: LNCS, vol. 3595, 2005, pp. 369–379. [31] C.H. Papadimitriou, M. Yannakakis, Optimization, approximation, and complexity classes, in: Proceedings of the 20th ACM Symposium on Theory of Computing, 1988, pp. 229–234. [32] G. Robins, A. Zelikovsky, Improved Steiner tree approximation in graphs, in: Proceedings of the 11th Annual ACM–SIAM Symposium on Discrete Algorithms, SODA, 2000, pp. 770–779. [33] D.B. West, Introduction to Graph Theory, second ed., Prentice Hall, Upper Saddle River, NJ, 2001. [34] H. Xiang, X. Tang, M.D.F. Wong, Min-cost flow-based algorithm for simultaneous pin assignment and routing, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 22 (7) (2003) 870–878.