Permute

Permute[expr,perm]

permutes the positions of the elements of expr according to the permutation perm.

Permute[expr,gr]

returns the list of permuted forms of expr under the elements of the permutation group gr.

Details • Permute works with any nonatomic expressions, operating on the first level of expressions.
• Permute reorders the elements of an expression but never changes its length.
• The permutation perm can be given in disjoint cyclic form or as a permutation list.
• When perm is given in cyclic form Cycles[{cyc1,cyc2,}], a cycle {p1,p2,} moves the elements of expr in a cyclic manner so that expr[[pi]] is moved to position pi+1.
• When perm is given as a permutation list, the result is equivalent to the use of Permute[expr,PermutationCycles[perm]].
• A permutation group gr can be specified by generators, with head PermutationGroup, or in named form, with head SymmetricGroup, AlternatingGroup, .

Examples

open all close all

Basic Examples(3)

Cyclic permutation of three elements in a list:

 In:= Out= Take the lowercase alphabet:

 In:= Out= Exchange the first and last character:

 In:= Out= Permute several characters:

 In:= Out= Permute an expression under all elements of a group:

 In:= Out= Properties & Relations(5)

Introduced in 2010
(8.0)