Function Repository Resource:

# PermutationCountByCycleLength

Calculate the number of permutations of the specified cycle length counts

Contributed by: Wolfram Staff (original content by Sriram V. Pemmaraju and Steven S. Skiena)
 ResourceFunction["PermutationCountByCycleLength"][{λ1,λ2,…}] gives the number of permutations of the specified cycle length counts {λ1,λ2,…}.

## Details and Options

The number of permutations with a given list of cycle length counts {λ1,λ2,} is , where n is the length of the list.
As the list {λ1,λ2,} is also known as the permutation type, ResourceFunction["PermutationCountByCycleLength"] returns the number of permutations by type.

## Examples

### Basic Examples (1)

The number of 6-permutations that have two 1-cycles and three 2-cycles:

 In[1]:=
 Out[1]=

### Properties and Relations (4)

There are (n-1)! n-permutations with one cycle:

 In[2]:=
 In[3]:=
 Out[3]=
 In[4]:=
 Out[4]=

There are n(n-2)! n-permutations with one singleton cycle and one (n-1)-cycle:

 In[5]:=
 In[6]:=
 Out[6]=
 In[7]:=
 Out[7]=

The CycleLengthCountList resource function is a list of all possible cycle length counts (permutation types) into which an n-permutation can be partitioned:

 In[8]:=
 In[9]:=
 Out[10]=

Count permutations by type:

 In[11]:=
 Out[11]=

As expected, there are n! permutations:

 In[12]:=
 Out[12]=

Use PermutationCountByCycleLength to tally the number of permutations of all the possible types:

 In[13]:=
 Out[13]=

Tallying CycleLengthCounts in the Permutations list gives the same result:

 In[14]:=
 Out[14]=
 In[15]:=
 Out[15]=

## Version History

• 1.0.0 – 09 July 2020