You are using the new UI (Beta).Return to the original UI

This page has been automatically translated by machine translation. Please note that translations may not be entirely accurate.

keisanHigh-precision calculations for everyday life and work

Determines whether a substitution is even or odd. (3 characters)

Author: shiroeExecutions: 119

※ This library was created by a member. This site is not responsible for its content.

Manage Bookmarks
Determines whether a permutation is even or odd.
Here, we consider the permutation of the number sequence 123.
This determines whether a 3-character permutation σ is even or odd.
If even, sgn(σ) = 1;
if odd, sgn(σ) = -1;
and
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.
For an even permutation, the parity check returns "even" and outputs 1.
If it is an odd permutation, the parity is set to odd, and -1 is output.
The parity of a permutation is sometimes used in the definition of a determinant.

Enter the result of permuting 123 in the input field.
In permutation notation, this is often written in the bottom row.
For example, if you want to check the parity of 132—which is the result of permuting 123—
set Input 1 to 1, Input 2 to 3, and Input 3 to 2.
The program will output the parity result.

Enter any of the digits 1, 2, or 3 for inputs 1, 2, and 3.
Ensure that the inputs for 1, 2, and 3 are all different and contain no duplicates.
Input 1
Input 2
Input 3
Sequence of numbers 
Even/Odd Determination  (Even = 1, Odd = -1)
R6 (2024). 03/27 (Wed)_Ver.substitution_n=3, i=1,2,3
Pilot version.

No customer feedback for this calculation yet.