# cardinalityOfConjugacyClass(Partition) -- the size of the conjugacy classes of S_n

## Synopsis

• Function: cardinalityOfConjugacyClass
• Usage:
cardinalityOfConjugacyClass p
• Inputs:
• p, an instance of the type Partition, a partition that indexes a conjugacy class of S_n
• Outputs:
• an integer, the size of the conjugacy class

## Description

The formula for this classes is obtained by the Orbit-Stabilizer lemma applied for S_n with the action of conjugation.

For a partition $p$ this formula is $n!/(\prod_i (\lambda_i )!i^\lambda_i$, where $\lambda_i$ denotes the number of parts in $p$ that are equal to $i$.

 i1 : p1 = new Partition from {3,2,1} o1 = Partition{3, 2, 1} o1 : Partition i2 : cardinalityOfConjugacyClass p1 o2 = 120 i3 : p2 = new Partition from {1,1,1,1,1} o3 = Partition{1, 1, 1, 1, 1} o3 : Partition i4 : cardinalityOfConjugacyClass p2 o4 = 1