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. (6 characters)

Author: shiroeExecutions: 75

※ 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 123456.
This determines whether a 6-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 check returns “even” and outputs 1.
If it is an odd permutation, the parity is determined to be odd, and -1 is output.
Determining the parity of a permutation is sometimes used in the definition of determinants.
In the input field, enter the sequence of numbers (a string of numbers resulting from permuting 123456) for which you want to check the parity.
In permutation notation, this is often written in the bottom row.
For example, if you want to check the parity of 123564—which is the result of permuting 123456—
set Input 1 to 1, Input 2 to 2, Input 3 to 3, Input 4 to 5, Input 5 to 6, and Input 6 to 4.
The program will output the parity result.
Enter any of the digits 1, 2, 3, 4, 5, or 6 into Input 1, 2, 3, 4, 5, and 6.
Enter distinct digits (no duplicates) into Input 1, 2, 3, 4, 5, and 6.
Enter one of the digits 1, 2, 3, 4, 5, or 6 in input fields 1, 2, 3, 4, 5, and 6.
Enter distinct digits (no duplicates) in input fields 1, 2, 3, 4, 5, and 6.
Input 1
Input 2
Input 3
Input 4
Input 5
Input 6
Entered string   (Sequence of numbers)
Sign sgn 
Digit display setting: 6 digits.
Fixed digit count.
Floating-point calculation mode.

No customer feedback for this calculation yet.