4
The number of n-cycles in a graph Gordon G. Cash New Chemicals Screening and Assessment Branch, Risk Assessment Division (7403M), US Environmental Protection Agency, 1200 Pennsylvania Avenue, NW, Washington, DC 20460, USA Abstract Recently, Chang and Fu [Y.C. Chang, H.L. Fu, The number of 6-cycles in a graph, Bull. Inst. Combin. Appl. 39 (2003) 27–30] derived an exact expression, based on powers of the adjacency matrix, for the number of 6-cycles in a graph. Here, I demonstrate a method for obtaining the number of n-cycles in a graph from the immanants of the adjacency matrix. The method is applicable to cycles of all sizes and to sets of disjoint cycles of any sizes, and the cycles in the set need not be the same size. Published by Elsevier Inc. Keywords: Immanants; Number of n-cycles; Adjacency matrix; Graph theory 1. Introduction 1.1. Immanants In [1], Chang and Fu derive an expression for c 6 , the number of 6-cycles in a graph, by subtracting from the number of closed walks of length 6 all the closed walks that are not 6-cycles. This expression is specific to 6-cycles, and, as it involves several summations over elements of powers of the adjacency matrix, is rather cumbersome. The present study presents an expression for c 6 that contains immanants of the adjacency matrix and that can be readily adapted to cycles of any size, c i , and to sets of disjoint cycles, {c i , c j , c k , ...}, where the i, j, k, ... may be the same or different. Sets of mutually disjoint cycles have been invoked in chemistry in resonance theory of conjugated hydrocarbons [2–7]. The partition function P(n) is the number of distinct nonincreasing partitions of the integer n. By conven- tion, repeated elements of a partition are represented by superscripts, so that, for example, the partitions of 4 are {4}, {3, 1}, {2 2 }, {2, 1 2 }, and {1 4 }. The irreducible character matrix of the symmetric group S n is a P(n) · P(n) matrix of integers, the rows and columns of which are indexed by the nonincreasing partitions of n. Strictly speaking, the columns are indexed by the conjugacy classes of permutations on n objects. While there is a one-to-one correspondence between the partitions and the conjugacy classes, a partition is a partition and a conjugacy class is a set of all permutations that have the same cycle structure, i.e., the same numbers and 0096-3003/$ - see front matter Published by Elsevier Inc. doi:10.1016/j.amc.2006.06.085 E-mail address: [email protected] Applied Mathematics and Computation 184 (2007) 1080–1083 www.elsevier.com/locate/amc

The number of n-cycles in a graph

Embed Size (px)

Citation preview

Applied Mathematics and Computation 184 (2007) 1080–1083

www.elsevier.com/locate/amc

The number of n-cycles in a graph

Gordon G. Cash

New Chemicals Screening and Assessment Branch, Risk Assessment Division (7403M), US Environmental Protection Agency,

1200 Pennsylvania Avenue, NW, Washington, DC 20460, USA

Abstract

Recently, Chang and Fu [Y.C. Chang, H.L. Fu, The number of 6-cycles in a graph, Bull. Inst. Combin. Appl. 39 (2003)27–30] derived an exact expression, based on powers of the adjacency matrix, for the number of 6-cycles in a graph. Here, Idemonstrate a method for obtaining the number of n-cycles in a graph from the immanants of the adjacency matrix. Themethod is applicable to cycles of all sizes and to sets of disjoint cycles of any sizes, and the cycles in the set need not be thesame size.Published by Elsevier Inc.

Keywords: Immanants; Number of n-cycles; Adjacency matrix; Graph theory

1. Introduction

1.1. Immanants

In [1], Chang and Fu derive an expression for c6, the number of 6-cycles in a graph, by subtracting fromthe number of closed walks of length 6 all the closed walks that are not 6-cycles. This expression is specificto 6-cycles, and, as it involves several summations over elements of powers of the adjacency matrix, is rathercumbersome. The present study presents an expression for c6 that contains immanants of the adjacency matrixand that can be readily adapted to cycles of any size, ci, and to sets of disjoint cycles, {ci,cj,ck, . . .}, where thei, j,k, . . . may be the same or different. Sets of mutually disjoint cycles have been invoked in chemistry inresonance theory of conjugated hydrocarbons [2–7].

The partition function P(n) is the number of distinct nonincreasing partitions of the integer n. By conven-tion, repeated elements of a partition are represented by superscripts, so that, for example, the partitions of 4are {4}, {3,1}, {22}, {2, 12}, and {14}. The irreducible character matrix of the symmetric group Sn is aP(n) · P(n) matrix of integers, the rows and columns of which are indexed by the nonincreasing partitionsof n. Strictly speaking, the columns are indexed by the conjugacy classes of permutations on n objects. Whilethere is a one-to-one correspondence between the partitions and the conjugacy classes, a partition is a partitionand a conjugacy class is a set of all permutations that have the same cycle structure, i.e., the same numbers and

0096-3003/$ - see front matter Published by Elsevier Inc.

doi:10.1016/j.amc.2006.06.085

E-mail address: [email protected]

G.G. Cash / Applied Mathematics and Computation 184 (2007) 1080–1083 1081

sizes of cycles. Let v(k,n) be the irreducible character indexed by the partition k and the conjugacy class n.In terms of individual permutations, vk(r) = v(k,n) when r is a permutation belonging to conjugacy classn. The only n which contribute to the immanant are those with no fixed points, i.e., those which permuteno graph vertex into itself. Let the subset of n be n*. Then, the immanant associated with the partition k isgiven by

immkðAÞ ¼X

n2n�mðnÞvðk; nÞ2cðnÞ: ð1Þ

If k = {1n}, then the associated immanant is the much-studied determinant of the adjacency matrix, A. Ifk = {n}, the associated immanent is the familiar permanent. Much less work has been published on the remain-ing P(n) � 2 immanants.

Recasting Eq. (1) in terms of the graph itself instead of its adjacency matrix, the immanant associated withpartition k is

immkðAÞ ¼X

r2n�vkðrÞ

Yn

j¼1

ðAþ IÞj;rðjÞ; ð2Þ

where m(n) is the number of ways of selecting a spanning subgraph corresponding to a permutation in con-jugacy class n, and c(n) is the number of cycles, that is, elements >2, in n. In using immanants to count thenumber of cycles in a graph, as in the examples below, it is important to remember that immanants count per-

mutations. Since each cycle can be permuted in two directions, the factor 2c(n) arises.

1.2. Immanantal polynomials

The determinant of xI � A is the well-known characteristic polynomial of a graph, and the permanent ofxI � A is the permanental polynomial. These are merely two special cases, corresponding to k = {1n} andk = {n}, respectively, of immanantal polynomials, which are the immanants of xI � A. Analogous to Eq.(1), the immanantal polynomial is

IkðG; xÞ ¼Xn

i¼0

X

rðiÞvkðrÞxn�i

Yn

j¼1

ðAþ IÞj;rðjÞ: ð3Þ

The summation over r(i) is over all permutations r of the n elements that leave i of those elementsunchanged. Thus, the last term of the polynomial, i.e., the one with i = n, is the immanant. In the special cases,the last term of the characteristic polynomial is the determinant, and the last term of the permanental poly-nomial is the permanent. These are useful in counting, for example, perfect matchings, which permute all theelements.

Specifically, a permutation is a perfect matching if and only if it belongs to conjugacy class n = {2n/2}. Thegeneralization of this fact is the key to using immanants and immanantal polynomials to count cycles, sets ofcycles, or matchings in a graph.

2. Results and discussion

The useful generalization here is the following: A cycle, set of cycles, or matching which involves i verticesof the graph contributes to the xn�i term of the immanantal polynomial through the contribution of its con-jugacy class. A 6-cycle, for example, contributes to the xn�6 term through the contribution of n = {6,1 n�6}.Other n will contribute to the xn�6 term as well, namely, n = {4,2,1n�6}, {32,1 n�6}, and {23,1n�6}. How-ever, it will be possible to choose a set of four immanantal polynomials for which these four contributionsare linearly independent, so that, with the four coefficients of the xn�6 term in hand, a set of four equationscan be solved for the contribution of n = {6,1n�6}, which is twice the number of 6-cycles in the graph (seethe explanation of Eq. (2) above). In a completely analogous manner, the number of Hamiltonian cyclesmay be determined by solving a larger set of equations for the contribution of n = {n}. Examples are presentedbelow.

1082 G.G. Cash / Applied Mathematics and Computation 184 (2007) 1080–1083

2.1. Examples

2.1.1. Coronene graph

Coronene is a much-studied chemical substance, a hydrocarbon with 24 carbon atoms arranged in a centralhexagon surrounded by six fused hexagons. Thus, its carbon-skeleton graph contains seven 6-cycles. Selectingfor two immanantal polynomials, the characteristic and permanental, plus those for k = {22,120} andk = {23,118} and eliminating the contributions from n = {4,2,1n�6}, {32,1 n�6}, and {23,1n�6} gives a =(1358c1 + 2c2 � 15c3 + c4)/6, where the ci are the coefficients of x18 in the respective immanantal polynomials.Since the ci values are �2832, 2, �390774, and �2021334, a = (�3845856 + 5664 � 2021334 + 5861 610)/6 = 14. This is twice the number of 6-cycles, since this procedure counts permutations, not cycles.

It has been conjectured [1] that a linearly independent set of equations for this procedure can always beobtained by selecting the set of k that are the conjugates of the set of n. The conjugate of a partition is the par-tition obtained by reading its Young diagram columnwise instead of rowwise. Thus, the respective conjugates ofn = {6,1n�6}, {4,2,1 n�6}, {32,1n�6}, and {23,1n�6} are k = {19,15}, {20,2,12}, {20,22}, and {21,3}. This set of kdoes indeed provide a linearly independent set of equations. In this case, we have a = (7583226c1 �47567241c2 + 76891765c3 � 104219503c4)/760121544. The values of ci are 11919414, 18730896, 13151766,and 2021334, so a = (90387610149564 � 890977044177936 + 1011262500606990 � 210662424877002)/760121544 = 14. This is all integer arithmetic, and there are no rounding errors, since nothing is rounded.

In an exactly analogous manner, the number of Hamiltonian cycles may be found by solving a system ofequations involving all n for permutations with no fixed vertices, i.e., no element equal to 1. If P(n) is the par-tition P function, there are precisely P(n) � P(n � 1) such n, since each partition on n ending in a 1 can beuniquely constructed by adding a 1 to a partition of n � 1. For a graph on 24 vertices, P(24) � P(23) =1575 � 1255 = 320. The k that are the conjugates of the 320n are precisely those of the form {ix, jy, . . .} wherex P 2, i.e., those with at least the first two elements identical. (Note that the characteristic polynomial meetsthis criterion, but the permanental polynomial does not.) Solving a system of 320 simultaneous equations isfast with even a modest desktop computer, and this exercise confirms that a = 0, there are no Hamiltoniancycles in the coronene graph.

In [4–7], Zhang and Zhang described a graph polynomial with coefficients that enumerate the ways in whichthe vertices of a graph can be covered with mutually disjoint hexagons and edges. Later, Gutman et al. [3]named this entity the Zhang–Zhang polynomial and described its significance in the resonance theory of ben-zenoid hydrocarbons. The coefficients, zk, of this polynomial may be obtained from immanants in exactly thesame way as the counts of Hamiltonian cycles by solving the same set of equations for contributions ofn = {6k, 2(n�6k)/2}.

In the coronene example, solving the same system of equations that give the number of Hamiltonian cyclesfor n = {63,23} instead gives a = 16. Since there are three independent cycles in this case, there are 16/23 = 2ways to choose a disjoint set of three 6-cycles plus three edges in the coronene graph. This is the z3 coefficientof the Zhang–Zhang polynomial.

2.1.2. Dodecahedron graph

The Hamiltonian cycle calculation on the dodecahedron graph, which has only 20 vertices, requires a sys-tem of only P(20) � P(19) = 627 � 490 = 137 equations. This calculation gives a = 60, confirming that thereare 60/21 = 30 distinct Hamiltonian cycles on this graph. It is possible to define a polynomial analogous to theZhang–Zhang polynomial that enumerates distinct ways to cover a graph with 5-cycles plus edges and deter-mine its coefficients with the same system of equations. A different (and smaller) system of equations could beused for a polynomial that enumerates covering a graph with 5-cycles and fixed vertices. A polynomial in twovariables might enumerate covers with cycles of two different sizes. None of these possibilities appears to havebeen explored.

2.2. Computational considerations

By far the most computationally demanding part of this work is determining the irreducible charactermatrices of the symmetric groups Sn. Computer programs for calculating these matrices have been described

G.G. Cash / Applied Mathematics and Computation 184 (2007) 1080–1083 1083

[8,9]. It is also straightforward to program the formulas given in [10] for the elements of these matrices in asoftware package capable of symbolic algebra. These matrices, however, depend only on n and are not specificto any particular graph on n vertices. Thus, once calculated, they may be stored in a central repository.

For cycle sets involving complete covers of many vertices, the size of P(n) � P(n � 1) becomes a problem.The algorithms available for calculating immanants and immanantal polynomials, however, are probably farfrom optimal; more work needs to be done in this area.

3. Conclusions

A mathematically exact method for finding the number of n-cycles in a graph is presented. The method isadaptable to finding the number of disjoint sets of n-cycles and sets of cycles of different sizes, with the remain-der of the graph covered by edges or not. These calculations can provide coefficients for a large number ofdifferent counting polynomials that seem never to have been investigated.

Disclaimer

This document has been reviewed by the Office of Pollution Prevention and Toxics, US EPA, and approvedfor publication. Approval does not signify that the contents necessarily reflect the views and policies of theAgency, nor does the mention of trade names or commercial products constitute endorsement or recommen-dation for use.

References

[1] Y.C. Chang, H.L. Fu, The number of 6-cycles in a graph, Bull. Inst. Combin. Appl. 39 (2003) 27–30.[2] G.G. Cash, Immanants and immanantal polynomials of chemical graphs, J. Chem. Inf. Comput. Sci. 43 (2003) 1942–1946.[3] I. Gutman, S. Gojak, B. Furtula, Clar theory and resonance energy, Chem. Phys. Lett. 413 (2005) 396–399.[4] H. Zhang, The Clar covering polynomial of S,T isomers, MATCH Commun. Math. Comput. Chem. 29 (1993) 189–197.[5] H. Zhang, F. Zhang, The Clar covering polynomial of hexagonal systems I, Discrete Appl. Math. 69 (1996) 147–167.[6] H. Zhang, The Clar covering polynomial of hexagonal systems with an application to chromatic polynomials, Discrete Math. 172

(1997) 163–173.[7] H. Zhang, F. Zhang, The Clar covering polynomial of hexagonal systems III, Discrete Math. 212 (2000) 261–269.[8] X. Liu, K. Balasubramanian, Computer generation of the character tables of the symmetric groups (Sn), J. Comput. Chem. 10 (1989)

417–425.[9] B. Fiedler, The Mathematica Package PERMS. Availabel from: <http://www.fiemath.de/perms.htm>.

[10] R. Merris, W. Watkins, Inequalities and identities for generalized matrix functions, Linear Algebra Appl. 64 (1985) 223–242.