Computation of the cycle index polynomial of a Permutation Group CS497-report Rohit Gurjar Y5383 Supervisor: Prof Piyush P. Kurur Dept. Of Computer Science and Engineering, IIT Kanpur November 3, 2008 Abstract Computing cycle index polynomial of a permutation group is known to be #P -complete. In this report we give some introduction to the problem and describe some permutation groups for which the computation of cycle index polynomial is easy. Introduction Definition. Cycle index polynomial of a group G of degree n is defined as P G (z, z 2... z n ) = z c(g) z c2(g) where c i (g) represents the number of cycles of length i in the disjoint cycle decomposition of g.. Application Let G be a permutation group acting on X = {0,,... n } and Ω = {f : f is a function from X to C}, where C be a finite set of alphabet of cardinality k. We define a group action on the set Ω by g(φ)(x) = φ(g (x)) for each φ Ω The action of G partitions Ω into a number of orbits, being the equivalence classes of Ω under the equivalence relation that identifies α and β whenever there exists g G mapping α to β. Then we know the following theorem.
Theorem. Let C, X and G be defined as above. Then the number of orbits of Ω under the action of G is P G (k, k,... k). C can be a set of colors. Then the expression P G (k, k,... k) gives the number of different color patterns of X. Definition 2. Let w : C R be a map which assigns a weight from R (or any ring) to each element of C. Then the weight of φ Ω, with respect to the weight function w is given by, w(φ) = x X w(φ(x)). Now, for each g G and φ Ω, w (g(φ)) = x X w (g(φ)(x)) = x X w ( φ(g (x)) ) = x X w (φ(x)) = w(φ) So, the elements of Ω in the same orbit, under the action of G, will have same weight. So we can define the following. Definition 3. Suppose Ω be an orbit under the action of G. Then the weight of, denoted w( ), is defined to be equal to w(φ) for any φ. Theorem 2 (Polya s Enumeration Theorem). With the above definitions and notations I = w( ) = P G (x, x 2... x n ), where the summation goes over distinct orbits of Ω under the action of G and x i = c C w(c)i. We can see that cycle index polynomial of a permutation group G may be computed at a specified point, directly from definition() by explicit enumeration of the elements of G. In general, however, the order of G is exponentially larger than its input size, say a list of generators. Generally, degree n of the permutation group G is taken as the measure of input size. So, we want to compute the cycle index polynomial at a specified point in the time polynomial in degree n. It is known that the problem of computing cycle index polynomial for a group is #P -complete. The proof (given in []) involves a polynomial-time reduction from finding number of independent sets in a graph(a #P -complete problem) to computing cycle index polynomial of a permutation group. The proof suggests that that the problem of computing cycle index polynomial is #P -complete even for abelian groups. Here we describe some special permutation groups for which the computation of cycle index polynomial is easy (can be computed in polynomial time). 2
2 Special Permutation Groups Notation. Let G be a permutation group with degree n. Consider the permutation g G, if g is the product of a cycle of length l, a cycle of length l 2 and so on till cycle of length l k, then we say g has a cycle struture P (g) = z l z l2... z lk. Notation 2. Let G be a permutation group with degree n. Consider a set of permutations H G, then we say P (H) = g H P (g) 2. Cyclic Groups Suppose the cyclic group G with degree n acting on Ω = {, 2,... n}, is generated by g having cycle structure P (g) = z l z l2... z lk where l i n i. It is easy to see that = lcm{l, l 2... l k } which can be exponential in n. In general we do not see any easy way to compute cycle index polynomial for cyclic groups. But it is easy in some special cases given below. Case When k = i.e., g = (, 2, 3... n) and = n. So, the cycle index polynomial can be computed very easily. It is given by. Case 2 n P (G) = n d n φ(d)z n/d d = p m, where p is a prime, this case is also easy. Because = lcm{l, l 2... l k } = p m so, l i s.t. l i = p m. Hence = p m n. The cycle index polynomial is given by p m P (G) = m p m φ(p m i )P (g pi ) i=. Case 3 If l i l j then gcd{l i, l j } = i, j {, 2... k}, i.e., distinct l i s are pairwise relatively prime. Let us assume that all l i s are distinct. The results can be easily generalised to the other case. Let S i Ω be the set of elements in the l i -cycle of g. Consider the subgroup H 0 = g l of group G. This is the subgroup of all permutations in G, which fixes all elements in S. Let right cosets of H 0 in G be {H 0, H,... H l } and 3
the corresponding representatives are {g 0, g... g l }. It is easy to see that P (G) = l i=0 P (H i) Let G and G be permutation groups acting on S and Ω\S respectively and for every h G we can write h = h h where, h G and h G, s.t. h (i) = h(i) i S and h (i) = h(i) i Ω\S. Let g = g g, where g G and g G. Now, we can see that H 0 = g l g l. Now, because j {, 2,... k} l and l j are relatively prime, g l = G. So, G H 0. Now, H i = g i H 0 g i G, so g i G = G. Hence, H i = (g i g i )H0 H i = (g i g i )G So, P (G) = H i = g i G ( l i=0 P (g i ) ) P (G ) P (G) = P (G ) P (G ) Inductively, P (G) = P (G ) P (G 2 ) P (G k ), where for every j {, 2... k}, G j be permutation group acting on S j, and for every h G we can write h = h h 2 h k where, h j G j s.t. h j (i) = h(i) i S j. Now, G j = l j n, so P (G j ) can be computed easily for all j {, 2... k}. Then the cycle index polynomial will be given by 2.2 Symmetric Group P (G) = (P (G ) P (G 2 ) P (G k )) Computing cycle index polynomial for symmetric group(whole permutation group) can be done easily because of its symmetry. Let G be the symmetric group acting on Ω = {a, a 2,... a n }. Consider the following definition for group G i {, 2,... n}, P i (G) = P (g) a n is in a i cycle in g We can see that P (G) = n i= P i(g). Consider the subgroup H 0 of all permutations in G which fixes a n. Consider H H 0 as acting on Ω\{a n }. For H, 4
P i (H), would be defined like this, P i (H) = g H a n is in a i cycle in g P (g) Note that P n (H) = 0. Because in any g H maximum length of a cycle can be n. We give the following recursive algorithm for computing cycle index polynomial for a symmetric group at the point (z, z 2... z n ). Algorithm cycle-index(g) Require: A symmetric group G with degree n. Ensure: P (G) and P i (G) i {, 2,... n} at the point (z, z 2... z n ) : if n == then 2: return {z, z } 3: else 4: {P (H), P (H), P 2 (H)... P n (H)} cycle-index(h) 5: P (G) z P (H) 6: for i 2 to n do 7: P i (G) (n ) ( z i ) P i (H) 8: end for 9: P (G) P (G) + P 2 (G) + P n (G) 0: return {P (G), P (G), P 2 (G)... P n (G)} : end if Then the cycle index polynomial of G will be given by n! P (G). We can see that the algorithm takes O(n 2 ) time. Theorem ( 3. ) With the notations given above, P (G) = z P (H) and P i (G) = (n ) P i (H) i {2, 3,... n}. And hence, the algorithm is correct. z i Proof. Consider the case when i =. Note that, {g G a n is in a cycle in g} = {g G g fixes a n } = H 0. So, P (G) = P (H 0 ) = z P (H). Now, when i 2, let us say the right cosets of H 0 in G are {H 0, H, H 2... H n } and the corresponding representatives are {I, (a n, a ), (a n, a 2 )... (a n, a n )}, where I is the identity element of G. Now, we can see that, P (G) = n j=0 P (H j). We can also write that n P i (G) = P i (H j ) () where P i (H j ) = g H j a n is in a i cycle in g P (g). j=0 5
We know that H n = H 0 g n, where g n = (a n, a n ). We can easily see that (b, c, d, e... ).(a, b) = (a, b, c, d, e... ) So, suppose h H 0 s.t. P (h) = z z l z l2... z lk, and a n is in l -cycle. Then P (hg n ) = z l+z l2... z lk. So, it is clear that i 2 ( ) P i (H 0 g n ) = P i (H) P i (H n ) = ( z i z i ) P i (H) (2) Notation 3. For any g G, let { P (g) if a n is in a i-cycle in g P i (g) = 0 otherwise. So, we can say that P i (H j ) = P i (g). g H j Let h H n, consider the function f s.t. f(h) = (a j, a n )h(a j, a n ) for some j {, 2... n 2}. For some h 0 H 0, we can write h = h 0 (a n, a n ), and so f(h) = (a j, a n )h 0 (a n, a n )(a j, a n ) = (a j, a n )h 0 (a j, a n )(a n, a j ) = h 0(a n, a j ). It is easy to see that h 0 = (a j, a n )h 0 (a j, a n ) H 0. So, f(h) H j. The cycle structures of h and f(h) are same, except that the positions of a n and a j are swapped. So, we can say that P i (h) = P i (f(h)) i {, 2,... n}. Also, it is easy to see that f : H n H j is a bijection. So, P i (H n ) = P i (h) h H n = P i (f(h)) h H n = P i (h ) h H j From (), P i (G) = = = P i (H j ) j {, 2,... n 2} (3) n P i (H j ) j=0 n P i (H j ) j= { H 0 fixes a n = (n )P i (H n ) {from (3) ( ) = (n ) P i (H) {from (2) z i 6
2.3 Alternating Group Let G be a permutation group with degree n and H be a subset of G such that H = {g g G and g is an even permutation}. It is easy to see that H is a subgroup of G. So, consider the following Lemma. = 2 H Proof. Let the left cosets of H in G be {H, H, H 2... H k } and their representatives are {I, a, a 2... a k } respectively. It is easy to see that a i is an odd permutation for all i k. So, for all i, j k, the element a i a j, will be an even permutation and so a i a j H. Hence a i and a j are in same coset. And this is true for all i, j k. So k =, and there are only two left cosets of H in G. Hence, = 2 H. Theorem 4. where x i = ( ) i z i. Proof. where P H (z, z 2... z n ) = P G (z, z 2... z n ) + P G (x, x 2... x n ) P G (x, x 2... x n ) = sgn(g) = Now, it is easy to see that = = x c(g) x c2(g) 2... x n P i ( ) ci(g)(i ) z c(g) z c2(g) sgn(g)z c(g) z c2(g) { if g is an even permutation, if g is an odd permutation. P G (x, x 2... x n ) + P G (z, z 2... z n ) = 2 = H g H g H = P H (z, z 2... z n ) z c(g) z c2(g) z c(g) z c2(g) So, cycle index polynomial at any point for the alternating group can be computed by computing the cycle index polynomial for the symmetric group at two points. 7
3 Another Approach The problem of counting the number of matchings in a graph is also known to be #P -complete. Another version of this problem is to find the sum of weights of all matchings of a weighted graph, where weight of a matching is the product of weights of edges in the matching. In the special case, when the graph is planar, the problem is easy and known to be in class NC. Now, computing the sum of weights of all matchings of a weighted graph and computing cycle index polynomial of a permutation group can be reduced to each other. So, the idea is to see for which groups the cycle index problem reduces to the matching problem with the planar graph case. For those groups computing cycle index polynomial will be easy. For example consider the graph G with vertex set V = {v, v 2... v 2n }, and edge set E = {(v i, v n+i ) i n}, with all the weights z. It is easy to see that computing cycle index polynomial for the trivial group reduces to the matching problem for G. However the reduction does not look easy for any nontrivial group even in very simple cases. And any such nontrivial groups could not be found. 4 Acknowledgements I would like to sincerely thank Prof. Piyush P. Kurur, for his constant encouragement and guidance throughout this work. References [] Mark Jerrum, Computational Pólya Theory, In Surveys in combinatorics (995), 03-8. [2] A.K. Lal, Lecture Notes on Discrete Mathematics, available at http:// home.iitk.ac.in/ arlal/book/mth202.pdf [3] Peter J. Cameron, Notes on Counting, available at http://www.maths.qmw. ac.uk/ pjc/notes/counting.pdf 8