Wikipedia:Reference desk/Archives/Mathematics/2013 June 16

= June 16 =

Determining the signature of a permutation without trying to rearranging it for the original sequence
Is there an algorithm to determine the signature of a permutation of a sequence without counting how many times you need to swap the elements from the original to get the permutation? (There are many ways to get the permutation, you only have to try one of them). Also write the algorithm in Python. Czech is Cyrillized (talk) 09:23, 16 June 2013 (UTC)
 * I don't know about Python, but in J you find answers here: . Bo Jacoby (talk) 10:16, 16 June 2013 (UTC).
 * First find its cycle decomposition. Then the parity of the permutation is the number of even cycles.   Sławomir Biały  (talk) 12:07, 16 June 2013 (UTC)