1001Ferramentas
🔀Calculators

Permutations P(n,k)

Compute permutations P(n,k) = n!/(n-k)!.

P(n,k) =

Permutations

A permutation of n distinct elements is an ordered arrangement of all of them. The count is simply P(n) = n!. When some elements repeat, you divide by the factorials of each repetition group — the permutation with repetition formula: P(n; r₁, r₂, …, rₖ) = n! / (r₁!·r₂!·…·rₖ!). Example: anagrams of "MATEMATICA" (10 letters: M×2, A×3, T×2, E, I, C) = 10! / (2!·3!·2!) = 3628800 / 24 = 151200. A circular permutation (objects around a round table) is (n−1)! because rotations are considered identical.

Applications and context

Enumeration of passwords and PINs (search-space size), Fisher–Yates shuffle (uniform random permutation in O(n)), classical cryptography (transposition ciphers), school problems involving anagrams (ENEM, vestibular), and the Travelling Salesman Problem (n! possible routes).

FAQ

What's the difference between permutation and arrangement? A permutation uses all n elements; an arrangement A(n,k) picks and orders only k of them.

And from combination? Combination C(n,k) doesn't care about order. Permutations and arrangements do.

Why divide by r! in repetitions? The r! orderings of a repeated group are indistinguishable (same letter), so you remove the overcount.

Related Tools