ameter spanning tree (MDST) of a set of n points in ... find a communication network among n nodes, where ..... In this case the diameter fs(c) = 2)er - c] which.
Bounded-Diameter Minimum Spanning Trees and Related Problems Jan-ming Holy2 Northwestern University
D. T. Lee1 Northwestern University C. K. Wong IBM T. J. Watsqn
Abstract
Spanning tree related problems in a graph have been well studied (12,2]. So have the diameter problems in which the diameter is measured in terms of the number of edges, instead of the total weight [l]. What motivates this investigation is that we want to find a communication network among n nodes, where the communication delay is measured in terms of the total weight of a shortest path between them. A desirable communication network naturally is one that has a minimum diameter. We restrict ourselves to the class of spanning trees. Since we may have many spanning trees with the same minimum diameter, we would like, in this case, to find one with the minimum cost, i.e., the total weight of the edges in the tree is minimum. A similar problem known as bounded diameter spanning tree problem, was shown to be NPhard by Garey and Johnson [S]. In this problem, the measure of the diameter is in terms of the maximum number of edges in any path of the spanning tree. In this paper we shall study the problem of finding a minimum diameter spanning tree (MDST) of a graph, called Euclidean graph, induced by a set of n points in the Enclidean plane, and the problem of finding minimum diameter Steiner tree in which new points are allowed. We summarize our main results below:
We consider the problem of finding a minimum diameter spanning tree (MDST) of a set of n points in the Euclidean plane. The diameter of a spanning tree is the maximum distance between any two points in the tree. We give a characterization of an MDST and present a 0(n3) time algorithm for solving the prohlem. We also show that for a weighted undirected graph, the problem of determining if a. spanning tree with total weight and diameter upper bounded, respectively, by two given parameters C and D exists is NP-complete. The geometrical minimum diameter Steiner tree problem, in which new points are allowed to be part of the spanning tree, is shown to be solvable in O(n) time.
1
Introduction
The diameter of a weighted graph G = (V, E) is defined as the longest of the minimum paths among all the pairs of vertices V, where V is the set of vertices and E is the set of edges. The radius of G with respect to a specific vertex v E V is defined as the longest of the minimum paths emanating from u. A spanning tree of a graph G = (V, E) is a connected graph T = (V, ET) without cycles. lSupported by the National Science Grant DCR 84-20814. 20n leave from Institute of Information Sinica, since 1986.
Foundation Science,
Theorem 1 A minimum diameier spanning free (MDST) of a set of n points can be found in 6(n”) time.
under
Theorem 2 Given a weighted undirected graph G = (V,E) and two parameters D and C, the problem of deciding if a spanning tree with cost and diameter upper bounded, respectively, by C and D exists is NPcomplete.
Academia
Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission.
0 1989 ACM O-89791-318-3/89/0006/0276
Chia-Hsiang Chang New York University
Theorem 3 Given a weighted undirected graph G = (V, E) and a vertex, u E V, and two parameters C and R, the problem of deciding if a spanning tree with cost and radius with respect to u upper bounded, respectively, by C and R exists is NP-complete.
$1.50
276
Theorem 4 Given a set S of n points in the plane, the problem of finding a minimum diameter spanning tree of S can be obtained in 6(n) time, if additional (Steiner) points are allowed.
This paper is organized as follows. In Section 2 the problems to be studied are formally defined. In Section 3 we present the g(n3) algorithm for the geometric MDST problem. In Section 4 we give the proof of NP-completeness of the bounded diameter bounded cost spanning tree (BDBCST) problem. In Section 5 we outline the linear time algorithm for the Steiner minimum diameter spanning tree problem. In Section 6, some open problems are given.
2
Problem
Figure 1: Topology lemma 1
of the tree used in the proof of
cost function IV(e) E Z+ for all e E E, find a Steiner where S E VT E V, of G such tree T = (&,ET), is minimized. that maXaimple path PET CeEP w(e)
Definitions
Given a set S of n points, S = {pl,pz,. . . ,pn}, the Euclidean graph G induced by S is a weighted complete graph G = (S, E), where the cost (or weight) of an edge (pi,pj) E E is the Euclidean distance between the points pi and pj. Our main concern is the minimization of the diameter, instead of minimizing the total cost, of the spanning tree T of a graph G. But in the meantime, if there exist several spanning trees having the same minimum diameter, we would like to find the one with a minimum total cost. We define in this section some problems related to minimizing the diameter of the spanning tree of a graph G:
3
Geometrical Minimum eter Spanning Tree
Diam-
In this section, we first prove a fundamental property of a geometrical minimum diameter spanning tree (GMDST). Based on this property, we then present a polynomial time algorithm for computing the spanning tree. Without confusion, we shall use the term “diameter” to mean both the length of the longest path and the path itself.
Problem 1 MDST Problem Given a graph G = (V, E) and a cost function IV(e) E Z+ for all e E E, find a spanning tree T for G such that mGimpk path PET CeEp IV(e) is minimized.
Lemma 1 The diameter of u geometric minimum diameter spurting tree of a set of n points with a minimum number of segments contains no more than 3 segments.
We shall consider the geometric MDST which the graph is a Euclidean graph.
Proof: Assume that the diameter of the GMDST, denoted as T, of a set S of n points contains k edges, where k >_ 4. Let the diameter of the GMDST T of the set S consist of a sequence of points, (A, B, C, . - -, D, E, F), where points A, B, C, D, E, and F are distinct except possibly that C may be identical to D, in which case k = 4. If we delete the edge (B, C) from T, two subtrees are obtained. Let’s consider the subtree TB rooted at B. Without loss of generality, we may assume that vertices in TB are connected to vertex B directly. In other words, TB is a star graph with kernel B. Otherwise, by the triangle inequality, we can transform subtree TB into a star without increasing the diameter of the tree T. Similarly, the subtree TE associated with the vertex E after edge (D, E) is removed is also a star. (Figure 1)
problem
in
Problem 2 BDBCST Problem Given a graph G = (V, E), a cost function l&‘(e) E Z+ for all e E E, and positive integers C and D, is there a spanning tree T for G such that x&T w(e) < C and CeEp w(e) 5 D for all simple path p in T? Problem 3 BRBCST Problem Given a graph G = (V, E), a cost function IV(e) E Z+ for all e E E, a distinguished vertex ZI E V as the root, and positive integers R and C, find a spanning tree T for G such that CeET IV(e) 5 C and CeEp IV(e) < R for all simple path p E T starting from the root v. Problem 4 Steiner MDST Problem Given a graph G = (V, E), a subset S of V, and a
277
Since the tree T is a GMDST with a minimum number of segments on the diameter, we claim that:
IAwhere points length verify
Cl > len(C,~..,D,E,F),
Definition I A spanning tree of an n-point set S is called monopolar if there exists a point called the monopole such that all the remaining points are connected to it; and is called dipolar if there exist two points called the dipole such that all the remaining points are directly connected to one of the two points in the dipole.
(1)
IX-Y 1d enotes the Euclidean distance between denotes X and Y and len(PATH-ON-TREE) of the path PATH-ON-TREE on the tree. To this statement, assume the contrary
IA-CJ
< Zen(C,...,D,E,F)
Note that any GMDST with a two-segment diameter can be transformed into a monopolar spanning tree without increasing the length of the diameter. Similarly a GMDST with a three-segment diameter can be transformed into a dipolar spanning tree. Based on lemma 1, we can device the following algorithm. ALGORITHM FUNCTION GMDST (S: a set of n points) begin
(2)
is true. Now consider the spanning tree Tl of the set S of points, in which the edge (B, V) in TB, where V E TB, is replaced by edge (C, V). It suffices to consider only those vertices V such that IV - BI = IA - BI. Note V may equal A. If
IC - VI < Zen(V, B, C)
which returns the mono1. find-min-of-MPST(S): plar spanning tree of the set S of a minimum diameter, denoted as MPST, and the length of its diameter, denoted as LDM;
for each vertex V with IV-B1 = IA-BI, the diameter of the transformed tree TI is smaller than that of the Suppose now GMDST T, which is a contradiction. that there exists a vertex V
2, find-mixofDPST(S): which returns the dipolar spanning tree of the set S of a minimum diameter, denoted as DPST, and the length of its diameter, denoted as LDD ;
IV-BI=IA-BI and
IC - VI = len(V, 8, C), The diameter of Tl consists of (V, C, . . . , D, E, F) and has the same length as T. The number of segments of the diameter of the transformed tree Tl is smaller than that of the GMDST T, which is again a contradiction. Since the inequality ing:
P-4
, - . . , D, E, F) IA-Cl len(A, B, C) len(A,B,C,*-a,D).
:= MPST;
end. For each point p E S, we construct a monopolar spanning tree by associating one edge for each point in the set S - {p}. The diameter for the MPST centered at p is the sum of the distance between p and its farthest neighbour and the distance between p and its second farthest neighbour. The algorithm find-min-of-MPST(S) returns the MPST, centered at This a point p*, whose diameter is the minimum. subproblem can be solved in O(n2) time l. The algorithm find-min-of-DPST(S) can be implemented in O(n3) time as given below. Basically, we consider all pairs of points, pi and pi, as possible centers of a dipolar MDST, and select the pair that gives an MDST. Consider now any pair pi and pi, i # j, We now want to find two circles Ki and Kj, centered at pi and pj, respectively, and covering the set of points such that the sum of &, Rj and ipi -pj I is minimum, where & and Rj are the radii of Ki and Kj respectively. We proceed as follows. Suppose pi and pj are taken as the two poles of the dipole. Points other than pi and pj are sorted, according to their distances with respect to pi (pi), into a non-decreasing list Li
(1) is true, we have the follow-
s wg7 Jfw) 2 < 5
3. if LDM 5 LDD then GMDST else GMDST := DPST.
(triangle inequality) (inequality (1)) (driangle inequality)
Note that since T has a minimum number of segments, IC-Al must be strictly less than len(A, B, C); otherwise, A is considered connected directly to C and the number of segments in the new diameter is smaller than that of T. By arguments similar to those for establishing the inequality (l), the above inequality also contradicts the GMDST assumption. This completes the proof. o Now, it’s obvious that given a set S of n points, n > 2, the diameter of a GMDST of the set S may have either two or three segments. In other words, the GMDST could be treated as having a single center in the two-segment-diameter case and having two centers in the latter case. To characterize these two cases, the following definition is given:
lThis neighbor
278
can be done in O(n log n) time Voronoi diagram [4,7,8,9,11,13].
using
the farthest
(Lj). The lath point in the list Li is designated as Li[k]. By traversing the lists in O(n) time, we can then identify all the possible four-point combinations (ei,pi,pj,ej), where ei = Li[L], ej = Lj[l], for some h and 1 such that len(ei,pi,pj, ej) is the diameter, and that Lj[ll E {Li[k’]lk’
> k,l iS U m&mum}
and Li[kJ E {Li[l’]lZ’
> I}.
Each four-point combination determines a dipolar spanning tree. It is easy to see that O(n) time suffices to find the best MDST centered at pi and Fj. The best dipolar spanning tree among all possible dipoles pi and pj is the minimum diameter dipolar spanning tree. We thus have the following theorem. Theorem
(MDST) time.
4
1 A minimum diameter spanning tree of a set of n points can be found in e(n”)
NP-Completeness BCST Problem
of the BD-
.
In this section, we’ll show the NP-completeness of the BDBCST problem for general graphs. Theorem
2 BDBCST
is NP complete.
Proof: BDBCST is in NP. Since the most heavyweighted simple path must be a path connecting two leaf nodes, we may randomly guess n - 1 edges and check if the tree satisfies the constraints in polynomial time. Let C = {Cl, CZ, . .. . C,} be an instance of 3SAT over variable set {Xl, Xp, . . . ,X,,}. We’ll construct a graph G = (V, E) and weight function W such that C is satisfiable if and only if there is a spanning tree T for G such that CeET w(e) 5 3n + 3q + 5 and ‘&r IV(e) 5 10 for all simple path p in tree T. The construction of G is as follows (Figure 2). G contains the following vertices: the truth setting node t, variable nodes {z1,~1, t2,t2, . ... z,, &}, the clause nodes (cl, c2, ... . c,} and a special node s. G contains the following edges: the assignment edges {(t, z)] for all variable node x), the consistency edges {(zi, Zi)li = 1 to n}, the containment edges ((ui, cj) 1 Ui = xi or z depending on whether Cj E C contains literal Xi or xrespectively }, and edge (t, s). The assignment edges have weight 2; the consistency edges have weight 1; the containment edges have weight 3; and edge (t, s) has weight 5. It’s clear this is a polynomial time construction.
279
Figure 2: Construction of G in proof of theorem 2 Suppose C is satisfiable. There is an assignment such that every clause in C contains at least one true literal. We may have a spanning tree T consisting of the following edges: edge (t, s), (t, xi) for all i where variable Xi is assigned true or (t, Zi) otherwise, all the consistency edges, and the containment edges (xii, ci) for all i where Xii is the first true literal in clause Ci. It is easy to see that CeET IV(e) = 3n+3q +5. Since the weight of the path from a leaf node to node t is at most 5, there is no path in T with weight greater than 10. Suppose there is a spanning tree T for G such that CeET IV(e) 5 3n + 3q + 5 and no simple path p in T with weight greater than 10. For there are 2n + q + 2 vertices in G, there are 2n + q + 1 edges in T. T must include the edge (t,s), since (t, s) is the only edge incident to vertex s. For clause nodes are connected only by the containment edges, there are at least q containment edges in T. Assume the spanning tree T consists of i assignment edges, j consistency edges, k + q containment edges and the edge (t, s). We have the following inequalities i, j, k 3: 0 jln i+j+k=2n
(3) (4) (5)
2i+j+3ks
3n
(6)
Assume j < n. From (6) - 2 x (5), we have k 5 j - n < 0, a contradiction. Therefore, T must include all n consistency edges. Substituting j = n into the above formulas, we have i+k=n 2i+3k
4 2n
(7) (8)
From (8) - 2 x (7), we have k 2 0. Therefore, T contains exactly q containment edges, n consistency edges and n assignment edges. We claim that all the clause nodes are adjacent only to those variable nodes which are adjacent to node t
in spanning tree T. Suppose this claim is not true. Because clause nodes are only adjacent to variable nodes in graph G, there must exist a variable node x and a clause node c such that x is adjacent to c but z is not adjacent to node t in T (Figure 2). The path from c to t which must go through z is of weight 6. So, the path from s to c in T is of weight 11, which is a contradiction. Since T contains all the consistency edges, T contains exactly one of the edges (t, xi) and (t, Zi) for all i. Assigning true to all the variables adjacent to t and false to their complements, all the clauses in C is satisfied for every clause contains at least one true literal. Hence, 3SAT is polynomially reducible to BDBCST. o Note that, the cost constraint 3n + 3q + 5 is exactly the minimum cost C’ of G and the diameter constraint 10 is the minimum possible diameter of the graph G used in the proof. The above proof actually reveals that even in the class of spanning trees with minimum total cost, the problem (the MCMDST problem) of finding a spanning tree with minimum diameter is also NP-hard. And it is also NP-hard to find a minimum spanning tree among the class of spanning trees with minimum diameter (the MDMCST problem). Thus, the following corollary is self-evident. Corollary 1 I. The MDMCST NP-hard. 2. The MCMDST NP-hard.
and the BDMCST
problems are
and the BCMDST
problems are
5
3 The BRBCST
Geometrical eter Steiner
d;’ + df = d; + d; + Q,
(9)
di’ + di” 5 d; + d; + cr.
(2) If
d; I- df < d; + d; + a,
then it can be shown that 34 # cr, ci E N,(cr) nm such that
problem is NP-complete.
Minimum Tree
Proof: According to lemma 1, the diameter of TS has at most 3 segments. To assert the current theorem, it suffices to show that if the diameter D of TS has 3 segments, then either Ts is not a geometrical minimum-diameter Steiner tree of S, or the number of segments on D can be further reduced. Denote the two distinct centers on the diameter D of the geometrical minimum-diameter Steiner tree Ts of S as cl and ~2, where cl # cs, and the set of points, excluding the other center, connected to center ci by edges in TS as Si, where i = 1,2. Among points in the set Si, let et, i = 1,2, be the farthest from the center ci, and ez be the point nearest to the straight line ct~z among the points second farthest from ci. Let di, i, j = 1,2 denote the distance 14 - ci 1, and (Y be the distance Ici - csl. We claim that cl, cs and ei (e2) are not colinear. Otherwise, Ts can be transformed into a star tree T’ = (Vs,E$) centered at cz (cl) without increasing thSelength of the diameter. We’ll show that
where i = 1,2, by the following arguments: (1) Since (ei - ci - ef) is a path on tree TS and (ei - cl - cs - e$.) is the diameter of Ts, we have
The same arguments used in the proof of theorem 2 can be used to prove the NP-completeness of the BRBCST problem except that the notion of diameter is replaced by the notion of radius, and that the vertex t is taken as the distinguished vertex. Theorem
Lemma 2 If Ts is a geometrical minimum-diameter Steiner tree of a set S of n points with a minimum number of segments on its diameter D, then D has at most 8 segments.
where d;’ is the longest distance among those from points in the set Si to the point dr, and di2 is the second farthest. While by triangle inequality, it is easy to show that
diam-
dl,’ + d; + cx’ < d; + d; + cr;
In this section, we consider a geometrical Steiner tree problem for the set S of n input points. A geometrical minimum-diameter Steiner tree is a tree TS that includes all the points of S (some vertices on the tree TS are not in S) and the diameter of the tree is minimized . In order to construct an efficient algorithm, the following lemma is first established:
In other words, we can define a new Steiner tree with diameter (e;i - c+ - c2 - eJ), which is shorter than the diameter of the minimum diameter Steiner tree Ts. This is a contradiction. Similarly, we can show that d;+d; does not hold.
280
d:+a=d;+2a. Thus (Y = 0. This contradicts our previous sssumption that the two centers cl and c2 are distinct. QED. 4 Lemma 2 implies that at most one Steiner point is needed for the construction of a geometrical minimum-diameter Steiner tree, which is a monopolar MDST. In the next lemma, we establish the relationship between the monopole of the minimum diameter Steiner tree and the center of the smallest enclosing circle.
Figure 3: Illustration
Theorem 4 The geometrical minimum-diameter Steiner tree problem is reducible to the minimum enclosing circle problem, and hence can be solved in 0(n) time.
Lemma 3 Let .t~ be the center of the smallest enclosing circle of S. The monopolar Steiner tree TM with CM as the monopole has the minimum diameter.
Proof: We simply use the l-center algorithm proposed by Dyer [3] and Megiddo[lO], and use the center as the monopole of the monopolar Steiner tree.
Proof: Let fs(z) denote the length of the diameter of a monopolar Steiner tree TS with z being the monopole. Suppose there exists a monopolar Steiner tree with c being the monopole such that c # CM and fs(c) < fs(cM). Let er,ez E S be the farthest and second farthest points from c.
0
6
Conclusion
We have considered a new class of problem pertaining to the diameter of spanning trees. We have presented an ~9(n”) time algorithm for finding a minimum diameter spanning tree of a set of n points in the plane. The result actually is applicable to any complete graph whose edge weight satisfies the triangle inequality. We have also considered the minimum diameter Steiner tree problem and presented a linear time algorithm. Furthermore, we have shown that the problem of finding a minimum-diameter minimumcost spanning tree of a general graph is NP-hard. We conjecture that the problem of deciding if a spanning tree of a set of n points in the plane whose total cost and diameter are both bounded exists is also NPcomplete. Whether or not the 6(n3) time bound for finding a minimum diameter spanning tree can be improved is of great interest.
Case 1 lel -cl = le2 -cl. In this case the diameter fs(c) = 2)er - c] which is equal to the diameter of the circle C centered at c and enclosing S. Since fS((cM) is exactly the diameter of the smallest enclosing circle of S, it is impossible that US < fS(cM). Case 2 je1 - cl > )e2 - cl. Let D1 and DZ be the two concentric circles centered at c such that ei and e2 lie, respectively, on D1 and D2. Let p denote the point of intersection of Dz and the half-line emanating from c along the direction of the line connecting er and c. Suppose p E S. Consider the circle C’ centered at--the midpoint c’ of pel. It is obvious that C’ encloses S and fs(c’) = fs(c) is equal to the diameter of C’. Hence it is impossible that US < fS((CM). Now let us assume that p $! S. Consider a point q on line segment ccl in the neighborhood N,(c) of c such that el and e2 remain to be the farthest and second farthest pointsofq. Wehavefs(q) = IQ - ez]+]q - er]. By the triangle inequality we have fs(c) > fs(n). (see Figure 3). Thus, c cannot be the monopole of a minimum diameter Steiner tree, a contradiction. We conclude with the following
for the proof of Lemma 3.
References [1] W. G. Brown. Reviews in Graph Theory. American Mathematical Society, Providence, RI, 1980. [2] D. Cheriton and R.E. Tarjan. Finding minimum spanning trees. SIAM J. Comput., 5(4):724-742, December 1976.
theorem:
281
[3] M. E. Dyer. Linear time algorithms for two- and three-variable linear programs. SIAM J. Cornputing, 13:31-45, February 1984. [4] H. Edelsbrunner, L. J. Guibas, and J. Stolfi. Optimal point location in a monotone subdivision, SIAM J. Cornput., 15(2):317-340, May 1985. [5] M. R. Garey and D. S. Johnson.
Computers and intractability: a guide to the theory of NPcompleteness. Freeman, San Francisco, 1979.
[6] M. R. Garey and D. S. Johnson. results. see [5, p.2061 for details.
Unpublished
[7] I. G. Gowda, D. G. Kirkpatrick, D. T. Lee, and A. Naamad. Dynamic voronoi diagrams. IEEE Transaction on Information Theory, IT-29(5), September 1983. [S] D. G. Kirkpatrick. Optimal search in planar SIAM J. Comput., 12(1):28-35, subdivisions. February 1983.
[9] D. T. Lee. Farthest neighbor Voronoi diagrams and applications. Technical Report Tech. Rep. #80-11-FC-04, Northwestern 1980.
Dept. Elec. Eng./Comput. Sci., Univ., Evanston, IL, November
Linear-time algorithms for linear in R3 and related problems. SIAM J. Computing, 12(4):759-776, November 1983.
[lo] N. Megiddo. programming [ll]
F. P. Preparata. A new approach to planar point location. SIAM J. Comput., 10:473-482, August 1981.
[12] R. C. Prim. Shortest some generalizations. 1957.
connecting
networks
and
BSTJ 96, 1389-1401,
[13] M. I. Shamos and D. Hoey. Closest-point problems. In Sixteenth Annual IEEE Symposium on Foundations of Computer Science, pages 151162, October 1975.
282