search for: signature_of_a_permutation

Displaying 1 result from an estimated 1 matches for "signature_of_a_permutation".

2008 Apr 15
1
sign(<permutation>) in R ?
I am looking for an algorithm (written in R (preferably) or C, but even pseudo-code in a text book maybe fine) to determine the sign of a permutation. What is that? Well, a permutation is either even or odd, the sign is +1 or -1, respectively, see, e.g., http://en.wikipedia.org/wiki/Signature_of_a_permutation which also says >> In practice, in order to determine whether a given permutation >> is even or odd, one writes the permutation as a product of >> disjoint cycles. The permutation is odd if and only if this >> factorization contains an odd number of even-length cycles....