Permutations and Combinations
Permutations and combinations count the ways to choose r items from n. In a permutation, order matters: P(n, r) = \frac{n!}{(n - r)!}. In a combination, order does not matter: C(n, r) = \frac{n!}{r!\,(n - r)!}. Choosing a president and a vice president is a permutation. Choosing a two-person team is a combination.
Before this lesson: Probability, Exponents and Multiplying and Dividing Fractions
What permutations and combinations count
Many counting problems ask, “How many ways can this happen?” Listing every way works for small cases, but it breaks down fast. Ten runners can finish first, second and third in 720 different ways.
The key question is whether order matters. If swapping two choices gives a different result, order matters, and you are counting permutations. If swapping gives the same result, order does not matter, and you are counting combinations.
Every combination of 3 people can be arranged in 6 orders. So there are always 6 times as many permutations of 3 items as combinations. That is why the combination formula divides by r!.
Counting formulas
Fundamental counting principle: if one choice can be made in m ways and a second in n ways, the two together can be made in m \cdot n ways. This extends to any number of choices.
Factorial: n! = n(n - 1)(n - 2) \cdots 2 \cdot 1, the number of ways to arrange n items in a row. By definition, 0! = 1.
| Count | Order matters? | Formula | Other notation |
|---|---|---|---|
| Permutations of r from n | Yes | P(n, r) = \frac{n!}{(n - r)!} | {}_nP_r |
| Combinations of r from n | No | C(n, r) = \frac{n!}{r!\,(n - r)!} | {}_nC_r or \binom{n}{r} |
A quick check: C(n, r) = \frac{P(n, r)}{r!}. On most calculators these are the nPr and nCr keys.
Permutations and combinations examples
Example 1: The counting principle
A lunch special includes one of 3 sandwiches, one of 4 drinks and one of 2 desserts. How many different lunches are possible?
3 \cdot 4 \cdot 2
Multiply the number of choices for each part of the meal.
3 \cdot 4 \cdot 2 = 24
Multiply.
Answer: 24 different lunches.
Example 2: A permutation
Ten runners are in a race. In how many ways can the gold, silver and bronze medals be awarded?
P(10, 3) = \frac{10!}{(10 - 3)!}Order matters (gold is different from silver), so use permutations with n = 10 and r = 3.
P(10, 3) = \frac{10!}{7!}Subtract in the denominator.
P(10, 3) = \frac{10 \cdot 9 \cdot 8 \cdot 7!}{7!}Write 10! as 10 \cdot 9 \cdot 8 \cdot 7! so the 7! can cancel.
P(10, 3) = 10 \cdot 9 \cdot 8
Cancel 7! from the top and bottom.
P(10, 3) = 720
Multiply.
Answer: 720 ways. You can also think of it as 10 choices for gold, then 9 for silver, then 8 for bronze.
Example 3: A combination
In how many ways can a teacher choose 3 of 10 students to form a committee?
C(10, 3) = \frac{10!}{3!\,(10 - 3)!}Order does not matter (the committee is the same in any order), so use combinations.
C(10, 3) = \frac{10!}{3!\,7!}Subtract in the denominator.
C(10, 3) = \frac{10 \cdot 9 \cdot 8}{3 \cdot 2 \cdot 1}Cancel 7! from 10!, and write out 3!.
C(10, 3) = \frac{720}{6}Multiply the top and the bottom.
C(10, 3) = 120
Divide.
Answer: 120 committees, which is 720 divided by the 3! = 6 orders of each group.
Example 4: Deciding which to use
A club has 12 members. (a) In how many ways can it elect a president, a vice president and a treasurer? (b) In how many ways can it pick a 3-person planning team?
P(12, 3) = 12 \cdot 11 \cdot 10
(a) The offices are different, so order matters. Multiply 12 choices, then 11, then 10.
P(12, 3) = 1320
Multiply.
C(12, 3) = \frac{12 \cdot 11 \cdot 10}{3!}(b) Team members are all equal, so order does not matter. Divide the permutations by 3!.
C(12, 3) = \frac{1320}{6}Substitute 1320 and 3! = 6.
C(12, 3) = 220
Divide.
Answer: (a) 1,320 ways; (b) 220 teams.
Example 5: Word problem with two groups
A school has 6 juniors and 7 seniors who want to join a 5-person student panel. The panel must have exactly 2 juniors and 3 seniors. How many different panels are possible?
C(6, 2) = \frac{6 \cdot 5}{2 \cdot 1} = 15Choose 2 of the 6 juniors. Order does not matter.
C(7, 3) = \frac{7 \cdot 6 \cdot 5}{3 \cdot 2 \cdot 1} = 35Choose 3 of the 7 seniors.
C(6, 2) \cdot C(7, 3) = 15 \cdot 35
Every junior pair can go with every senior group, so multiply (the counting principle).
C(6, 2) \cdot C(7, 3) = 525
Multiply.
Answer: 525 possible panels.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Using a permutation when order does not matter | Counting 3-person teams from 10 as P(10, 3) = 720 | Teams have no order: C(10, 3) = 120. |
| Using a combination when order matters | Counting gold-silver-bronze finishes as C(10, 3) = 120 | Medals are different: P(10, 3) = 720. |
| Canceling factorials incorrectly | \frac{10!}{7!} = \frac{10}{7} | Factorials don’t divide like numbers: \frac{10!}{7!} = 10 \cdot 9 \cdot 8. |
| Thinking 0! = 0 | C(5, 5) = \frac{5!}{5!\,0!} treated as undefined | 0! = 1, so C(5, 5) = 1. |
| Adding when you should multiply | Panels = 15 + 35 = 50 | Choices made together multiply: 15 · 35 = 525. |
| Forgetting repeated letters | Arrangements of LEVEL = 5! = 120 | Divide by the repeats: \frac{5!}{2!\,2!} = 30. |
Related methods
Arrangements with repeated items
When some items are identical, divide by the factorial of each repeat count. The word MISSISSIPPI has 11 letters with 4 I’s, 4 S’s and 2 P’s, so it has \frac{11!}{4!\,4!\,2!} = 34650 arrangements.
Counting and probability
Counting is often the first step in finding a probability: divide the number of favorable outcomes by the number of possible outcomes. The chance that a random 3-person committee from Example 3 includes one particular student is \frac{C(9, 2)}{C(10, 3)} = \frac{36}{120} = 0.3.
Pascal’s triangle
The numbers C(n, r) form Pascal’s triangle, where each number is the sum of the two above it. These same numbers are the coefficients in the binomial theorem, the next lesson.
Practice problems
- Find 5!.
- Find \frac{8!}{6!}.
- Find P(7, 2).
- Find C(9, 4).
- How many 4-digit codes are possible if digits can repeat?
- In how many ways can 6 books be arranged on a shelf?
- How many 5-card hands can be dealt from a 52-card deck?
- How many different arrangements of the letters in LEVEL are there?
- A team of 15 players picks a captain and a co-captain. In how many ways can this be done?
- A quiz has 10 questions. Students must answer 7, including the first 2. How many ways can a student choose which questions to answer?
Show answers
1.
5! = 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1
Write out the factorial.
5! = 120
Multiply.
Answer: 120
2.
\frac{8!}{6!} = \frac{8 \cdot 7 \cdot 6!}{6!}Write 8! as 8 \cdot 7 \cdot 6!.
\frac{8!}{6!} = 8 \cdot 7Cancel 6!.
\frac{8!}{6!} = 56Multiply.
Answer: 56
3.
P(7, 2) = \frac{7!}{5!}Use the permutation formula: 7 − 2 = 5.
P(7, 2) = 7 \cdot 6
Cancel 5!.
P(7, 2) = 42
Multiply.
Answer: 42
4.
C(9, 4) = \frac{9!}{4!\,5!}Use the combination formula: 9 − 4 = 5.
C(9, 4) = \frac{9 \cdot 8 \cdot 7 \cdot 6}{4 \cdot 3 \cdot 2 \cdot 1}Cancel 5! and write out 4!.
C(9, 4) = \frac{3024}{24}Multiply the top and the bottom.
C(9, 4) = 126
Divide.
Answer: 126
5.
10 \cdot 10 \cdot 10 \cdot 10
Each of the 4 digits has 10 choices, and repeats are allowed.
10^4 = 10000
Multiply (see exponents).
Answer: 10,000 codes
6.
6! = 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1
Arranging all 6 books in a row is 6!.
6! = 720
Multiply.
Answer: 720 ways
7.
C(52, 5) = \frac{52 \cdot 51 \cdot 50 \cdot 49 \cdot 48}{5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}The order of cards in a hand does not matter, so use combinations.
C(52, 5) = \frac{311875200}{120}Multiply the top and the bottom.
C(52, 5) = 2598960
Divide.
Answer: 2,598,960 hands
8.
\frac{5!}{2!\,2!}LEVEL has 5 letters, with 2 L’s and 2 E’s.
\frac{5!}{2!\,2!} = \frac{120}{4}Find each factorial: 5! = 120 and 2! · 2! = 4.
\frac{5!}{2!\,2!} = 30Divide.
Answer: 30 arrangements
9.
P(15, 2) = 15 \cdot 14
The two roles are different, so order matters.
P(15, 2) = 210
Multiply.
Answer: 210 ways
10.
C(8, 5)
The first 2 questions are fixed. Choose the other 5 from the remaining 8.
C(8, 5) = \frac{8 \cdot 7 \cdot 6}{3 \cdot 2 \cdot 1}Use C(8, 5) = \frac{8!}{5!\,3!} and cancel 5!.
C(8, 5) = \frac{336}{6}Multiply the top and the bottom.
C(8, 5) = 56
Divide.
Answer: 56 ways
Permutations and combinations FAQ
What is the difference between a permutation and a combination?
In a permutation, order matters, so ABC and CBA count as different. In a combination, order does not matter, so they count as the same group.
How do you know whether to use a permutation or a combination?
Ask whether swapping two of the chosen items gives a different result. Different roles, ranks or positions mean permutation; teams, groups and hands mean combination.
Why is 0! equal to 1?
There is exactly one way to arrange zero items: do nothing. Defining 0! = 1 also makes the formulas work, such as C(n, n) = 1.
What does nCr mean on a calculator?
It is C(n, r), the number of combinations of r items from n. The nPr key gives permutations.
Summary
- Multiply the numbers of choices for steps done together (the counting principle).
- n! is the number of ways to arrange n items, and 0! = 1.
- Order matters: P(n, r) = \frac{n!}{(n - r)!}.
- Order does not matter: C(n, r) = \frac{n!}{r!\,(n - r)!} = \frac{P(n, r)}{r!}.
- For repeated items, divide by the factorial of each repeat count.
Previous lesson: Projectile Motion with Parametric Equations
Next lesson: Binomial Theorem
Back to the Precalculus Index