powered by
The sign of a permutation equals to the parity of the count of involutions to order the given permutation
permSign(prm)
The permutation to evaluate
The parity of the given permutation. Equals to +1 if even and -1 if it is odd.
permNext, ssetNext
permNext
ssetNext
# NOT RUN { permSign(c(1,2,3,4)) permSign(c(1,2,4,3)) permSign(c(2,1,4,3)) permSign(c(2,4,1,3)) # }
Run the code above in your browser using DataLab