PermutationCycles

PermutationCycles[perm]

gives a disjoint cycle representation of permutation perm.

Details

  • The input permutation perm can be given as a permutation list or in disjoint cyclic form.
  • A permutation list is a reordering of the consecutive integers {1,2,,n}.
  • PermutationCycles[perm] returns an expression with head Cycles containing a list of cycles, each of the form {p1,p2,,pn}, which represents the mapping of the pi to pi+1. The last point pn is mapped to p1.
  • PermutationCycles[perm,h] returns an expression with head h.
  • The result of PermutationCycles is automatically canonicalized by rotating each cycle so that the smallest point appears first and ordering cycles by the first point.

Examples

open allclose all

Basic Examples  (2)

Cyclic form of a permutation list of length 10:

In[1]:=
Click for copyable input
Out[1]=

Identity permutation list:

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Applications  (2)

Properties & Relations  (5)

Neat Examples  (1)

See Also

Cycles  PermutationCyclesQ  PermutationList  PermutationListQ

Tutorials

Related Demonstrations

Introduced in 2010
(8.0)
| Updated in 2012
(9.0)