5.5: Permutations and Combinations
- Page ID
- 2108
\( \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}\)Learning Objectives
- Calculate the probability of two independent events occurring
- Define permutations and combinations
- List all permutations and combinations
- Apply formulas for permutations and combinations
This section covers basic formulas for determining the number of various possible types of outcomes. The topics covered are:
- counting the number of possible orders
- counting using the multiplication rule
- counting the number of permutations
- counting the number of combinations
Possible Orders
Suppose you had a plate with three pieces of candy on it: one green, one yellow, and one red. You are going to pick up these three pieces one at a time. The question is: In how many different orders can you pick up the pieces? Table \(\PageIndex{1}\) lists all the possible orders.
There are two orders in which red is first: red, yellow, green and red, green, yellow. Similarly, there are two orders in which yellow is first and two orders in which green is first. This makes six possible orders in which the pieces can be picked up.
Number | First | Second | Third |
---|---|---|---|
1 | red | yellow | green |
2 | red | green | yellow |
3 | yellow | red | green |
4 | yellow | green | red |
5 | green | red | yellow |
6 | green | yellow | red |
The formula for the number of orders is shown below.
\[\text{Number of orders} = n!\]
where \(n\) is the number of pieces to be picked up. The symbol "!" stands for factorial. Some examples are:
\[ \begin{align} 3! &= 3 \times 2 \times 1 = 6 \\ 4! &= 4 \times 3 \times 2 \times 1 = 24 \\ 5! &= 5 \times 4 \times 3 \times 2 \times 1 = 120 \end{align} \]
This means that if there were \(5\) pieces of candy to be picked up, they could be picked up in any of \(5! = 120\) orders.
Multiplication Rule
Imagine a small restaurant whose menu has \(3\) soups, \(6\) entrées, and \(4\) desserts. How many possible meals are there? The answer is calculated by multiplying the numbers to get \(3 \times 6 \times 4 = 72\). You can think of it as first there is a choice among \(3\) soups. Then, for each of these choices there is a choice among \(6\) entrées resulting in \(3 \times 6 = 18\) possibilities. Then, for each of these \(18\) possibilities there are \(4\) possible desserts yielding \(18 \times 4 = 72\) total possibilities.
Permutations
Suppose that there were four pieces of candy (red, yellow, green, and brown) and you were only going to pick up exactly two pieces. How many ways are there of picking up two pieces? Table \(\PageIndex{2}\) lists all the possibilities. The first choice can be any of the four colors. For each of these \(4\) first choices there are \(3\) second choices. Therefore there are \(4 \times 3 = 12\) possibilities.
Number | First | Second |
---|---|---|
1 | red | yellow |
2 | red | green |
3 | red | brown |
4 | yellow | red |
5 | yellow | green |
6 | yellow | brown |
7 | green | red |
8 | green | yellow |
9 | green | brown |
10 | brown | red |
11 | brown | yellow |
12 | brown | green |
More formally, this question is asking for the number of permutations of four things taken two at a time. The general formula is:
\[ _nP_r = \dfrac{n!}{(n-r)!}\]
where \(_nP_r\) is the number of permutations of \(n\) things taken \(r\) at a time. In other words, it is the number of ways \(r\) things can be selected from a group of \(n\) things. In this case,
\[ _4P_2 = \dfrac{4!}{(4-2)!} = \dfrac{4 \times 3 \times 2 \times 1}{2 \times 1} = 12\]
It is important to note that order counts in permutations. That is, choosing red and then yellow is counted separately from choosing yellow and then red. Therefore permutations refer to the number of ways of choosing rather than the number of possible outcomes. When order of choice is not considered, the formula for combinations is used.
Combinations
Now suppose that you were not concerned with the way the pieces of candy were chosen but only in the final choices. In other words, how many different combinations of two pieces could you end up with? In counting combinations, choosing red and then yellow is the same as choosing yellow and then red because in both cases you end up with one red piece and one yellow piece. Unlike permutations, order does not count. Table \(\PageIndex{3}\) is based on Table \(\PageIndex{2}\) but is modified so that repeated combinations are given an "\(x\)" instead of a number. For example, "yellow then red" has an "\(x\)" because the combination of red and yellow was already included as choice number \(1\). As you can see, there are six combinations of the three colors.
Number | First | Second |
---|---|---|
1 | red | yellow |
2 | red | green |
3 | red | brown |
x | yellow | red |
4 | yellow | green |
5 | yellow | brown |
x | green | red |
x | green | yellow |
6 | green | brown |
x | brown | red |
x | brown | yellow |
x | brown | green |
The formula for the number of combinations is shown below where \(_nC_r\) is the number of combinations for \(n\) things taken \(r\) at a time.
\[ _nC_r = \dfrac{n!}{(n-r)!r!}\]
For our example,
\[ _4C_2 = \dfrac{4!}{(4-2)!2!} = \dfrac{4 \times 3 \times 2 \times 1}{(2 \times 1)(2 \times 1)} = 6\]
which is consistent with Table \(\PageIndex{3}\).
As an example application, suppose there were six kinds of toppings that one could order for a pizza. How many combinations of exactly \(3\) toppings could be ordered? Here \(n = 6\) since there are \(6\) toppings and \(r = 3\) since we are taking \(3\) at a time. The formula is then:
\[ _6C_3 = \dfrac{6!}{(6-3)!3!} = \dfrac{6\times 5 \times 4 \times 3 \times 2 \times 1}{(3 \times 2 \times 1)(3 \times 2 \times 1)} = 30\]