9
This article was downloaded by: [University of Cambridge] On: 09 October 2014, At: 17:38 Publisher: Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK Engineering Optimization Publication details, including instructions for authors and subscription information: http://www.tandfonline.com/loi/geno20 ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS V. J. RAYWARD-SMITH a a School of Computing Studies & Accountancy, University of East Anglia , Norwich, NR4 7TJ, UK Published online: 21 May 2007. To cite this article: V. J. RAYWARD-SMITH (1984) ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS, Engineering Optimization, 7:4, 281-288, DOI: 10.1080/03052158408960643 To link to this article: http://dx.doi.org/10.1080/03052158408960643 PLEASE SCROLL DOWN FOR ARTICLE Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) contained in the publications on our platform. However, Taylor & Francis, our agents, and our licensors make no representations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of the Content. Any opinions and views expressed in this publication are the opinions and views of the authors, and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon and should be independently verified with primary sources of information. Taylor and Francis shall not be liable for any losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoever or howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use of the Content. This article may be used for research, teaching, and private study purposes. Any substantial or systematic reproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in any form to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http:// www.tandfonline.com/page/terms-and-conditions

ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

  • Upload
    v-j

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

This article was downloaded by: [University of Cambridge]On: 09 October 2014, At: 17:38Publisher: Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House,37-41 Mortimer Street, London W1T 3JH, UK

Engineering OptimizationPublication details, including instructions for authors and subscription information:http://www.tandfonline.com/loi/geno20

ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNINGSUBGRAPHSV. J. RAYWARD-SMITH aa School of Computing Studies & Accountancy, University of East Anglia , Norwich, NR4 7TJ,UKPublished online: 21 May 2007.

To cite this article: V. J. RAYWARD-SMITH (1984) ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS,Engineering Optimization, 7:4, 281-288, DOI: 10.1080/03052158408960643

To link to this article: http://dx.doi.org/10.1080/03052158408960643

PLEASE SCROLL DOWN FOR ARTICLE

Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) containedin the publications on our platform. However, Taylor & Francis, our agents, and our licensors make norepresentations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of theContent. Any opinions and views expressed in this publication are the opinions and views of the authors, andare not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon andshould be independently verified with primary sources of information. Taylor and Francis shall not be liable forany losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoeveror howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use of theContent.

This article may be used for research, teaching, and private study purposes. Any substantial or systematicreproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in anyform to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http://www.tandfonline.com/page/terms-and-conditions

Page 2: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

Engineering Optimization, 1984, Vol. 7, pp. 281-288© 1984 Gordon and Breach Science Publishers, Inc.0305-215Xj84/0704-02SI$IS.50jO Printed in Great Britain

ON FINDING CONSTRAINED MINIMUM WEIGHTSPANNING SUBGRAPHS

V. J. RAYW ARD-SMITH,

School ofComputing Studies & Accountancy, University of East Anglia,Norwich, NR4 7TJ, UK.

(Received NonemberHl, 1983)

We consider problems of finding a minimum weight spanning subgraph which has to satisfy some additionalconstraint defined in terms of distances between vertices. Three distinct problems of this type are definedand all are shown to be NP-hard. Heuristic algorithms for their solution are discussed.

INTRODUCTION

Let G = (V, E) denote a graph with a finite number of vertices, V, and edges E c

V x V In this paper, we are. concerned with weighted graphs and, in particular,ones with associated weight function w: E -> Z+, where Z+ denotes the set of positiveintegers.

If u, v E V are two vertices of G then there is a path in G from u to v ifand only if there exist vertices u = VI' V2, ••• , Vm - 1, Vm = v such that m > 1 and(vj , Vi + I) E E for i = 1,2, ... , m - 1. The graph G is connected if there exists a pathin G from u to v for any u, v E V. Unless explicitly stated, all graphs in this paper willbe connected. The weight of a path in G is the sum of the weights of the edges in-thepath. Since we assume that the graph is connected and the weights are positive, thereis always a minimal weight path in G between any two given nodes, u, v E V. This pathwill contain no cycles and its weight defines the distance in G between u and v,denotedby dG(u, v).The diameter of the graph G, diam (G), is then defined to be max •.vEydG(u,v).

If G = (V, E) is a graph then G' = (V', E) is a subqraph of G if V' c V and E' c E.If V' = V and G' is connected then G' is said to be a spanning subgraph of G.

The weight, w(G), of a weighted graph G = (V, E) is the sum of the weights of itsedges, i.e. w(G) = LeEE wee). Clearly, if the weights of all the edges of a graph arepositive then the spanning subgraph of minimal weight can contain no cycles and isthus a tree. Well known algorithms exist to construct minimal spanning rrees/: 7, 9

If the vertices of a graph represent locations and the edges represent possiblecommunication links weighted with the associated cost of providing these links, thenspanning subgraphs represent possible communication networks. Although it isimportant to keep the total cost of a communication network small, the engineerwill also be faced with other constraints. For example, a communication networkmay not be acceptable if the distance between two locations in the chosen networkexceeds some given bound. This bound may be fixed or may depend upon the distancebetween the locations as defined by the parent graph. In this paper, we consider inSection 2 the difficulty of finding communication networks under these and similarconstraints. Unfortunately, all the results are negative in the sense that the problems

281

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 3: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

282 DR V. J. RAYWARD-SMlTH

are shown to be NP-complete4 and hence most unlikely to yield to polynomial timealgorithms. Heuristic methods can be used to give approximate solutions and wediscuss these in Section 3.

As is usual in this type of work, we will formulate our optimization problems asdecision problems. We consider the following:

DISTBND

Instance: A graph G = (V, E), weight function w: E -> Z+, real constants k l > 0,k2 ~ 0, integer bound b > O.

Question; Is there a spanning subgraph of G, G' == (V, E'), such that

i) dG(u, v) 5: k l dG(u, v) + k2 for all u, v E V

and

ii) w(G') 5: b?

If, in the above, we had had k 1 = 0 then we would have been considering:

DIAMBND

Instance: A graph G = (V, E), weight function w: E -+ Z+, integer bounds b l > 0,b2 > O.

Question: Is there a spanning subgraph of G, G' = (V, E'), such that

i) dG (u, v) 5: b, for all u, VE V, i.e. the diameter of G' is less than or equal to b l ,

and

ii) w(G') s b2 ?

Finally, we consider constraining the sum of distances over all possible pairs and get

SUMBND

Instance: A graph G = (V, E), weight function w: E -+ Z ", integer bounds b I > 0,b2 > O.

Question: Is there a spanning subgraph of G, G' = (V, E'), such that

i) Lu,uevdG.(u. v) s b,and

ii) w(G') s b2 ?

It is important to note that we are not insisting that our spanning subgraphs shouldbe trees. In many instances, the first constraint in the above three types of problemcan only be satisfied if the spanning graph contains one or more cycles. The complexityof various multi-constrained spanning tree problems is discussed by Cameriniet al.' However, their work is for un weighted graphs only.

2 NP-COMPLETENESS RESULTS

To prove a problem, n is NP-complete we have to show that n E NP and that thereexists a problem Il' which is NP-complete such that Fl' ex. n. Clearly all three of theproblems cited in Section 2 are in NP since for any guessed subgraph we can check

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 4: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

CONSTRAINED SPANNING SUBGRAPHS 283

in polynomial time whether it spans the parent graph and satisfies the various con­straints. Our proofs of NP-completeness given in theorems 1, 2 and 3 thus rely onexhibiting a polynomial transformation from a known NP-complete problem to thatunder discussion.

Theorem I DISTBND is NP-complete.

Proof Exact cover by three sets (X3C) is a known NP-complete problem." It isstated thus

X3C

Instance: Collection C = ,{CI, C2 , ... , Cm} of subsets of a set S = {X., x 2 , .•• ,x3 q }

such that each C, contains exactly three elements of S.

Question: Does C contain a cover of S of size q, i.e. are there q subsets

Cil , Ci 2 ' ... ' Cj q E C

such that U1= I Cij = S?

Clearly, if C does contain a cover then the subsets in this cover must all be pairwisedisjoint. We will show that X3C ex: DISTBND. From an instance I of X3C we con­struct an instance of DISTBND as follows. The vertices of G are defined by V =S u C u {s, s} and the edges

E = {(x;, Cj):XjECj} U res, Cj):CjEC} u res, C):CjEC) U res, S)}.

Of these four sets of edges, the first set all have weight 1, the second set all have weightW, the third set all have weight 2 and the edge (s, s) has weight W - 1. The integer wis large and chosen such that w > 5m.

Figure I illustrates the weighted graph resulting from the instance of X3C withC 1 = {t, 2, 3}, C2 = {2, 4, 5}, C3 = {3, 4, 5}, C4 = {I, 3, 6}, c, = {2, 5, 6} andS = {I, 2, 3, 4,5, 6}.

2 3 4

FIGURE I

5 6

)

all aresweighted 1

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 5: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

284 DR V. J. RAYWARD-SMITH

We now set k l = t, k2 = w/2 + 1 and b = (q + 2)w - 1. We have to show that1 has answer "YES" if and only if the constructed instance of DISTBND has answer"YES",

Firstly, if OISTBND has answer YES then there exists a spanning subgraph,G', of G such that

1) dG,(u, v) :s; tdG(u, v) + w/2 + 1 for all u, v and

2) w(G') :s; (q + 2)w - 1.

From the first condition we see that dG,(s, s) :s; tdG(s s) + (w/2 + 1) = !(w - 1) +w/2 + I = IV + t so the edge (s, s) with weight w - 1 must appear in G'. We knowfrom the second condition that w(G') :s; (q + 2)w - 1 and from this we can infer thatthere are at most q arcs with weight w emanating from s. Now, again from the firstcondition, we can deduce that dds, Xi) :s; tdG(s, Xi) + (w/2 + 1) = t(w + 1) + w/2+ I = w + It. Thus, for each Xi' there exists a path of length w + 1 from S to Xi' Thismust comprise two arcs (s, Cj ) and (C j , Xi) for some C, E C. Since every C, can bejoined to at most three x-nodes in G', this means that there are at least q arcs from swith weight w. Combining the above two arguments, we see there must be exactly qarcs from s with weight w. Let C = {Cjl(s, C) is an arc in G'. C has q elements and foreach Xi E S there exists some C, E C such that (Xi' Cj ) is an arc in G'. Thus C mustcover S.

Conversely, if! has a YES solution, then construct the subgraph G' of G by keepingall edges of weight 1, all edges of weight 2, the edge of weight w - 1 but only the qedges of weight w defined by {(s, C) IC, is in the cover of S}. The total cost of theseedges is 3m + 2m + (w - 1) + qw < (q + 2)w - 1 so that w(G') :s; (q + 2)w ~ 1 issatisfied. We now have to check that all the distance constraints are also satisfied.For all C; E C, dG,(s, C) :s; W + 1 = tdaCs, C) + (w/2 + 1); and dG,(s, C) = 2 <t.2 + w/2 + 1 = tdG(s, Cj ) + (w/2 + 1). For all Xi E S, dG.(s. Xi) = w + 1 < -!(w + 1)+ w/2 + t = tdG(S, Xi) + (w/2 + 1) and dds, x.) = 3 < t.3 + w/2 + 1 =tdG(s, Xi) + (w/2 + 1). Also, for all Xi E S, C, E C, dG.(xi , C j ) = 1 < tdG(x j , C) +(w/2 + 1). So all the distance constraints are satisfied.

The construction of the graph corresponding to a given instance I of X3C can clearlybe constructed in polynomial time and hence the theorem is established.

Theorem 2 OIAMBND is NP-complete.

Proof Bounded (underlying) diameter spanning tree (BOST) has been shown tobe NP-complete4

.

BOST

Instance: Graph G = (V, E), weight function w:E -> Z +, positive integer d < IV Iand positive integer b.

Question: Is there a spanning tree T for G such that

i) T contains no simple path with more than d edges,

and

ii) weT) :s; b.

BOST ex: DIAMBNO is fairly straightforward. From an instance of BOST weconstruct an instance of OIAMBNO by using the same graph but by increasing the

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 6: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

CONSTRAINED SPANNING SUBGRAPHS 285

weight function to w' where w'(e) = wee) + k and k > w(G). The constraints ofDIAMBND are set to

i) ddu, v) ~ (d + l)k - 1 for all u, v E V

and

ii) w'(G') ~ b + (I VI - l)k.

The first or these is satisfied if and only if there is no simple path in the subgraphcontaining more than d edges and the second if and only if G' is a tree and w(G') ~ b.

Theorem 3 SUMBND is NP-complete.

Proof If wee) = 1 for all e E E and b2 is set to IV I - 1 to ensure that the spanningsubgraph is a tree, then SUMBND becomes the NP-complete network designproblem." Since SUMBND is a generalisation of an NP-complete problem, it mustitself be NP-complete.

3 APPROXIMATE SOLUTIONS

For each of the three decision problems, there is an associated optimization problem.For example, that associated with DISTBND is the problem of finding a minimalweight spanning subgraph, GOPT , of a given weighted graph, G, such that

dGOPT(u, v) ~ ktdG(u, v) + k2 for all u, v E V

for some given k l > 0, k 2 ~ O. We now know that none of these optimization prob­lems are likely to be solvable by a polynomial time algorithm and thus we must turnour attention to finding approximate solutions. If w(GOPT) is the minimal weight of aspanning subgraph satisfying a given distance constraint, then we hope to find aspanning subgraph, G', which also satisfies the constraint and is such that w(G') isnot much greater than w(GOPT) '

We shall concentrate on the optimization problem associated with DISTBND butour arguments can be equally well applied to the optimization problems arisingfrom DIAMBND or SUMBND. Firstly, we observe that the familiar minimumweight spanning tree problem is obtained from our optimization problem by relaxingthe distance constraint. It follows that if T is the minimum weight spanning tree ofG then weT) ~ w(GOPT) ' We can also obtain an upper bound on w(GOPT) by applyingthe following greedy algorithm.

Discard Algorithm:

1) Let G' = G and let e l , e2 , ..• , em denote an ordering of the edges of G' by non­increasing weight.

2) for i from 1 to m do

remove e, from G' only if the resultant graph still satisfies the distanceconstraint.

Since the distances {dr.'Cu, v):u, v E V} can all be calculated in 0(1V1 3) time using

Ref. 3, the discard algorithm is a polynomial time algorithm of O(1nIl E I). If.f'Ddenotes the graph resulting from this algorithm then w(GD) ~ w(GOPT) ' Summarisingthe above, we have proved

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 7: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

2116 DR V. J. RAYWARD-SMITH

Unfortunately, the discard algorithm can perform very badly. In Figure 2 wegive an example of a weighted graph comprising 2n + 2 nodes ao, bo, ai' b" ... , a., b.and weighted edges as indicated. If we seek a minimal weight spanning subgraph,GOPT , such that

dGOPT(u, v) ~ (1 + 3t:)dG(u, v) for all u, v E V

then w(GOPT) = 1 + (2n + 1)1:. However, the discard algorithm only removes theedge (ao, bo) and thus w(Gv) = n + 2nt:. Assuming that I: > 0 is arbitrarily small,we see that in this case w(Gv)/w(GOPT) is 0(1V I).

E

FIGURE 2

We thus propose a tree search algorithm derived from the discard algorithm. Again,we assume that the edges of G are ordered e l , e2, ... , em by nonincreasing weight.Then, at level i in the search tree, we branch according to whether or not edge e, isto be included in the spanning subgraph (see Figure 3). Let nj denote a node at leveli of the tree. The path from the root to the node n j determines a subset of{el, e2' ... , e i - I } denoted by E(nJ, Three possibilities occur:

i) G., = (V, E(nj» is a spanning subgraph satisfying the distance constraints. Thennj is designated a terminal node with value w(G.}

ii) (V, E(n;) u rei' ... , em}) is either disconnected or does not satisfy the distanceconstraints. Then nj is a terminal node with value co.

iii) (V, E(n j ) u {ej , ••• , em}) is a spanning subgraph of G which also satisfies thedistance constraints. The value assigned to ni , v(n j ) , must then represent an estimationof m(nj ) = min{w(G.): G. is a spanning subgraph satisfying the distance constraintsand nj is in the subtree ro~ted at n;}.

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 8: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

CONSTRAINED SPANNING SUBGRAPHS

level I

level 2

level 3

287

••

•••

•••

e/,:;---~---~----~- --~-----~- -- ---FIGURE 3

level i

The tree search proceeds by growing the tree from the root and at each step con­sidering for expansion the leaf node with least value. If this leaf node is terminal thealgorithm halts and the solution is determined by the node under consideration.Otherwise, the node is expanded, the values of its children are evaluated and the pro­cess repeated. Hence, this is an example of algorithm A· (see Ref. 8).

A lower bound, l(n;), on m(nj ) can be achieved by relaxing the distance constraintand using an extension of Kruskal's algorithm 7, viz.

G1 i- (V, E(nJ);

for j from m by -1 to i while G I is disconnecteddo if the addition of ej does not form a cycle in G I

then add ej to G1 ;

l(n;) i- w(G1) .

Similarly, an upper bound, u(n j ) on m(nj ) can be achieved from an extension of thediscard algorithm, viz.

G; i- (V, E(nj ) u {e., ... , em});

for jfrom i to m doremove e, from Go only if the resultant graph still satisfiesthe distance constraint;

Using these two algorithms, we see that we should define v(nj ) such that I(n j ) ~

v(n j ) ::;; u(n;). The lower bound could be used to find an exact solution by settingv(n;) = l(nJ This follows from a well-known result described in Ref. 8. However. thesearch time could. of course, then be exponential. If v(n j ) = U(lli), then the tree search

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014

Page 9: ON FINDING CONSTRAINED MINIMUM WEIGHT SPANNING SUBGRAPHS

288 DR V. J. RAYWARD-SMITH

algorithm will no longer necessarily given an exact solution but the search time maybe considerably reduced. The solution obtained will be as good as, if not better than,a solution obtained from the discard algorithm. (If we run the tree search algorithmwith v(n j ) = u(n j ) on the example of Figure 2, the solution obtained is in fact optimal.)

An engineer who is faced with this type of optimization problem should try variousfunctions for v(nJ For example, if he finds that v(n j ) = u(ni) produces a solutionreasonably quickly, he might try v(ni) = (l(n j ) + u(n j ))/2. If this gives a better solutionreasonably quickly, he might then try another bisection and set v(n j ) = (3/(n;) +u(n;))/4. Alternatively, if v(nj) = (l(n j ) + u(n j ))/2 causes the search algorithm to thrash,he can either do a depth first search on the most promising nodes or try again withv(nj) = (/(ni ) + 3u(n j))/4. This bisection approach to finding a good measure canclearly be iterated a number of times. Other expressions for v(ni ) based on heuristicscould also be designed.

ACKNOWLEDGEMENTS

The author wishes to acknowledge the help and encouragement received from members of the MathematicalAlgorithms Group at the University of East Anglia, Norwich. In particular, Dr. G. P. McKeown andMr. M. C. Field took part in useful discussions.

REFERENCES

I. P. M. Camerini, G. Galbiati, and F. Maffioli, "On the Complexity of Finding Multi-constrainedSpanning Trees," Discrete Applied Maths., 5, 39-50 (1983).

2. D. Cheritou and R. E. Tarjan, "Finding Minimum Spanning Trees," SIAM J. Comput., 5, 724-742(1976).

3. R. W. Floyd, "Algorithm 97: Shortest Path," CACM,S, 345 (1962).4. M. R. Garey and D. S. Johnson, Computers and Intractability, W. H. Freeman, San Francisco, (1979).5. D. S. Johnson, J. K. Lenstra, and A. H. G. Rinnooy Kan, "The Complexity of the Network Design

Problem," Networks, 8, 279-285 (1978).6. R. M. Karp, "Reducibility among Combinatorial Problems," Complexity of Computer Communica­

tions (eds. R. E. Miller and J. W. Thatcher). Plenum Press, New York, 85-103 (1972).7. J. B. Kruskal, "On the Shortest Spanning Subtree of a Graph and the Travelling Salesman Problem,"

Proc. Amer. Math. Soc., 7, 48-50 (1956).8. N. J. Nilsson, Problem-Solving Methods in Artificial Intelligence, McGraw Hill, New York, (1971).9. R. C. Prim, .. Shortest Connection Networks and Some Generalizations," Bell System Tech. J., 1389­

1401 (1957).

Dow

nloa

ded

by [

Uni

vers

ity o

f C

ambr

idge

] at

17:

38 0

9 O

ctob

er 2

014