4
The Tree Center Problems and the Relationship with the Bottleneck Knapsack Problems Akiyoshi Shioura, Maiko Shigeno Department of Mathematical and Computing Sciences, Tokyo Institute of Technology, 2-12-1 Oh-okayama, Meguro-ku, Tokyo 152, Japan Received 8 May 1996; accepted 28 August 1996 Abstract: The tree center problems are designed to find a subtree minimizing the maximum distance from any vertex. This paper shows that these problems in a tree network are related to the bottleneck knapsack problems and presents linear-time algorithms for the tree center problems by using the rela- tion. q 1997 John Wiley & Sons, Inc. Networks, 29: 107–110, 1997 1. THE TREE CENTER PROBLEMS by d ( p , S ) Å min{ d ( p , q ) o q S }. For each subtree S , the eccentricity ecc( S ) is the maximum distance from S to any vertex in T , i.e., ecc ( S ) Å max{ d ( £ i , S ) o£ i V }. Let T Å (V, E ) be a tree network with a vertex set V Å { £ 1 ,..., £ n } and an edge set E Å { e 2 ,..., e n }, The size of a subtree S is defined as the sum of the weights of partial edges in S and denoted by size ( S ). where an edge e i is incident to the vertex £ i and on the path connecting £ i and £ 1 . We denote by N the index set This paper deals with two types of the tree center problems, which find a subtree in T minimizing the eccen- {2, . . . , n } of edges. For each i N , the edge e i has a positive length l i and a positive weight w i . In this paper, tricity under the size constraint. The continuous version is described as we assume that T is drawn in the Euclidean plane so that each edge e i is a line segment with length l i and regard T as a closed and connected subset of points in the Euclid- ean plane. For two points p , q on an edge e i ,a partial CTCP Minimize ecc( S ) subject to size( S ) ° W , S is a subtree of T , edge connecting p and q is the set of points lying between p and q on e i . The length of the partial edge is defined by the Euclidean distance l pq of p and q , and the weight and the discrete version is is w i ( l pq / l i ). A subset S of T is called a subtree if it is closed and connected. A subtree S is decomposed into several partial DTCP Minimize ecc( S ) subject to size( S ) ° W , S is a discrete subtree of T , edges such that the intersection of any pair of distinct partial edges is empty or a vertex. We call a subtree discrete when its boundary points are vertices of T . where 0 ° W õ size( T ). We call optimal solutions of In a tree network T , the distance between two points these problems the continuous tree center and discrete p , q T , denoted by d ( p , q ), is the sum of the lengths tree center, respectively. These tree center problems and of partial edges on the unique path connecting p and q . their variations were discussed by many researchers. The distance between a point p and a subtree S is given When W Å 0, the tree center problems find the so-called absolute center and vertex center, for both of which O ( n ) -time algorithms were already presented [ 4, 5 ] . For Correspondence to: A. Shioura; e-mail: [email protected] q 1997 John Wiley & Sons, Inc. CCC 0028-3045/97/030107-04 107 750 / 8u0E$$0750 01-22-97 00:19:09 netwal W: Networks

The tree center problems and the relationship with the bottleneck knapsack problems

  • Upload
    maiko

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

The Tree Center Problems and the Relationshipwith the Bottleneck Knapsack Problems

Akiyoshi Shioura, Maiko Shigeno

Department of Mathematical and Computing Sciences, Tokyo Institute of Technology, 2-12-1Oh-okayama, Meguro-ku, Tokyo 152, Japan

Received 8 May 1996; accepted 28 August 1996

Abstract: The tree center problems are designed to find a subtree minimizing the maximum distancefrom any vertex. This paper shows that these problems in a tree network are related to the bottleneckknapsack problems and presents linear-time algorithms for the tree center problems by using the rela-tion. q 1997 John Wiley & Sons, Inc. Networks, 29: 107–110, 1997

1. THE TREE CENTER PROBLEMS by d(p , S) Å min{d(p , q) o q √ S}. For each subtree S ,the eccentricity ecc(S) is the maximum distance from Sto any vertex in T , i.e., ecc(S) Å max{d(£i , S) o£i √ V }.Let T Å (V, E) be a tree network with a vertex set V

Å {£1 , . . . , £n } and an edge set E Å {e2 , . . . , en }, The size of a subtree S is defined as the sum of the weightsof partial edges in S and denoted by size (S) .where an edge ei is incident to the vertex £i and on the

path connecting £i and £1 . We denote by N the index set This paper deals with two types of the tree centerproblems, which find a subtree in T minimizing the eccen-{2, . . . , n} of edges. For each i √ N , the edge ei has

a positive length li and a positive weight wi . In this paper, tricity under the size constraint. The continuous versionis described aswe assume that T is drawn in the Euclidean plane so that

each edge ei is a line segment with length li and regardT as a closed and connected subset of points in the Euclid-ean plane. For two points p , q on an edge ei , a partial CTCP

Minimize ecc(S)subject to size(S) ° W ,

S is a subtree of T ,edge connecting p and q is the set of points lying betweenp and q on ei . The length of the partial edge is definedby the Euclidean distance lpq of p and q , and the weight and the discrete version isis wi ( lpq / li ) .

A subset S of T is called a subtree if it is closed andconnected. A subtree S is decomposed into several partial

DTCPMinimize ecc(S)subject to size(S) ° W ,

S is a discrete subtree of T ,edges such that the intersection of any pair of distinctpartial edges is empty or a vertex. We call a subtreediscrete when its boundary points are vertices of T .

where 0 ° W õ size(T ) . We call optimal solutions ofIn a tree network T , the distance between two pointsthese problems the continuous tree center and discretep , q √ T , denoted by d(p , q) , is the sum of the lengthstree center, respectively. These tree center problems andof partial edges on the unique path connecting p and q .their variations were discussed by many researchers.The distance between a point p and a subtree S is givenWhen W Å 0, the tree center problems find the so-calledabsolute center and vertex center, for both of whichO(n)-time algorithms were already presented [4, 5] . ForCorrespondence to: A. Shioura; e-mail: [email protected]

q 1997 John Wiley & Sons, Inc. CCC 0028-3045/97/030107-04

107

750/ 8u0E$$0750 01-22-97 00:19:09 netwal W: Networks

108 SHIOURA AND SHIGENO

the case wi Å li ( i √ N) , Minieka [7] and Hakimi et al. Therefore, it is sufficient to consider continuous sub-trees containing the absolute center. We assume without[3] presented simple greedy algorithms for the continuous

and discrete tree center problems, respectively, both of loss of generality that the absolute center of T is a vertexin T . (Otherwise, we augment the absolute center to V .)which run in O(n 2) time by naive implementation.

Our main aim is to investigate the relationship between We also assume that £1 is the absolute center. Any subtreecontaining £1 can be represented by using a vector (yi )i√Nthe tree center problems and the bottleneck knapsack

problems. We shall formulate the tree center problems as with 0 ° yi ° 1, where each yi is associated with theedge ei . If there exists a partial edge of ei connectinglinear and integer programming problems. These formula-

tions give the relation that the tree center problems are f (£i ) and (r , i) , then we set yi Å r ; otherwise, yi Å 0.Such a vector satisfies the conditionthe bottleneck knapsack problems with the ‘‘subtree’’

constraint. We show that the additional subtree constraintis satisfied by optimal solutions of the bottleneck knap- if yj ú 0, then yi Å 1 ( j √ N , £i Å f (£j)) . (1)sack problems. The linear-time solvability of the bottle-neck knapsack problems enables us to find optimal sub- On the other hand, if (yi )i√N satisfies condition (1) , thentrees in O(n) time. the point set

A closely related work was done by Tamir [8] for thetree median problem, which finds a subtree minimizing <

i√N,yiú0{(r , i)É0 ° r ° yi } < {£1 }

the sum of the distances from all vertices. He derived therelationships with the knapsack problems and presentedexact and approximation algorithms for the tree median induces a subtree containing £1 .

For each i √ N , we define bi asproblems.For convenience of the description, assume that T is a

rooted tree with root £1 . For any two vertices £i , £j , if the bi Å max{d(£i , £j)É£j is a descendant of £i }.path connecting £1 and £j contains £i , then £i is an ancestorof £j , and £j is a descendant of £i . The parent of £i , It satisfies the recursive equation:denoted by f (£i ) , is the unique ancestor of £i connectedby an edge ei . For any i √ N and a real number r with

bi Åmax{ lj / bjÉ j √ N , f (£j) Å £i }

(∃£h s.t. f (£h) Å £i ) ,0 (otherwise) .

0 ° r ° 1, (r , i) represents the point on ei with theEuclidean distance li r from f (£i ) .

The eccentricity is rewritten as follows:

2. MAIN RESULTS Lemma 2.2. Suppose that S is a subtree containing £1

with S x T and that (yi )i√N is a vector associated withWe first show that the continuous tree center problem S. Then, it holds that(CTCP) is reducible to the continuous bottleneck knap-sack problem. ecc(S) Å max{ li (1 0 yi ) / biÉi √ N , yi õ 1}.

Simple observation gives the following property:

From the above discussion, we can restate the CTCPLemma 2.1 [7] . The continuous tree center contains the

asabsolute center.

CTCP1

Minimize max{ li (1 0 yi ) / biÉi √ N , yi õ 1}subject to ∑ {wi yiÉi √ N} ° W ,

if yj ú 0 then yi Å 1 ( j √ N , £i Å f (£j)) ,0 ° yi ° 1 ( i √ N) ,

which is equivalent to

CTCP2

Minimize max{ li xi / biÉi √ N , xi ú 0}subject to ∑ {wi xiÉi √ N} ¢ W *,

if xj õ 1 then xi Å 0 ( j √ N , £i Å f (£j)) ,0 ° xi ° 1 ( i √ N) .

(2.3)(2.4)(2.5)

750/ 8u0E$$0750 01-22-97 00:19:09 netwal W: Networks

TREE CENTER PROBLEMS 109

Here, xi Å 1 0 yi for each i √ N and W * Å ({wiÉi Theorem 2.4. The continuous tree center problem is re-ducible to the continuous bottleneck knapsack problem√ N} 0 W . Elimination of the condition (2.4) from the

CTCP2 yields a continuous bottleneck knapsack problem, in O(n) time and solvable in O(n) time.referred to as the CTCP3. (Note that the CTCP3 can beseen as a variant of the continuous minimax resource Next, we shall show that the discrete tree center prob-allocation problem in [6].) lem (DTCP) can be reduced to the 0–1 bottleneck knap-

sack problem.Lemma 2.3. The optimal solution of the CTCP3 satisfies We assume that the root £1 is a vertex center. Thecondition (2.4) . following property is implicitly used in Hakimi et al. [3]:

Proof. For a given scalar parameter t , defineLemma 2.5. There exists a discrete tree center con-taining a vertex center.xi ( t) Å

1 ( li / bi ° t) ,( t 0 bi ) / li (bi ° t õ li / bi ) ,0 (bi ú t) .

Thus, we have to consider only discrete subtrees con-taining £1 . The following is a corollary of Lemma 2.2:Let t* Å min{ tÉ(wi xi ( t) ¢ W *}. Then, the optimal

solution of the CTCP3 is given by (xi ( t*))i√N . When £i

Å f (£j) , we have bi ¢ bj / lj , and, consequently, xi ( t*) Corollary 2.6. Let S be any discrete subtree containingÅ 0 if xj( t*) õ 1. Therefore, (xi ( t*))i√N satisfies (2.4) .

£1 . If S x T, thenj

ecc(S) Å max{ li / biÉi √ N , ei ⊆ T"S}.With a slight modification, the algorithm proposed in [2]searches the parameter t* of the above proof in linear

By using a 0–1 valued vector (yi )i√N , we can reformulatetime.

the DTCP to

DTCP1

Minimize max{( li / bi )(1 0 yi )Éi √ N}subject to ∑ {wi yiÉi √ N} ° W ,

if yj ú 0 then yi Å 1 ( j √ N , £i Å f (£j)) ,yi √ {0, 1} ( i √ N) .

Putting W * Å ({wiÉi √ N} 0 W and xi Å 1 0 yi for each i √ N , we obtain

DTCP2

Minimize max{( li / bi )xiÉi √ N}subject to ∑ {wi xiÉi √ N} ¢ W *,

if xj õ 1 then xi Å 0 ( j √ N , £i Å f (£j)) ,xi √ {0, 1} ( i √ N) .

(2.6)(2.7)(2.8)

By removing condition (2.7) from the DTCP2, we obtain Since li / bi ú lj / bj for any i , j √ N with £i Å f (£j) ,a 0–1 bottleneck knapsack problem. For such a problem, condition (2.7) holds for (x*i )i√N . We can find index k

in O(n) time by the median-finding algorithm [1].the 0–1 valued vector (x*i )i√N given by

x*i Å H1 ( li / bi ° lk / bk) ,0 ( li / bi ú lk / bk) Theorem 2.7. The discrete tree center problem is reduc-

ible to the 0–1 bottleneck knapsack problem in O(n)time and solvable in O(n) time.

is optimal, where k √ N satisfies

∑ {wiÉi √ N , li / bi õ lk / bk} õ W * We are grateful to Takeaki Uno of Tokyo Institute of Tech-nology for his valuable comments and to anonymous referees

° ∑ {wiÉi √ N , li / bi ° lk / bk}. for their suggestions and relevant reference [8] .

750/ 8u0E$$0750 01-22-97 00:19:09 netwal W: Networks

110 SHIOURA AND SHIGENO

REFERENCES [ 5] S. M. Hedetniemi, E. J. Cockayne, and S. T. Hedetniemi,Linear algorithms for finding the Jordan center and pathcenter of a tree. Trans. Sci. 15 (1981) 98–114.[1] M. Blum, R. W. Floyd, V. Pratt, and R. L. Rivest, Time

bounds for selection. J. Comput. Syst. Sci. 7 (1973) 448– [ 6] T. Ibaraki and N. Kato, Resource Allocation Problems:461. Algorithmic Approaches. MIT Press, Cambridge, MA

(1988).[ 2] P. Brucker, An O(n) algorithm for quadratic knapsackproblems. Oper. Res. Lett. 3 (1984) 163–166. [ 7] E. Minieka, The optimal location of a path or tree in a

tree network. Networks 15 (1985) 309–321.[ 3] S. L. Hakimi, E. F. Schmeichel, and M. Labbe, On locat-ing path- or tree-shaped facilities on networks. Networks [ 8] A. Tamir, Fully polynomial approximation schemes for23 (1993) 543–555. locating a tree-shaped facility: A generalization of the

knapsack problem. Technical Report, Tel Aviv University[ 4] G. Y. Handler, Minimax location of a facility in an undi-rected tree graph. Trans. Sci. 7 (1973) 287–293. (1993).

750/ 8u0E$$0750 01-22-97 00:19:09 netwal W: Networks