Counting Methods: Permutations and Combinations
Learn when order matters and when it doesn't β and use factorials, permutations, and combinations to count large possibility spaces precisely.
How many possible passwords exist with 8 characters? How many ways can 5 runners finish a race? How many 5-card poker hands are possible? These questions all require counting arrangements β and the answer isn't as simple as multiplying. Permutations and combinations are the mathematical tools that answer "how many ways?" questions precisely. They appear in cryptography (password security), genetics (DNA sequence arrangements), scheduling (shift rotation plans), and game design (deck building mechanics). Once you see the pattern, you'll never count arrangements by hand again.
- Compute factorials and use the Fundamental Counting Principle for sequential choices
- Calculate permutations \(P(n,r)\) when the order of selection matters
- Calculate combinations \(C(n,r)\) when only the group matters, not the order
Key relationship: \(P(n,r) = r! \times C(n,r)\). Combinations are always smaller than permutations for the same n and r, because they divide out all the equivalent orderings.
Permutations vs. Combinations β When to Use Which
| Situation | Order Matters? | Formula |
|---|---|---|
| Assigning 1st, 2nd, 3rd place in a race | β Yes | P(n, r) |
| Creating a 4-digit PIN from 0β9 | β Yes | P(n, r) |
| Choosing 3 toppings from 8 for a pizza | β No | C(n, r) |
| Selecting a 5-person committee from 20 | β No | C(n, r) |
| Arranging 6 books on a shelf | β Yes | 6! = 720 |
8 runners compete. How many ways can gold, silver, and bronze be awarded?
\[ P(8, 3) = \frac{8!}{(8-3)!} = \frac{8!}{5!} = 8 \times 7 \times 6 = \mathbf{336} \]A company has 10 engineers. They need to select a 3-person project team (no specific roles). How many distinct teams are possible?
\[ C(10, 3) = \frac{10!}{3!\,(10-3)!} = \frac{10!}{3!\,7!} = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = \frac{720}{6} = \mathbf{120} \]If roles mattered (Lead, Dev, QA), it would be P(10,3) = 720 β 6Γ more arrangements.
A system requires a 4-character PIN using only digits 0β9. How many PINs are possible (a) if digits can repeat, and (b) if no digit can repeat?
(a) With repetition β use the Fundamental Counting Principle:
\[ 10 \times 10 \times 10 \times 10 = 10^4 = \mathbf{10{,}000} \](b) Without repetition β order matters, no repeats = permutation:
\[ P(10, 4) = \frac{10!}{6!} = 10 \times 9 \times 8 \times 7 = \mathbf{5{,}040} \]Requiring unique digits cuts the possible PINs nearly in half β relevant for security policy design.
- How many ways can you arrange the letters A, B, C, D in a row?
- A lottery draws 5 numbers from 1β49 (order doesn't matter). How many combinations are possible?
- Why is C(n,r) always β€ P(n,r) for the same n and r?
βΆ Show Answers
- All 4 letters, all positions: \(4! = 4 \times 3 \times 2 \times 1 =\) 24.
- \(C(49,5) = 49!/(5! \cdot 44!) = (49 \times 48 \times 47 \times 46 \times 45)/(5 \times 4 \times 3 \times 2 \times 1) = 1{,}906{,}884 / 120 \approx\) 1,906,884 β that's why jackpots are so hard to win.
- Combinations divide out the \(r!\) equivalent orderings of each selected group. Since \(r! \geq 1\), \(C(n,r) = P(n,r)/r! \leq P(n,r)\).
- Using permutation when order doesn't matter: Choosing 3 toppings from 8 β peppers, olives, mushrooms is the SAME pizza as olives, mushrooms, peppers. Using P(8,3) instead of C(8,3) overcounts by 3! = 6Γ.
- Forgetting that 0! = 1: The formula P(n,n) = n!/0! requires 0! = 1 to give n! (all arrangements). This is defined, not derived.
- Applying formulas when repetition is allowed: P(n,r) and C(n,r) assume no repetition. If an element can be chosen more than once (like dice rolls), use the Fundamental Counting Principle instead.
- If order matters, use \(P(n,r) = n!/(n-r)!\). If order doesn't matter, use \(C(n,r) = n!/(r!(n-r)!)\).
- Factorials count all arrangements of n distinct items: \(n!\). They grow very fast β 10! = 3,628,800.
- The Fundamental Counting Principle multiplies independent choices: m choices then n choices = mΓn total outcomes.
- Combinations are always β€ permutations for the same n and r: \(C(n,r) = P(n,r)/r!\).
Cryptographers design password and encryption key spaces using permutation math β a 10-character alphanumeric password (62 characters: aβz, AβZ, 0β9) has \(62^{10} \approx 8.4 \times 10^{17}\) possibilities. That enormous number is what makes brute-force attacks impractical. Scheduling analysts use combinations to build shift rotation plans β choosing which employees cover which shifts out of a pool, or which machine configurations to test first during production optimization. Understanding whether a scenario requires ordered or unordered counting is the critical first step in every one of these calculations.
Calculator Connection
The Permutations & Combinations Calculator computes P(n,r) and C(n,r) for any n and r, including showing the factorial breakdown β essential for verifying probability problems, lottery odds, and arrangement counting without error-prone manual arithmetic.
Try it with the Calculator
Apply what you've learned with this tool.
Counting Methods: Permutations and Combinations: Quiz
5 questions per attempt Β· Intermediate Β· Pass at 70%
Start Quiz β