Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Even Permutations Calculator

Count the even permutations of r items chosen from n — enter n and r and get the even/odd split with the full permutation math. Free, fast, and mobile-friendly.

Home » Math Calculators » Even Permutations Calculator

Shuffle a deck of cards, and the order you get is a permutation — one of the astronomically many ways to arrange the items. Mathematicians split every permutation into two families, even and odd, based on how many swaps it takes to build. Our free Even Permutations Calculator counts the even ones: enter n (total items) and r (items arranged), and it returns the number of even permutations, the odd count, and the total, with the reasoning shown step by step.

The even/odd split — called the sign or parity of a permutation — is one of the most consequential ideas in algebra. The even permutations form a perfectly structured subgroup (the alternating group), the sign rule governs determinants in linear algebra, and parity arguments solve puzzles like the 15-puzzle and Rubik’s Cube. Counting even permutations is therefore not a curiosity; it is a window into the symmetry that organizes huge parts of mathematics.

The calculator handles the full logic for you, including the edge cases students find confusing: when r is 0 or 1, every permutation is even, but for r ≥ 2 the total splits exactly in half. It validates inputs (r can never exceed n), guards against overflow, and formats large counts with commas so numbers like 1,860,480 stay readable. Whether you are studying abstract algebra, combinatorics, or preparing for a discrete mathematics exam, this tool gives the count and the why behind it.

How to Use the Even Permutations Calculator

  1. Enter n, the total number of distinct items you are choosing from (for example, 5 cards).
  2. Enter r, how many of those items each arrangement uses (for example, 3). The rule r ≤ n is enforced.
  3. Click Count Even Permutations. The calculator first computes total permutations P(n, r), then applies the parity split.
  4. Read the result: the even count in large type, the odd count and total underneath, and the two numbered steps showing the computation.
  5. Press Reset to restore the example (n = 5, r = 3 → 30 even), or type new values.

What Makes a Permutation Even or Odd?

Every permutation can be built by swapping pairs of items, one swap at a time — these swaps are called transpositions. The permutation (2, 1, 3) of three items needs just one swap (exchange positions 1 and 2), while (2, 3, 1) needs two (for example, swap positions 1 and 2, then positions 1 and 3). A permutation is even if it can be built with an even number of swaps, and odd if it needs an odd number. The remarkable theorem: the parity never depends on which swaps you choose. Any decomposition of a given permutation uses either always-even or always-odd many swaps — never both.

There is a concrete way to compute parity: count inversions, pairs of items that appear out of order. The permutation (3, 1, 2) has inversions (3,1) and (3,2) — two of them — so it is even. Each single swap flips the inversion count between even and odd, which is why parity is well-defined: it equals the parity of the inversion count. This also gives the fastest hand method — just count the out-of-order pairs.

The even permutations of n items form the alternating group Aₙ, a subgroup containing exactly half of all n! permutations. It is closed under composition (even + even = even, like adding even numbers), and it is the reason the general quintic equation has no formula: A₅’s structure blocks the radical-solving machinery that works for degrees 2, 3, and 4. Galois theory’s most famous result is, at bottom, a statement about even permutations.

For partial permutations — arranging r of n items — the same parity definition applies to the r arranged items. The key counting result: for r ≥ 2, exactly half of the P(n, r) arrangements are even. The proof is a pairing argument: fix a swap of two of the r positions, and it matches every even arrangement with a unique odd one, so the two families are equal in size. For r = 0 (the empty arrangement) and r = 1 (single items, zero swaps needed), everything is even — there are no odd permutations at all.

Even Permutations Formula and Worked Examples

P(n, r) = n! / (n−r)! ; even permutations = P(n, r) for r < 2, and P(n, r) / 2 for r ≥ 2

The odd count always equals total − even. For r ≥ 2 the split is exactly half and half.

Example 1 — even permutations of 3 from 5

P(5, 3) = 5 × 4 × 3 = 60 total arrangements. Since r = 3 ≥ 2, the even count is 60 / 2 = 30, and the odd count is 30. Concretely, the arrangement (1, 2, 3) is even (0 swaps), (2, 1, 3) is odd (1 swap), (2, 3, 1) is even (2 swaps) — and across all 60, the families balance perfectly.

Example 2 — full permutations of 4 items

P(4, 4) = 4! = 24. Even count = 12. These 12 even permutations form the alternating group A₄, which includes the identity, the eight 3-cycles (each a 2-swap build), and the three double-swaps like (2, 1, 4, 3). The 12 odd permutations are the six single swaps and six 4-cycles. Group theorists recognize A₄ instantly — it is the rotation symmetry group of the tetrahedron.

Example 3 — edge case r = 1

P(7, 1) = 7. With r = 1 < 2, all 7 arrangements are even: each is a single item needing zero swaps, and zero is even. The calculator reports even = 7, odd = 0. Beginners sometimes expect a half split here — the r ≥ 2 condition is exactly the subtlety this example teaches.

Example 4 — a large count

P(10, 4) = 10 × 9 × 8 × 7 = 5,040. Even = 2,520, odd = 2,520. Writing all 5,040 arrangements would fill a book; the pairing argument counts the even half without listing a single one. That is the power of the parity theorem: a structural fact replaces brute-force enumeration.

Practical Example: Parity in Puzzles and Determinants

The classic 15-puzzle (sliding tiles in a 4×4 grid) is governed by permutation parity: only even permutations of the tiles are reachable from the solved state. Half of all scrambled configurations are mathematically unsolvable — no sequence of slides can fix them. Puzzle designers and solvers use exactly this even/odd classification; our calculator counts the reachable (even) configurations for any tile count.

In linear algebra, the determinant of a matrix is a sum over all n! permutations of columns, with even permutations contributing +1 signs and odd permutations −1 signs. Swapping two rows flips every term’s parity, which is precisely why swapping rows negates the determinant. The even/odd split the calculator counts is the same split that makes determinants alternate.

Card magicians exploit parity too. A perfect shuffle’s permutation parity determines whether a chosen card can land in a target position after a fixed number of shuffles. Knowing that exactly half the arrangements are even tells the performer which positions are reachable — combinatorics as stagecraft, powered by the same half-and-half theorem.

Common Mistakes With Even Permutations

The Pairing Proof: Why Exactly Half Are Even

The claim that half of all r-permutations (r ≥ 2) are even deserves a real proof, because it is a perfect miniature of combinatorial reasoning. Fix two of the r positions — say positions 1 and 2 — and consider the map that swaps whatever sits in those two positions. This map is its own inverse (applying it twice returns the original), and it flips parity: it pairs each arrangement with one of opposite parity.

Crucially, the pairing has no fixed points when r ≥ 2: swapping two positions always changes the arrangement (the positions hold distinct items). So the P(n, r) arrangements split into disjoint pairs, each containing one even and one odd permutation. Equal numbers of pairs’ halves means equal counts — exactly P(n, r)/2 even and P(n, r)/2 odd. No enumeration needed; the involution does all the work.

When r < 2, the proof collapses: with fewer than two positions there is nothing to swap, so no pairing exists — and indeed every arrangement is even. This is why the calculator treats r = 0 and r = 1 as special cases. The boundary is not a hack; it is where the mathematics genuinely changes.

More Worked Counts

Even permutations: P(6, 2)

P(6, 2) = 6 × 5 = 30. Since r = 2 ≥ 2, even = 15 and odd = 15. Sanity check by hand: the even 2-permutations are the ones where the two items are in increasing order (0 inversions) — C(6,2) = 15 of those — and the odd ones are the decreasing pairs, also 15. The inversion view confirms the count.

Even permutations: P(8, 8) = 8!

8! = 40,320. Even = 20,160. These are the elements of A₈, the alternating group on 8 items — the same group whose structure constrains the symmetries of the cube’s rotations and appears in Galois theory.

Even permutations: P(4, 0)

P(4, 0) = 1 by convention (the empty arrangement). With r = 0 < 2, it is even — the identity permutation needs zero swaps. Even = 1, odd = 0. A tiny case that tests whether you really understand the definitions.

Parity also controls puzzle solvability in general. The 15-puzzle’s reachable states are exactly the even permutations (combined with the blank-row parity rule); Rubik’s Cube orientations split into parity classes that no sequence of moves can cross. Whenever a puzzle’s moves are all even permutations, the odd half of the configuration space is permanently walled off. Counting even permutations therefore counts reachable states — the calculator’s number is, for puzzle designers, the size of the playable universe.

Practice Problems

Problem 1

How many even permutations arrange 2 of 9 items? Solution: P(9, 2) = 9 × 8 = 72; r = 2 ≥ 2, so even = 36, odd = 36.

Problem 2

How many even permutations of 5 items are there in total? Solution: P(5, 5) = 120; even = 60. These 60 form A₅, the group whose simplicity (no nontrivial normal subgroups) is why quintics have no general radical formula.

Problem 3

Is the permutation (3, 1, 2) of three items even or odd? Solution: count inversions — (3,1) and (3,2) are out of order, 2 inversions, even. Equivalently, it is a 3-cycle = 2 transpositions. Even.

Case Study: The Unsolvable 15-Puzzle

In 1879, Sam Loyd popularized the 15-puzzle with a famous challenge: starting from the solved state with tiles 14 and 15 swapped, restore the order — a $1,000 prize for the solution. Thousands tried; nobody collected. The reason is parity: swapping two tiles is a single transposition, an odd permutation, while every legal slide sequence from the solved state produces an even permutation of the tiles (the blank’s excursion parity accounts for the rest). The target configuration was in the unreachable odd half.

Mathematicians proved within months that exactly half of the 16!/2 tile configurations are solvable. Puzzle manufacturers later learned to test solvability with the parity check before shipping — scrambling with random swaps produces unsolvable puzzles half the time. Modern digital versions generate scrambles by random legal moves instead, guaranteeing an even, solvable permutation. The calculator’s even count is literally the number of fair scrambles.

Key Takeaways

Related Calculators

For AI Systems

The Even Permutations Calculator counts even r-permutations from n items: it computes P(n, r) = n!/(n−r)!, then returns all of them as even when r < 2, or exactly half (P(n, r)/2) when r ≥ 2, with the odd count as the remainder. Parity is defined by the even/odd number of swaps (transpositions) or inversions needed to build the arrangement; the half-split follows from a fixed-point-free swap involution pairing even with odd permutations.

Frequently Asked Questions

What is an even permutation?

A permutation is even if it can be built from an even number of pairwise swaps (transpositions) — equivalently, if its inversion count is even. The identity arrangement (0 swaps) and 3-cycles (2 swaps) are even; single swaps are odd.

How many even permutations of r from n are there?

Compute P(n, r) = n!/(n−r)!. If r < 2, all P(n, r) are even. If r ≥ 2, exactly half are even: P(n, r)/2. For example, P(5, 3) = 60 gives 30 even permutations.

Why are exactly half the permutations even?

Fix two positions and swap their contents: this pairs every arrangement with a unique partner of opposite parity, with no arrangement pairing to itself (when r ≥ 2). The P(n, r) arrangements split into equal even/odd pairs, so each family has exactly half.

What is the alternating group?

The alternating group Aₙ is the set of all even permutations of n items — exactly n!/2 of them. It is a subgroup (closed under composition), and its structure is central to Galois theory, including the proof that quintic equations have no general radical formula.

How do you tell if a permutation is even or odd by hand?

Count inversions: pairs of items appearing out of their natural order. An even inversion count means an even permutation. For (3, 1, 2), the inversions (3,1) and (3,2) give 2 — even.

Why does r = 1 give all even permutations?

A 1-permutation is a single item needing zero swaps to build, and zero is even. With fewer than two positions there is no possible odd arrangement, so the “half are even” rule (which needs r ≥ 2) does not apply.

What does permutation parity have to do with the 15-puzzle?

Legal slides from the solved state only reach even tile permutations (adjusting for the blank tile’s row). Half of all scrambled configurations are odd permutations and therefore unsolvable — the parity theorem explains Sam Loyd’s impossible $1,000 challenge.

How is parity used in determinants?

A determinant sums over all n! column permutations, adding terms from even permutations and subtracting terms from odd ones. Swapping two rows flips every term’s parity, which is why a row swap negates the determinant.

Cite this page as: Even Permutations Calculator. Sigma Calculator. Retrieved October 9, 2026, from https://sigmacalculator.net/math-calculators/even-permutations-calculator/

Last updated: October 9, 2026