Vertex fusion under diameter constraints

13
Vertex Fusion under Diameter Constraints * Marc Comas and Maria J. Serna ALBCOM Research group, LSI Dept. Universitat Polit` ecnica Catalunya {mcomas,mjserna}@lsi.upc.es June 3, 2007 Abstract Given a graph G=(V ,E), a positive integer k and a positive integer d, we want find a subset V k with k vertices such the graph obtained by identifying the vertices from V k in G has diameter at most d. We prove that for every d 2 the problem is NP-complete. For the case of trees we provide a polynomial time algorithm that exploits the relationship with the r-dominating set problem. 1 Introduction The problem of augmenting a graph by adding new edges to reach a cer- tain improvement of a graph or network parameter is a source of important problems on network reliability and fault tolerant computing. One of the fundamental parameters in communication networks is the graph diame- ter. Observe that the delay in sending a a mesage from a node to another one depends on the length of the route among them. Thus a graph with small diameter, even a small world graph with logarithmic diameter, will be preferred to another one with bigger diameter as the total delay in commu- nication will be smaller. The most discused augmentation problems in the literature are based on the notion of graph augmentation by the addition of edges under some constraints. In particular, for the case in which the constrained parameter is the diameter the problem is formulated as follows: Augmentation under diameter constraints (adc). Given a graph G and a positive integer d, add a minimum number of edges to obtain a graph of diameter at most d. * partially supported by the FET pro-actives Integrated Project 15964 (AEOLUS), and the Spanish projects TIN-2004-07925-C03-01 (GRAMMARS), TIN-2005-09198-C02- 02 (ASCE), and TIN2005-25859-E. The work of the first author was partially supported by a FPI scholarship of the Spanish Ministry of Education and Science. 1

Transcript of Vertex fusion under diameter constraints

Vertex Fusion under Diameter Constraints∗

Marc Comas and Maria J. Serna

ALBCOM Research group, LSI Dept. Universitat Politecnica Catalunya

{mcomas,mjserna}@lsi.upc.es

June 3, 2007

Abstract

Given a graph G=(V ,E), a positive integer k and a positive integerd, we want find a subset Vk with k vertices such the graph obtained byidentifying the vertices from Vk in G has diameter at most d. We provethat for every d ≥ 2 the problem is NP-complete. For the case of treeswe provide a polynomial time algorithm that exploits the relationshipwith the r-dominating set problem.

1 Introduction

The problem of augmenting a graph by adding new edges to reach a cer-tain improvement of a graph or network parameter is a source of importantproblems on network reliability and fault tolerant computing. One of thefundamental parameters in communication networks is the graph diame-ter. Observe that the delay in sending a a mesage from a node to anotherone depends on the length of the route among them. Thus a graph withsmall diameter, even a small world graph with logarithmic diameter, will bepreferred to another one with bigger diameter as the total delay in commu-nication will be smaller.

The most discused augmentation problems in the literature are basedon the notion of graph augmentation by the addition of edges under someconstraints. In particular, for the case in which the constrained parameteris the diameter the problem is formulated as follows:

Augmentation under diameter constraints (adc). Givena graph G and a positive integer d, add a minimum number ofedges to obtain a graph of diameter at most d.

∗partially supported by the FET pro-actives Integrated Project 15964 (AEOLUS),and the Spanish projects TIN-2004-07925-C03-01 (GRAMMARS), TIN-2005-09198-C02-02 (ASCE), and TIN2005-25859-E. The work of the first author was partially supportedby a FPI scholarship of the Spanish Ministry of Education and Science.

1

The adc problem was shown to be NP-complete in [10, 4]. The complexity ofthe problem restricted to trees remains open, however several partial resultsare known. In the case of paths the optimal value can be determined up toan additive error constant term [6] as well as for cycles [1]. Other lower andupper bounds can be found in [1, 5]. For the case of trees a 2-approximationalgorithm for even d was presented in [4]. A 8-approximation algorithm forodd d was provided in [8]. Finally a (2 + 1/δ)- approximation algorithm forthe case of d odd is due to [3].

We are interested in analyzing augmentation problems under other def-initions of graph augmentation that make sense in modern overlay commu-nication networks. In such a setting a new network is obtained by the su-perposition of two different networks with possible different communicationtechnologies and thus the augmentation might have a more involved topol-ogy than just the buying of some additional communication links. Particu-lar cases are augmentation by vertex fusion (vertex identification see formaldefinition later), by imposing a clique or by imposing a complete bipartitegraph, and in general by imposing a particular network on a node subset.

In this paper we deal with the problem of augmentation under diameterconstraint when augmentation means vertex fusion. This is the problem inwhich we assume that the communication technology of the overimposednetwork allow instantaneous communication between the nodes, thereforethey can communicate at zero cost, this is equivalent to consider a networkin which we fusion all of them in one node. The problem can be formalizedas follows:

Vertex fusion under diameter constraints (vfdc). Givena graph G and a positive integer d, fusion a minimum numberof vertices to obtain a graph of diameter at most d.

We show that the vfdc problem is NP-hard for general graphs. Inthe positive side we show that the problem can be solved in polynomialtime when the input graph is restricted to be a tree. Our results imply alsoconsequence on the parameterized complexity of the problem for the naturalparameterizations.

2 Definitions

We use standard terminology for graphs. Let G = (V,E) be a graph. Wedenote the distance between two vertices v and w by d(v,w), which is definedthe minimum number of edges in a path joining them. We denote by d(v,W )the minimum distance between v and the subset W ⊆ V , formally d(v,W ) =minw∈W d(v,w).

The diameter of a graph G, denoted by diam(G), is the maximum dis-tance between two vertices, diam(G) = maxv,w∈V d(v,w). The r-neighborhood

2

of a vertex v, denoted using the ball notation as Br(v), is the set formed byall vertices at distance at most r from v, i.e., Br(v) = {w ∈ V ; d(v,w) ≤ r}.Extending the definition to sets, the r-neighborhood of a set of verticesW ⊆ V is the set formed by all the vertices at distance at most r fromW , i.e., Br(W ) = {v ∈ V ; d(v,W ) ≤ r} =

⋃w∈W Br(w). In the same way,

we introduce the ball of radius r centered in an edge e = {v1, v2} ∈ E asBr(e) = Br(v1) ∪ Br(v2).

Given a graph G and a subset of vertices W ⊂ V , the vertex fusion of Win G is G/W = (V/RW , E′), where RW is the equivalence relation definedby v ∼ w if v and w ∈ W , and E′ is the edges set induced by the quotientafter removing the multiple edges and loops.

Given a graph G = (V,E) and a subset W ⊂ V , we say that W is ad-fusion set in G if G/W has diameter at most d.

With the previous definitions we can define formally the problems weare interested in.

Vertex fusion problem (vf). Given a graph G and two pos-itive integers k and d. Does G have a d-fusion set with at mostk vertices?

Min vertex fusion problem (mvf). Given a graph G and apositive integer d. Compute the minimum k for which G has ad-fusion set with at most k vertices?

We alsconsider two parameterizations of the vf problem.

d-Vertex fusion problem (d-vf). Given a graph G and aninteger k. Does G have a d-fusion set with at most k vertices?

k-Vertex fusion problem (k-vf). Given a graph G and twopositive integers k and d. Does G have a d-fusion set with atmost k vertices?

A r-dominating set of a graph G is subset W ⊂ V for which the maxi-mum distance from a vertex to W is at most r, this is maxv∈V d(v,W ) ≤ r.Or equivalently, W ⊂ V for which V =

⋃w∈W Br(w). The associated prob-

lem is stated as follows:

r-dominating set problem(r-ds). Given a graph G and aninteger k > 0. Does G have an r-dominating set with at most kvertices?

Note that in the particular case that r = 1, the above formulation corre-sponds to the well known dominating set problem [7]. From [2, 9] we knowthat the r-dominating set is solvable in linear time in trees.

Now we introduce some additional notation for trees. Let T = (V,E) bea tree. We define the set of leaves of T by L(T ) and if W ⊂ V then the

3

subset of leaves induced by W as L(W,T ) = W ∩ L(T ). Let v ∈ V and letw be a neighbor of v in T . The subtree Tv(w) is the subtree rooted at w insuch a way that v /∈ Tv(w). Moreover we define the subtree T ∗

v (w) as thesubtree induced by the vertex set V (Tv(w)) ∪ {v}).

Finally, for any r > 0 and any subtree S of T , we use the notation βr(S)for the minimum number of balls of radius r that are necessary to cover S.

3 NP-Completeness

To prove the NP-hardness of the vertex fusion under diameter constrintsproblem, we show a strongest result, the NP-hardness of the d-vf problemfor any d ≥ 2. In the proof we modify the construction appeared in [4] usedto prove the NP-hardness for edge augmentation problem.

Theorem 3.1. The d-vertex fusion problem is NP-complete for any d ≥ 2.

Proof. Given a possible solution to the vertex fusion problem we can verifyits correctness in polynomial time by calculating the distance from everyvertex to every other vertex in G/Vk.

Therefore it remains to show that d-vc is an NP-hard problem. In thiscase we present a reduction from the dominating set problem (r-ds withr = 1). Assume that a value d ≥ 2 has been fixed.

Given an instance of dominating set, consisting of a graph G = (V,E)and an integer k > 0, we would reduce this problem to d-vertex fusionproblem on a graph G′ = (V ′, E′) and integer k′ = k + 1,in such a way thatthere is a dominating set in G with k vertices if and only if we can obtain ad-fusion set with k + 1 vertices in G′.

We assume that the set of vertices in the original graph is V = {v1, ..., vn}.We have a different reduction for the cases where d is even and where d isodd.

Case 1: d = 2r [See the construction in Figure 1]

Let {Pi = (V Pi , EP

i )}1≤i≤n be a set of n paths with length r − 1 andlet vi ∈ V be the first vertex of a path Pi in such a way that thevertex set V p

i is formed by V pi = {p1

i = vi, p2i , ..., p

r−1i } where pj

i arenew vertices for j > 1. Similarly, we consider a set of n paths {Qi =(V Q

i , EQi )}1≤i≤n with length r, having a common vertex b as their first

vertex so that their vertex set is formed by V Qi = {q1

i = b, q2i , ..., q

ri }

and a new vertex a.

Formally, we have V ′ = V ∪ {v′1, ..., v′n} ∪ {a} ∪

⋃ni=1(V

Pi ∪ V Q

i ) as thevertex set in G′.

For the edges of G′, we start with G joining its vertices to the pathsPi, a clique K(V ′) on the vertex V ′ = {v′1, ..., v

′n}, the paths Qi and

4

the vertex a. For any 1 ≤ i ≤ n, we add the edges {w, v′i} for anyw ∈ B1(vi) and finally we connect a to b and a to every vertex v′i.

and E′ = E∪{(a, b)}∪⋃n

i=1(EPi ∪EQ

i ∪⋃n

j=i{(v′i, v

′j)}∪

⋃w∈BG

1 (vi){(v′i, v)})

as its edge set. See Figure 1 for the construction.

Now, let S be a dominating set in G, we want prove that S ∪ {b} is ad-fusion set in G′.

Consider the graph G∗ = G′/S ∪ {b}, and let v,w be two differentvertices in G∗, we want prove that dG∗(v,w) ≤ d.

If v and w belongs in V ∪V ′∪{a, b} then the distance between them inG∗ can not be greater than 2 because their distance does not dependon the path’s length and all the vertices in V ∪V ′∪{a, b} are at distanceat most one to S ∪ {b}. So if we want consider the maximum distancein G∗ we have to consider at least one vertex belongs in Pi or Qi inG∗.

Consider that v ∈ V Pi , then the furthest vertex in G∗ is from v have to

be the vertex qrj for some j or the vertex pr

j for j 6= i. In the first cased(v, qr

j ) = d(v, vi)+r if vi ∈ S or d(v, qrj ) = d(v, vi)+r+1 if vi /∈ S, but

d(v, vi) ≤ r − 1 so d(v, qrj ) ≤ d(v, vi) + r + 1 ≤ 2r. And in the second

case, d(v, prj) = d(v, vi) + r − 1 if vi, vj ∈ S, d(v, pr

j ) = d(v, vi) + rif vi ∈ S or vj ∈ S and d(v, pr

j) ≤ d(v, vi) + r + 1 if vi, vj /∈ S so

d(v, prj) ≤ d(v, vi) + r + 1 ≤ 2r. If we consider v ∈ V Q

i , following the

same way we arrive to d(v, pr−1i ) ≤ 2r and d(v, qr

j ) ≤ 2r. Note that in

the worst case if we consider pr−1i and qr

j for some i such that vi /∈ S

we have d(pr−1i , qr

j ) = 2r then S ∪ b is a d-fusion set.

In the other direction, let S′ be a d-fusion set in G′.

Suppose that b /∈ S′ then if k < n − 1 ∃i, j such that V Pi ∩ S′ = ∅

and V Qj ∩ S′ = ∅, so the distance between pr−1

i to qrj is at least the

sum of the Pi’s length plus one to go to S′ and Qj’s length plus oneto go to S′, so d(pr−1

i , qri ) > 2r = d, consequently b ∈ S′. Then we

can write S′ = S ∪ {b} = {s1, s2, ..., sl, b}. Note that if k = n− 1 thenV \ v for any vertex v is a dominating set in G, and if k > n − 1 V isa dominating set in G.

Let us consider a function t defined from V ′ ∪⋃n

i=1 V Pi to V where

v ∈ V Pi 7−→ t(v) = vi

v′i ∈ V ′ 7−→ t(v′i) = vi

be a function that convert a vertex in V ′ ∪⋃n

i=1 V Pi to a vertex in

V . We claim that if S ∪ {b} is a d-fusion set in G′ then t(S) ={t(s1), t(s2), ..., t(sl)} is a dominating set in G.

5

v1

v2

v3

v4

v5

v6

v1 v6 G = (V, E)

v′

1v′

6K(V ′)

pr−1

1p

r−1

2p

r−1

3p

r−1

4p

r−1

5p

r−1

6

a

b

qr

1

qr

2qr

3qr

4

qr

5

qr

6

Figure 1: Transformation from Dominating set to Vertex fusion.(even case)

Suppose that t(S) = {t(s1), t(s2), ..., t(sl)} is not a dominating set inG, then exist vk ∈ V such that d(vk, t(S)) > 1 in G′ the relation isequivalent to exists vk ∈ V ⊂ V ′ such that d(vk, S) > 1. We canconsider one path Qi such that Pi ∩ S = ∅ then if we consider thedistance between pr−1

k and qri we have d(pr−1

k , qri ) > r−1+1+r = 2r so

S∪{b} is not a d-fusion set, consequently t(S) have to be a dominatingset in G.

Case 2: d = 2r + 1 [See the construction in Figure 2]

In this case the construction is similar to the construction before, butnow we consider a set of vertices B = {b1, ..., bn} connected to b and inthis case the vertex set for every path Qi is V Q

i = {q1i = bi, q

2i , ..., q

ri }.

Finally, we add to the edge set before G′ the edges connecting everyvertex bi and an edge between b and every bi.

Formally, the vertex set is defined by V ′ = V ∪ {v′1, ..., v′n} ∪ {a, b} ∪

⋃ni=1 V P

i ∪ V Qi and the edge set is defined by E′ = E ∪ {(a, b)} ∪

⋃ni=1(({b, bi})∪EP

i ∪EQi ∪

⋃nj=i{(v

′i, v

′j), (bi, bj)}∪

⋃w∈BG

1 (vi){(v′i, v)}).

Let S be a dominating set in G, we want prove that S∪{b} is a d-fusionset in G′.

Consider the graph G∗ = G′/S ∪ {b}, and let v,w be two differentvertices in G∗, we want prove that dG∗(v,w) ≤ d.

As in the case before, if we consider two vertices in V ∪V ′∪{a, b}∪Bthe distance between them can not be greater than 2, so we have toconsider v or w are not belonging in V ∪ V ′ ∪ {a, b} ∪ B.

Suppose that v ∈ Pi, if we consider w ∈ V ∪ V ′ ∪ {a, b} ∪ B theirdistance holds d(v,w) ≤ d(v, vi) + 2 the constant appearing in thesecond member is the cost necessary to go from vi to a vertex in S andthen go to w, so if we consider the vertex pr−1

i we will have d(v,w) ≤

6

v1

v2

v3

v4

v5

v6

v1 v6 G = (V, E)

v′

1v′

6K(V ′)

pr−1

1p

r−1

2p

r−1

3p

r−1

4p

r−1

5p

r−1

6

a b

b1 b6 K(B)

qr

1qr

2qr

3qr

4qr

5qr

6

Figure 2: Transformation from Dominating set to Vertex fusion. (odd case)

r + 1. If w ∈ V Pj then the distance between v and w is d(v,w) ≤

d(v, vi) + d(w, vj) + 2 if v,w /∈ S and d(v,w) ≤ d(v, vi) + d(w, vj) + 1if v or w ∈ S so we have d(v,w) ≤ d(v, vi) + d(w, vj) + 2 and this ismaximum when consider pr−1

i and pr−1j so d(v,w) ≤ 2r. In the last

case, if we consider w ∈ Qj, we have d(v,w) ≤ d(v, vi) + d(w, bj) + 2so maximizing the relation we obtain d(v,w) ≤ 2r + 1.

Suppose now that v ∈ Qi then if w belongs in V ∪V ′∪{a, b}∪B we haved(v,w) ≤ d(v, bi) + 2 which implies d(v,w) ≤ r + 2 and if we considerw in Qj their distance is given by d(v,w) = d(v, bi)+d(w, bj )+1, if weconsider the vertices qr

i and qrj we obtain d(v,w) ≤ 2r + 1. So S ∪ {b}

is a d-fusion set.

In the other direction, suppose that S′ is a d-fusion set in G′. Weclaim that exists b∗ ∈ S′ for some b∗ ∈ {b} ∪ B.

Similarly to the example before, if b∗ /∈ S′ for any b∗ ∈ {b} ∪ B, thenwe can consider the distance between qr

i and pr−1j for some j holding

V Pj ∩ S′ = ∅, so the distance between them have to be d(qr

i , pr−1j ) ≥

r + 2 + 1 + r − 1 = 2r + 2.

Then we can write S′ as S ∪ b∗. With the same definition for thefunction t, we claim that t(S) = {t(s1), ..., t(sl)} is a dominating setin G.

If t(S) is not a dominating set in G, exist vk ∈ V for which d(vk, S) > 1,so if we consider the distance between pr−1

k and some qrj for which

V Qj ∩ S = ∅, we will have d(pr−1

k , qrj ) > r − 1 + 1 + r + 1 = 2r + 1 so

S ∪ {b∗} is not a d-fusion set G′ and consequently S is a dominatingset in G.

7

As a consequence of the previous theorem and taking into account thatthe dominating set problem is W[1]-hard [], and that the construction in theproof of the previous theorem is a parameterized reduction, we have:

Corollary 3.2. The vertex fusion problem under diameter constrains isNP-complete for any d ≥ 2. The k-vertex fusion problem is W[1]-hard.

4 Vertex fusion problem in trees

In the previous section we have shown that the problem is hard in generalgraphs. In this section we find an algorithm working in polynomial time forths vertex fusion under diameter constrins for the case in which the inputgraph G is restricted to be a tree.

We start showing properties that relate the vertex fusion problem to ther-dominating set problem. Concretely, we use r-dominating sets to obtainbounds for d-fusion sets.

Proposition 4.1. Let T = (V,E) be a tree and r and k two positive integers.There is a 2r-fusion set with k vertices in T if and only if there is an r-dominating set with k vertices in T .

Proof. Obviously, if T has an r-dominating set S then S is a 2r-fusion setin T .

For the opposite direction, assume that we have a 2r-fusion set in T . Weclaim that we can construct an r-dominating set in T .

Let Vk = {v1, v2, ..., vk} be a 2r-fusion set in T , if Vk is an r-dominatingset in T we have finished so we have to analyze the case where Vk is not anr-dominating set in T .

Consider the following classification in V . Let Ci = {vi1, v

i2, ..., v

ini} ⊂ V

be the subset formed by the vertices in V with vi as the nearest vertex in Vk.Formally we define the set Ci as Ci = {w ∈ V ; d(w, vi) ≤ minj>id(w, vj) andd(w, vi) < minj<id(w, vj)} (note that the second equation in the definitionof Ci make that a vertex w belongs in just one component). In this way, wehave V =

⋃ki=1 Ci. For clarity in the proof, we assume that the vertex vi

1 isone of furthest vertices in Ci to vi. Let wi be the vertex at distance r fromvi1 in the path between vi

1 to vi, and consider the vertex wi = vi if the classCi \ Br(vi) is empty.

Now we want prove, that the set formed by {w1, ..., wk} is an r-dominatingset in T . Assume that v ∈ Ci, we claim that d(v,wi) ≤ r and consequentlyv ∈ Br(wi).

Let P (vi1, vi) be the path between vi

1 and vi and P (v, vi) the path betweenv and vi. If v ∈ P (vi

1, vi) then d(v,wi) ≤ r because the distance between vi1

and vi is not greater than 2r and wi is at distance r from vi1. So we have

to consider v /∈ P (vi1, vi). Obviously P (vi

1, vi) ∩ P (v, vi) 6= ∅ because vi ∈

8

P (vi1, vi)∩P (v, vi), so we consider the nearest vertex v∗ ∈ P (vi

1, vi)∩P (v, vi)to v.

We have two different cases to decompose the path P (vi1, vi):

1. d(vi1, vi) = d(vi

1, wi) + d(wi, v∗) + d(v∗, vi).

2. d(vi1, vi) = d(vi

1, v∗) + d(v∗, wi) + d(wi, vi).

In the first case, we have that d(v, vi1) ≤ 2r, d(v,wi) = d(v, v∗)+d(v∗, wi)

and d(vi1, v

∗) = d(vi1, wi) + d(wi, v

∗) so 2r ≥ d(v, vi1) = d(v, v∗) + d(v∗, vi

1) =d(v, v∗)+d(v∗, wi)+d(wi, v

i1) = d(v, v∗)+d(v∗, wi)+ r = d(v,wi)+ r so this

implies d(v,wi) ≤ r.In the second case, we have that d(v, vi) = d(v, v∗)+d(v∗, wi)+d(wi, vi)

but d(vi1, vi) ≥ d(v, vi) so d(vi

1, v∗)+d(v∗, wi)+d(wi, vi) ≥ d(v, v∗)+d(v∗, wi)+

d(wi, vi) and then r = d(vi1, wi) ≥ d(v,wi).

So, we have that Br(wi) ⊇ Ci and then we finally have that V =⋃ki=1 Ci ⊆

⋃ki=1 Br(wi), so {w1, w2, ..., wk} is an r-dominating set in T .

As a consequence of the previous result we get:

Corollary 4.2. Let T = (V,E) be a tree. If there is an r-dominating set inT with k vertices but there is not any (r − 1)-dominating set with k verticesin T then there is an (2r − 1)-fusion set or 2r-fusion set S with k verticesin T for which T/S has minimum diameter.

Proof. Let S(T, k) be the minimum d for which a d-fusion set with k verticesexists in T .

If there exists a r-dominating set in T with k vertices then S(T, k) ≤2r. In the case that an r − 1-dominating set does not exist in T we have2(r − 1) < S(T, k). Thus we obtain that 2r − 1 ≤ S(T, k) ≤ 2r. Thereforethe minimum diameter for a d-vertex fusion problem is S(T, k) = 2r − 1 orS(T, k) = 2r.

The algorithm differs again depending on whether d is even or odd. Todeal with the case of odd d we need an additional definition. Let T = (V,E)be a tree, S ⊂ V is a (k, r)-nice set if and only if ∃Vk that is a r-dominatingset with k vertices in T \S such that ∀s ∈ S d(s, Vk) ≤ r +1 and ∀s1, s2 ∈ Sd(s1, s2) ≤ 2r + 1.

With the previous definition and taking into account the properties ofr-dominating sets, we have the following result.

Proposition 4.3. Let T = (V,E) be a tree and let r and k be two positiveintegers. There is a (2r + 1)-fusion set with k vertices in T if and only ifthere is a set S ⊂ V that is (k, r)-nice.

Proof. In one direction, if there is a r-nice subset S in T , then we have that

9

• ∀v,w ∈ V \ S, d(v,w) ≤ 2r

• ∀v ∈ V and ∀w ∈ V \ S, d(v,w) ≤ 2r + 1

• ∀v,w ∈ S, d(v,w) ≤ 2r + 1

so in all the cases we have that for any v,w ∈ V , d(v,w) ≤ 2r +1. Similarlywe have that for any v,w ∈ V , d(v, Vk) + d(w, Vk) ≤ 2r + 1.

The opposite direction is proved using an argument similar to the onein the proof of Proposition 4.1. Let Vk be the (2r + 1)-fusion set thatby hypothesis existis in T . Consider the classification of V into k classesCi = {vi

1, vi2, ..., v

ini} ⊂ V which is formed by the vertices in V with vi as

their nearest vertex in Vk. Formally we define the set Ci as Ci = {w ∈V ; d(w, vi) ≤ minj>id(w, vj) and d(w, vi) < minj<id(w, vj)}. Let vj

1 beone of the vertices in Cj furthest to vj and consider the set Si = {s ∈Ci; d(vi

1, vi) = d(s, vi) ≥ r + 1}. Finally, if P (vi1, vi) is the path between vi

1

and vi consider the vertex wi as the vertex in P (vi1, vi) at distance r + 1 to

vi1 if Si 6= ∅ and wi = vi if Si = ∅.

We claim that the set S =⋃k

i=1 Si is a (k, r)-nice set in T . To prove thaclaim we first show that for any v ∈ Ci \ Si, d(v,wi) ≤ r.

Let v ∈ Cj \Sj and consider the path P (v, vj) and v∗ the nearest vertex

to vj1 in P (v, vj) ∩ P (vj

1, vj), then we have to cases:

1. d(vj1, vj) = d(vj

1, wj) + d(wj , v∗) + d(v∗, vj).

2. d(vj1, vj) = d(vj

1, v∗) + d(v∗, wj) + d(wj , vj).

In the first case, we have that d(v, vj1) ≤ 2r + 1, d(v,wj) = d(v, v∗) +

d(v∗, wj) and d(vj1, v

∗) = d(vj1, wj)+d(wj , v

∗) so 2r+1 ≥ d(v, vj1) = d(v, v∗)+

d(v∗, vj1) = d(v, v∗) + d(v∗, wj) + d(wj , v

j1) = d(v, v∗) + d(v∗, wj) + r + 1 =

d(v,wj) + r so this implies d(v,wj) ≤ r.In the second case, we have that d(v, vj) = d(v, v∗)+d(v∗, wj)+d(wj , vj)

but d(vj1, vj) > d(v, vj) so d(vj

1, v∗) + d(v∗, wj) + d(wj , vj) ≥ d(v, v∗) +

d(v∗, wj) + d(wj , vj) and then r + 1 = d(vj1, wj) > d(v,wj), consequently

r ≥ d(v,wj).We can conclude that Wk = {w1, w2, ...wk} is an r-dominating set in

T \ S and consequently S is an r-nice set.

As all the vertices in a (k, r)-nice set are contained in some ball centeredat one edge, from now on we consider the tree T rooted at some edge e. Weanalyze properties of the vertices in this rooted tree that can imply theirmembership in a (k, r)-nice set.

Using the properties of r-dominating sets and the definition of niceness,we have:

10

Lemma 4.4. Let T = (V,E) be a tree rooted at some edge e, let r and kbe positive integers. Assume that there is and edge ball Br(e) containing a(k, r)-nice set S in T . Consider an r-dominating set Vk in T \ S then if Vk

is an r-dominating set in T \ (S ∪ {v}) for some v ∈ Br(e) then S ∪ {v} isa (k, r)-nice in T.

Proof. Clearly, ∀s1, s2 ∈ S ∪{v} d(s1, s2) ≤ 2r +1 because S ∪{v} ⊆ Br(e).Furthermore, ∀s ∈ S ∪ {v} d(s, Vk) ≤ r + 1 due to the fact that ∀s ∈ Sd(s, Vk) ≤ r + 1 and that d(v, Vk) ≤ r because Vk is an r-dominating set inT \ S. Therefore, we conclude that S ∪ {v} is a (k, r)-nice set in T .

As a consequence of the previous results we have:

Corollary 4.5. Let T = (V,E) be a tree, let e ∈ E, and let r and k be twopositive integers. If S ⊆ V is a (k, r)-nice set in T contained in Br(e) thenS ∪ L(Br(e), T ) is also a (k, r)-nice set in T .

Proof. Let T = (V,E) be a tree, let e ∈ E, and let r and k be two positiveintegers. If Vk is an r-dominating set in T \S then if we remove the leafs ofT we have that Vk is an r-dominating set in T \ (S ∪ L(Br(e), T )).

Corollary 4.6. Let T = (V,E) be a tree, let e ∈ E, and let S ⊆ V be a(k, r)-nice set for some pair of positive integers k and r. If v ∈ Br(e) andβr(T

∗v (vi)) = βr(Tv(vi)) + 1 ∀vi son of v then S ∪ {v} is (k, r)-nice.

Proof. Let Vk be an r-dominating set in T \ S, if we consider T \ (S ∪ {v})then Vk′ = Vk ∩

⋃Tv(vi) have at least

∑βr(Tv(vi)) vertices because if Vk′

have least vertices than∑

βr(Tv(vi)) then we have βr(T∗v (vi)) = βr(Tv(vi))

for some son i. But we need just∑

βr(Tv(vi)) to r-dominate⋃

Tv(vi) so byLemma 4.4, S ∪ {v} is an r-nice set.

Our next result shows that we always have a (k, r)-nice set without leavesin a subtree of T provided it exists in T .

Lemma 4.7. Let T = (V,E) be a tree, let e ∈ E, and let r and k be twopositive integers. There is a (k, r)-nice set in T contained in Br(e) if andonly if there is a (k, r)-nice set free of leaves in T \L(Br(e), T ) contained inBr(e).

Proof. Let S be a (k, r)-nice set in T and let e ∈ E be an edge such thatS ⊆ Br(e), then if we consider the set S′ = S \L(Br(e), T ) we have that S′

is a (k, r)-nice set free of leafs in T \ Br(e). In the other direction, let S bea (k, r)-nice set free of leafs and let S ⊆ Br(e). Then if we add L(Br, T ) toS by Corollary 4.5 we have that S ∪ L(Br(e)) is a (k, r)-nice set in T .

Our next result provides the key result to select candidates for a (k, r)-nice set.

11

Lemma 4.8. Let T be a tree , let e ∈ E, and let r and k be two positiveintegers. Let v ∈ Br(e) be such that βr(T

∗v (vi)) = βr(Tv(vi)) + 1 for any

vi ∈ V that is a son of v. Then, there is a (k, r)-nice set free of leavesin T if and only if there is a (k′, r)-nice set free of leaves in T \ T (v), fork′ = k −

∑βr(Tv(vi)).

Proof. In one direction, let S be a (k, r)-nice set free of leaves in T then byCorollary 4.6 S∪{v} is n (k, r)-nice set free of leaves in T , which implies thatT \ (S ∪ {v}) has an r-dominating set Vk, but

∑βr(Tv(vi)) is the number

of vertices necessary to cover⋃

Tv(vi) so we can cover with k −∑

Tv(vi)vertices (T \Tv)\ (S ∪{v}) so (S ∪{v})\Tv is a (k′, r)-nice set free of leavesin T \ Tv for k′ = k −

∑βr(Tv(vi).

In the other direction, if S is an (k′, r)-nice set free of leaves in T \ Tv

for k′ = k −∑

βr(Tv(vi)), then S ∪ {v} is a (k, r)-nice set in T because wecan cover

⋃Tv(vi) with

∑βr(Tv(vi)) vertices.

Now we can state here the main result

Theorem 4.9. The vertex fusion problem under diameter constraints whenthe input graph is restricted to be a tree can be solved by a polynomial timealgorithm.

Proof. By Corollary 4.2 we can bound the minimum possible diameter forsome r between 2r and 2r + 1.

From Lemma 4.7 we can find (if it exists) a (k, r)-nice set free of leaves inT \L(Br(e), T ) for some e ∈ E. To find it, we use Lemma 4.8 decreasing thesize of the tree in every step. Finally and depending on whether a (k, r)-setexist or not in T , by Proposition 4.3 we can decide if the minimal diameteris 2r + 1 or 2r.

The complexity of the algorithm is dominated by the complexity of com-puting the r-dominating set in all the subtrees of T \Br(e) for every e ∈ E.This step has a cost O(n2) for a tree rooted on an edge e and thus, a totalcost O(n3) when performing the computation for every e ∈ E. As we haveto repeat the process using Lemma 4.8 at most k times, the total complexityof the algorithm is O(kn3).

5 Conclusions and further results

We have shown that the vfdc problem is NP-hard in general and provideda polynomial time algorithm when the input is restricted to be a tree. Ouralgorithm is based on the computation of an adequate r-dominating set. Wesuspect that our algorithm can also be extended to other graph classes forwhich the dominating set problem can be solved in polynomial time.

Concerning parameterized complexity two parameter arise naturally, thegraph diameter d and the size of the fusion set k, this leads to the definition

12

of the d-vertex fusion problem and of the k-vertex fusion problem.Theorem 3.1 implies that the d-vertex fusion problem is NP-hard ford ≥ 2 and thus not likely to be fixed parameter tractable. The reduction inTheorem 3.1 shows also that the size of the d-fusion set is r + 1, thereforetaking into account that the k-ds problem is W[1]-hard, the k-vertex fusion

problem is not likely to be fixed parameter tractable.There remain several open problems related to vertex fusion an dis-

tances, for example the complexity of augmentation problem under radiusor eccentricity constraints.

References

[1] N. Alon, A. Gyarfas, and M. Ruszinko. Decreasing the diameter ofbounded degree graphs. J. Graph Theory, 35:161–172, 2000.

[2] R. Chandrasekaran and A. Daughety. Location on tree net-works: P-center and n-dispersion problems. Discussion Papers 357R,Northwestern University, Center for Mathematical Studies in Eco-nomics and Management Science, December 1978. available athttp://ideas.repec.org/p/nwu/cmsems/357r.html.

[3] Victor Chepoi, Bertrand Estellon, Karim Nouioua, and Yann Vaxes.Mixed covering of trees and the augmentation problem with odd diam-eter constraints. Algorithmica, 45(2):209–226, 2006.

[4] Victor Chepoi and Yann Vaxes. Augmenting trees to meet biconnec-tivity and diameter constraints. Algorithmica, 33(2):243–262, 2002.

[5] P. Erdos, A. Gyarfas, and M. Ruszinko. How to decrease the diameterof triangle-free graphs. Combinatorica, 18(4):493–502, 1998.

[6] Chung F.R.K. and Garey M.R. Diameter bounds for altered graphs. J.Graph Theory, 8:511–534, 1984.

[7] M.R. Garey and D.S. Johnson. Computers and Intractability: A Guideto the Theory of NP-Completeness. W. H. Freeman, 1979.

[8] Toshimasa Ishii, Shigeyuki Yamamoto, and Hiroshi Nagamochi. Aug-menting forests to meet odd diameter requirements. In ISAAC, pages434–443, 2003.

[9] O. Kariv and S. L. Hakimi. An algorithmic approach to network loca-tion problems. I. The p-centers. 37(3):513–538, December 1979.

[10] A. A. Schoone, H. L. Bodlaender, and J. van Leeuwen. Diameter in-crease caused by edge deletion. J. Graph Theory, 11(3):409–427, 1987.

13