Skip to main content
Mathematics LibreTexts

5.2: Permutations and Combinations

  • Page ID
    105834
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

    \( \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}\)

    Section 1: Factorial Notation

    Definition: \(n!\)

    \(n!\) denotes the product of natural numbers from \(1\) to \(n\), i.e.

    \(n!=n\cdot(n-1)\cdot\dots\cdot3\cdot2\cdot1\)

    Example \(\PageIndex{1}\)

    \(4!=4\cdot3\cdot2\cdot1=24\)

    \(5!=5\cdot4\cdot3\cdot2\cdot1=120\)

    \(8!=8\cdot7\cdot6\cdot5\cdot4\cdot3\cdot2\cdot1=40320\)

    Note that

    \(0!=1\)

    In combinatorics, we would want to be able to simplify the following expressions:

    \(\frac{7!}{3!}\), \(\frac{7!}{4!}\), \(\frac{7!}{3!4!}\)

    The easiest way to simplify the factorials is to write them out using the definition, and then reduce by the greatest common factor:

    \(\frac{7!}{3!}=\frac{7\cdot6\cdot5\cdot4\cdot3\cdot2\cdot1}{3\cdot2\cdot1}=7\cdot6\cdot5\cdot4\)

    \(\frac{7!}{4!}=\frac{7\cdot6\cdot5\cdot4\cdot3\cdot2\cdot1}{4\cdot3\cdot2\cdot1}=7\cdot6\cdot5\)

    \(\frac{7!}{3!4!}=\frac{7\cdot6\cdot5\cdot4\cdot3\cdot2\cdot1}{3\cdot2\cdot1\cdot4\cdot3\cdot2\cdot1}=7\cdot5\)

    Frequently we will have to work with expressions like the very last one. Note that after writing out the factorials and after reducing by the common factorial we still have some common factors left which we need to reduce.

    Section 2: Permutations

    Definition: Permutation

    An ordered arrangement of distinct objects is called a permutation.

    Example \(\PageIndex{2.1}\)

    THR is a permutation of length three from letters \(\{T, H, R\}\).

    HRT is a permutation of length three from letters \(\{T, H, R\}\).

    HR is a permutation of length 2 from letters \(\{T, H, R\}\).

    Example \(\PageIndex{2.2}\)

    123 is a permutation of length three from letters \(\{1, 2, 3\}\).

    231 is a permutation of length three from letters \(\{1, 2, 3\}\).

    31 is a permutation of length 2 from letters \(\{1, 2, 3\}\).

    How many permutations of length 3 out of 3 letters are there?

    To create a permutation, we have to consecutively choose 3 letters. Since the letters are all distinct the number of choices at each step is decreasing by one. So by the basic counting principle the total number of permutations is \(3\cdot2\cdot1=3!\).

    How many permutations of length 4 out of 4 letters are there?

    To create a permutation, we have to consecutively choose 4 letters. Since the letters are all distinct the number of choices at each step is decreasing by one. So by the basic counting principle the total number of permutations is \(4\cdot3\cdot2\cdot1=4!\).

    How many permutations of length \(n\) out of \(n\) letters are there?

    To create a permutation, we have to consecutively choose \(n\) letters. Since the letters are all distinct the number of choices at each step is decreasing by one. So by the basic counting principle the total number of permutations is \(n!\).

    How many permutations of length 2 out of 5 letters are there?

    To create a permutation, we have to consecutively choose 2 letters. Since the letters are all distinct the number of choices at each step is decreasing by one. So by the basic counting principle the total number of permutations is \(5\cdot4\).

    How many permutations of length 3 out of 5 letters are there?

    To create a permutation, we have to consecutively choose 3 letters. Since the letters are all distinct the number of choices at each step is decreasing by one. So by the basic counting principle the total number of permutations is \(5\cdot4\cdot3\).

    How many permutations of length \(k\) out of \(n\) letters are there?

    To create a permutation, we have to consecutively choose \(k\) letters. Since the letters are all distinct the number of choices at each step is decreasing by one. So by the basic counting principle the total number of permutations is given by the following product:

    \(n\cdot(n-1)\cdots(n-k+1)\)

    Theorem: Permutation Rule

    In general, we want to find out how many permutations of length \(k\) out of \(n\) letters are there? Let’s denote this quantity as \(P_k^n\). Based on the observed pattern, we obtain the following formula called the permutation rule:

    \(P_k^n=\frac{n!}{(n-k)!}\)

    Let’s do a few applications of it.

    Example \(\PageIndex{2.3.1}\)

    How many permutations of length 2 out of 5 letters are there?

    Solution

    The answer is \(P_2^5\) which we can now compute using the formula:

    \(P_2^5=\frac{5!}{(5-2)!}=\frac{5!}{3!}=5\cdot4=20\)

    Example \(\PageIndex{2.3.2}\)

    How many permutations of length 4 out of 10 letters are there?

    Solution

    The answer is \(P_4^{10}\) which we can now compute using the formula:

    \(P_4^{10}=\frac{10!}{(10-4)!}=\frac{10!}{6!}=10\cdot9\cdot8\cdot7=5040\)

    Try It Yourself! \(\PageIndex{2.3}\)
    Theorem: Special Permuations Rule

    If the length of a permutation is the same as the number of available letters, then we replace \(k\) with \(n\) in the permutation formula and obtain the special permutation rule:

    \(P_n^n=\frac{n!}{(n-n)!}=\frac{n!}{0!}=n!\)

    Let’s do a few applications of it.

    Example \(\PageIndex{2.4.1}\)

    How many permutations of length 4 out of 4 letters are there?

    Solution

    \(P_4^4=4!=4\cdot3\cdot2\cdot1=24\)

    Example \(\PageIndex{2.4.2}\)

    How many permutations of length 6 out of 6 letters are there?

    Solution

    \(P_6^6=6!=6\cdot5\cdot4\cdot3\cdot2\cdot1=720\)

    Try It Yourself! \(\PageIndex{2.4}\)

    The following questions:

    • How many ways are there to select 3 people out of 6 for a committee with distinct roles?

    • How many ways are there to select 3 pieces of art out 6 for an exhibition in which the order matters?

    and many other questions, all have the same answer:

    \(P_3^6\)

    The following questions:

    • How many ways are there to select 5 people out of 9 for a committee with distinct roles?

    • How many ways are there to select 5 pieces of art out 9 for an exhibition in which the order matters?

    and many other questions, all have the same answer:

    \(P_5^9\)

    Try It Yourself! \(\PageIndex{2.5.1}\)
    Try It Yourself! \(\PageIndex{2.5.2}\)
    Try It Yourself! \(\PageIndex{2.5.3}\)

    Permutations is one of the building blocks of the combinatorics.

    Section 3: Combinations

    Definition: Combination

    A collection of distinct objects is called a combination.

    Example \(\PageIndex{3.1.1}\)

    \(\{T, H, R\}\) is a combination of length three from letters \(\{T, H, R\}\).

    \(\{H, R, T\}\) is a combination of length three from letters \(\{T, H, R\}\).

    \(\{T, H, R\}\) and \(\{H, R, T\}\) are the same combinations.

    Example \(\PageIndex{3.1.2}\)

    \(\{1, 2\}\) is a combination of length two from letters \(\{1, 2, 3\}\).

    \(\{2, 3, 1\}\) is a combination of length three from letters \(\{1, 2, 3, 4\}\).

    \(\{1, 3\}\) is a permutation of length two from letters \(\{1, 2, 3, 4\}\).

    Let’s discuss the difference between permutations and combinations.

    Permutations

    Combinations

    • Definition: An ordered arrangement of distinct objects is called a permutation.
    • Order matters, i.e., \(AB \neq BA\)
    • Example: selecting a committee of 3 people
    • Definition: A collection of distinct objects is called a combination.
    • No order, i.e., \(\{A, B\} = \{B, A\}\)
    • Example: selecting 3 people for a survey

    Since every combination of length \(k\) can be further arranged in order, the number of permutations of length \(k\) is \(k!\) times larger than the number of combinations of length \(k\).

    Theorem: Combinations Rule

    In general, we want to find out how many combinations of length \(k\) out of \(n\) letters are there? Let’s denote this quantity as \(C_k^n\). Based on the fact that the number of permutations of length \(k\) is \(k!\) times larger than the number of combinations of length \(k\) we obtain the following formula called the combinations rule:

    \(C_k^n=\frac{n!}{(n-k)!k!}\)

    Let’s do a few applications of it.

    Example \(\PageIndex{3.2.1}\)

    How many combinations of length 2 out of 5 letters are there?

    Solution

    The answer is \(C_2^5\) which we can now compute using the formula:

    \(C_2^5=\frac{5!}{(5-2)!2!}=\frac{5!}{3!2!}=\frac{5\cdot4}{2\cdot1}=10\)

    Example \(\PageIndex{3.2.2}\)

    How many combinations of length 4 out of 10 letters are there?

    Solution

    The answer is \(C_4^{10}\) which we can now compute using the formula:

    \(C_4^{10}=\frac{10!}{(10-4)!4!}=\frac{10!}{6!4!}=\frac{10\cdot9\cdot8\cdot7}{4\cdot3\cdot2\cdot1}=210\)

    Try It Yourself! \(\PageIndex{3.2}\)

    Alternatively, the following notation is commonly used in the literature:

    \(C_k^n=\begin{pmatrix}
    n\\
    k
    \end{pmatrix}\)

    and we read it as "\(n\) choose \(k\)".

    The following questions:

    • How many ways are there to select 3 people out of 6 for a survey?

    • How many ways are there to select 3 pieces of art out 6 to donate?

    and many other questions, all have the same answer:

    \(C_3^6\)

    The following questions:

    • How many ways are there to select 5 people out of 9 for a survey?

    • How many ways are there to select 5 pieces of art out 9 to donate?

    and many other questions, all have the same answer:

    \(C_5^9\)

    Try It Yourself! \(\PageIndex{3.3.1}\)
    Try It Yourself! \(\PageIndex{3.3.2}\)
    Try It Yourself! \(\PageIndex{3.3.3}\)

    Combinations along with permutations is another building blocks of the combinatorics.

    Try It Yourself! \(\PageIndex{3.4}\)

    This page titled 5.2: Permutations and Combinations is shared under a not declared license and was authored, remixed, and/or curated by Anton Butenko.

    • Was this article helpful?