On Central Spannng Trees of a Graph S. Bezrukov Unverstat-GH Paderborn FB Mathematk/Informatk Furstenallee 11 D{33102 Paderborn F. Kaderal, W. Poguntke FernUnverstat Hagen LG Kommunkatonssysteme Bergscher Rng 100 D{58084 Hagen bstract We consder the collecton of all spannng trees of a graph wth dstance between them based on the sze of the symmetrc derence of ther edge sets. central spannng tree of a graph s one for whch the maxmal dstance to all other spannng trees s mnmal. We prove that the problem of constructng a central spannng tree s algorthmcally dcult and leads to an NP-complete problem. 1 Introducton ll the basc notons concernng graphs, whch are not explaned here, may be found n any ntroductory book on graph theory, e.g. [4]. In the whole paper we consder undrected connected graphs wthout loops, but maybe wth multple edges. For a graph G we denote by V (G) and E(G) ts vertex and edge sets, respectvely. Let T 1 and T 2 be a par of spannng trees of a graph G. We dene the dstance between T 1 and T 2 as D(T 1 ; T 2 ) = 1 2 j(e(t 1) [ E(T 2 )) n (E(T 1 ) \ E(T 2 ))j;.e. the dstance equals half of the symmetrc derence between E(T 1 ) and E(T 2 ) (notce that the symmetrc derence tself s always of even sze). For a xed tree T there exsts a polynomal algorthm to nd a tree T 0 such that D(T; T ) s maxmal. Indeed, assgn weghts to the graph edges. Each edge of 0 T gets weght 1, and all the other edges get weght 0. Now apply an algorthm to nd a mnmal weght spannng tree n G. Ths results n a maxmally dstant tree T wth respect to 0 T. par of spannng trees T 1 ; T 2 of a graph G s called maxmally dstant f D(T 1 ; T 2 ) D(T 0 1 ; T 2) for any spannng trees 0 T 0 1 ; T 0 2 of G. Maxmally dstant trees were studed n a nber of papers (cf. [9, 10, 11]). n algorthm for ndng a par of maxmally dstant spannng trees s presented n [9] and requres polynomally many steps wth respect to ppeared n Lect. Notes Comp. Sc., vol.1120, Sprnger Verlag, 1996, 53{58. 1
the nber of vertces n the graph. spannng tree T beng part of a par of maxmally dstant trees s called extremal. Extremal trees are useful n the mxed analyss of electrcal crcuts. In our paper we are nterested n the dual problem of ndng a spannng tree T, such that max T 0 D(T; T ) s mnmal. We call such a tree a 0 central tree of G. The noton of a central tree was ntroduced n [2], and some applcatons of such trees to crcut analyss one can nd n [7]. central tree can also be useful for broadcastng messages n a communcaton network. Central trees were ntensvely studed n the lterature (see [8, 12, 13, 14]), but presently we know only the paper [1] beng devoted to the constructon of central trees. Unfortunately the algorthm descrbed n [1] contans a gap, and n [5] one can nd a counterexample to ths algorthm. lso no result s known to us concernng the complexty of the problem of constructng a central tree. Ths complexty aspect s the man pont of our analyss here. Gven a graph G, let us dene ts tree graph T (G). The vertces of T (G) correspond to the spannng trees of G, and two vertces of T (G) are adjacent the dstance between the correspondng spannng trees s 1. Thus the noton of a central tree of G corresponds to a central vertex n the graph T (G). The problem to nd all central vertces n a graph s known to be polynomal wth respect to the nber of ts vertces, but n our case the nber of spannng trees of G may be exponentally large wth respect to jv (G)j, and so the result concernng the central vertces cannot be drectly appled to construct central trees. Let H be a subgraph of a graph G. Denote by H the complement of H n G,.e. the subgraph obtaned by deleton of all the edges of H n G. Let r(h) denote the rank of H,.e. the nber of vertces of G mnus the nber of components of H. Proposton 1 (cf. [6]) If T s a central tree, then r(t ) r(t 0 ) for any other spannng tree T 0. Therefore deleton of a central tree from G results n a maxmal nber of components n the remanng graph. Note that, dually, deleton of an extremal tree results n a mnmal nber of components n the remanng graph (cf. [6]). Ths s the property makng extremal trees useful n crcut analyss. Consder the followng problem, whch we call Central Tree: Instance: graph G and an nteger nber k. Queston: Is there a spannng tree T of G, such that the graph T conssts of k components? In the next secton we prove that ths problem s NP-complete. 2 The man result Theorem 1 The Central Tree problem s NP-complete We use transformaton from the problem X3C (Exact Cover by 3-sets), whch s known to be NP-complete (see the problem [SP2] n [3]) and s the followng: 2
Instance: set E of jej = 3k elements and a collecton F of 3-element subsets of E. Queston: Does F contan an exact cover for E,.e. a subcollecton F 0 F such that every element of E occurs n exactly one member of F 0? In the proof we take an nstance for the X3C problem and construct some graph, consdered later as an nput to the Central Tree problem. Hence, we consder the Central Tree problem only for the graphs obtaned n such a way, thus showng that t s NPcomplete even for ths restrcted class of graphs. Let F be a collecton of 3-subsets as an nstance of the X3C problem. We represent F by a bpartte graph G(F ) wth the bpartton sets E and S consstng of 3k and jf j vertces respectvely. The vertces of E correspond to the base set, and the vertces of S correspond to the 3-subsets n F. The edges of G(F ) are determned by the ncdence structure of the set system. We construct an nstance for the Central Tree problem as follows. Take the graph G(F ) and add 3k 2 edges, connectng the vertces of E, such that the subgraph of G(F ) nduced by the vertex set E s a complete graph. dd an extra vertex v to the obtaned graph, and connect v wth each vertex of S. The resultng graph s denoted by G(F ). In Fg. 1a an example of such a graph G(F ) for the case jej = 6, jf j = 4 s shown. The sets fv 1 g and fv 2 g form an exact cover of the base set. ' & mu u u u u u u K 6 w 1 1 w 2 1 w 3 1 w 1 2 w 2 2 w 3 2??? @??? u u?????? @?????? # v 1 c # ## v 2 cc # ## v a. The graph G(F ). $ % E S Fg. 1 u u u u u u??? mu u u??? # v 1 c # ## v 2 cc # ## v b. spannng tree of G(F ). Now we show that an exact cover of the set E (consstng of k subsets) exsts there exsts a spannng tree n G(F ), whch splts G(F ) nto k +2 components. We asse that jej 6 and (1) jsj > k + 1: (2) Observe that f one bounds these sets the X3C problem s polynomally solvable. Indeed, let an exact cover exst. Denote by v 1 ; :::; v k the vertces of S, correspondng to the coverng subsets (cf. Fg. 1a). Furthermore, for each v denote by w 1 ; w2; w3 ts neghbors n E. Then the subsets fw 1 ; w2; w3 g are dsjont. Consder the spannng tree 3
T n G nduced by the edges of the form (v; u) wth u 2 S and (v ; w 1 ), (v ; w 2 ), (v ; w 3 ) for = 1; :::; k. Then the components of G n T consst of k + 1 sngle vertces v; v 1 ; :::; v k and the subgraph nduced by the vertex set E [ (S n fv 1 ; :::; v k g). Thus we have k + 2 components. We refer to Fg. 1b for k = 2. There a spannng tree of the graph G(F ) s shown and after deleton of t the vertces v 1 ; v 2 ; v form 3 sngle components, and the rest of the vertces form the 4 th component. We showed that the exstence of an exact cover of sze k n the set system F mples the exstence of a spannng tree n the graph G(F ), after deleton of whch we get a graph wth k + 2 components. Now we show the reverse drecton. In fact we show that the structure of components must be exactly as descrbed above. So, let T be a spannng tree, whch splts G nto exactly k + 2 components. We clam that all the vertces of E belong to the same component. Suppose ths s not true and there exsts a component C such that 0 < jc \ Ej < jej: Denote E = 0 C \ E. If je 0 j > 1 and je n E 0 j > 1, then the edge cut separatng E and 0 E n E 0 whch s part of T necessarly contans a crcle, contradctng that T s a tree. Let E = 0 fwg and asse the component contanng w has one more vertex u. Wthout loss of generalty we may asse that u 2 S and (w; u) 2 E(G(T )). Now the edge cut separatng u and w from E n E has to contan a crcle, whch s agan a contradcton. 0 Thus, we have a component consstng of the sngle vertex w. It s not dcult to see that all the vertces E n w belong to only one component, whch we denote by D. Now each vertex u 2 S belongs to ths component D, snce otherwse the edge cut separatng u and w from the set E n fwg contans a crcle. Therefore, n ths case the graph G(F ) n T conssts of at most 3 components, formed by the sngle vertces w and v and the subgraph nduced by the vertex set (E n fwg) [ S. But (1) and jej = 3k mply that the nber of components must be at least 4, a contradcton. Hence all the vertces of E must belong to the same component. Consder the followng two cases: Case 1. sse that the vertex v forms a sngle component n G(F ) n T. Then the spannng tree T ncludes all the edges of the form (v; u) wth u 2 S. Case 1a. sse that there exsts a component, whch contans at least 2 vertces of S. Then ths component must contan at least one vertex from E (snce otherwse t s not connected), and so by the above t must contan all the set E. Therefore, there exsts at most one component contanng at least 2 vertces of S, and we have determned already 2 components of the graph G(F ) n T. Thus all the other k components are formed by k sngle vertces (we denote them by v 1 ; :::; v k ) of S, and so the tree T contans the edges of the form (v ; w 1 ), (v ; w 2 ), (v ; w 3 ) (here w 1 ; w2; w3 2 E ncdent wth v, and the sets of the form fw 1 ; w2; w3g must be dsjont). Thus, the vertces v 1; :::; v k form an exact cover of the set E. Case 1b. sse that there s no component contanng at least 2 vertces of S. Ths leads us to a contradcton, snce n ths case each vertex of S (maybe except one of them, 4
whch s connected to E) forms a sngle component, and so ether k = jsj or k = jsj? 1, whch contradcts (2). Case 2. Now asse that the component contanng the vertex v (denote ths component by K) also contans some vertces u 1 ; :::; u t 2 S. We show that ths s, however, mpossble. Case 2a. sse smlarly to the above that there exsts another component C (C 6= K), whch contans at least 2 vertces of S n fu 1 ; :::; u t g. Ths leads us to the concluson that C contans the whole set E, E \ K = ; and all the other k components are formed by k sngle vertces of the set S = 0 S n (C [ K) (wth js 0 j = k). Smlarly to the above the vertces of S have to form an exact cover of the set E. Consder the vertex 0 u 1. Its neghborhood W = fw 1 ; w 2 ; w 3 g n E s covered by the vertces of S 0. If there exsts a vertex v 1 2 S such that ts neghborhood n 0 E contans at least 2 vertces of W, then the edge cut separatng the vertces u 1 and v 1 contans a cycle, contradctng that T s a tree. Thus, there exst two vertces v 1 ; v 2 2 S adjacent wth the vertces of 0 W and the edge cut separatng the vertces u 1 ; v 1 ; v 2 ; v contans a cycle, whch s agan a contradcton. Case 2b. sse that there s no other component contanng at least 2 vertces of S. If K \ E = ;, then smlarly to Case 2a we obtan a contradcton that T s not a tree. Thus K has to contan the whole set E and each vertex from the set S n fu 1 ; :::; u t g has to form a sngle component. There are k + 1 of these components, and they have to be separated by a tree. Ths means that the neghborhoods fw 1 ; w2; w3 g of them n E must be dsjont, whch s mpossble because jej = 3k. References [1] moa., Cottafava G.: Invarance Propertes of central trees, IEEE Trans. Crcut Theory, vol. CT-18 (1971), 465{467. [2] Deo D.: central tree, IEEE Trans. Crcut Th., vol. CT-13 (1966), 439{440. [3] Garey M.R., Johnson D.S.: Computers and Intractablty: Gude to the Theory of NP-completeness, Freeman 1979. [4] Harary F.: Graph theory, ddson-wesley Publ. Company, 1969. [5] Kaderal F.: counterexample to the algorthm of moa and Cottafava for ndng central trees, preprnt, FB 19, TH Darmstadt, June 1973. [6] Kaderal F.: Uber zentrale und maxmal entfernte Bae, unpublshed manuscrpt. [7] Kajtan Y., Kawamoto T., Shnoda S.: new method of crcut analyss and central trees of a graph, Electron. Commun. Japan, vol. 66 (1983), No. 1, 36{45. [8] Kawamoto T., Kajtan Y., Shnoda S.: New theorems on central trees descrbed n connecton wth the prncpal partton of a graph, Papers of the Techncal Group on Crcut and System theory of Inst. Elec. Comm. Eng. Japan, No. CST77-109 (1977), 63{69. 5
[9] Ksh G., Kajtan Y.: Maxmally dstant trees and prncpal partton of a lnear graph, IEEE Trans. Crcut Theory, vol. CT-16 (1969), 323{330. [10] Ksh G., Kajtan Y.: Maxmally dstant trees n a lnear graph, Electroncs and Communcatons n Japan (The Transactons of the Insttute of Electroncs and Communcaton Engneers of Japan), vol. 51 (1968), 35{42. [11] Ksh G., Kajtan Y.: On maxmally dstant trees, Proceedngs of the Ffth nnual llerton Conference on Crcut and System Theory, Unversty of Illnos, Oct. 1967, 635{643. [12] Shnoda S., Kawamoto T.: On central trees of a graph, Lecture notes n Computer Sc., vol. 108 (1981), 137{151. [13] Shnoda S., Kawamoto T.: Central trees and crtcal sets, n Proc. 14th slomar Conf. on Crcut, Systems and Comp., Pacc Grove, Calf., 1980, D.E. Krk ed., 183{187. [14] Shnoda S., Sashu K.: Condtons for an ncdence set to be a central tree, Papers of the Techncal Group on Crcut and System theory of Inst. Elec. Comm. Eng.Japan, No. CS80-6 (1980), 41{46. 6