PermutationListQ

PermutationListQ[expr]

returns True if expr is a valid permutation list and False otherwise.

Details

  • A valid permutation list {p1,,pn} is a rearrangement of the integers {1,,n}.

Examples

open allclose all

Basic Examples  (1)

A valid permutation list:

In[1]:=
Click for copyable input
Out[1]=

Invalid permutation lists:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Scope  (2)

Properties & Relations  (4)

Neat Examples  (1)

See Also

PermutationList  PermutationCycles  PermutationCyclesQ

Tutorials

Introduced in 2010
(8.0)