Skip to content

Cycles ​

A permutation written in disjoint-cycle notation: (i1 i2 … ik)(i_1\,i_2\,\dots\,i_k) sends i1→i2→⋯→ik→i1i_1 \to i_2 \to \dots \to i_k \to i_1 and fixes everything else. A carrier, like PermutationGroup — it holds the cycles rather than computing anything from them.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaCyclic permutationMathWorldPermutationCycleCyclicPermutationWikidataQ212130nLabcyclic permutationFindStatSt000031via PermutationWolfram LanguageCycles!
Cycles({{i1, ..., ik}, ...})the permutation that cycles each listed tuple and fixes every other point
Cycles({{i1, i2, ...}, ...})A permutation written in disjoint-cycle notation: (i1 i2 … ik)(i_1\,i_2\,\dots\,i_k) sends i1→i2→⋯→ik→i1i_1 \to i_2 \to \dots \to i_k \to i_1 and fixes everything else. A carrier, like PermutationGroup — it holds the cycles rather than computing anything from them.
Typed signatures
TypePackageApplies
((list<list<integer>>) -> expression<Cycles>) & ((cycle_decomposition) -> expression<Cycles>)combinatoricsreplaces groupalgebraalways
(list<list<integer>>) -> expression<Cycles>groupalgebraalways

Domain: Permutations

Details
  • Fixed points (singleton cycles) are dropped on construction — Cycles({{1},{2,3}})\mathrm{Cycles}(\{\{1\},\{2,3\}\}) and Cycles({{2,3}})\mathrm{Cycles}(\{\{2,3\}\}) are the same value
  • The cycles and their internal order are kept exactly as given otherwise — nothing is sorted or rotated to a canonical start
  • PermutationCycles builds one from a one-line word; Permute applies one to a list; InversePermutation reverses one
  • Written from a CycleDecomposition, it drops that value's fixed points. CycleDecomposition(cycles, n) is the way back, given the size

Examples

Basic #

the singleton cycles {5}\{5\} and {4}\{4\} vanish — they fix those points anyway

live ↗
InCycles([[1,3,2],[5],[4]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3, 2\bigr\rbrack, \bigl\lbrack5\bigr\rbrack, \bigl\lbrack4\bigr\rbrack\bigr\rbrack)OutCycles([[1,3,2]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3, 2\bigr\rbrack\bigr\rbrack)
live ↗
InCycles([[4,10,2,5],[9],[7,1,18]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack4, 10, 2, 5\bigr\rbrack, \bigl\lbrack9\bigr\rbrack, \bigl\lbrack7, 1, 18\bigr\rbrack\bigr\rbrack)OutCycles([[4,10,2,5],[7,1,18]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack4, 10, 2, 5\bigr\rbrack, \bigl\lbrack7, 1, 18\bigr\rbrack\bigr\rbrack)
Applications #

(1 3 2)(1\,3\,2) moves the item at position 1 to position 3, 3 to 2, 2 to 1

live ↗
InPermute([a,b,c,d],Cycles([[1,3,2]]))\mathrm{Permute}(\bigl\lbrack a, b, c, d\bigr\rbrack, \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3, 2\bigr\rbrack\bigr\rbrack))Out[b,c,a,d]\bigl\lbrack b, c, a, d\bigr\rbrack
Properties #

Fixed points are dropped, leaving the identity

live ↗
InCycles([[1],[2],[3],[4]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1\bigr\rbrack, \bigl\lbrack2\bigr\rbrack, \bigl\lbrack3\bigr\rbrack, \bigl\lbrack4\bigr\rbrack\bigr\rbrack)OutCycles([])\mathrm{Cycles}(\bigl\lbrack\bigr\rbrack)

The cycle (1 3 2)(1\,3\,2) sends 3 to 2

live ↗
InPermutationReplace(3,Cycles([[1,3,2]]))\mathrm{PermutationReplace}(3, \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3, 2\bigr\rbrack\bigr\rbrack))Out22

A point outside every cycle is fixed

live ↗
InPermutationReplace(4,Cycles([[1,3,2]]))\mathrm{PermutationReplace}(4, \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3, 2\bigr\rbrack\bigr\rbrack))Out44
About
Examples6
Checked againstWolfram Language 5 agree1 differ
CrosswalkWikipediaMathWorld ×2WikidatanLabFindStatWolfram Language

See also: PermutationCycles, Permute, PermutationGroup, InversePermutation