PermutationList

PermutationList[perm]

returns a permutation list representation of permutation perm.

PermutationList[perm,len]

returns a permutation list of length len.

Details

  • The input permutation perm can be given as a permutation list or in disjoint cyclic form.
  • For cyclic input Cycles[{cyc1,cyc2,}] the cycles cyci must be lists of positive integers representing the points of the domain in which the permutation perm acts. The cycles must have no common points.
  • PermutationList returns a permutation list that is a reordering of the consecutive integers {1,2,,len}. By default the length len is the largest integer present in the input perm.
  • For an input cycle {p1,p2,,pm} the resulting permutation list has point pi+1 at position pi and p1 at position pm.
  • PermutationList also works with SparseArray objects.

Examples

open allclose all

Basic Examples  (2)

Convert permutation cycles to a permutation list:

Explicit length specification:

Scope  (3)

Action on cyclic permutations:

The identity permutation can be given as an empty list or as a list of singletons:

On permutation lists the input is returned unchanged:

Pad the permutation list to a different length without changing its support:

PermutationList works efficiently with large inputs:

Properties & Relations  (4)

A simple Wolfram Language implementation of PermutationList, but which requires the presence of singletons:

PermutationList and PermutationCycles are inverse functions:

PermutationList returns the list of images of a sorted range of integers:

The same result can be obtained with the more general function PermutationReplace:

A permutation matrix corresponding to a given disjoint cycle representation:

Use the "PermutationList" property of PermutationMatrix to get the corresponding permutation list:

This is equivalent to directly applying PermutationList to the cycles:

Possible Issues  (2)

The required length must be equal to or greater than the largest point of the permutation support:

Permutation lists must have machine-sized length:

Neat Examples  (1)

Illustrate how points get moved under increasing permutations:

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

Text

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

CMS

Wolfram Language. 2010. "PermutationList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/PermutationList.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_permutationlist, organization={Wolfram Research}, title={PermutationList}, year={2012}, url={https://reference.wolfram.com/language/ref/PermutationList.html}, note=[Accessed: 21-November-2024 ]}