# 12.2: Permutations and Combinations

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

Consider the following counting problems:

1. In how many ways can three runners finish a race?
2. In how many ways can a group of three people be chosen to work on a project?

What is the difference between these two problems? In the first problem the order that the runners finish the race matters. In the second problem the order in which the three people are chosen is not important, only which three people are chosen matters.

## Permutation

A permutation is an arrangement of a set of items. The number of permutations of n items taking r at a time is given by:​​​

$P(n, r)=\frac{n !}{(n-r) !} \label{permutation}$

Note: Many calculators can calculate permutations directly. Look for a function that looks like $$_nP_r$$ or $$P(n,r)$$

## Example 1

Let’s look at a simple example to understand the formula for the number of permutations of a set of objects. Assume that 10 cars are in a race. In how many ways can three cars finish in first, second and third place? The order in which the cars finish is important. Use the multiplication principle. There are 10 possible cars to finish first. Once a car has finished first, there are nine cars to finish second. After the second car is finished, any of the eight remaining cars can finish third. 10 x 9 x 8 = 720. This is a permutation of 10 items taking three at a time.

Using the permutation formula:

$P(10,3)=\frac{10 !}{(10-3) !}=\frac{10 !}{7 !}= \dfrac{10 \cdot 9 \cdot 8 \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1} = 10 \cdot 9 \cdot 8 = 720 \nonumber$

Using the fundamental counting principle:

$\underline{10} \cdot \underline{9} \cdot \underline{8} = 720 \nonumber$

There are 720 different ways for cars to finish in the top three places.

## Example 2

The school orchestra is planning to play six pieces of music at their next concert. How many different programs are possible?

Solution

This is a permutation because they are arranging the songs in order to make the program. Using the permutation formula:

$P(6,6)=\frac{6 !}{(6-6) !}=\frac{6 !}{0 !}=\frac{720}{1}=720 \nonumber$

Using the fundamental counting principle:

$\underline{6} \cdot \underline{5} \cdot \underline{4} \cdot \underline{3} \cdot \underline{2} \cdot \underline{1}=720 \nonumber$

There are 720 different ways of arranging the songs to make the program.

## Example 3

The Volunteer Club has 18 members. An election is held to choose a president, vice-president and secretary. In how many ways can the three officers be chosen?

Solution

The order in which the officers are chosen matters so this is a permutation.

Using the permutation formula:

$P(18,3)=\frac{18 !}{(18-3) !}=\frac{18 !}{15 !}=18 \cdot 17 \cdot 16=4896 \nonumber$

Note: All digits in 18! in the numerator from 15 down to one will cancel with the 15! in the denominator.

Using the fundamental principle:

$$\begin{array} {cccccc} {\underline{18}}&{\cdot}&{\underline{17}}&{\cdot}&{\underline{16}}&{ = 4896}\\ {\text{Pres.}}&{}&{\text{V.P.}}&{}&{\text{Sec.}}&{} \end{array}$$

There are 4896 different ways the three officers can be chosen.

Another notation for permutations is $$_nP_r$$. So, $$P(18,3)$$ can also be written as $$_{18}P_3$$. Most scientific calculators have an $$_nP_r$$ button or function.

Combinations are when the order does not even matter. We are just collecting objects together.

## Example 4

Choose a committee of two people from persons A, B, C, D and E. By the multiplication principle there are $$5 \cdot 4 = 20$$ ways to arrange the two people.

AB AC AD AE BA BC BD BE CA CB

CD CE DA DB DC DE EA EB EC ED

Committees AB and BA are the same committee. Similarly for committees CD and DC. Every committee is counted twice.

$\frac{20}{2}=10 \nonumber$

so there are 10 possible different committees.

Now choose a committee of three people from persons A, B, C, D and E. There are $$5 \cdot 4 \cdot 3 = 60$$ ways to pick three people in order. Think about the committees with persons A, B and C. There are $$3! =6$$ of them.

ABC ACB BAC BCA CAB CBA

Each of these is counted as one of the 60 possibilities but they are the same committee. Each committee is counted six times so there are

$\frac{60}{6}=10 \, \text{different committees}. \nonumber$

In both cases we divided the number of permutations by the number of ways to rearrange the people chosen.

The number of permutations of n people taking r at a time is $$P(n,r)$$ and the number of ways to rearrange the people chosen is $$r!$$. Putting these together we get

\begin{aligned} \frac{n !}{\# \text { ways to arrange r items }} &=\frac{P(n, r)}{r !}=\frac{(n-r) !}{\frac{r !}{1}} \\ &=\frac{n !}{(n-r) !} \cdot \frac{1}{r !} \\ &=\frac{n !}{(n-r) ! r !} \end{aligned}

## Combination

A combination is a selection of objects in which the order of selection does not matter. The number of combinations of n items taking r at a time is:

$C(n, r)=\frac{n !}{r !(n-r) !} \label{combination}$

Note: Many calculators can calculate combinations directly. Look for a function that looks like $$_nC_r$$ or $$C(n,r)$$.

## Example 5

A student has a summer reading list of eight books. The student must read five of the books before the end of the summer. In how many ways can the student read five of the eight books?

Solution

The order of the books is not important, only which books are read. This is a combination of eight items taking five at a time.

$C(8,5)=\frac{8 !}{5 !(8-5) !}=\frac{8 !}{5 ! 3 !}= \dfrac{8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1}{5 \times 4 \times 3 \times 2 \times 1 \times 3 \times 2 \times 1} = \dfrac{8 \times 7 \times 6}{3 \times 2 \times 1} = 8 \times 7 = 56$

There are 56 ways to choose five of the books to read.

## Example 6

A child wants to pick three pieces of Halloween candy to take in her school lunch box. If there are 13 pieces of candy to choose from, how many ways can she pick the three pieces?

Solution

This is a combination because it does not matter in what order the candy is chosen.

\begin{align*} C(13,3) &=\frac{13 !}{3 !(13-3) !}=\frac{13 !}{3 ! 10 !} \\[4pt] &= \dfrac{13 \times 12 \times 11 \times 10 \times 9\times 8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1}{(3 \times 2 \times 1)(10 \times 9\times 8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1)} \\[4pt] &=\frac{13 \times 12 \times 11}{3 \times 2 \times 1} \\[4pt] =\frac{1716}{6}=286 \end{align*}

There are 286 ways to choose the three pieces of candy to pack in her lunch.

Note: The difference between a combination and a permutation is whether order matters or not. If the order of the items is important, use a permutation. If the order of the items is not important, use a combination.

Now here are a couple examples where we have to figure out whether it is a permuation or a combination.

## Example 7

A serial number for a particular model of bicycle consists of a letter followed by four digits and ends with two letters. Neither letters nor numbers can be repeated. How many different serial numbers are possible?

Solution

This is a permutation because the order matters.

Use the multiplication principle to solve this. There are 26 letters and 10 digits possible.

$26 \cdot 10 \cdot \underline{9} \cdot \underline{8} \cdot \underline{7} \cdot \underline{25} \cdot \underline{24}=78,624,000$

There are 78,624,000 different serial numbers of this form.

## Example 8

A class consists of 15 men and 12 women. In how many ways can two men and two women be chosen to participate in an in-class activity?

Solution

This is a combination since the order in which the people is chosen is not important.

Choose two men:

$C(15,2)=\frac{15 !}{2 !(15-2) !}=\frac{15 !}{2 ! 13 !}=105 \nonumber$

Choose two women:

$C(12,2)=\frac{12 !}{2 !(12-2) !}=\frac{12 !}{2 ! 10 !}=66 \nonumber$

We want 2 men and 2 women so multiply these results.

$105(66)=6930 \nonumber$

There are 6930 ways to choose two men and two women to participate.

This page titled 12.2: Permutations and Combinations is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Maxie Inigo, Jennifer Jameson, Kathryn Kozak, Maya Lanzetta, & Kim Sonier via source content that was edited to the style and standards of the LibreTexts platform.