You are on page 1of 8

# JOURNAL

OF COMBINATORIAL

THEORY

11,

193-200 (1971)

The Mijbius

Function

and Connected

Graphs*

Computing Centre, Department of Mathematics, University of the West Indies, Mona, Kingston 7, Jamaica Communicated by Frank Harary

Received September 1969 27,

The MGbius functionp(n) of classical numbertheory is employed calculate to the numbers connected of graphs from the numbers all graphs a particular of of type whenthe countingpolynomialfor the latter is known.

1. INTRODUCTION Connectivity is an important property of graphs and has been well studied in enumerative graph theory. It is well known, for example, that, if a counting seriescan be found which enumerates general graphs of a specified type with certain features, then the counting seriesfor connected graphs of the same type having the same features can be found (the features of a graph can be the nodes, edges, double edges, circuits, etc., the only requirement being that the number of features of a given kind in a graph must be the total number of the samefeatures in the components). Examples of this procedure are to be found in [l, 2, and 51. Theorem 1 of [5] states that, if K(N, , N, ,..., N, ; A,, A, ,..., A,) is the number of graphs of a specified type having Ni labeled features of the i-th kind (i = 1, 2,..., p) and A, unlabeled features of the j-th kind (j = 1, 2, 3,..., q), and if k(n, , n2 ,..., n, ; 01~ 01~ LX,) similarly defined , ,..., is for connected graphs of the specified type, then the counting series
G(x, , xz ,..., x, ; ~1 , ~2 a..., WJ

= c K(N,,...,N, ; A,,...,A,)fi \$j fi 4’j
* Research supported the Air Force Officeof Scientific by Research, Officeof Aerospace Research, United StatesAir Force, underA.F.O.S.R. Grant No. 1026-66. 0 1971by Academic Press, Inc. 193

u.. and G(0. 0. ...) A. . 0.. . u1 .) = 1 k(ol.... 7=1 r where k(0..... which is the taking of the formal logarithm.. Gilbert’s theorem [l] for the number of connected graphs having p labeled nodes and q unlabeled edgesis a corollary of this theorem. In this paper. 0) = 0 by convention. ) 012 )... .. x2 . ... we use a wellknown result from the theory of symmetric functions [4].. For the first stage.. ..194 and CADOGAN are connected by the equation log{1 + W... convention that G(0. .. which is a direct consequence of equation (33) of [2] and states that the relation between the counting series G(u.... we show how the coefficients in the counting seriesfor unlabeled connected graphs can be obtained non-recursively. to take the formal logarithm of the counting series for general graphs.....) a. . while for the unlabeled graphs a further manipulation is necessary.. Both of these manipulations are usually carried out by means of recursion formulae. ul ..) fi j=l q for general graphs.. Thus. u.) fI u3"' j=l for connected graphs. uo)} = f 1 g(ulT. x.... is lot41 + G(u. ) 24)..... and for the second stage of the calculation we make use of the Mobius function and the Mobius inversion formula [3].... aJ = 0 for all 01~ 01~ cyn We use the ... 0) = 0.. 01~ a2 ... O.. u2 .. u2 .. 0.)..4.... The corresponding result for wholly unlabeled graphs is given in Theorem 2 of [5].) 2.. .. 0. x. to obtain the counting seriesfor connected graphs it is necessary.‘). A2 ). O. . u2r u.. 0.) = c K(A. u. . 24 ..)} = g(xl . x2 .. in each case. and the counting series g(u.. provided k(0.. 0) = 0. 0.

} = SIX + \$s2x2+ \$s3x3+ . ) from which can be derived the result: 2h. u. . we get \$. To find a non-recursive expression for g. .. are polynomials in all the variables except Xi .X3+ *..>> = f 711=1 gmxim. h. ~1 . where G. ...-.. and g.. (2) for m > 0. On differentiating with respect to the single variable.. . we compare the equation: with a well-known equation in the theory of symmetric functions [4]. gmxim).. and equate coefficients of Xirn. RELATIONSBETWEEN In order to take the formal logarithm of the counting seriesfor general graphs.=l.x + /2. we first express the series as a seriesin one variable with polynomial coefficients in the other variables. ~~~~~~ exp (i. h. . Thus. multiply both sides by gmxim. . h. . x2 I. 3h. g. . .. = If we differentiate (1) logarithmically. . . When m = 0. x. = 0. with G.X2+ /2. u2. . h.) = f m=O GmxinL. 1 h. sm = (-1)-l mh. we derive a recurrence relation between the coefficients.5 2. % h. namely: log{1 + /2.. ..f .. on writing 1 + G(x.. .. .THE MiiBIUS FUNCTION AND CONNECTED GRAPHS COEFFICIENTS OFTHE~OUNTING SERIES 19. . ~2 . x2 . we find that gm = G. 1 h. ... h. and log{1 + G(x... u. This is the usual recursion formula. u1 . 1 . . x. * 1 h.

u.. . i (-I>“. ~(4) = 0. ~(2) = . log{1 + G(u. functions as Thus ~(1) = 1. uz . g. . to the second stage.. (3) mG.... ug)} = 5 . p(n) has been defined in number theory [3] as ifn = 1 if n has a squared factor.) A. T=l where G(u. This is the end of the first stage of the calculation... 0. 4 . . g(r) P (g = 2 g (\$) P(I).) fi up ) j=l and P . ..-. .. ) A. USE OF MOBIUS INVERSION FORMULA The Mobius follows: p(n) = function 1. 23 1 z. = (--lP1 m . ).196 CADOGAN We therefore have Gl 2G. uz . . . Returning to the problem of unlabeled graphs. We now move on 3. uzT. we have from Section 1... G. . etc. The Mobius inversion formula is defined for arithmetical follows: Tf h-9 = C f(r). Gl .. G...) = 1 K(A. 1 G. . rln then f(n) = . g(ulc. 1 .1. if n is the product of k distinct primes. uq’).. ~(6) = 1. ’ ...

..) Ip 26.a* BY Eq. 4 = C Tlal&. a.. A.. c + k (+ .. (4)... (41. ... a2 ... therefore.THE M6BIU. a.. a.) . i j=l 1 j=l On equating coefficients of nTS1 up we obtain: k 4% > 6 . +r .az. . ).. fi up = 1 X(a.) ) a.. F) = k(u...aq i p(r) h (+ . Let log c K(A.)... 4)..... .. tlapz‘&.... we have the result of the theorem.. Our next task is to invert Eq. + .... Proof. uz .. .. A......... This completes the second stage of the calculation.aq (+ .... means that r divides each ui (i = 1... 4 = c rlal..9 ..a..).S FUNCTION AND CONNECTED GRAPHS 197 Hence.. +) 9 (4) where r 1 a. &. But hence. and we do so by means of the following theorem: THEOREM.2.

198 CADOGAN 4.. satisfies J-h.) and on collecting all values of 4n. Harary enumerated the graphs on a given number of nodes and edges. y) = y + Y2(l + x) + y3(l + x + x2 + x3) + y4(1 + X + 2x2 + 3x3 + 2x4 + x5 + x6) + y5(~xsx++xf. is a polynomial in x. denote the number of connected graphs with n nodes and m edges. > where the coefficient of xmyn gives the number of non-isomorphic graphs having n nodes and m edges. Y>> = c &Y”P where g. APPLICATION As an illustration of the entire procedure. Let cm. by equation (11) of [2]. 1. g(x. Then. we get Table I. (9 On writing g. and derived a formula for the number of connected graphs in terms of the number of all graphs. 2.n .2 + 4x3 + 6x4 + 6x5 + 6x6 + 4x7 + 2x8 + y”( 1 + x + 2x2 + 5x3 + 9x4 + 15x5 + 21x6 + 24x’ + 24x8 + 21x9 + 15x10 + 9x11 + 5x12 + 2x13 + xl4 + xl”) + y7(1 + x + 2x2 + 5x3 + 10x4 + 21x5 + 41x6 + 65x7 + 97x8 + 131x9 + 148xlO + 148~~~ + 131~~~ + 97x13 + 65x14 + 41x15 + 21x16 + 10x1’ + 5x1* + 2xls + x20 + x2’) +y”(l +x+2x2+5x3+ 11x4+24x5+56x6+ 115x7 + 221x8 + 402x9 + 663xlO + 980~~~ + 1312~~~ + 1557~~~ + 1646~~~ + 1557~‘~ + 1312~~~ + 980~~~ + 663x18 + 402~~~ + 221x20 + 115x21 + 56~~~ + 24~~~ + 11x24 + 5x25 + 2x26 + x2’ + x2”) + . . we obtain: . we use an example given by Harary [2]. The counting polynomial for graphs is... (6).n (6) On applying the result of the theorem to Eq.. = C d.x” (m = 0.. If lofit{ 1 + dx. it can be easily shown that g... dm.

THE MijBIUS FUNCTION AND TABLE I CONNECTED GRAPHS 199 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 i 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 t 0 & 2 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 6 0 0 7 .i 0 1 23 90 236 4863 814 11694 14. This table agrees with the result of collecting the coefficients after subtracting equation (38) from equation (11) in [2] for n = 0 to 7.. and to the referee for his helpful suggestions in preparing version.m gives the number of trees on m nodes. ACKNOWLEDGMENTS The author is indebted to Professor R. problem the final .54 1579 1515 1290 970 658 400 220 114 56 24 11 5 2 1 1 B 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Q 0 0 0 3 5 5 4 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Q Q + 6 134 19 22 20 14 9 5 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 33 67 107 132 138 126 95 64 40 21 10 5 2 1 1 0 0 0 0 0 0 0 The values of c. C. Read for bringing the above to his attention.. are collected in Table II.\$ 8 -i 0 0 0 . We note that cm_l.

READ. LITTLEWOOD. directed. London. N. Trans. Math. C. The number . E. 405-411. 1964. D.” 2nd ed. 1. Math. Heinemann. S(3) (1956). 78 (2) (1955). Enumeration 2. J. 1958. 1958. J. H-Y. rooted. “A University Algebra. Some enumeration problems in graph theory. R.200 CADOGAN TABLE n II m \ 0 1 2 3 4 5 6 I 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 2 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 3 5 5 4 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 6 13 19 22 20 14 9 5 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 I 0 0 0 0 0 0 11 33 61 107 132 138 126 95 64 40 21 10 5 2 1 1 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 23 89 236 486 813 1169 1454 1579 1515 1290 970 658 400 220 114 56 24 11 5 2 1 1 REFERENCES of labeled graphs. HUNTER. 445-463. 3. 4.” Oliver & Boyd. Sot. E. GILBERT. 5. London. University of London. “Number Theory. of linear. and connected graphs. Amer.. Canad. Doctoral Thesis. F.