signature takes as argument a permutation.
signature returns the signature of the permutation given as argument.
The signature of a permutation is equal to :
The signature of a cycle of size k is : (−1)k+1.
Input :
Output :
Indeed permu2cycles([3,4,5,2,0,1])=[[0,3,2,5,1,4]].