On Central Spanning Trees of a Graph

0 downloads 0 Views 110KB Size Report
spanning tree of a graph is one for which the maximal distance to all other spanning trees is minimal. We prove that the problem of constructing a central ...
On Central Spanning Trees of a Graph S. Bezrukov Universit¨at-GH Paderborn FB Mathematik/Informatik F¨ urstenallee 11 D–33102 Paderborn



F. Kaderali, W. Poguntke FernUniversit¨at Hagen LG Kommunikationssysteme Bergischer Ring 100 D–58084 Hagen

Abstract We consider the collection of all spanning trees of a graph with distance between them based on the size of the symmetric difference of their edge sets. A central spanning tree of a graph is one for which the maximal distance to all other spanning trees is minimal. We prove that the problem of constructing a central spanning tree is algorithmically difficult and leads to an NP-complete problem.

1

Introduction

All the basic notions concerning graphs, which are not explained here, may be found in any introductory book on graph theory, e.g. [4]. In the whole paper we consider undirected connected graphs without loops, but maybe with multiple edges. For a graph G we denote by V (G) and E(G) its vertex and edge sets, respectively. Let T1 and T2 be a pair of spanning trees of a graph G. We define the distance between T1 and T2 as D(T1 , T2 ) =

1 · |(E(T1 ) ∪ E(T2 )) \ (E(T1 ) ∩ E(T2 ))|, 2

i.e. the distance equals half of the symmetric difference between E(T1 ) and E(T2 ) (notice that the symmetric difference itself is always of even size). For a fixed tree T there exists a polynomial algorithm to find a tree T 0 such that D(T, T 0 ) is maximal. Indeed, assign weights to the graph edges. Each edge of T gets weight 1, and all the other edges get weight 0. Now apply an algorithm to find a minimal weight spanning tree in G. This results in a maximally distant tree T 0 with respect to T . A pair of spanning trees T1 , T2 of a graph G is called maximally distant if D(T1 , T2 ) ≥ D(T10 , T20 ) for any spanning trees T10 , T20 of G. Maximally distant trees were studied in a number of papers (cf. [9, 10, 11]). An algorithm for finding a pair of maximally distant spanning trees is presented in [9] and requires polynomially many steps with respect to ∗

Appeared in Lect. Notes Comp. Sci., vol.1120, Springer Verlag, 1996, 53–58.

1

the number of vertices in the graph. A spanning tree T being part of a pair of maximally distant trees is called extremal. Extremal trees are useful in the mixed analysis of electrical circuits. In our paper we are interested in the dual problem of finding a spanning tree T , such that maxT 0 D(T, T 0 ) is minimal. We call such a tree a central tree of G. The notion of a central tree was introduced in [2], and some applications of such trees to circuit analysis one can find in [7]. A central tree can also be useful for broadcasting messages in a communication network. Central trees were intensively studied in the literature (see [8, 12, 13, 14]), but presently we know only the paper [1] being devoted to the construction of central trees. Unfortunately the algorithm described in [1] contains a gap, and in [5] one can find a counterexample to this algorithm. Also no result is known to us concerning the complexity of the problem of constructing a central tree. This complexity aspect is the main point of our analysis here. Given a graph G, let us define its tree graph T (G). The vertices of T (G) correspond to the spanning trees of G, and two vertices of T (G) are adjacent iff the distance between the corresponding spanning trees is 1. Thus the notion of a central tree of G corresponds to a central vertex in the graph T (G). The problem to find all central vertices in a graph is known to be polynomial with respect to the number of its vertices, but in our case the number of spanning trees of G may be exponentially large with respect to |V (G)|, and so the result concerning the central vertices cannot be directly applied to construct central trees. Let H be a subgraph of a graph G. Denote by H the complement of H in G, i.e. the subgraph obtained by deletion of all the edges of H in G. Let r(H) denote the rank of H, i.e. the number of vertices of G minus the number of components of H. Proposition 1 (cf. [6]) If T is a central tree, then r(T ) ≤ r(T 0 ) for any other spanning tree T 0 . Therefore deletion of a central tree from G results in a maximal number of components in the remaining graph. Note that, dually, deletion of an extremal tree results in a minimal number of components in the remaining graph (cf. [6]). This is the property making extremal trees useful in circuit analysis. Consider the following problem, which we call Central Tree: Instance: A graph G and an integer number k. Question: Is there a spanning tree T of G, such that the graph T consists of k components? In the next section we prove that this problem is NP-complete.

2

The main result

Theorem 1 The Central Tree problem is NP-complete We use transformation from the problem X3C (Exact Cover by 3-sets), which is known to be NP-complete (see the problem [SP2] in [3]) and is the following: 2

Instance: A set E of |E| = 3k elements and a collection F of 3-element subsets of E. Question: Does F contain an exact cover for E, i.e. a subcollection F 0 ⊆ F such that every element of E occurs in exactly one member of F 0 ? In the proof we take an instance for the X3C problem and construct some graph, considered later as an input to the Central Tree problem. Hence, we consider the Central Tree problem only for the graphs obtained in such a way, thus showing that it is NPcomplete even for this restricted class of graphs. Let F be a collection of 3-subsets as an instance of the X3C problem. We represent F by a bipartite graph G(F ) with the bipartition sets E and S consisting of 3k and |F | vertices respectively. The vertices of E correspond to the base set, and the vertices of S correspond to the 3-subsets in F . The edges of G(F ) are determined by the incidence structure of the set system. We construct  an  instance for the Central Tree problem as follows. Take the graph G(F ) and add 3k edges, connecting the vertices of E, such that the subgraph of G(F ) 2 induced by the vertex set E is a complete graph. Add an extra vertex v to the obtained graph, and connect v with each vertex of S. The resulting graph is denoted by G(F ). In Fig. 1a an example of such a graph G(F ) for the case |E| = 6, |F | = 4 is shown. The sets {v1 } and {v2 } form an exact cover of the base set. '

w11

w12

$

w13

w21

w22

w23

u u u u u u E A K6 @ A A & %  A A @ A  A A @ A  A A @ A  A A @A m u u Au Au @Am S c # c # C  c C  # v1 c v2 # C  c # C  c # c C  # m cC# u

v a. The graph G(F ).

u

u    

u

u @ @

u u A A @ A @ A  @A u @ Am m u u u c # c # C  c C  # v1 c v2 # C  c # C  c # c C  # cC# m u

v b. A spanning tree of G(F ). Fig. 1

Now we show that an exact cover of the set E (consisting of k subsets) exists iff there exists a spanning tree in G(F ), which splits G(F ) into k + 2 components. We assume that |E| ≥ 6 and |S| > k + 1.

(1) (2)

Observe that if one bounds these sets the X3C problem is polynomially solvable. Indeed, let an exact cover exist. Denote by v1 , ..., vk the vertices of S, corresponding to the covering subsets (cf. Fig. 1a). Furthermore, for each vi denote by wi1 , wi2 , wi3 its neighbors in E. Then the subsets {wi1 , wi2 , wi3 } are disjoint. Consider the spanning tree 3

T in G induced by the edges of the form (v, u) with u ∈ S and (vi , wi1 ), (vi , wi2 ), (vi , wi3 ) for i = 1, ..., k. Then the components of G \ T consist of k + 1 single vertices v, v1 , ..., vk and the subgraph induced by the vertex set E ∪ (S \ {v1 , ..., vk }). Thus we have k + 2 components. We refer to Fig. 1b for k = 2. There a spanning tree of the graph G(F ) is shown and after deletion of it the vertices v1 , v2 , v form 3 single components, and the rest of the vertices form the 4th component. We showed that the existence of an exact cover of size k in the set system F implies the existence of a spanning tree in the graph G(F ), after deletion of which we get a graph with k + 2 components. Now we show the reverse direction. In fact we show that the structure of components must be exactly as described above. So, let T be a spanning tree, which splits G into exactly k + 2 components. We claim that all the vertices of E belong to the same component. Suppose this is not true and there exists a component C such that 0 < |C ∩ E| < |E|. Denote E 0 = C ∩ E. If |E 0 | > 1 and |E \ E 0 | > 1, then the edge cut separating E 0 and E \ E 0 which is part of T necessarily contains a circle, contradicting that T is a tree. Let E 0 = {w} and assume the component containing w has one more vertex u. Without loss of generality we may assume that u ∈ S and (w, u) ∈ E(G(T )). Now the edge cut separating u and w from E \ E 0 has to contain a circle, which is again a contradiction. Thus, we have a component consisting of the single vertex w. It is not difficult to see that all the vertices E \ w belong to only one component, which we denote by D. Now each vertex u ∈ S belongs to this component D, since otherwise the edge cut separating u and w from the set E \ {w} contains a circle. Therefore, in this case the graph G(F ) \ T consists of at most 3 components, formed by the single vertices w and v and the subgraph induced by the vertex set (E \ {w}) ∪ S. But (1) and |E| = 3k imply that the number of components must be at least 4, a contradiction. Hence all the vertices of E must belong to the same component. Consider the following two cases: Case 1. Assume that the vertex v forms a single component in G(F ) \ T . Then the spanning tree T includes all the edges of the form (v, u) with u ∈ S. Case 1a. Assume that there exists a component, which contains at least 2 vertices of S. Then this component must contain at least one vertex from E (since otherwise it is not connected), and so by the above it must contain all the set E. Therefore, there exists at most one component containing at least 2 vertices of S, and we have determined already 2 components of the graph G(F ) \ T . Thus all the other k components are formed by k single vertices (we denote them by v1 , ..., vk ) of S, and so the tree T contains the edges of the form (vi , wi1 ), (vi , wi2 ), (vi , wi3 ) (here wi1 , wi2 , wi3 ∈ E incident with vi , and the sets of the form {wi1 , wi2 , wi3 } must be disjoint). Thus, the vertices v1 , ..., vk form an exact cover of the set E. Case 1b. Assume that there is no component containing at least 2 vertices of S. This leads us to a contradiction, since in this case each vertex of S (maybe except one of them, 4

which is connected to E) forms a single component, and so either k = |S| or k = |S| − 1, which contradicts (2). Case 2. Now assume that the component containing the vertex v (denote this component by K) also contains some vertices u1 , ..., ut ∈ S. We show that this is, however, impossible. Case 2a. Assume similarly to the above that there exists another component C (C 6= K), which contains at least 2 vertices of S \ {u1 , ..., ut }. This leads us to the conclusion that C contains the whole set E, E ∩ K = ∅ and all the other k components are formed by k single vertices of the set S 0 = S \ (C ∪ K) (with |S 0 | = k). Similarly to the above the vertices of S 0 have to form an exact cover of the set E. Consider the vertex u1 . Its neighborhood W = {w1 , w2 , w3 } in E is covered by the vertices of S 0 . If there exists a vertex v1 ∈ S 0 such that its neighborhood in E contains at least 2 vertices of W , then the edge cut separating the vertices u1 and v1 contains a cycle, contradicting that T is a tree. Thus, there exist two vertices v1 , v2 ∈ S 0 adjacent with the vertices of W and the edge cut separating the vertices u1 , v1 , v2 , v contains a cycle, which is again a contradiction. Case 2b. Assume that there is no other component containing at least 2 vertices of S. If K ∩ E = ∅, then similarly to Case 2a we obtain a contradiction that T is not a tree. Thus K has to contain the whole set E and each vertex from the set S \ {u1 , ..., ut } has to form a single component. There are k + 1 of these components, and they have to be separated by a tree. This means that the neighborhoods {wi1 , wi2 , wi3 } of them in E must be disjoint, which is impossible because |E| = 3k.

References [1] Amoia A., Cottafava G.: Invariance Properties of central trees, IEEE Trans. Circuit Theory, vol. CT-18 (1971), 465–467. [2] Deo D.: A central tree, IEEE Trans. Circuit Th., vol. CT-13 (1966), 439–440. [3] Garey M.R., Johnson D.S.: Computers and Intractability: A Guide to the Theory of NP-completeness, Freeman 1979. [4] Harary F.: Graph theory, Addison-Wesley Publ. Company, 1969. [5] Kaderali F.: A counterexample to the algorithm of Amoia and Cottafava for finding central trees, preprint, FB 19, TH Darmstadt, June 1973. ¨ [6] Kaderali F.: Uber zentrale und maximal entfernte B¨ aume, unpublished manuscript. [7] Kajitani Y., Kawamoto T., Shinoda S.: A new method of circuit analysis and central trees of a graph, Electron. Commun. Japan, vol. 66 (1983), No. 1, 36–45. [8] Kawamoto T., Kajitani Y., Shinoda S.: New theorems on central trees described in connection with the principal partition of a graph, Papers of the Technical Group on Circuit and System theory of Inst. Elec. Comm. Eng. Japan, No. CST77-109 (1977), 63–69. 5

[9] Kishi G., Kajitani Y.: Maximally distant trees and principal partition of a linear graph, IEEE Trans. Circuit Theory, vol. CT-16 (1969), 323–330. [10] Kishi G., Kajitani Y.: Maximally distant trees in a linear graph, Electronics and Communications in Japan (The Transactions of the Institute of Electronics and Communication Engineers of Japan), vol. 51 (1968), 35–42. [11] Kishi G., Kajitani Y.: On maximally distant trees, Proceedings of the Fifth Annual Allerton Conference on Circuit and System Theory, University of Illinois, Oct. 1967, 635–643. [12] Shinoda S., Kawamoto T.: On central trees of a graph, Lecture notes in Computer Sci., vol. 108 (1981), 137–151. [13] Shinoda S., Kawamoto T.: Central trees and critical sets, in Proc. 14th Asilomar Conf. on Circuit, Systems and Comp., Pacific Grove, Calif., 1980, D.E. Kirk ed., 183–187. [14] Shinoda S., Saishu K.: Conditions for an incidence set to be a central tree, Papers of the Technical Group on Circuit and System theory of Inst. Elec. Comm. Eng.Japan, No. CAS80-6 (1980), 41–46.

6