CENTRAL CIRCULATION BOOKSTACKS The person charging this material is re- sponsible for its renewal or its return to the library from which it was borrowed on or before the Latest Date stamped below. You may be charged a minimum fee of $75.00 for each lost book. Theft, mutilation, and underlining el book* ore reasons for disciplinary action and moy result in dismissal from the University. TO RENEW CAll TEIEPHONE CENTER, 333-8400 UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN JAN 2 8 1996 FEB 1 2 1997 AUG 24 2006 When renewing by phone, write new due date below previous due date. L162 )u.Ud //UZ+ UIUCDCS-R-77-860 UILU-ENG 77 1715 H f DECOMPOSITION OF GRAPHS INTO TREES by S. Zaks C. L. Liu May 1977 r ary of DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN URBANA, ILLINOIS Digitized by the Internet Archive in 2013 http://archive.org/details/decompositionofg860zaks DECOMPOSITION OF GRAPHS INTO TREES* by S. Zaks and C. L. Liu Department of Computer Science University of Illinois at Urbana-Champaign Urbana, Illinois 61801 May 1977 This work was supported in part by the National Science Foundation under Grant Number MCS-73-03408. ABSTRACT Denoting by T. , P. and S. an i edges tree, path or star respectively, we show that the complete graph K can be decomposed into trees T,, T, T -, , where T. is either P. or S. for i = 1, 2, ... , 12 n-1 i ii n - 1. We also show that the same result holds for decomposing the com- plete bipartite graph K , (K ) for an odd (even) n. We then treat the cases of decomposing K into P, , P 3 , ... , P ? _-, and K + , (with an odd n) into P~, P., ... , P« . All of these results are being proved by decomposing the adjacency matrix of the appropriate graph. A different kind of result is shown for decomposing a full m-ary tree. I. INTRODUCTION In this paper we study the problem of decomposing a graph into edge-disjoint trees, where the graph is the complete graph K , or the complete bipartite graphs K ( K n _i ) for n even ( odd ) and K n n > or o*j n- i p , n the full m-ary tree. We denote by T., P., S. a tree, path, or star with i edges, respectively. We prove the following: Theorem 1: K can be decomposed into T, , T , ... , T , where T. is n K 12 n-1 l either S. or P. for i =1,2, ... ,n-l. Theorem 2 : K can be decomposed into P-, , P v ... , P 9n i • Theorem 3 : K .-, can be decomposed into P ? , P*, ... , P ? for odd n. Theorem 4 : K (K , ) for n even (odd) can be decomposed into T, , y, n-1 -y-,n T«, ... , T -J where T. is either S. or P. for i = 1, 2, ... , n - 1. Theorem 5 : The full m-ary tree with k levels can be decomposed into T , T r,, ... , T . in a unique way (up to isomorphism), m m A. Gyafras and J. Lehel discuss in [1] this problem, referring to it as packing trees into K , and prove that T, , . . . , T , can be packed into K if all but two of them are stars, and also prove Theorem 1 by an induction procedure on n. J. F. Fink and H. J. Straight show in [2] that K can be decomposed into P-. , P 2 , ... , P _-, (a special case of Theorem 1), that K (K -. ) for n even (odd) can be decomposed into jjj-.n-l ^-,n P-i > Pp> ••• » P n _i ( a special case of Theorem 4), and have the same results as Theorem 2 and Theorem 3. They also show that K + , can be decomposed into P 2 , P^, ... , Po n _? ancl ^2n' a c y c ^ e °^ l en 9 tn 2n, for an even n. They conjecture that Theorem 3 does not hold for an even n. II. SOME BASIC OBSERVATIONS We first show several compact ways to represent stars and certain paths in the adjacency matrix of a graph. Unfortunately, such representa- tions can not be extended immediately to include all trees - even not all paths - which makes the problem of decomposing a graph to an arbitrary set of trees much more difficult. Let G be an undirected graph - without loops and multiple edges - with vertices set V = {v,, v ? , ... , v } and edges set E. Denote by A(6) = (a..) the adjacency matrix of G, such that a.. = 1 if (v., v.) e E and a.j. = otherwise. Note that a.. = for all i. We can use only the upper right part of A(G)- (a..) for 1 i < j <_ n - because G is undirected, D and we denote it by A (G). p In A (6) name each of the following sequences of l's as a stair : (a) A right stair : a. JS a. J+r a^j^. Vl,j+2' "' ' B 1-i,J*t, a i-£,j+£+l (b) A left stair : a. JS a^^, a._ uj _ r a^^, ••• . a i- £ ,j- £ > a i-£-l,j-£ where for both (a) and (b) £ > 0, all the a 's in the sequence equal 1, and each of the first and last elements can be excluded. A left stair is legal if it doesn't contain both a i . +l and a. . for any i and £, and is illegal otherwise. For example, see the heavy lines in Figure 1, in which i stands for v-,i =1,2, ... ,7. (We use this notation in all the figures.) Lemma 1 : A star subgraph in a graph G corresponds to a set of 1 entries, all of them in one row or one column, in A(G), and vice versa. Proof: Immediate. □ 1 1 V JL 2 JL J 1 / 7* 1 1 '1 1 3 right stair 4 L Ti 5 i 6 i i 1 1 1 2 1 1 1 3 1 1 1 1 4 L 1 a legal loft stair 5 .', 6 i i an illegal 'left stair STAIRS IN THE ADJACENCY MATRIX Figure 1 Lemma 2 : 1. A right stair in A (G) corresponds to a path in a graph G. 2. A left stair in A (G) corresponds to a path in a graph G iff it is legal. Proof : Every stair in A(G) corresponds to distinct consecutive edges in G, so it only remains to show that no cycle is formed. In (1) we begin with a.., which corresponds to the edge (v., v.) for i < j, and alternately increase the second index and decrease the first one, so each index k appears in at most 2 consecutive terms, and thus in G no cycle is formed by the appropriate edges. In (2) we begin with a.., which corresponds to the edge (v., v.) for i < j, and alternately decrease the first and the second indices, so a cycle could be formed in the appropriate edges in G iff we have in the stair both a . . and a. D for some i and a, hence the left stair in A (G) corresponds to a path in G iff it is legal. D For example, the paths corresponding to the right and the legal left stairs, and the cycle corresponding to the illegal left stair of Figure 1, are shown in Figures 2.1, 2.2, and 2.3, respectively. (1) (2) (3) Figure 2 It should be noted that although the notion of left stair is interesting by itself, in our decompositions we will use only the right stairs. III. DECOMPOSITION OF K n ,R, Recall that in A K (K n ) a. . = 1 for all 1 < i < j < n. Theorem 1 : K can be decomposed into Tj » T 2 T^ where T.. is either S. or P. for i = 1 , 2, . . . , n - 1 . Proof: We prove the theorem for even n. When n is odd, the argument is similar and is left to the reader. We divide A R (K n ) into two blocks (See Figure 3) A^n) = {a^l 1 < i < j < n, i + j i n> A«(n) = {a..| 1 £ i < j 1 n, i + j > n} n-2 r Block A (n) 1 1 1 1 1 l i l .I 2 1 1 1 1 i l lp hr 3 1 1 1 l 1 1 1 | i 1 if" P n-1 1 J*"" l l i 1 T l i i 1 i i i n-l 1 N Block A 2 (n) n-, DECOMPOSITION OF A (K n ) Figure 3 We now show that A^n) can be decomposed corresponding to the given trees T\ for even i, and that A 2 (n) can be decomposed corresponding to the given trees T. for odd i. The proofs for A^n) and A 2 (n) are similar, so let us show the result for A 2 (n), by induction: For n = 1 A 2 (n) is reduced to a 1 x 1 array, for which it is clear that P^ or S-j can be packed in. Assume it holds for an even m < n. Then for n we want to pack J y Tg, ... , T , into A 2 (n), when each T. is either a path or a star. We consider two cases of having T , = P , or T , = 3 n-1 n-1 n-1 s n _-|- Omitting either of them from A 2 (n) we are left with a block of A 2 (n-l)'s shape as is shown in Figure 3, and in which we can pack all the rest of the trees by the induction hypothesis. D Example 1 : In Figure 4 we show the decomposition of K into S-,, S., P c , o / b b P A » P?> Po, Pi and of K n into P Q , P 7 , P c , S c , P., S , S , S 4' '3' r 2' 1 8' 7' '6' °5' 4' J 3* 2' J l DECOMPOSITION OF K Figure 4 IV. DECOMPOSITION OF BIPARTITE GRAPH S D Recall that in A (K ) we have a full p x q rectangular array of l's, with O's outside. In our discussion we work only with this rect- angle. Theorem 2: K can be decomposed into P-, , P , . . . , P -, . n,n K 13 2n-l Proof : The right stair that begins in the lower leftmost 1 and ends in the upper rightmost 1 corresponds to a path P ? , of length 2n-l in K . After omitting it we are left with two separated parts of the n x n square, but as we are interested only in right stairs here, we can move those parts toward each other getting an (n-1) x (n-1) square, and the proof is thus completed by induction. □ Example 2 : The decomposition of K, fi into P, , P^, P,-, P-,, P q and P,, is shown in Figure 5. 1 ' 2 ' 3 ' 4 ' 5 ' 6 ' DECOMPOSITION OF K n,n Figure 5 Theorem 3 : K - can be decomposed into P^ P^, ... , P- for odd n. Proof: According to Theorem 2 we can decompose K into P, , P~ n,n l j P ? , . From this decomposition we can easily get the desired decomposition as illustrated in Figure 6. LD 1 ■ 2 ' 3' 4 ' 5' 6' 7 ' 1 2 3 4 5 6 7 7,7 V 2' 3' 4' 5' 5' 7' _t t _ 8 r J r J 1 p > ^ J 1 r- 2 3 P 8 -- 4 K 7,8 5 p ^— - r ■■■■ 6 1 L. r J 1 7 1 s I 8 t t t P !0 P 6 DECOMPOSITION OF K n,n- t P 2 H Figu re 6 Theorem 4 : K ( K n -1 ^ for n even fadd) can be decomposed into 2>n-l — p— ,n T-j, T 2 , ... , T n _ 1 where 1. is either S i or P i for i = 1 , 2, . . . , n - 1 . Proof : The proof is similar to that of Theorem 1, so we only illustrate it here in an example where n = 8, and we decompose k „ ^ into P.., P c , S c > S , , P 4,7 / o d *t j S~, P, (see Figure 7). □ 6 7 8 9 10 11 5 6 7 Block A, DECOMPOSITION OF K n n-1 Figure 7 10 V. DECOMPOSITION OF FULL TR EES The last result about decomposition of graphs is obtained for a full tree, as follows: Theorem 5 : The full m-ary tree with k levels can be decomposed into T , T ? , ... , T . in a unique way (up to isomorphism). m rn m K Example : The decomposition of the full binary tree with 4 levels into T„, T., Tq, T,g is shown in Figure 8. DECOMPOSITION OF A FULL BINARY TREE Figure 8 / K -j \ m -1 Proof : Since a full m-ary tree of k levels has ^ Z ' edges and -j^y internal nodes, therefore T , must contain at least one leaf, say A m (see Figure 9), and the root B, as a simple counting argument shows. Thus all the path joining A and B belongs to T ^. m 11 If any of the edges CD,, ... , CD m belongs to T k , we don't m have enough room for T . _, , as a simple counting m DECOMPOSITION OF A FULL M-ARY TREE Figure 9 argument shows. So T , must be in the enclosed area, where there are exactly m k m edges, and the rest of the proof follows by induction. □ 12 REFERENCES [1] A. Gyarfas and J. Lehel , "Packing Trees of Different Order Into K ", Proceedings of the 1976 Kenthely Colloquium, to be publish [2] J. F. Fink and H. J. Straight, "Path-Perfect Graphs," to appear BIBLIOGRAPHIC DATA SHEET 1. Report No. UIUCDCS-R-77-860 4. Title and Subtitle Decomposition of Graphs Into Trees 3. Recipient's Accession No. 5. Report Date May 1977 7. Author(s) S. Zaks and C. L. Liu 8. Performing Organization Rept. No. ?. Performing Organization Name and Address Department of Computer Science University of Illinois at Urbana-Champaign Urbana, IL 61801 10. Project/Task/Work Unit No. 11. Contract/Grant No. MCS-73-03408 12. Sponsoring Organization Name and Address National Science Foundation Washington, DC 13. Type of Report & Period Covered 14. 15. Supplementary Notes 16. Ahsrracts Denoting by T\ , P.. and S i an i edges tree, path or star respectively, we show that the complete graph K n can be decomposed into trees T, , Tp, ... , T ,, where T. is either P.. or S.. for i = 1 , 2, . . . , n-1 . We also show that the same result holds for decomposing the complete bipartite graph K _, (K ) for an odd (even) n. n,— j- o".n-l We then treat the cases of decomposing K n into P, , P,, ..., P„ , and K Al (with n,n I j ^n-i n,n+l an odd n) into P 2> P^, . .. , P 2 . All of these results are being proved by decom- posing the adjacency matrix of the appropriate graph. A different kind of result is shown for decomposing a full m-a ry tree. 17. Key Words and Document Analysis. 17a. Descriptors undirected graph, tree, path, star, adjacency matrix, decomposition 7b. Identifiers/Open-Ended Terms 7c. COSATI Field/Group 8. Availability Statement ORM NTIS-35 (10-70) 19. Security Class (This Report) UNCLASSIFIED 20. Security Class (This Page UNCLASSIFIED 21. No. of Pages 22. Price USCOMM-DC 40329-P71 «ty &t>