Function Repository Resource:

# EvenPermutations

Get even permutations of a list

Contributed by: Ed Pegg Jr
 ResourceFunction["EvenPermutations"][list] returns the even permutations of list. ResourceFunction["EvenPermutations"][list,count] returns count even permutations of list.

## Details

An even permutation is a permutation created by an even number of two-element swaps.
If the list has length 9 or less, all even permutations will be returned. If the list has length longer than 9, a random sampling of even permutations will be returned.

## Examples

### Basic Examples (2)

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]=

### Possible Issues (1)

For a list of 12 items, rather than returning 12!/2 = 239500800 items, a sampling of even permutations is given:

 In[5]:=
 Out[5]=

### Neat Examples (1)

Use even permutations to embed an icosahedron within a tetrahedron:

 In[6]:=
 Out[6]=

## Version History

• 1.0.1 – 26 May 2021