# Permutation Lists

A possible way of working with permutations is by relating them to the reorderings of the elements of a list. This is the standard point of view in the combinatorial approach to permutations, which shifts the emphasis to the permuted expressions, rather than the permutations themselves. This has always been an implicit interpretation of *permutation lists* in *Mathematica,* reorderings of Range[n] for some non-negative integer n. Several standard functions in *Mathematica* allow basic manipulation of permutation lists, and now other functions have been added to work with permutation lists and convert them into their disjoint cyclic form.

PermutationListQ | validate a list of integers as reordering of |

PermutationSupport | points moved by a permutation |

Basic functionality for permutation lists.

In[1]:= |

Out[1]= |

In[2]:= |

Out[2]= |

In[3]:= |

Out[3]= |

In[4]:= |

Out[4]= |

Permutation lists can be converted into disjoint cyclic form and vice versa. This is similar to the functions ToCycles and FromCycles in the *Combinatorica* package in improved form.

PermutationCycles | convert permutation into disjoint cyclic form |

PermutationList | convert permutation into a permutation list |

Conversion to and from cyclic form.

In[5]:= |

Out[5]= |

In[6]:= |

Out[6]= |

In[7]:= |

Out[7]= |

In[8]:= |

In[9]:= |

Out[9]= |

In[10]:= |

Out[10]= |

In[11]:= |

Out[11]= |

In[12]:= |

Out[12]= |

In[13]:= |

Out[13]= |

Permutation lists can be used to permute the parts of an expression with the functions Part and Permute. There are two differences: First, depending on the length of the permutation list, Part may change the number of arguments of the expression, but Permute never changes it. Second, Part and Permute interpret the permutation in different ways.

Part | return a subexpression, possibly reordering its elements |

Permute | permute elements of an expression as given by a permutation |

FindPermutation | compute the permutation that takes the first list to the second |

In[14]:= |

In[15]:= |

Out[15]= |

In[16]:= |

Out[16]= |

In[17]:= |

Out[17]= |

In[18]:= |

Out[18]= |

In[19]:= |

Out[19]= |

In[20]:= |

Out[20]= |

In[21]:= |

Out[21]= |

In[22]:= |

Out[22]= |

In[23]:= |

Out[23]= |

In[24]:= |

Out[24]= |

It is possible to perform permutation operations with permutation lists, using standard commands of *Mathematica*.

Part | permutation list product |

Ordering | permutation list inverse |

Range | identity permutation list |

RandomSample | pseudorandom generation of permutation lists |

Standard commands reinterpreted for permutation lists.

In[25]:= |

In[26]:= |

Out[26]= |

In[27]:= |

Out[27]= |

In[28]:= |

Out[28]= |

In[29]:= |

Out[29]= |

In[30]:= |

Out[30]= |

In[31]:= |

Out[31]= |

In[32]:= |

Out[32]= |

Another important use of permutation lists is the transposition of arrays with Transpose, which results in a generally different array of permuted dimensions.

In[33]:= |

Out[33]= |

In[34]:= |

Out[34]= |

In[35]:= |

Out[35]= |

In[36]:= |

Out[36]= |