Determines whether a substitution is even or odd. (5 characters)
Author: shiroeExecutions: 184
※ This library was created by a member. This site is not responsible for its content.
Enter one of the digits 1, 2, 3, 4, or 5 in inputs 1, 2, 3, 4, and 5.
Enter distinct digits (no duplicates) in inputs 1, 2, 3, 4, and 5.
Enter distinct digits (no duplicates) in inputs 1, 2, 3, 4, and 5.
| Entered string | |
| Even/Odd Determination | (Even = 1, Odd = -1) |
R6 (2024). June 9 (Sun)_Ver. 001
Fixed digit settings.
Routine calculation,,rumia00
B>c_near:k
Fixed digit settings.
Routine calculation,,rumia00
B>c_near:k
No customer feedback for this calculation yet.
Here, we consider the permutation of the sequence 12345.
This determines whether a 5-character permutation σ is even or odd.
If even, sgn(σ) = 1;
if odd, sgn(σ) = -1;
and
the result is output as 1 or -1.
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 check returns “even” and outputs 1.
If it is an odd permutation, the parity check returns “odd” and outputs -1.
Determining the parity of a permutation is sometimes used in the definition of determinants.
Enter the result of permuting 12345 (the sequence for which you want to check the parity) into the input field.
In permutation notation, this is often written in the bottom row.
For example, if you want to determine the parity of 12354—the result of permuting 12345—
set input 1 to 1, input 2 to 2, input 3 to 3, input 4 to 5, and input 5 to 4.
The program will output the parity result.