Skills Beta

Factorials and Combinations

2 min read · freeNot practiced

Some probability questions need a count first: how many different ways can 3 of 10 quiz answers be right? Listing them all would take a long time. Two tools do the counting for you: the factorial and the combination.

Factorials: counting orders

How many ways can you line up 5 different books on a shelf? There are 5 choices for the first spot. Once that book is placed, 4 remain for the second spot, then 3, then 2, then 1. Multiply:

5×4×3×2×1=120.5 \times 4 \times 3 \times 2 \times 1 = 120.

That product is written 5!5!, read "5 factorial". In general,

n!=n×(n−1)×(n−2)×⋯×2×1,n! = n \times (n - 1) \times (n - 2) \times \cdots \times 2 \times 1,

and by definition 0!=10! = 1. Factorials grow fast: 10!=3,628,80010! = 3{,}628{,}800.

Combinations: counting choices

Often the order does not matter. A team of Ana and Ben is the same team as Ben and Ana. Counting ordered choices of 2 from 4 people gives 4×3=124 \times 3 = 12, but that counts each team twice, once in each order. Divide by the 2!=22! = 2 orders: 6 teams.

All six teams of 2 that can be chosen from Ana, Ben, Cal and Dee: Ana and Ben, Ana and Cal, Ana and Dee, Ben and Cal, Ben and Dee, Cal and Dee. Below: 4C2 = 4! / (2! × 2!) = 24 / 4 = 6 teams.
Figure 1. The six teams of 2 from 4 people. LevlPrep original diagram.

The general rule is the combination, the number of ways to choose k items from n when order does not matter:

nCk=(nk)=n!k!(n−k)!.{}_nC_k = \binom{n}{k} = \frac{n!}{k!\,(n - k)!}.

Read it "n choose k". Both notations mean the same thing; on a calculator it is usually nCr, and in Bluebook you can type 10C3.

Choose 3 of 10. In how many ways can a student get exactly 3 of 10 quiz questions right?

The order does not matter (it is just which 3 questions), so use a combination.

10C3=10!3!7!=10×9×8×7!3×2×1×7!=7206=120.{}_{10}C_3 = \frac{10!}{3!\,7!} = \frac{10 \times 9 \times 8 \times 7!}{3 \times 2 \times 1 \times 7!} = \frac{720}{6} = 120.

The 7!7! cancels: you only ever need the top k factors over k!k!.

Answer: 120 different sets of 3 questions.

Useful facts

  • nC0=1{}_nC_0 = 1 and nCn=1{}_nC_n = 1: one way to choose nothing, one way to choose everything.
  • nCk=nCn−k{}_nC_k = {}_nC_{n-k}: choosing the 3 questions that are right is the same as choosing the 7 that are wrong, so 10C3=10C7=120{}_{10}C_3 = {}_{10}C_7 = 120.
  • nC1=n{}_nC_1 = n: there are n ways to choose one item.

Order or no order?

SituationOrder matters?Count
Line up 5 booksyes5!=1205! = 120
Choose a team of 2 from 4no4C2=6{}_4C_2 = 6
Pizza with 3 of 6 toppingsno6C3=20{}_6C_3 = 20
Which 3 of 10 answers are rightno10C3=120{}_{10}C_3 = 120

In Unit 2 the combination appears inside a probability formula, counting the different orders in which successes and failures can happen. Being quick and sure with nCk{}_nC_k now makes that formula much easier.

Spot a mistake on this page?