Skip to main content

Registration is now open for this year's LibreFest! Join us virtually the week of July 13.

Register here
Statistics LibreTexts

4.4.1: Permutations

  • Page ID
    11505
  • \( \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}\)

    <This goes after the Multiplication Axion on previous page> 

    Permutations 

    Earlier, we were asked to find the word sequences formed by using the letters { A, B, C } if no letter is to be repeated. The tree diagram gave us the following six arrangements.

    ABC, ACB, BAC, BCA, CAB, and CBA.

    Arrangements like these, where order is important and no element is repeated, are called permutations.

    Definition: Permutations

    A permutation of a set of elements is an ordered arrangement where each element is used once.

    Example \(\PageIndex{1}\)

    How many three-letter word sequences can be formed using the letters { A, B, C, D }?

    Solution

    There are four choices for the first letter of our word, three choices for the second letter, and two choices for the third.

    Positions in a Three Letter Word
    Position 1 Position 2 Position 3

    4

    3

    2

    Applying the multiplication axiom, we get \(4 \cdot 3 \cdot 2 = 24\) different arrangements.

    Example \(\PageIndex{2}\)

    How many permutations of the letters of the word ARTICLE have consonants in the first and last positions?

    Solution

    In the word ARTICLE, there are 4 consonants.

    Since the first letter must be a consonant, we have four choices for the first position, and once we use up a consonant, there are only three consonants left for the last spot. We show as follows:

    Positions in a Seven Letter Word
    Position 1 Position 2 Position 3 Position 4 Position 5 Position 6 Position 7

    4

             

    3

    Since there are no more restrictions, we can go ahead and make the choices for the rest of the positions using the remaining letters.

    So far we have used up 2 letters, therefore, five remain. So for the next position there are five choices, for the position after that there are four choices, and so on. We get

    Positions in a Seven Letter Word
    Position 1 Position 2 Position 3 Position 4 Position 5 Position 6 Position 7

    4

    5

    4

    3

    2

    1

    3

    So the total permutations are \(4 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 \cdot 3 = 1440\).

    Exercise\(\PageIndex{1}\)

    Given five letters { A, B, C, D, E }. Find the following:

    1. The number of four-letter word sequences.
    2. The number of three-letter word sequences.
    3. The number of two-letter word sequences.
    Answer

    The problem is easily solved by the multiplication axiom, and answers are as follows:

    1. The number of four-letter word sequences is \(5 \cdot 4 \cdot 3 \cdot 2 = 120\).
    2. The number of three-letter word sequences is \(5 \cdot 4 \cdot 3 = 60\).
    3. The number of two-letter word sequences is \(5 \cdot 4 = 20\).

    We often encounter situations where we have a set of n objects and we are selecting r objects to form permutations. We refer to this as permutations of n objects taken r at a time, and we write it as nPr.

    Therefore, the above exercise can also be answered as listed below.

    The number of four-letter word sequences is 5P4 = 120.
    The number of three-letter word sequences is 5P3 = 60.
    The number of two-letter word sequences is 5P2 = 20.

    Before we give a formula for nPr, we'd like to introduce a symbol that we will use a great deal in this as well as in the next chapter.

    Definition: Factorial

    \[\mathrm{n} !=\mathrm{n}(\mathrm{n}-1)(\mathrm{n}-2)(\mathrm{n}-3) \cdots 3 \cdot 2 \cdot 1\]

    where \(n\) is a natural number.

    \[0! = 1\]

    Now we define nPr.

    Definition: nPr

    The Number of Permutations of n Objects Taken r at a Time

    \[\mathrm{nPr}=\mathrm{n}(\mathrm{n}-1)(\mathrm{n}-2)(\mathrm{n}-3) \cdots(\mathrm{n}-\mathrm{r}+1)\]

    or

    \[\mathrm{nPr}=\frac{\mathrm{n} !}{(\mathrm{n}-\mathrm{r}) !} \]

    where \(n\) and \(r\) are natural numbers.

    The reader should become familiar with both formulas and should feel comfortable in applying either.

    Example \(\PageIndex{3}\)

    Compute the following using both formulas.

    1. 6P3
    2. 7P2

    Solution

    We will identify \(n\) and \(r\) in each case and solve using the formulas provided.

    a. 6P3 = \(6 \cdot 5 \cdot 4 = 120\), alternately

    \[ 6 \mathrm{P} 3=\frac{6 !}{(6-3) !}=\frac{6 !}{3 !}=\frac{6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{3 \cdot 2 \cdot 1}=120 \]

    b. 7P2 = \(7 \cdot 6 = 42\), or

    \[7 \mathrm{P} 2=\frac{7 !}{5 !}=\frac{7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}=42\]

    With permutations, we have seen that you can either use the permutation formula or the multiplication axion. There are cases when we might want to use both ideas.

    Next we consider some more permutation problems to get further insight into these concepts.

    Example \(\PageIndex{4}\)

    In how many different ways can 4 people be seated in a straight line if two of them insist on sitting next to each other?

    Solution

    Let us suppose we have four people A, B, C, and D. Further suppose that A and B want to sit together. For the sake of argument, we tie A and B together and treat them as one person.

    The four people are \(\boxed{AB}\) CD. Since \(\boxed{AB}\) is treated as one person, we have the following possible arrangements.

    \[ \boxed{AB} CD, \boxed{AB} DC, C \boxed{AB}D, D\boxed{AB}C, CD \boxed{AB}, DC\boxed{AB} \nonumber\]

    Note that there are six more such permutations because A and B could also be tied in the order BA. And they are

    \[ \boxed{BA}CD, \boxed{BA} DC, C\boxed{BA}D, D\boxed{BA}C, CD\boxed{BA}, DC \boxed{BA} \nonumber\]

    So altogether there are 12 different permutations.

    Let us now do the problem using the multiplication axiom.

    After we tie two of the people together and treat them as one person, we can say we have only "three" people. So we need the number of ways to rearrange 2 people AND the number of ways to rearrange the "three" people who remain. 

    Choices for Seating
    Ways to Arrange Two People Ways to Arrange the "Three" people
    2P1 = 2! = 2 3P1 = 3! = 6

    The multiplication axiom tells us that there are 6(2) = 12 different arrangements.

    Example \(\PageIndex{5}\)

    You have 4 math books and 5 history books to put on a shelf that has 5 slots. In how many ways can the books be shelved if the first three slots are filled with math books and the next two slots are filled with history books?

    Solution

    We first do the problem using the multiplication axiom.

    Since the math books go in the first three slots, there are 4 choices for the first slot,
    3 choices for the second and 2 choices for the third.

    The fourth slot requires a history book, and has five choices. Once that choice is made, there are 4 history books left, and therefore, 4 choices for the last slot. The choices are shown below.

    Slots on a Shelf
    Slot 1 Slot 2 Slot 3 Slot 4 Slot 5

    4

    3

    2

    5

    4

    Therefore, the number of permutations are \(4 \cdot 3 \cdot 2 \cdot 5 \cdot 4 = 480\).

    Alternately, we can use a both the multiplication axion and Permutations

    Choices for Book Selection
    Ways to Arrange Three Math Books Together Ways to Arrange Two History Books Together
    4P3 =  \(4 \cdot 3 \cdot 2\) = 24 5P2 =  \(5 \cdot 4\) = 20

    Clearly, this makes sense. For every permutation of three math books placed in the first three slots, there are 5P2 permutations of history books that can be placed in the last two slots. Hence the multiplication axiom applies, and we have the answer (4P3) (5P2).

    So the answer can be written as (4P3) (5P2) = (24)(20) = 480.

    Permutations with Similar Elements

    Let us determine the number of distinguishable permutations of the letters ELEMENT.

    Suppose we make all the letters different by labeling the letters as follows.

    \[E_1LE_2ME_3NT \nonumber\]

    Since all the letters are now different, there are 7! different permutations.

    Let us now look at one such permutation, say

    \[LE_1ME_2NE_3T \nonumber\]

    Suppose we form new permutations from this arrangement by only moving the E's. Clearly, there are 3! or 6 such arrangements. We list them below.

    \begin{aligned} &\mathrm{LE}_{1} \mathrm{ME}_{2} \mathrm{NE}_{3} \\
    &\mathrm{LE}_{1} \mathrm{ME}_{3} \mathrm{NE}_{2} \\
    &\mathrm{LE}_{2} \mathrm{ME}_{1} \mathrm{NE}_{3} \mathrm{T} \\
    &\mathrm{LE}_{2} \mathrm{ME}_{3} \mathrm{NE}_{1} \mathrm{T} \\
    &\mathrm{LE}_{3} \mathrm{ME}_{2} \mathrm{NE}_{1} \mathrm{T} \\
    & \mathrm{LE}_{3} \mathrm{ME}_{I} \mathrm{NE}_{2} \mathrm{T} \end{aligned}

    Because the E's are not different, there is only one arrangement LEMENET and not six. This is true for every permutation.

    Let us suppose there are n different permutations of the letters ELEMENT.

    Then there are \(n \cdot 3!\) permutations of the letters \(E_1LE_2ME_3NT\).

    But we know there are 7! permutations of the letters \(E_1LE_2ME_3NT\).

    Therefore, \(n \cdot 3! = 7!\)

    Or \(n = \frac{7!}{3!}\).

    This gives us the method we are looking for.

    Definition: Permutations with Similar Elements

    The number of permutations of n elements taken \(n\) at a time, with \(r_1\) elements of one kind, \(r_2\) elements of another kind, and so on, is

    \[\frac{n !}{r_{1} ! r_{2} ! \ldots r_{k} !} \]

    Example \(\PageIndex{6}\)

    Find the number of different permutations of the letters of the word MISSISSIPPI.

    Solution

    The word MISSISSIPPI has 11 letters. If the letters were all different there would have been 11! different permutations. But MISSISSIPPI has 4 S's, 4 I's, and 2 P's that are alike.

    So the answer is \(\frac{11!}{4!4!2!} = 34,650\).

    Example \(\PageIndex{7}\)

    If a coin is tossed six times, how many different outcomes consisting of 4 heads and 2 tails are there?

    Solution

    Again, we have permutations with similar elements.

    We are looking for permutations for the letters HHHHTT.

    The answer is \(\frac{6!}{4!2!} = 15\).

    Example \(\PageIndex{8}\)

    In how many different ways can 4 nickels, 3 dimes, and 2 quarters be arranged in a row?

    Solution

    Assuming that all nickels are similar, all dimes are similar, and all quarters are similar, we have permutations with similar elements. Therefore, the answer is

    \[\frac{9 !}{4 ! 3 ! 2 !}=1260 \nonumber\]

    Example \(\PageIndex{9}\)

    A stock broker wants to assign 20 new clients equally to 4 of its salespeople. In how many different ways can this be done?

    Solution

    This means that each sales person gets 5 clients. The problem can be thought of as an ordered partitions problem. In that case, using the formula we get

    \[\frac{20 !}{5 ! 5 ! 5 ! 5 !}=11,732,745,024 \nonumber\]

    Example \(\PageIndex{10}\)

    A shopping mall has a straight row of 5 flagpoles at its main entrance plaza. It has 3 identical green flags and 2 identical yellow flags. How many distinct arrangements of flags on the flagpoles are possible?

    Solution

    The problem can be thought of as distinct permutations of the letters GGGYY; that is arrangements of 5 letters, where 3 letters are similar, and the remaining 2 letters are similar:

    \[ \frac{5 !}{3 ! 2 !} = 10 \nonumber\]

    Just to provide a little more insight into the solution, we list all 10 distinct permutations:

    GGGYY, GGYGY, GGYYG, GYGGY, GYGYG, GYYGG, YGGGY, YGGYG, YGYGY, YYGGG

     

    Combinations

    <Insert section on Combinations here>

     

    Summary

    1. Permutations: A permutation of a set of elements is an ordered arrangement where each element is used once.
    2. Factorial: \[\mathrm{n} !=\mathrm{n}(\mathrm{n}-1)(\mathrm{n}-2)(\mathrm{n}-3) \cdots 3 \cdot 2 \cdot 1 \nonumber\] where \(n\) is a natural number. \[0! = 1 \nonumber\]
    3. Permutations of n Objects Taken r at a Time: \[\mathrm{nPr}=\mathrm{n}(\mathrm{n}-1)(\mathrm{n}-2)(\mathrm{n}-3) \cdots(\mathrm{n}-\mathrm{r}+1) \nonumber\] or \[\mathrm{nPr}=\frac{\mathrm{n} !}{(\mathrm{n}-\mathrm{r}) !} \nonumber\] where \(n\) and \(r\) are natural numbers.
    4. Permutations with Similar Elements

      The number of permutations of n elements taken n at a time, with \(r_1\) elements of one kind, \(r_2\) elements of another kind, and so on, such that \(\mathrm{n}=\mathrm{r}_{1}+\mathrm{r}_{2}+\ldots+\mathrm{r}_{\mathrm{k}}\) is

      \[\frac{n !}{r_{1} ! r_{2} ! \dots r_{k} !} \nonumber\]

      This is also referred to as ordered partitions.


    This page titled 4.4.1: Permutations is shared under a CC BY license and was authored, remixed, and/or curated by Rupinder Sekhon and Roberta Bloom.

    • Was this article helpful?