PermutationList[perm]
returns a permutation list representation of permutation perm.
PermutationList[perm,len]
returns a permutation list of length len.
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 all close allBasic Examples (2)
Scope (3)
Action on cyclic permutations:
PermutationList[Cycles[{{1, 5}, {2, 9, 3}}]]The identity permutation can be given as an empty list or as a list of singletons:
PermutationList[Cycles[{}]]PermutationList[Cycles[{}], 10]On permutation lists the input is returned unchanged:
PermutationList[{3, 5, 2, 4, 1}]Pad the permutation list to a different length without changing its support:
PermutationList[{3, 5, 2, 4, 1}, 8]PermutationList works efficiently with large inputs:
PermutationCycles[list = RandomSample[Range[10000000]]];PermutationList[%] === list// TimingProperties & Relations (4)
A simple Wolfram Language implementation of PermutationList, but which requires the presence of singletons:
fromcycles[cycs_List] := Map[Last, Sort[Transpose[Map[Flatten, {Map[RotateRight, cycs], cycs}]]]]fromcycles[{{3, 2}, {4}, {1, 5, 6}}]% == PermutationList[Cycles[{{3, 2}, {1, 5, 6}}]]PermutationList and PermutationCycles are inverse functions:
PermutationList[PermutationCycles[{6, 3, 5, 4, 2, 7, 8, 1}]]PermutationList returns the list of images of a sorted range of integers:
PermutationList[Cycles[{{1, 2, 3}, {4, 5}}]]The same result can be obtained with the more general function PermutationReplace:
PermutationReplace[Range[5], Cycles[{{1, 2, 3}, {4, 5}}]]A permutation matrix corresponding to a given disjoint cycle representation:
PermutationMatrix[Cycles[{{1, 5, 6}, {2, 4}}]]Use the "PermutationList" property of PermutationMatrix to get the corresponding permutation list:
%["PermutationList"]This is equivalent to directly applying PermutationList to the cycles:
PermutationList[Cycles[{{1, 5, 6}, {2, 4}}]]Possible Issues (2)
The required length must be equal to or greater than the largest point of the permutation support:
PermutationList[Cycles[{{1, 2}, {3, 4, 5}}], 3]PermutationList[{2, 1, 4, 5, 3}, 3]Permutation lists must have machine-sized length:
PermutationList[Cycles[{{1, 10 ^ 100}}]]
See Also
Cycles PermutationCycles PermutationListQ PermutationMatrix
Function Repository: FromInversionVector NextPermutation
Tech Notes
Related Guides
Related Demonstrations
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_2026_permutationlist, author="Wolfram Research", title="{PermutationList}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/PermutationList.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_permutationlist, organization={Wolfram Research}, title={PermutationList}, year={2012}, url={https://reference.wolfram.com/language/ref/PermutationList.html}, note=[Accessed: 13-June-2026]}