|
From: Jaime V. <vi...@fe...> - 2023-05-05 18:23:44
|
On 05/05/23 18:24, Daniel Volinski via Maxima-discuss wrote: > Is there a command in Maxima the calculates the sign of a permutation? > > Given a base permutation (a list) and a test permutation (a list) of > the same elements, > I would l like a command to calculate the number of switches needed to > go from one > to the other or (alternatively) whether this number is odd or even. > Hello Daniel, Function perm_parity, from additional package combinatorics, will give 0 if the permutation is even or 1 if it is odd. Regards, Jaime |