doi:10.1006rjagm.2000.1088, available online at http:rrwww.idealibrary.com on
A Polynomial Time Approximation Scheme for Optimal ProductRequirement Communication Spanning Trees
Bang Ye Wu
Department of Computer Science and Information Engineering, ShuTe Uni¨ersity, Yen Chau, Kao Shiung, Taiwan 824, Republic of China
Email: bangye@ms16.hinet.net
KunMao Chao
Department of Life Science, National YangMing Uni¨ersity, Taipei, Taiwan 112, Republic of China
Email: kmchao@ym.edu.tw
and
Chuan Yi Tang
Department of Computer Science, National Tsing Hua Uni¨ersity, Hsinchu, Taiwan, Republic of China
Email: cytang@cs.nthu.edu.tw
Received November 2, 1998
Given an undirected graph with nonnegative edge lengths and nonnegative vertex weights, the routing requirement of a pair of vertices is assumed to be the product of their weights. The routing cost for a pair of vertices on a given spanning tree is defined as the length of the path between them multiplied by their routing requirement. The optimal productrequirement communication spanning tree is the spanning tree with minimum total routing cost summed over all pairs of vertices. This problem arises in network design and computational biology. For the special case that all vertex weights are identical, it has been shown that the problem is NPhard and that there is a polynomial time approximation scheme for it. In this paper we show that the generalized problem also admits a polynomial time approximation scheme. 䊚 2000 Academic Press
182 01966774r00 $35.00
Copyright䊚 2000 by Academic Press All rights of reproduction in any form reserved.
1. INTRODUCTION
Consider the following problem in network design. We are given an undirected graph with a nonnegative length on each edge. The vertices may represent the cities and the edges represent the possible links to be built. For each vertex, there is a nonnegative weight representing the population of the city. For any pair of vertices, the routing requirement is assumed to be the product of the weights of the two vertices. The routing cost for a pair of vertices on a given spanning tree is defined as their routing requirement times the length of the path between them. The goal is to find a spanning tree such that the total routing cost summed over all pairs of vertices is the minimum.
The above problem is called the optimal productrequirement communica
Ž .
tion spanning tree PROCT problem. The PROCT problem is a generaliza
Ž . Ž
tion of the minimum routing cost spanning tree MRCT problem also w x.
called the shortest total path length spanning tree problem in 2 , in which the weights on vertices are all identical. Both PROCT and MRCT prob lems are special cases of the optimum communication spanning tree prob lem, in which the routing requirement of a pair of vertices may be any
w x w x
nonnegative value 3 . The MRCT problem is NPhard 2 and a 2ap w x
proximation algorithm was given in 5 . Recently, it was shown that the
Ž .
MRCT problem can be approximated within 4r3 q in polynomial time w x
for any fixed ) 0 6 . More recently, a polynomial time approximation
Ž .
scheme PTAS for the MRCT problem and its possible application to w x
computational biology were presented in 7 . w x
In 8 , two vertexweighted generalizations of the MRCT problem were studied; one is the PROCT problem and the other is the optimal sumre
Ž .
quirement communication spanning tree SROCT problem in which the routing requirement of a pair of vertices is defined to be the sum of their weights. A 1.577approximation algorithm for the PROCT problem and a 2approximation algorithm for the SROCT problem were given in the
w x
paper 8 . Balancing between the total edge weights and the routing costs w x
of spanning trees was also studied. In 9 , an algorithm was given for constructing spanning trees with small routing costs and small total edge weights.
w x
In 7 , a PTAS for the minimum routing cost spanning tree problem, the unweighted version of PROCT, is presented by showing the following properties:
1. The MRCT problem with general inputs is equivalent to the problem with metric inputs a complete graph in which edge lengths obeyŽ the triangle inequality ..
2. A kstar is a spanning tree with at most k internal nodes. The
Ž .
minimum routing cost kstar is a good approximation solution for the metric MRCT problem. Its approximation ratio can be arbitrarily close to 1 as k becomes sufficiently large.
3. For a fixed k, the minimum kstar on a metric can be found in polynomial time.
In fact, the first and the second properties remain true for the PROCT problem. These can be obtained by straightforward generalizations of the previous results and will be shown later in the paper. However, there is no obvious method to generalize the algorithm for the minimum kstar to the weighted case. The core of a kstar is the subtree obtained by deleting all of the leaves of the kstar. The algorithm for an unweighted minimum kstar is to try all possible cores and determine the best connections of the leaves for each core. For a specified core, a configuration is to indicate how many leaves are connected to each internal node. When the core and configuration are fixed, it was shown that the best leaf connection can be found by solving an assignment problem. The number of possible cores is
n ky2 n ky2
Ž ._{k} k , which comes from the Ž ._{k} possible knodes subset and the k possible tree topologies of k nodes. In the unweighted case, the number of
Ž ^{ky1}.
configurations is O n which is the number of ways to partition an integer ny k into k different parts. Therefore, the total time is polyno
Ž ^{3}. mial for fixed k since the assignment problem can be solved in O n time w x1 . However, in the weighted case there are k^{n}^{yk} possible configurations Žthe same as the number of possible connections , hence such an algorithm. will be exponential in time.
w x
In 8 , the 1.577approximation algorithm for the PROCT problem is to find the minimum routing cost 2star. For the minimum 2star with a specified core, it is shown that the best leaf connection can be found by solving a minimum cut problem. Thus, the minimum 2star can be found in polynomial time by trying all of the possible cores. But it is still unknown how to find the minimum kstar when k) 2 in polynomial time. In this paper, we show that the PROCT problem admits a PTAS by a technique that we call scaling and rounding. Scaling the input instances is a technique that has been used to balance the running time and the approximation ratio. For example, Lawler used the scaling technique to develop a PTAS
w x for the knapsack problem 4 .
The paper is organized as follows: In Section 2 we give some definitions and notations. The PTAS for the PROCT problem is presented in Section 3 and the lemmas to show the time complexity and approximation ratio are given in Sections 4, 5, 6, and 7.
2. PRELIMINARIES
Ž . Ž .
For a graph G, V G and E G denote its vertex set and edge set, respectively. In this paper, we assume that the vertex and the edge weight functions are always nonnegative. Let r be a vertex weight function and V
Ž .
be a vertex set. We use r V to denote the total weight of the vertices in V.
Ž . Ž Ž ..
For a graph S, we use r S to denote r V S . The input graph of the PROCT problem is assumed to be simple, undirected, and connected. We use n and R to denote the number of vertices and the total vertex weight of the input graph. It is assumed that there is no zero length edge in the graph. This assumption does not affect the generality of the problem since we can merge two vertices if they are connected by a zero length edge in the metric graph.
Ž .
DEFINITION 1. Let Gs V, E, w , S be a subgraph of G, and i, j g V.
Ž . Ž .
By SP i, j we denote the shortest path from i to j on S. Let w SS s
Ž . Ž . Ž Ž ..
Ýeg EŽS.w e . The distance of i and j in S is d i, jS s w SP i, j . WeS
Ž . Ž .
define d_{G} i, S s min_{jg VŽS. G}d i, j .
DEFINITION 2. The metric closure of G is the complete graph G with
Ž . Ž . Ž .
vertex set V G and edge weight w, where w i, j s d i, j for allG
Ž . i, jg V G .
Ž .
DEFINITION 3. Given a graph Gs V, E with edge weight function w and vertex weight function r, the PROCT problem is to find a spanning
Ž . Ž . Ž . Ž .
tree T of G such that c T, r s Ý_{i, j}_{g V}r i r j d_{T} i, j is the minimum.
The definition of the MRCT problem is the same as that of PROCT except that each vertex weight is restricted to 1.
DEFINITION4. For a graph G, a vertex weight r is canonical if 0F rŽ .¨
Ž . Ž .4
F 1 for every ¨g V G and max¨g VŽG.r _{¨} s 1.
For the PROCT problem, we assume that the input vertex weight is canonical since we can divide each weight by the maximum one in a preprocessing stage.
DEFINITION 5. Let r be a vertex weight of a graph G and q be a positive number. We use q⭈ r to denote the vertex weight function defined
Ž .Ž . Ž .
by q⭈ r ¨ s q = r ¨ for every _{¨}g V.
Let T be any spanning tree of a graph and r , r_{1} _{2} be vertex weight
Ž . ^{2} Ž .
functions. By definition, it is easy to see that c T, q⭈ r s q c T, r for any Ž . Ž .
nonnegative number q. Also, if r_{1} _{¨} F r_{2} ¨ for any vertex _{¨}, then
Ž . Ž .
c T, r2 F c T, r .2
DEFINITION 6. A kstar is a spanning tree with at most k internal nodes. The core of a tree is the subtree obtained by deleting all of the
leaves from the tree, and the edges on a core are called the core edges of the core.
DEFINITION7. Let A be a tree and V a vertex set containing no vertex
Ž .
of A. We use Star A, V to denote the set of trees, in which every tree contains A as a subtree and all vertices in V are leaves of the tree.
3. THE PTAS FOR THE PROCT PROBLEM
A balanced kstar is a special kind of kstar. Similar to the result for the MRCT problem, the minimum routing cost balanced kstar is a good approximate solution. The difficulty of approximating the PROCT is how to find the minimum routing cost kstar. Assume that the vertex weights are all integers. We may find the minimum routing cost kstar of the weighted case by transforming the instance into an unweighted case. For a vertex with weight x, we generate x copies of the vertex and connect the copies by edges of zero length. After the transformation, one may find the
w x
minimum routing cost kstar by the algorithm developed in 7 for the unweighted case. However, the time complexity depends on the total vertex weight instead of the input size.
The key point of our PTAS is to find a kstar whose routing cost approximates the cost of the minimum balanced kstar and whose approxi mation ratio can be arbitrarily close to 1. The approximation is based on a technique that we call scaling and rounding. Let G be a metric graph and
Ž .
A be the core of a balanced kstar. For each vertex _{¨} not in V A we need to determine a vertex in A and connect_{¨} to it. By a selected threshold, we
Ž . Ž .
first divide V G_V A into a light part and a heavy part according to their weights. Then, for each vertex in the heavy part, we enlarge their weights by a scaling factor and round them to integers. When the weights are all integers, the number of configurations is polynomial in the total enlarged weight of the vertices in the heavy parts. Therefore, the best
Ž .
connection with respect to the enlarged weights can be determined by an algorithm similar to the one in the unweighted case. Finally, each vertex in the light part is connected to its closest vertex in A. It will be shown that the approximation ratio and the time complexity are determined by k, the scaling factor, and by the threshold for dividing the vertices into the light and heavy parts. The PTAS is given below.
ALGORITHM. PTAS PROCT.
Input: A graph G with a canonical vertex weight r, a positive number
 1, and two positive integers q and k.
Output: An approximate productrequirement communication spanning tree of G.
Ž . Step 1. Construct the metric closure Gs V, E, w of G.
U U
Step 2. r Step 2 is performed on G. r
For each possible tree A spanning no more than k vertices do
U Ž . 4 Ž .
r assume V A s a ¬ 1 F i F k , k F k, and V _V A s 1 . . .i
4U
ny k r
Ž . Ž . Ž .
Step 2.1. Sort and relabel the vertices in V_V A such that r i F r i q 1 ᭙i
Ž 4.
Step 2.2. Find the maximum j such that r 1 . . . j FR.
4 . Ž
Let VLs 1 . . . j and V s j q 1 . . . n y k andH s r j q 1 ..
Ž . Also let RLs r V .L
Step 2.3. Let rŽ ._{¨} s qr? Ž .¨ r , ᭙@ ¨g V , and rH Ž .¨ s qrŽ .¨ r, ᭙¨g Ž .
V A .
Ž . Ž .
Step 2.4. Find the tree T_{1}g Star A, V_{H} with minimum cost c T , r ._{1} Step 2.5. Construct T from T by connecting_{A} _{1} _{¨} to the closest vertex in A,
᭙¨g V .L
U Ž ^{U} .
Step 3. Let T be the tree constructed in Step 2 with minimum c T , r .
U Ž .
Transform T to a spanning tree T of G such that c T, r F Ž ^{U} .
c T , r . Step 4. Output T.
In order to show the time complexity and approximation ratio, we shall prove the following:
U Ž .
1. Let T be a 1q approximation solution of the PROCT Ž 3.
problem with input G. In O n time, it can be transformed into a Ž1q approximation solution of the PROCT problem with input G. ŽSection 4, Corollary 4 ..
Ž . Ž
2. There exists a balanced kstar X of G, which is a kq 3 r k q 1 approximation solution. A balanced kstar is a special kstar and will be.
Ž .
defined later Section 5, Lemma 5 .
3. Let T_{A} be the tree constructed in Step 2.5 and X_{A} be the
Ž . ŽŽ ^{y1}.^{2} Ž
minimum balanced kstar with core A. c T , rA F 1 q q q k q
.^{2} Ž .. Ž . Ž .
3 r k q 1 c X , r , whenever X exists Section 6, Lemma 8 .A A
ŽŽ .^{k}. Ž
4. The time complexity of Step 2.4 is O qRr Section 7, Lemma 13 ..
Based on the above results, we show the approximation ratio and time complexity in the following theorem:
THEOREM 1. PTAS PROCT is a PTAS for the PROCT problem with
Ž ^{k}^{y1 2 k}Ž .^{k}. ŽŽ ^{y1}.^{2}
time complexity O k n qr and approximation ratio 1q q q
ŽŽ .^{2} Ž ...ŽŽ . Ž ..
k q 3 r k q 1 kq 3 r k q 1 for any positi¨e integers q and k and positi_{¨}e number  1.
Proof. The approximation ratio follows directly from the above results, which will be proved later. Also by the above results, the time complexity is
Ž ^{k}^{y1 k}Ž .^{k}. Ž .
O k n qRr . From the choice of in Step 2.2, j q 1 G Ý_{1F iF jq1}r iŽ .)R. We have ) Rrn. Thus, the time complexity is
Ž ^{k}^{y1 2 k}Ž .^{k}.
O k n qr . It can be easily shown that the approximation ratio approaches 1 as q, ^{y1}, and k go to infinity. Therefore, for any desired approximation ratio 1q ) 1, we can choose suitable q, , and k and the time complexity is polynomial when they are fixed.
4. REDUCTION TO A METRIC
Ž .
Let Gs V, E, w and h be the edge weight of its metric closure G. In this section we show how a spanning tree of G can be transformed into a spanning tree of G without increasing cost. The transformation algorithm
w x
was proposed in 7 for the MRCT problem and was shown to hold for the
w x w x
PROCT problem in 8 . The proof in 8 is a straightforward generalization w x
of the one in 7 . We only describe how it works and the proof is given in Appendix A.
Ž . Ž . Ž .
Any edge a, b in G is called a bad edge if a, b f E or w a, b )
Ž .
h a, b . Given any spanning tree T of G, the algorithm iteratively replaces the bad edges until there are no bad edges left. Since the resulting tree has no bad edge, it can be thought of as a spanning tree of G with the same
w x Ž ^{2}.
cost. It was proved in 8 that there will be at most O n iterations and Ž ^{3}.
the total time complexity is O n . Furthermore, the cost never increases while replacing the bad edges. The result is summarized in the following lemma:
LEMMA2. Gi_{¨}en a spanning tree T of G, there is an algorithm which can
Ž . Ž . Ž ^{3}.
construct a spanning tree Y of G with c Y, r F c T, r in O n time.
Ž .
Let PROCT G, r denote the optimal solution of the PROCT problem with input graph G and vertex weight r. The above lemma implies that
c PROCT G, r , r
Ž Ž . .
F c PROCT G, r , r .Ž Ž . .
It is easy to see that the optimal cost for input G is no less than the one for input G. Therefore, we have the following corollaries.
Ž Ž . . Ž Ž . .
COROLLARY3. c PROCT G, r , r s c PROCT G, r , r .
U Ž .
COROLLARY 4. Let T be a 1q approximation solution of the Ž 3.
PROCT problem with input G. In O n time, it can be transformed into a Ž1q approximation solution of the PROCT problem with input G..
5. THE BALANCED kSTARS We now give the definition of the balanced kstars.
DEFINITION8. Let T be a spanning tree of G, S a connected subgraph of T, and H the subgraph obtained by removing S from T. Let ␦ F 1r2
Ž .
be a positive real number. S is a ␦separator of T if r B F ␦R for every connected component in H. A ␦separator S is minimal if any proper subgraph of S is not a ␦separator of T.
DEFINITION 9. Let k be a positive integer. A balanced kstar is a spanning tree with at most k internal nodes and its core is a minimal Ž2r k q 3 separator of the spanning tree.Ž ..
w x w x Essentially, Lemma 5 is a natural generalization of the one in 7 . In 7 ,
Ž . Ž .
it was proved that there is a kstar X which is a kq 3 r k q 1  approximation solution for the MRCT problem. The kstar X is also a balanced kstar. The modification of the definition is for the sake of showing the approximation ratio. The proof can be obtained by just replacing the vertex cardinalities with the total weight of the correspond ing vertex sets in all relevant definitions and lemmas. It is given in Appendix B.
Ž . Ž
LEMMA 5. There exists a balanced kstar of G which is a kq 3 r k q 1 approximation solution of the PROCT problem with input G..
6. APPROXIMATION RATIO
In this section, we show the approximation ratio of the PTAS. We first define the routing load and the routing cost on an edge and show that the cost of a tree can be computed by summing up the routing cost on all tree edges.
DEFINITION 10. Let T be any spanning tree of a graph G and r be a
Ž . Ž .
vertex weight function. For any edge es u,¨ g E T , we define the
Ž . Ž . Ž .
routing load on the edge e to be l T, r, e s 2r T r T , where T and Tu ¨ u ¨
are the two subtrees resulting from deleting e. The routing cost on the
Ž . Ž .
edge e is, defined to be l T, r, e w e .
Ž .
LEMMA6. Let T be any spanning tree of a graph Gs V, E, w and r be
Ž . Ž . Ž .
a_{¨}ertex weight function. c T, r s Ý_{eg EŽT .}l T, r, e w e . Proof.
c T , r
Ž .
sÝ
r i r j dŽ . Ž .
TŽ
i , j.
i , jgV
s_{i , j}
Ý
_{gV}r i r jŽ . Ž . ž
_{e}_{gSP i, j}Ý
_{Ž} _{.}w eŽ . /
T
s_{e}_{gE T}
Ý
_{Ž} _{.}ž
_{e}_{gSP i, j}Ý
_{Ž} _{.}r i r jŽ . Ž . /
w eŽ .
T
s
Ý
l T , r ,e w e .Ž . Ž .
Ž . eg T
Note that the above lemma also implies that the routing cost of a tree can be computed in linear time. The following lemma shows that the load on each core edge will not be increased too much by the insertion of the light leaves.
LEMMA7. Let T and T be the trees constructed in Steps 2.4 and 2.5 in_{1} _{A}
Ž Ž . Ž ..
Algorithm PTAS PROCT respecti_{¨}ely. l T , r, eA y l T , r, e F 2 RR ,1 L
Ž . for e_{¨}ery edge eg E A .
Proof. Consider the light leaves one by one as they are inserted. For Ž .
any eg E A and any ¨g V , whenever_{L} ¨ is inserted the load increase on e is no more than 2 rŽ ._{¨} R. Summing over all _{¨}g V , the total loadL
increase on e is no more than 2 RR ._{L}
Now we show the approximation ratio below:
LEMMA 8. Let T_{A} be the tree constructed in Step 2.5 and X_{A} be the
Ž . ŽŽ ^{y1}.^{2} Ž .^{2}
minimum balanced kstar with core A. c T , rA F 1 q q q k q 3 r Žkq 1 c X , r , whene.. Ž _{A} . ¨er X_{A} exists.
Ž .
Proof. Let Us V A j V . T and X are the trees obtained byH 1 1
deleting the leaf set VL from TA and X , respectively. Note that XA 1g
Ž . Ž . Ž .
Star A, V_{H} . Since c T , r is minimum among the trees in Star A, V_{1} _{H} , we have
c T , r
Ž
1.
F c X , r .Ž
1. Ž .
1Ž . Ž .
Since r _{¨} F qr ¨ r for any ¨g U,
q q 2
c X , r
Ž
1.
F c X ,ž
1ž /
^{} ⭈ r s/ ž /
^{} c X , r .Ž
1. Ž .
2 Ž . Ž .By 1 and 2 , we obtain
1 2
c T , r
Ž
1.
Fž /
^{} c X , r .Ž
1. Ž .
3Ž . Ž . Ž y1. Ž . Ž .
For _{¨}g V , qrH ¨ r F r ¨ q 1 F 1 q q r _{¨} , and for _{¨}g V A ,
y1 y1
Ž . Ž . Ž . Ž . Ž . Ž . Ž .
qr _{¨} r s r ¨ F 1 q q r _{¨} . Therefore, qr _{¨} r F 1 q q r _{¨} for any _{¨}g U. Then
q _{2}
y1 y1
c T ,
ž
1 ⭈ r F c T , 1 q q/ Ž
1Ž .
⭈ r s 1 q q. Ž .
c T , r .Ž
1. Ž .
4Ž . Ž .^{2} Ž Ž . . Ž . Ž .
Since c T , r1 s rq c T , qr ⭈ r , by 3 and 4 ,1
2 y1 2 y1 2
c T , r
Ž
1.
Fž /
^{q}Ž
1q q.
c T , rŽ
1.
F 1 q qŽ .
c X , r .Ž
1. Ž .
5Ž .
For a subset B of leaves in a tree T, let C T, B denote the total_{L}
Ž .
routing cost on the edges connecting the leaves in B, i.e., C T, BL s
Ž .Ž Ž . Ž .. Ž Ž .. Ž .
2Ýig Br i r T y r i w i, fa T, i , where fa T, i is the neighbor of the leaf i in T. By Lemma 6,
c T , r
Ž
A.
sÝ
l T , r , e w eŽ
A. Ž .
q C T , VLŽ
A H.
q C T ,V .LŽ
A L.
Ž . egE A
Since
C T , VL
Ž
A H.
y C T , VLŽ
1 H.
s 2Ý
r i R w i , fa T , iŽ .
LŽ Ž
A. .
igVH
F 2
Ý
r i RŽ .
^{L}Ž
w i , fa X , iŽ Ž
^{A}. .
q w AŽ . .
igVH
s C X , VL
Ž
A H.
y C X ,VLŽ
1 H.
q 2 R R w A ,H LŽ .
we havec T , r
Ž
^{A}.
F c T , r qŽ
^{1}. Ý Ž
l T , r , eŽ
^{A}.
y l T , r, e w eŽ
^{1}. . Ž .
Ž . egE A
q C T , V q C X , VL
Ž
A L.
LŽ
A H.
y C X , VLŽ
1 H.
q 2 R R w A .H LŽ .
Ž .
6Similarly,
c X , r
Ž
_{A}.
G c X , r q C X , VŽ
_{1}.
_{L}Ž
_{A} _{H}.
y C X , V_{L}Ž
_{1} _{H}.
q C X , V . 7_{L}Ž
_{A} _{L}. Ž .
Ž . Since, on T , the light leaves are connected to the closest nodes in V A ,_{A}Ž . Ž . Ž . Ž . Ž .
C T , VL A L F C X , V . Then by 5 , 6 , 7 , and Lemma 7, we haveL A L y1 2
c T , r
Ž
A.
F 1 q qŽ .
c X , rŽ
A.
q
Ý Ž
l T , r , eŽ
^{A}.
y l T , r, e w e q 2 R R w AŽ
^{1}. . Ž .
^{H} ^{L}Ž .
Ž . egE A
y1 2
F 1 q q
Ž .
c X , rŽ
A.
q 2 R R q R w A .LŽ
H. Ž . Ž .
8 If ks 1, the lemma holds trivially since there is no edge in A. In the following, we assume k) 1. For a balanced kstar, since its core is aŽ Ž ..
minimal 2r k q 3 separator, the routing load on any core edge is no
Ž Ž ..Ž Ž .. ^{2}Ž .Ž .^{y2}
less than 2 2 Rr k q 3 R y 2 Rr k q 3 s 4R k q 1 k q 3 . We
Ž . ^{2}Ž .Ž .^{y2} Ž . Ž
have l X , r, eA G 4R k q 1 k q 3 for every eg E A . Thus, c X ,A
. ^{2}Ž .Ž .^{y2} Ž . Ž .
r G 4R k q 1 k q 3 w A . Since RLFR, by 8 , we have
2 2
c T , r
Ž
^{A}.
F 1 q qž Ž
y1.
q 2 y k q 3 r 2k q 2 c X , rŽ . Ž . Ž . / Ž
^{A}.
2 2
F 1 q q
ž Ž
y1.
q k q 3 r k q 1 c X , r .Ž . Ž . / Ž
^{A}.
7. BEST CONNECTION OF LEAVES WITH INTEGER WEIGHTS In this section, we shall present how one may find the minimum routing
Ž . Ž .
cost spanning tree in Star A, V_{H} . Any tree in Star A, V_{H} can be de
Ž .
scribed by a partition L , L , . . . , L_{1} _{2} _{k} of V , in which L is the set of_{H} _{i} w x
vertices connected to the vertex a of A. In 7 , there is a polynomial time_{i} algorithm for the unweighted version of this subproblem. We describe it as follows:
< <
When Li s l is fixed for each i, since the routing costs on all edgesi
in A are also fixed, the problem is to find the partition minimizing
Ž .
Ý_{1}_{F iF k}Ý_{¨g L}w _{¨}, a . Such a partition can be solved in polynomial time_{i}
i
by a straightforward reduction to an assignment problem or to a maximumŽ perfect matching problem . Since the number of all possible configurations. Žl , l , . . . , l_{1} _{2} _{k}.is O VŽ< _{H}<^{k}^{y1}., the problem can be solved in polynomial time for a fixed k.
Now consider the case with positive integer weights on vertices in V ._{H}
q j
Ž . Ž . Ž .4
Let Rs r A q r V_{H} and let V_{H}s ¨_{i}¬ ᭙¨_{i}g V , 1 F j F r_{H} ¨_{i} . Con struct a graph G^{q} as follows:
䢇 Vertex set: V AŽ .j V ;Hq
䢇 Edge set: E AŽ .j i, j ¬ ᭙i g V , j g V A ;Ž . qH Ž .4
䢇 Edge weight w : w1 1Ž_{¨}ij, a.s wŽ¨i, a R.Ž y rŽ¨i.. Žr R y 1 for each.
Ž . Ž . Ž . Ž .
ag V A and w e s w e for each e g E A ;1
䢇 Vertex weight r : r a1 1Ž .s r a for each a g V A and rŽ . Ž . 1Ž .¨ s 1 for each_{¨}g V^{q}_{H}.
Ž ^{q}. ^{q} Ž .
Let Y be the tree in Star A, V_{H} on graph G such that c Y, r_{1} is
Ž .
minimum. Also let the partition describing Y be L , L , . . . , L ._{1} _{2} _{k}
LEMMA 9. In Y, _{¨}_{i}^{j} and_{¨}_{i}^{m} are connected to the same internal node for any i, j, m.
Proof. We prove the lemma by contradiction. Without loss of general ity, assume _{¨}i^{1}g L and1 ¨i^{2}g L . We shall show that Y is not minimal.2
Let Y_{1} be the tree obtained by moving _{¨}_{i}^{2} from L to L and let Y_{2} _{1} _{2} be the tree obtained by moving _{¨}_{i}^{1} from L to L . Consider the cost of Y ._{1} _{2} _{1}
c Y , r
Ž
1 1.
s c Y, r y 2Ž
1. Ý
r1Ž .
_{¨} dYŽ
_{¨}i^{2},_{¨}.
Ž q.
¨gV G
q 2
Ý
r1Ž .
_{¨} dY_{1}Ž
_{¨}i^{2},_{¨}.
Ž q.
¨gV G
Since
r
Ž .
_{¨} dŽ
_{¨}^{2},_{¨}.
s rŽ .
_{¨}Ž
wŽ
_{¨}^{2}, a.
q d a ,Ž
¨. . Ý
1 Y iÝ
1 1 i 2 Y 2q 2
Ž .
¨gV G ¨/¨i
s R y 1 w
Ž .
^{1}Ž
¨^{i}2, a^{2}.
qÝ
r^{1}Ž .
_{¨} d^{Y}Ž
a ,^{2} _{¨}.
¨/¨i2
and
2 2
r
Ž .
_{¨} dŽ
_{¨} ,_{¨}.
s R y 1 wŽ . Ž
¨ , a. Ý
^{1} ^{Y}1 ^{i} ^{1} ^{i} ^{1}Ž q.
¨gV G
q
Ý
r^{1}Ž .
_{¨} d^{Y}1Ž
a ,^{1} _{¨}.
,¨/¨i2
we have
c Y , r
Ž
1 1.
s c Y, r y 2 R y 1 wŽ
1. ž Ž .
1Ž
¨i2, a2.
q_{¨}_{/}Ý
_{¨}^{2}r1Ž .
_{¨} dYŽ
a ,2 _{¨}. /
i
q 2 R y 1 w
ž Ž .
^{1}Ž
¨^{i}2, a^{1}.
q_{¨}Ý
_{/}_{¨}^{2}r^{1}Ž .
_{¨} d^{Y}1Ž
a ,^{1} _{¨}. /
.Ž .
9i
Similarly,
c Y , r
Ž
^{2} ^{1}.
s c Y, r y 2 R y 1 wŽ
^{1}. ž Ž .
^{1}Ž
¨1^{i}, a^{1}.
q_{¨}Ý
_{/}_{¨}^{1}r^{1}Ž .
_{¨} d^{Y}Ž
a ,^{1} _{¨}. /
i
q 2 R y 1 w
ž Ž .
1Ž
¨i1, a2.
q_{¨}_{/}Ý
_{¨}^{1}r1Ž .
_{¨} dY_{2}Ž
a ,2 _{¨}. /
.Ž
10.
i
Ž ^{1} . Ž ^{2} . Ž .
Recall that w1_{¨}i, a s w1¨i, a for any ag V A . Summing up Eqs.
Ž .9 and 10 , we obtainŽ .
c Y , r
Ž .
q c Y , rŽ .
r2Ž
1 1 2 1.
s c Y, r q
Ž
^{1}. ž
¨Ý
/¨i2r^{1}Ž .
_{¨} d^{Y}1Ž
a ,^{1} _{¨}.
y¨Ý
/¨1ir^{1}Ž .
_{¨} d^{Y}Ž
a ,^{1} _{¨}. /
q
ž
¨Ý
/¨1ir^{1}Ž .
_{¨} d^{Y}2Ž
a ,^{2} _{¨}.
y¨/Ý
¨i2r^{1}Ž .
_{¨} d^{Y}Ž
a ,^{2} _{¨}. /
s c Y, r q d
Ž
^{1}. Ž
^{Y}1Ž
a ,^{1} _{¨}^{i}^{1}.
y d a ,^{Y}Ž
^{1} ¨^{i}^{2}. .
q d a ,
Ž
^{Y}2Ž
^{2} ¨^{i}^{2}.
y d a ,^{Y}Ž
^{2} ¨^{i}^{1}. .
s c Y, r q w a ,
Ž
1. Ž
1Ž
1 ¨^{1}i.
y d a , a y w a ,YŽ
1 2.
1Ž
1 ¨i^{2}. .
q w a ,
Ž
1Ž
2 ¨i^{2}.
y d a ,a y w a ,YŽ
2 1.
1Ž
1 ¨i^{1}. .
s c Y, r y 2 d a , a .
Ž
1.
YŽ
1 2.
Since it is assumed that there is no zero length edge, we have
Ž . Ž .4 Ž .
min c Y , r , c Y , r1 1 2 1  c Y, r . This is a contradiction to the fact that1
the cost of Y is minimum.
j 4 Ž .
Let L_{i}s ¨_{i}¬ ᭚¨_{i}g L . By the above lemma, L , L , . . . , L_{i} _{1} _{2} _{k} is a
Ž . Ž .
partition of V . Let Y_{H} g Star A, V_{H} and described by L , L , . . . , L ._{1} _{2} _{k} The following lemma is immediate.
Ž . Ž . LEMMA10. c Y, r1 s c Y, r .
Ž . Ž . Ž . Ž .
Proof. Since r a1 i s r a and r L s r L for all i, the routing costsi i i
on any core edge are the same in the two trees. So, c Y , r
Ž
1.
y c Y, r s 2 R y 1Ž . Ž . Ý Ý
w1Ž
_{¨}, ai.
¨gL 1FiFk i
y 2
Ý Ý ž
Ry rŽ
¨^{j}. /
rŽ
_{¨}^{j}.
wŽ
_{¨}^{j}, a .^{i}.
1FiFk¨jgLi
By the definition of w and L ,_{1} _{i} 2 R
Ž
y 1. Ý Ý
w1Ž
_{¨}, ai.
¨gL 1FiFk i
s 2 R y 1
Ž . Ý Ý Ý
w^{1}Ž
_{¨}^{j}m, a^{i}.
Ž . 1FmFr ¨ 1FiFk¨jgLi j
s 2 R y 1
Ž . Ý Ý
rŽ
_{¨}^{j}.
wŽ
_{¨}^{j}, a^{i}. Ž
Ry rŽ .
¨.
r R y 1Ž .
1FiFk¨jgLi
s 2
Ý Ý Ž
Ry rŽ .
¨.
rŽ
_{¨}^{j}.
wŽ
, a .^{j} ^{i}.
1FiFk¨jgLi
Ž . Ž .
Therefore, c Y, r1 y c Y, r s 0.
The proof of the next corollary is similar to that of the above lemma.
Ž .
COROLLARY 11. For any tree Zg Star A, V_{H} on G, there exists a tree
q q
Ž . Ž . Ž .
Zg Star A, VH on G such that c Z, r1 s c Z, r .
By Lemma 10 and Corollary 11, we have the following corollary:
Ž .
COROLLARY 12. L , L , . . . , L_{1} _{2} _{k} describes the minimum tree Y in
Ž .
Star A, V_{H} on G.
Therefore, the problem of finding the desired tree in Step 2.4 is Ž ^{q}. equivalent to that of finding the minimum cost tree Y in Star A, V_{H} on
q Ž . Ž ^{q}. Ž .
G . Since r1 _{¨} s 1 for any vertex in V G _V A , Y can be found by solving a series of assignment problems as in the unweighted case. It takes
kq2 R
Ž . Ž .
O R time if we solve the _{k}_{y 1} assignment problems individually.
w x
However, as in 7 , there is an efficient algorithm for solving all of these Ž k.
assignment problems with total time complexity O R . By using such an algorithm, we have Lemma 13 as the result of this section.
ŽŽqR k. . LEMMA13. The time complexity of Step 2.4 is O _{} .
APPENDIX A
In this appendix, we present the transformation algorithm and the
Ž . Ž . Ž .
related results. Let Gs V, E, w and G s V, V = V, h . Any edge a, b
Ž . Ž . Ž .
in G is called a bad edge if a, b f E or w a, b ) h a, b . For any bad
Ž . Ž . Ž .
edge es a, b there must exist a path P / e such that w P s h a, b . Given any spanning tree T of G, the algorithm can construct another
Ž . Ž .
spanning tree Y without any bad edge such that c Y, r F c T, r . Since Y
Ž . Ž . Ž .
has no bad edge, h e s w e for every e g E Y and Y can be thought of as a spanning tree of G with the same cost.
ALGORITHM. Remove bad Input: a spanning tree T of G
Ž .
Output: a spanning tree Y of G i.e. without any bad edge such that
Ž . Ž .
c Y, r F c T, r .
Compute all pairs of the shortest paths of G.
while there exists a bad edge in T
Ž .
1Ž .
Pick a bad edge a, b . Root T at a.
U Ž . Ž .
r assume SP a, b s a, x, . . . , bG
and y is the father of x^{U}r if b is not an ancestor of x then
U Ž . Ž .
Y s T j x, b y a, b
UU U Ž . Ž .
Y s Y j a, x y x, y elseYUs T j a, x y a, bŽ . Ž .
UU U Ž . Ž .
Y s Y j b, x y x, y endif
Ž ^{U} . Ž ^{UU} . if c Y , r  c Y , r then
Ys Y^{U} else
Ys Y^{UU} endif
Ts Y
Ž .
2endwhile
We assume that the shortest paths obtained in the first step have the
Ž . Ž . Ž . Ž .
following property: If SP a, bG s a, x, . . . , b , then SP a, b s a, x jG
Ž .
SP_{G} x, b . This assumption is feasible since almost all popular algorithms for all of the pairs of the shortest paths output such a solution.
Ž . Ž ^{2}. CLAIM14. The loop 1 is executed at most O n times.
Ž . Ž .
Proof. For each bad edge es a, b , let l e be the number of edges in
Ž . Ž . Ž . Ž . Ž . ^{2}
SP a, bG and f T s Ýbad el e . Since l e F n y 1, f T  n . Since Ža, x is not a bad edge, it is easy to check that f T decreases by at least 1. Ž . at each loop iteration.
Ž . Ž . Ž .
CLAIM15. Before instruction 2 is executed, c Y, r F c T, r .
Proof. For any node _{¨}, let S_{¨} be the set of vertices in the subtree rooted at _{¨}.
Ž ^{U} . Ž .
Case 1. xg S y S . If c Y , r F c T, r , the result follows. Othera b
wise, let U1s S y S and U s S y S y S . Since the distance does nota b 2 a b x
Ž .
change for any two vertices both in U_{1} or both in S , we have_{b} c T , r
Ž .
 c YŽ
^{U}, r.
r i r j d
Ž . Ž . Ž
i , j.
 r i r j dŽ . Ž .
^{U}Ž
i , j ..
Ý Ý
^{T}Ý Ý
^{Y}igU jgS1 b igU jgS1 b
Ž . Ž . Ž . Ž . UŽ . Ž .
Since dT i, j s d i, a q h a, b q d b, j and dT T Y i, j s d i, x qT
Ž . Ž .
h x, b q d b, j ᭙i g U , j g S , we haveT 1 b
Ž . Ž . Ž .
FIG. 1. Removing the bad edge a, b . Case 1 top and Case 2 bottom are presented.
r i r j
Ž . Ž . Ž
dŽ
i , a.
q h a, b q d b, jŽ . Ž . .
Ý Ý
T TigU jgS1 b

Ý Ý
r i r jŽ . Ž . Ž
d^{T}Ž
i , x.
q h x, b q d b, jŽ .
^{T}Ž . .
igU jgS1 b
« r S
Ž
b. Ý
r i dŽ .
TŽ
i , a.
q r U r S h a, bŽ
1. Ž
b. Ž .
igU1
 r S
Ž
^{b}. Ý
r i dŽ .
^{T}Ž
i , x.
q r U r S h x, bŽ
^{1}. Ž
^{b}. Ž .
igU1
«
Ý
r i dŽ .
TŽ
i , a.
q r U h a, bŽ
1. Ž .
igU1

Ý
r i dŽ .
^{T}Ž
i , x.
q r U h x, bŽ
^{1}. Ž .
igU1
«
Ý
r iŽ . Ž
dTŽ
i , a.
y d i, x  yr U h a, x .TŽ . . Ž
1. Ž .
igU1
Ž .
Note that r Sb ) 0 since the inequality holds. Then,
c Y
Ž
^{UU}, r.
y c T , r r2 sŽ .
r i r jŽ . Ž .
d ^{UU}Ž
i , j.
y d i, jŽ .
Ž . Ý Ý Ž
^{Y} ^{T}.
igU jgS2 x
q
Ý Ý
r i r jŽ . Ž . Ž
dY^{UU}Ž
i , j.
y d i, j .TŽ . .
igU jgS1 b
Ž ^{UU} . Ž .
Since d Y , i, j F d i, j for i g U and j g S , the second term is notT 1 b
Ž . Ž . Ž . Ž ^{UU} . Ž .
positive. Since dT i, j s d i, x q d x, j and d Y , i, j s d i, a qT T T
Ž . Ž .
h a, x q d x, j ᭙i g U , j g S , we haveT 2 x
c Y
Ž
^{UU}, r.
y c T , r r2Ž .
Ž .
F
Ý Ý
r i r jŽ . Ž . Ž
d^{T}Ž
i , a.
q h a, x y d i, xŽ .
^{T}Ž . .
igU jgS2 x
s r S
Ž
x. Ý
r iŽ . Ž
dTŽ
i , a.
q h a, x y d i, xŽ .
TŽ . .
igU2
s r S
Ž
^{x}. Ý
r iŽ . Ž
d^{T}Ž
i , a.
y d i, x q r U r S h a, x^{T}Ž . . Ž
^{2}. Ž
^{x}. Ž .
igU2
F r S
Ž
x. Ý
r iŽ . Ž
dTŽ
i , a.
y d i, x q r U r S h a, xTŽ . . Ž
2. Ž
x. Ž .
igU1
 yr U r S h a, x q r U r S h a, x
Ž
_{1}. Ž
_{x}. Ž . Ž
_{2}. Ž
_{x}. Ž .
F 0.Ž .Ž Ž . Ž .. Ž .Ž Ž . Ž ..
Note that ÝigU_{2}r i dT i, a y d i, x F ÝT igU_{1}r i dT i, a y d i, xT
Ž . Ž .
since U1y U s S and d i, a ) d i x ᭙i g S .2 x T T x
Ž ^{UU} . Ž .
So, c Y , r  c T, r .
Case 2. xg S . Root the tree at b and exchange the label of a and b.b
We can find that this case is the same as Case 1.
Lemma 2 in Section 4 comes from the two claims.
APPENDIX B
In this appendix, we show the existence of the balanced kstar which is a Žkq 3 r k q 1 approximation of the PROCT problem on a metric graph.. Ž . Recall that G is a metric graph and that R denotes the total vertex weight
Ž . r G .
Ž . Ž Ž . .
DEFINITION11. If T is a tree and S; T, w T, i, j s w SP i, j l SS T
Ž . for i, jg V T .
DEFINITION 12. Let T be a spanning tree of G and S a connected subgraph of T. Deleting the edges in E S from T will result in severalŽ .
Ž . Ž .
subtrees. For a vertex ig V S , we use VB T, S, i to denote the vertex set of the subtree containing i.
LEMMA16. Let S be a minimal␦separator of T. If i is a leaf of S, r VBŽ ŽT, S, i..)␦R.
Proof. If S contains only one vertex, the result is trivial. Otherwise, if
Ž Ž ..
r VB T, S, i )␦R, deleting i from S we still get a ␦separator. This is a contradiction to S being minimal.
Ž . Ž Ž
DEFINITION 13. Let T be a tree and Ps SP i, j in which r VB T,T
.. Ž Ž ..
P, i G r VB T, P, j . We define
a Ž Ž ..
P s r VB T, P, i ,
b Ž Ž ..
P s r VB T, P, j , and
c Ž Ž .. Ž Ž ..
P s R y r VB T, P, i y r VB T, P, j .
Ž . Ž . Ž Ž
Assume Ps i, m , m , . . . , m_{1} _{2} _{h, j} . Define Q P s Ý_{1}_{F x F h}r VB T, P,
.. Ž .
mx = d m , i .T x
DEFINITION14. For a spanning tree T of G, and 0␦ F 0.5, a ␦path of T is a path P on T such that P^{c}F␦Rr2.
4
DEFINITION15. Let 0␦ F 0.5. A ␦spine Y s P , P , . . . , P of T is1 2 h
a set of pairwise edgedisjoint ␦paths in T such that S s D_{1}_{F iF h}P is a_{i}
minimal ␦separator of T. Furthermore, for any pair of distinct paths Pi
and P in the spine, we require that either they do not intersect or, if they_{j} do, that the intersection point is an endpoint of both paths. We define the
Ž .
cut and leaf set CAL Y of a ␦spine Y to be the set of the endpoints of Ž .
the paths in Y. In the case that Y is empty, CAL Y contains the vertex which itself is a minimal ␦separator.
LEMMA17. Let Y be a␦spine of a spanning tree T of G and S s D_{P}_{g Y} P be a minimal␦separator of T. Then
c T , r
Ž .
r2 G 1 yŽ
␦ R. Ý
rŽ .
_{¨} dTŽ
_{¨}, S.
¨gV
q
Ý Ž
P^{b}Ž
P^{a}q P^{c}.
w PŽ .
q PŽ
^{a}y P^{b}.
Q PŽ . .
.PgY
Proof. We have
c T , r
Ž .
r2 sÝ
e^{a}e^{b}w eŽ .
egT
G
Ý Ž
1y␦ Re.
^{b}w eŽ .
qÝ
e^{a}e^{b}w eŽ .
egT _ S egS
G 1 y
Ž
␦ R. Ý
rŽ .
_{¨} dTŽ
_{¨}, S.
qÝ Ý
e^{a}e^{b}w e .Ž .
¨gV PgY egP
Ž .
For the second term, assume Ps m , m , m , . . . , m_{0} _{1} _{2} _{h} in which
Ž Ž .. Ž Ž .. Ž Ž ..
r VB T, P, m0 G r VB T, P, m . Let r VB T, P, m s n for 1 F i Fh i i
Ž .
hy 1 and e s mi iy1, mi for 1F i F h.
h hy1 hy1
a b a c b
e e w e
Ž .
s P q P y n P q n w eŽ .
Ý Ý ž Ý
j/ ž Ý
j/
iegP is1 jsi jsi
h
b a e
s
Ý
PŽ
P q P w e. Ž
^{i}.
is1
h hy1
a b
q P y P
Ž . Ý Ý
n w ejŽ
i.
is1 jsi
h hy1 hy1
q^{is1}
Ý ž
^{jsi}Ý
n^{j}/ ž
PcyÝ
^{jsi}n^{j}/
w eŽ
^{i}.
G P^{b}Ž
P^{a}q P^{c}.
w PŽ .
hy1 j
a b
q P y P
Ž .
js1Ý
n^{j}ž
is1Ý
w eŽ
^{i}. /
s P^{b}
Ž
P^{a}q P^{c}.
w PŽ .
q PŽ
^{a}y P^{b}.
Q P .Ž .
LEMMA 18. For any constant 0␦ F 0.5 and spanning tree T of G,
< Ž .< u v there exists a ␦spine Y of T such that CAL Y F 2r␦ y 3.
Proof. Let S be a minimal ␦separator of T. S is a tree. Let U s1 ¨¬¨
4 4
is a leaf in S , U_{2}s ¨¬¨ has more than two neighbors in S , and
< < < <
Us U j U . Let h s U . Clearly, U F 2h y 2. For any1 2 1 ¨1,_{¨}2g U, call
Ž . 4
¨_{1}and_{¨}_{2} neighbors in U if _{¨}_{3}f SP_{T} ¨_{1},_{¨}_{2} for all _{¨}_{3}g U y ¨_{1},_{¨}_{2}. Let
Ž . 4 ^{c}
Y1s SPT ¨1,_{¨}2 ¬¨1,_{¨}2 are neighbors in U . For any Pg Y , if P )1
␦Rr2, P is called a heavy path. It is easy to check that Y satisfies the1
requirements of a ␦spine except that there may exist some heavy paths.
For any heavy path P, we can divide it into some nonheavy paths by no u ^{c} Ž .v
more than 2 P r ␦R y 1 vertices on P. Since there are at least ␦R weights hanged at each leaf,
P^{c} R y h␦R.
PgY
Ý
1Assume U to be the minimal vertex set for cutting the heavy paths to_{3} result in a ␦spine Y of T. We have
< <U3 F 2 R y h␦R r ␦R y 1 s 2r␦ y 2h y 1.
Ž . Ž . u v
< Ž .< < < < < u v So, CAL Y s U q U F 2r␦ y 3.3
Žu v LEMMA19. For any constant 0␦ F 0.5, there exists a balanced 2r␦
. Ž . Ž Ž .. Ž Ž . .
y 3 star X such that c X, r F 1r 1 y␦ c PROCT G, r ,r .
Ž . Ž . 4
Proof. Let Ts PROCT G, r s V, E, w . Also, let Y s P ¬ 1 F i F hi
< Ž .< u v
be a ␦spine of T in which CAL Y F 2r␦ y 3, and let S s D_{P}_{g Y} P
Ž . Ž Ž
be a minimal ␦separator of T. Assume P s SP u ,_{i} _{T} _{i} ¨_{i} and r VB T, P ,_{i}
.. Ž Ž ..
ui G r VB T, P ,i ¨i . Construct a subgraph M; G with vertex set
Ž . Ž . 4
CAL Y and edge set Ems u ,i ¨i ¬ 1 F i F h . Trivially, M is a tree. Let
Ž . Ž ^{a} ^{b}. ^{c} Ž . Ž Ž .
f i be an indicator variable such that if Pi y P P w P y R 2Q P yi i i i
c Ž .. Ž . Ž .
P w Pi i G 0 then f i s 1; else f i s 0. We construct a spanning tree X of G where the edge set E is determined by the following rules:_{x}
1. M; X.
Ž . Ž .
2. If qg VB T, S, m then q, m g E , for any m g u ,x i ¨i¬ 1 F iF h .4
Ž . Ž . Ž .
3. For the vertex set V_{i}s V y VB T, P , u y VB T, P ,_{i} _{i} _{i} ¨_{i} , if f i
Ž . 4 Ž . 4
s 1 then q, ui ¬ q g V ; E ; elsei x q,_{¨}i ¬ q g V ; E . That is, thei x
vertices in V are either all connected to u or all connected to_{i} _{i} _{¨}_{i}.