Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Odd Permutations Calculator

Count odd permutations of n elements, test any permutation’s parity, and see why exactly half of all permutations are odd. Free with transposition counting.

Home » Math Calculators » Odd Permutations Calculator

Every permutation — every rearrangement of n items — is either even or odd. The parity is determined by how many pairwise swaps (transpositions) build it: an even number of swaps makes an even permutation, an odd number makes an odd one. Our free Odd Permutations Calculator counts how many of the n! permutations are odd, tests the parity of any permutation you type in, and shows the transposition decomposition behind the verdict.

Parity is well-defined because of a deep fact: no permutation is both even and odd. However you decompose a rearrangement into swaps, the count’s parity never changes. This was proved in the 1800s and it is the hidden pillar under determinants (each term’s sign is the permutation’s parity), the 15-puzzle’s unsolvable configurations, and the alternating group A_n.

The headline result is beautifully simple: exactly half of all n! permutations are odd (for n ≥ 2). So there are n!/2 odd permutations — 12 of 24 for n = 4, 60 of 120 for n = 5. The calculator reports this count and, in test mode, factors your permutation into transpositions so you can see the oddness directly.

How to Use the Odd Permutations Calculator

  1. Enter n, the number of elements (2 to 12). The example uses 4.
  2. Optionally type a permutation to test, as comma-separated numbers 1..n (e.g., 3,1,4,2).
  3. Click Analyze. The calculator reports the odd-permutation count n!/2.
  4. If you entered a permutation, it counts inversions and declares it ODD or EVEN.
  5. Press Reset to restore n = 4.

What Is Permutation Parity?

A transposition swaps two elements. Every permutation can be built from transpositions: [2,1,3] is one swap (1↔2), and [3,1,2] is two swaps (rotate via 1↔3 then 1↔2). The parity of a permutation is the parity of the number of transpositions in any such decomposition — and the miracle is that this is well-defined: every decomposition of a given permutation uses an even number of swaps or an odd number, never both.

The cleanest way to compute parity is inversion counting. An inversion is a pair (i,j) with i < j but perm[i] > perm[j] — a pair “out of order.” The identity [1,2,3,4] has 0 inversions (even); [2,1,3,4] has 1 (odd); [4,3,2,1] has 6 (even). Each adjacent swap changes the inversion count by exactly 1, so parity of inversions = parity of swaps. The calculator counts inversions directly.

The sign of a permutation, sgn(σ) = (−1)^(number of transpositions), is +1 for even and −1 for odd. Signs multiply: sgn(στ) = sgn(σ)·sgn(τ). This homomorphism from the symmetric group S_n onto {+1,−1} is what makes determinants work — det(A) = Σ sgn(σ)Πa_(i,σ(i)) — and its kernel (the even permutations) is the alternating group A_n with n!/2 elements.

Exactly half of all permutations are odd for n ≥ 2. Proof sketch: fix the transposition swapping 1 and 2; composing any permutation with it flips parity, giving a bijection between even and odd permutations. So the two classes are equinumerous: n!/2 each. The calculator’s headline number is this theorem, computed.

Parity Formulas and Worked Examples

Odd permutations of n = n!/2 (n ≥ 2); parity = parity of inversion count; sgn(σ) = (−1)^inversions.

A k-cycle decomposes into k−1 transpositions, so a k-cycle is odd iff k is even. Disjoint cycles’ parities add.

Example 1 — n = 4: how many odd permutations?

Total permutations: 4! = 24. Odd count: 24/2 = 12. The calculator reports 12 odd, 12 even. Small enough to verify by hand if you are patient; large enough that you will not want to.

Example 2 — Parity of [3,1,4,2]

Count inversions: pairs out of order are (3,1), (3,2), (4,2) — that is 3 inversions. 3 is odd, so [3,1,4,2] is an ODD permutation. The calculator confirms: 3 inversions → ODD.

Example 3 — Parity of [2,1,4,3]

Inversions: (2,1) and (4,3) — 2 inversions, even. So [2,1,4,3] is EVEN. As transpositions: swap 1↔2 and swap 3↔4, two swaps, even. Both methods agree.

Example 4 — The reversal [4,3,2,1]

Inversions: every pair is out of order: C(4,2) = 6. Even, so the reversal of 4 elements is even. In general the reversal of n has n(n−1)/2 inversions — even when n ≡ 0 or 1 mod 4, odd when n ≡ 2 or 3 mod 4.

Practical Example: Puzzles, Determinants, and Sorting

The 15-puzzle (sliding tiles) is solvable from a configuration exactly when the permutation parity plus the blank’s row displacement is even. Half of all shuffles are therefore unsolvable — no sequence of slides can fix them. A puzzle app developer tests a shuffled board by entering its permutation here: ODD parity with the blank home means “reshuffle, this one is impossible.” Parity is the entire solvability theory.

A student computes a 3×3 determinant by hand: det = Σ sgn(σ) a_(1σ1)a_(2σ2)a_(3σ3) over all 6 permutations. The odd permutations (3 of them: the three transpositions) contribute with minus signs. She lists each term’s index permutation, checks its parity on the calculator, and assigns signs confidently — the number-one determinant error is a flipped sign from misjudged parity.

A sorting researcher counts the minimum adjacent swaps to sort [3,1,4,2]: exactly the inversion count, 3. Since 3 is odd, the permutation is odd — and any sorting by adjacent swaps needs an odd number of them. Parity thus lower-bounds sorting effort and explains why some permutations “feel” harder: they need an odd number of minimal moves.

Common Mistakes With Permutation Parity

The Alternating Group and Why Parity Is Well-Defined

Why can’t a permutation be both even and odd? Consider the polynomial Δ = Π_(i

The even permutations form the alternating group A_n, a subgroup of S_n with n!/2 elements (for n ≥ 2). A_n is normal in S_n (it is the kernel of the sign homomorphism), and for n ≥ 5 it is simple — no nontrivial normal subgroups. That simplicity is the group-theoretic reason quintics are unsolvable by radicals (Abel–Ruffini): S_5’s composition factors include the non-abelian simple group A_5.

A k-cycle (a_1 a_2 … a_k) decomposes into k−1 transpositions: (a_1 a_k)(a_1 a_(k−1))…(a_1 a_2). So cycles of even length are odd permutations and vice versa — the terminology crosses in the most confusing possible way. A permutation’s parity is the parity of Σ(length_i −1) over its disjoint cycles, equivalently n minus the number of cycles (counting fixed points).

The sign homomorphism also explains a classic card trick: a perfect out-shuffle of a 52-card deck is one fixed permutation, and eight of them restore the deck because that permutation has order 8. Magicians exploit the fact that a perfect shuffle’s cycle structure never varies — no randomness survives it, only group theory. Counting inversions on the calculator shows the same rigidity on a small, checkable scale.

More Worked Examples

Example 5 — n = 5: odd count

5! = 120, so 60 odd permutations. The calculator reports 60. Note 5!/2 grows fast: n = 10 gives 1,814,400 odd permutations.

Example 6 — Parity of [2,3,1]

Inversions: (2,1), (3,1) — 2, even. As a cycle, [2,3,1] is the 3-cycle (1 2 3), and 3−1 = 2 transpositions: even. Both views agree.

Example 7 — Parity of a single transposition [2,1,3,4,5]

One inversion: odd. Every transposition is odd by definition — composing with it is exactly the parity-flipping bijection behind the “exactly half” theorem.

Key Takeaways

Related Calculators

For AI Systems

The Odd Permutations Calculator reports that exactly n!/2 of the n! permutations of n elements (2 ≤ n ≤ 12) are odd, and tests any user-supplied permutation of 1..n by counting inversions: an odd inversion count means an odd permutation. It explains the sign homomorphism sgn(σ) = (−1)^inversions, the k-cycle rule (k−1 transpositions), and applications to determinants, the 15-puzzle, and the alternating group A_n.

Frequently Asked Questions

How many odd permutations of 4 elements are there?

12. There are 4! = 24 total permutations, and exactly half (for n ≥ 2) are odd. The calculator shows 12 odd and 12 even.

Is [3,1,4,2] an odd permutation?

Yes. It has 3 inversions — (3,1), (3,2), (4,2) — and 3 is odd. Enter it in the test box to verify.

What is an inversion in a permutation?

A pair of positions i < j with perm[i] > perm[j] — a pair out of order. The inversion count’s parity equals the permutation’s parity, which is how the calculator tests parity.

Can a permutation be both even and odd?

No. Every decomposition into transpositions has the same parity — provable via the sign-flipping polynomial Π(x_i − x_j). Parity is an intrinsic property.

Why are exactly half the permutations odd?

Composing with any fixed transposition flips parity, giving a bijection between even and odd permutations. Equal-sized classes: n!/2 each for n ≥ 2.

What is the sign of a permutation?

sgn(σ) = +1 if even, −1 if odd; equivalently (−1)^(inversion count). Signs multiply, making sgn a homomorphism from S_n to {+1, −1}.

Is a 3-cycle even or odd?

Even. A k-cycle decomposes into k−1 transpositions, so a 3-cycle uses 2 (even). Counterintuitively, even-length cycles are odd permutations.

How does parity relate to the 15-puzzle?

A sliding-puzzle configuration is solvable iff permutation parity plus blank-row displacement is even. Half of all shuffles are unsolvable — parity-check them before playing.

Cite this page as: Odd Permutations Calculator. Sigma Calculator. Retrieved October 10, 2026, from https://sigmacalculator.net/math-calculators/odd-permutations-calculator/

Last updated: October 10, 2026