Skip to main content

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.

Lesson 9 of 10 Statistics & Probability Intermediate ⏱ 9 min read
πŸ”₯ Why This Matters

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.

🎯 What You'll Learn
  • 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 Vocabulary
Factorial (n!)The product of all positive integers from 1 to n. \(5! = 5 \times 4 \times 3 \times 2 \times 1 = 120\). Defined: \(0! = 1\). Fundamental Counting PrincipleIf one event has m outcomes and a second has n, together they have m Γ— n outcomes. Permutation P(n,r)The number of ordered arrangements of r items chosen from n items: \(n! / (n-r)!\). Combination C(n,r)The number of unordered selections of r items from n: \(n! / (r!(n-r)!)\). Also written \(\binom{n}{r}\). Order MattersDifferent arrangements of the same items count as different outcomes. Use permutations. Order Doesn't MatterAny group with the same items is the same outcome regardless of arrangement. Use combinations.
Key Concept β€” The Core Formulas
\[ n! = n \times (n-1) \times (n-2) \times \cdots \times 1 \] \[ P(n, r) = \frac{n!}{(n-r)!} \qquad \text{(Permutations β€” order matters)} \] \[ C(n, r) = \binom{n}{r} = \frac{n!}{r!\,(n-r)!} \qquad \text{(Combinations β€” order doesn't matter)} \]

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

SituationOrder Matters?Formula
Assigning 1st, 2nd, 3rd place in a raceβœ… YesP(n, r)
Creating a 4-digit PIN from 0–9βœ… YesP(n, r)
Choosing 3 toppings from 8 for a pizza❌ NoC(n, r)
Selecting a 5-person committee from 20❌ NoC(n, r)
Arranging 6 books on a shelfβœ… Yes6! = 720
Worked Example 1 β€” Basic: Permutation (Race Finish)

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} \]
Worked Example 2 β€” Intermediate: Combination (Committee Selection)

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.

Worked Example 3 β€” Real World: Password Security

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.

✏️ Quick Check
  1. How many ways can you arrange the letters A, B, C, D in a row?
  2. A lottery draws 5 numbers from 1–49 (order doesn't matter). How many combinations are possible?
  3. Why is C(n,r) always ≀ P(n,r) for the same n and r?
β–Ά Show Answers
  1. All 4 letters, all positions: \(4! = 4 \times 3 \times 2 \times 1 =\) 24.
  2. \(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.
  3. 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)\).
⚠️ Common Mistakes
  • 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.
βœ… Key Takeaways
  • 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!\).
πŸ’Ό Career Connection β€” Cryptographer & Scheduling Analyst

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.

Permutations & Combinations
Count arrangements and selections from a set β€” used in probability and algorithm analysis.
Use calculator β†’
← Previous Lesson
Back to
Independent vs. Dependent Events
Continue Learning
Up Next: Interpreting Data and Making Decisions
Next Lesson →
Test Your Knowledge

Counting Methods: Permutations and Combinations: Quiz

5 questions per attempt  Β·  Intermediate  Β·  Pass at 70%

Start Quiz β†’

More in Statistics & Probability

Understanding Data and Types of Data Organizing Data with Frequency Tables Calculating the Mean (Average)
← All Statistics & Probability lessons