Mathematica > Mathematics and Algorithms > Discrete Mathematics > Permutations > PermutationCyclesQ >

PermutationCyclesQ

PermutationCyclesQ[expr]
returns True if expr is a permutation in disjoint cyclic form, and False otherwise.
  • The disjoint cyclic form of a permutation is an expression with head Cycles containing a list of cycles, each one being a list of positive integers. The integer points in a permutation must all be different.
A valid permutation in cyclic form:
A symbolic permutation object:
An invalid permutation:
A valid permutation in cyclic form:
In[1]:=
Click for copyable input
Out[1]=
 
A symbolic permutation object:
In[1]:=
Click for copyable input
Out[1]=
 
An invalid permutation:
In[1]:=
Click for copyable input
Out[1]=
Test permutations of any support:
The identity permutation:
A possible Mathematica implementation of PermutationCyclesQ:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF