Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Calculate the number of permutations of the specified cycle length counts
ResourceFunction["PermutationCountByCycleLength"][{λ1,λ2,…}] gives the number of permutations of the specified cycle length counts {λ1,λ2,…}. |
The number of 6-permutations that have two 1-cycles and three 2-cycles:
| In[1]:= |
| Out[1]= |
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]= |
This work is licensed under a Creative Commons Attribution 4.0 International License