# Cycle (mathematics)

{{#invoke:Hatnote|hatnote}} In mathematics, and in particular in group theory, a cycle is a permutation of the elements of some set X which maps the elements of some subset S of X to each other in a cyclic fashion, while fixing (i.e., mapping to themselves) all other elements of X. For example, the permutation of {1, 2, 3, 4} that sends 1 to 3, 2 to 4, 3 to 2 and 4 to 1 is a cycle, while the permutation that sends 1 to 3, 2 to 4, 3 to 1 and 4 to 2 is not (it separately permutes the pairs {1, 3} and {2, 4}). The set S is called the orbit of the cycle.

## Definition

A permutation of a set X, which is a bijective function ${\displaystyle \sigma :X\to X}$, is called a cycle if the action on X of the subgroup generated by ${\displaystyle \sigma }$ has exactly one orbit with more than a single element. This notion is most commonly used when X is a finite set; then of course the orbit S in question is also finite. Let ${\displaystyle s_{0}}$ be any element of S, and put ${\displaystyle s_{i}=\sigma ^{i}(s)\,}$ for any ${\displaystyle i\in \mathbf {Z} }$. Since by assumption S has more than one element, ${\displaystyle s_{1}\neq s_{0}}$; if S is finite, there is a minimal number ${\displaystyle k>1}$ for which ${\displaystyle s_{k}=s_{0}}$. Then ${\displaystyle S=\{s_{0},s_{1},\ldots ,s_{k-1}\}}$, and ${\displaystyle \sigma }$ is the permutation defined by

${\displaystyle \sigma (s_{i})=s_{i+1}\quad {\mbox{for }}0\leq i

and ${\displaystyle \sigma (x)=x}$ for any element of ${\displaystyle X\setminus S}$. The elements not fixed by ${\displaystyle \sigma }$ can be pictured as

${\displaystyle s_{0}\mapsto s_{1}\mapsto s_{2}\mapsto \cdots \mapsto s_{k-1}\mapsto s_{k}=s_{0}}$.

A cycle can be written using the compact cycle notation ${\displaystyle \sigma =(s_{0}~s_{1}~\dots ~s_{k-1})}$ (there are no commas between elements in this notation, to avoid confusion with a k-tuple). The length of a cycle, is the number of elements of its orbit of non-fixed elements. A cycle of length k is also called a k-cycle.

## Basic properties

One of the basic results on symmetric groups says that any permutation can be expressed as the product of disjoint cycles (more precisely: cycles with disjoint orbits); such cycles commute with each other, and the expression of the permutation is unique up to the order of the cycles (but note that the cycle notation is not unique: each k-cycle can itself be written in k different ways, depending on the choice of ${\displaystyle s_{0}}$ in its orbit). The multiset of lengths of the cycles in this expression is therefore uniquely determined by the permutation, and both the signature and the conjugacy class of the permutation in the symmetric group are determined by it.

The number of k-cycles in the symmetric group Sn is given, for ${\displaystyle 2\leq k\leq n}$, by the following equivalent formulas

${\displaystyle {\binom {n}{k}}(k-1)!={\frac {n(n-1)\cdots (n-k+1)}{k}}={\frac {n!}{(n-k)!k}}}$

A k-cycle has signature (−1)k − 1.

## Transpositions

Array of transpositions

A cycle with only two elements is called a transposition. For example, the permutation of {1, 2, 3, 4} that sends 1 to 1, 2 to 4, 3 to 3 and 4 to 2 is a transposition (specifically, the transposition that swaps 2 and 4).

### Properties

Any permutation can be expressed as the composition (product) of transpositions—formally, they are generators for the group. In fact, if one takes ${\displaystyle a=1}$, ${\displaystyle b=2}$, ..., ${\displaystyle e=5}$, then any permutation can be expressed as a product of Template:Visible anchor, meaning the transpositions ${\displaystyle (k~~k+1),}$ in this case ${\displaystyle (1~2)}$, ${\displaystyle (2~3)}$, ${\displaystyle (3~4)}$, and ${\displaystyle (4~5).}$ This follows because an arbitrary transposition can be expressed as the product of adjacent transpositions. Concretely, one can express the transposition ${\displaystyle (k~~l)}$ where ${\displaystyle k by moving k to l one step at a time, then moving l back to where k was, which interchanges these two and makes no other changes:

${\displaystyle (k~~l)=(k~~k+1)\cdot (k+1~~k+2)\cdots (l-1~~l)\cdot (l-2~~l-1)\cdots (k~~k+1).}$

The decomposition of a permutation into a product of transpositions is obtained for example by writing the permutation as a product of disjoint cycles, and then splitting iteratively each of the cycles of length 3 and longer into a product of a transposition and a cycle of length one less:

${\displaystyle (a,b,c,d,\ldots ,y,z)=(a,b)\cdot (b,c,d,\ldots y,z)}$

This means the initial request is to move ${\displaystyle a}$ to ${\displaystyle b}$, ${\displaystyle b}$ to ${\displaystyle c}$, ${\displaystyle y}$ to ${\displaystyle z}$ and finally ${\displaystyle z}$ to ${\displaystyle a}$. Instead one may roll the elements keeping ${\displaystyle a}$ where it is by executing the right factor first (as usual in operator notation, and following the convention in the article on Permutations). This has moved ${\displaystyle z}$ to the position of ${\displaystyle b}$, so after the first permutation, the elements ${\displaystyle a}$ and ${\displaystyle z}$ are not yet at their final positions. The transposition ${\displaystyle (a,b)}$, executed thereafter, then addresses ${\displaystyle z}$ by the index of ${\displaystyle b}$ to swap what initially were ${\displaystyle a}$ and ${\displaystyle z}$.

In fact, the symmetric group is a Coxeter group, meaning that it is generated by elements of order 2 (the adjacent transpositions), and all relations are of a certain form.

One of the main results on symmetric groups states that either all of the decompositions of a given permutation into transpositions have an even number of transpositions, or they all have an odd number of transpositions, that allows to define the parity of a permutation.