# How to get the CycleIndexPolynomial of direct product of two symmetric groups?

If I want to obtain the CycleIndexPolynomial of the symmetric group $S_n$, I can just do i.e.

n=4;
CycleIndexPolynomial[SymmetricGroup[n],Table[x[i],{i,1,n}]]


x[1]^4/24 + 1/4 x[1]^2 x[2] + x[2]^2/8 + 1/3 x[1] x[3] + x[4]/4

But what if I want to get the CycleIndexPolynomial of the direct product of two symmetric groups $S_n\times S_m$? Which syntax should I use to obtain that? Or maybe there is some iterative way to get it? Thanks for any suggestion!

EDIT:

I know for a fact that the CycleIndexPolynomial of $S_2\times S_2$ with all variables $x[i]$ evaluated at $x[i]=n$ should reduce to

n^4/4 + 3n^2/4

However, if we do

cyc=CycleIndexPolynomial[SymmetricGroup[2],Table[x[i],{i,1,2}]];
cyc^2/.x[_]->n//Expand


we get

n^2/4 + n^3/2 + n^4/4

which is definitely not the same.

• The documentation for CycleIndexPolynomial states that "The cycle index polynomial of a direct product of groups is the product of the cycle index polynomial of the groups". – MarcoB Feb 12 '17 at 20:51
• The example in the documentation shows that a direct product of two cyclic groups becomes an abelian group with two dimensions of those two sizes. What does the product of two symmetric groups become? I tried to do the same thing as in the example using two instances of SymmetricGroup[2], and simply multiplying - but the result did not agree with what I know to be true for this simple example. – Kagaratsch Feb 12 '17 at 21:08
• I updated the question. – Kagaratsch Feb 12 '17 at 21:31
• The cycle index polynomial is really of an action, so we must be precise about the action we are talking about, or give the actual permutation cycles we are using. The external direct product S2 x S2 acts on 4 points (two separate sets of two points), and has the elements (1)(2)(3)(4), (12)(3)(4), (1)(2)(34), (12)(34). There is one permutation with 4 cycles, two permutations with 3 cycles and one permutation with 2 cycles. Therefore the cycle index is (x^4 + 2 x^3 + x^2) / 4. Perhaps you are referring to some alternative action of an internal direct product? – jose Feb 13 '17 at 3:10
• That is an isomorphic group, but not the same group as a permutation group. That is the "Vierergruppe" in FiniteGroupData. If you compute CycleIndexPolynomial[FiniteGroupData["Vierergruppe", "PermutationGroupRepresentation"], {x, x}] you do get (3 x^2 + x^4)/4. Even shorter, FiniteGroupData["Vierergruppe", "CycleIndex"][x, x] gives that. – jose Feb 15 '17 at 20:30

So I found this paper which provides a special multiplication prescription in eq. (2.7) which gives the CycleIndexPolynomial of a product group. My implementation is:

multiplicationWeiXu[poly1_, poly2_] := Block[{},
var1 = Variables[poly1];
mon1 = MonomialList[poly1, var1];
var2 = Variables[poly2];
mon2 = MonomialList[poly2, var2];
If[poly1 === 1,
poly2,
If[poly2 === 1,
poly1,
Sum[
(mon1[[i]] mon2[[j]] /. a[_] -> 1) Product[a[LCM[l, m]]^( l m Exponent[mon1[[i]], var1[[l]]] Exponent[mon2[[j]], var2[[m]]]/LCM[l, m]), {l, 1, Length[var1]}, {m, 1, Length[var2]}]
, {i, 1, Length[mon1]}, {j, 1, Length[mon2]}]
]
]
]


I had to add the control cases $S_1\times S_n\to S_n$ and $S_n\times S_1\to S_n$ by hand, because their formula seemed to produce $S_1\times S_n\to S_1$ and $S_n\times S_1\to S_1$ instead.

Now if we do

cyc=CycleIndexPolynomial[SymmetricGroup[2],Table[a[i],{i,1,2}]];
multiplicationWeiXu[cyc, cyc] /. a[_] -> a


we properly get

(3 a^2)/4 + a^4/4

so this seems to give the correct result. Still a bit sceptical though, since it failed for $S_1\times S_n$ and I had to fix it by hand.