Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get even permutations of a list
ResourceFunction["EvenPermutations"][list] returns the even permutations of list. | |
ResourceFunction["EvenPermutations"][list,count] returns count even permutations of list. |
The even permutations of {1,2,3,4}:
| In[1]:= |
| Out[1]= |
The even permutations of {2,1,3,4}:
| In[2]:= |
| Out[2]= |
The even permutations of an odd permutation have signature -1:
| In[3]:= |
| Out[3]= |
Ten even permutations of {1,…,15}:
| In[4]:= |
| Out[4]= | ![]() |
For a list of 12 items, rather than returning 12!/2 = 239500800 items, a sampling of even permutations is given:
| In[5]:= |
| Out[5]= | ![]() |
Use even permutations to embed an icosahedron within a tetrahedron:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License