PermutationListQ[expr]
returns True if expr is a valid permutation list and False otherwise.
PermutationListQ
PermutationListQ[expr]
returns True if expr is a valid permutation list and False otherwise.
Examples
open all close allBasic Examples (1)
Scope (2)
PermutationListQ works efficiently with large permutation lists:
PermutationListQ[RandomSample[Range[1000000]]]The empty list is considered a permutation list of length and degree 0:
PermutationListQ[{}]Properties & Relations (4)
RandomSample[Range[n]] always gives a valid permutation list:
RandomSample[Range[10]]PermutationListQ[%]A possible, but less efficient, Wolfram Language implementation:
permutationlistq[list_List] := SameQ[Union[list], Range[Length[list]]]permutationlistq[RandomSample[Range[10]]]Validity of permutations in cyclic form is checked with PermutationCyclesQ. A permutation list can always be obtained as a permutation of the elements in canonical order using Permute:
list = {1, 4, 3, 5, 7, 8, 10, 2, 6, 9}PermutationListQ[list]cycs = FindPermutation[Sort[list], list]PermutationCyclesQ[cycs]Permute[Sort[list], cycs] === listOrdering always returns a permutation list, even if the elements of the expression are repeated:
Ordering[head[a, a, b, c, b, a, c, b]]PermutationListQ[%]See Also
PermutationList PermutationCycles PermutationCyclesQ
Function Repository: PermutationInvolutionQ
Tech Notes
Related Guides
History
Text
Wolfram Research (2010), PermutationListQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PermutationListQ.html.
CMS
Wolfram Language. 2010. "PermutationListQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PermutationListQ.html.
APA
Wolfram Language. (2010). PermutationListQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PermutationListQ.html
BibTeX
@misc{reference.wolfram_2026_permutationlistq, author="Wolfram Research", title="{PermutationListQ}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/PermutationListQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_permutationlistq, organization={Wolfram Research}, title={PermutationListQ}, year={2010}, url={https://reference.wolfram.com/language/ref/PermutationListQ.html}, note=[Accessed: 13-June-2026]}