Cycles

Cycles[{cyc1,cyc2,}]

represents a permutation with disjoint cycles cyci.

Details

  • The cycles cyci of a permutation are given as lists of positive integers, representing the points of the domain in which the permutation acts.
  • A cycle {p1,p2,,pn} represents the mapping of the pi to pi+1. The last point pn is mapped to p1.
  • Points not included in any cycle are assumed to be mapped onto themselves.
  • Cycles must be disjoint, that is, they must have no common points.
  • Cycles objects are automatically canonicalized by dropping empty and singleton cycles, rotating each cycle so that the smallest point appears first, and ordering cycles by the first point.
  • Cycles[{}] represents the identity permutation.

Examples

open allclose all

Basic Examples  (2)

A permutation with two cycles:

Automatic evaluation to a canonical form:

Scope  (2)

Permutations can involve any positive integers, with cycles of any length:

Identity permutation:

Properties & Relations  (9)

The identity permutation contains no cycles in its canonical form:

Permutation applied to a single point:

Points not present in the cycles are mapped onto themselves:

Cycles given in SparseArray form are automatically converted into normal lists:

Generate the list of permutations corresponding to a symmetric group:

Permutations are numerically ordered by comparing their respective lists of images:

Canonical Wolfram Language ordering of Cycles objects:

The identity is always sorted first:

A way to compute the inverse of a permutation:

Possible Issues  (3)

Only positive integers can appear in cycles:

All integers must be distinct:

Permutation objects with symbolic arguments return unevaluated:

Neat Examples  (1)

Graph representation of a permutation:

The inverse permutation has the arrows reversed:

Wolfram Research (2010), Cycles, Wolfram Language function, https://reference.wolfram.com/language/ref/Cycles.html.

Text

Wolfram Research (2010), Cycles, Wolfram Language function, https://reference.wolfram.com/language/ref/Cycles.html.

CMS

Wolfram Language. 2010. "Cycles." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Cycles.html.

APA

Wolfram Language. (2010). Cycles. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Cycles.html

BibTeX

@misc{reference.wolfram_2024_cycles, author="Wolfram Research", title="{Cycles}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/Cycles.html}", note=[Accessed: 27-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_cycles, organization={Wolfram Research}, title={Cycles}, year={2010}, url={https://reference.wolfram.com/language/ref/Cycles.html}, note=[Accessed: 27-November-2024 ]}