Determines whether a substitution is even or odd. (9 characters)
Author: shiroeExecutions: 47
※ This library was created by a member. This site is not responsible for its content.
Outputs the result of the even/odd check.
Enter one of the digits 1, 2, 3, 4, 5, 6, 7, 8, or 9 in input fields 1 through 9.
Enter distinct digits (no duplicates) in input fields 1 through 9.
Enter one of the digits 1, 2, 3, 4, 5, 6, 7, 8, or 9 in input fields 1 through 9.
Enter distinct digits (no duplicates) in input fields 1 through 9.
| Sign sgn |
R6 (2024). July 21 (Sun)_Ver. 001
Digit setting: 6 digits. Fixed digits. Real number calculation mode.
Routine calculation,,rumia00
B>c_near:k
Digit setting: 6 digits. Fixed digits. Real number calculation mode.
Routine calculation,,rumia00
B>c_near:k
No customer feedback for this calculation yet.
Here, we consider the permutation of the sequence 123456789.
This determines whether the 9-character permutation σ is even or odd.
If even, sgn(σ) = 1 (one)
If odd, sgn(σ) = -1 (minus one)
Accordingly,
the program outputs 1 or -1 as the result.
A permutation that can be expressed as the product of an even number of transpositions is an even permutation,
while a permutation that can be expressed as the product of an odd number of transpositions is an odd permutation.
If the permutation is even, the parity is determined to be even, and 1 is output.
If the permutation is odd, the parity is determined to be odd, and -1 is output.
Determining whether a permutation is even or odd is sometimes used in the definition of determinants.
In the input field, enter the sequence of numbers for which you want to check the parity (a string of numbers resulting from permuting 123456789).
In permutation notation, this is often written in the bottom row.
For example, if you want to check the parity of 876512349—which is the result of permuting the digits of 123456789—
enter 1=8, 2=7, 3=6,Input 4=5, Input 5=1, Input 6=2, Input 7=3, Input 8=4, and Input 9=9.