A permutation calculator counts how many different ordered arrangements are possible under a specified rule. The defining feature of a permutation is that order matters: changing the order produces a different outcome.
1) Core idea: “order matters”
If an outcome records positions (first, second, third) or a sequence (code, ranking, lineup), then it is an ordered arrangement and permutations are appropriate. If an outcome records only a set (a chosen committee), then combinations are appropriate.
Quick test: If swapping two selected items changes the outcome, the situation is a permutation.
2) Main formulas used by a permutation calculator
| Situation | What is being counted | Formula | Typical wording |
|---|---|---|---|
| Without repetition (distinct items), choose \(r\) from \(n\) | Ordered selections of length \(r\) with no repeats | \(P(n,r)=\dfrac{n!}{(n-r)!}\) | “arrange \(r\) out of \(n\)” |
| Full permutation of \(n\) distinct items | All possible orderings of all \(n\) items | \(n!\) | “arrange all \(n\)” |
| With repetition allowed, length \(r\) from \(n\) choices | Ordered sequences where repeats are allowed | \(n^r\) | “codes, passwords, outcomes with replacement” |
3) Why \(P(n,r)=\dfrac{n!}{(n-r)!}\) is correct
Consider filling \(r\) labeled positions (position 1 through position \(r\)) from \(n\) distinct items with no repetition. The first position has \(n\) choices, the second has \(n-1\), continuing until the \(r\)-th position has \(n-r+1\).
\[ P(n,r)=n \cdot (n-1) \cdot (n-2) \cdot \ldots \cdot (n-r+1). \]
The factorial form matches this product:
\[ P(n,r)=\frac{n!}{(n-r)!}. \]
4) Worked example a permutation calculator would solve
Problem: 7 distinct students are available; how many ways can 3 class officer positions (President, Vice President, Secretary) be filled with no repeats? The positions are distinct, so order matters and a permutation is required.
\[ P(7,3)=\frac{7!}{(7-3)!}=\frac{7!}{4!}=7 \cdot 6 \cdot 5=210. \]
Result: 210 different ordered assignments.
5) With repetition allowed: when the formula becomes \(n^r\)
If repeats are allowed and order still matters (for example, a length-\(r\) code from \(n\) symbols), then each position has \(n\) choices independently, so:
\[ \text{Number of sequences} = n^r. \]
6) Common confusion: permutations vs combinations
- Permutation: ordered arrangement, “ranking/lineup/positions,” uses \(P(n,r)\).
- Combination: unordered selection, “choose a group,” uses \(\binom{n}{r}=\dfrac{n!}{r!(n-r)!}\).
- Relationship: \[ P(n,r)=\binom{n}{r}\cdot r!. \]