Skip to main content

Section 4.1 Permutations

Subsection 4.1.1 Permutations, repetition

Goal: count problems like the following (problem assigned later). If Allen, Betty, and Charles bid on three items in an auction and each can afford to buy all three, how many possible outcomes are there?

Subsubsection 4.1.1.1 Motivation

The following problem is non-trivial. Read it to see how counting problems may be stumbled upon in many settings. Play with it to see what kind of issues can arise in counts.

Problem 4.1.1.

In England there is a tradition of bell ringing. This is done with a set of bells as might be mounted in a church or city hall. Because of the structure of the bells they cannot be used to play music (insufficient pitches, insufficient control of timing). However, they can be rung using controlled patterns. Note it is assumed here that bells decrease in pitch (i.e., bell 1 is higher than bell 2).

A change is an ordering of bells. For example \((1 \; 2 \; 3 \; 4 \;5)\) or \((1 \; 3 \; 2 \; 5 \; 4)\text{.}\) The numbers refer to which bell is rung at that time. The following are the rules for constructing one type of extent (a sequence of changes).

  1. The first and last changes must be \((1 \; 2 \; 3 \; \ldots \; n)\)

  2. Other than the first and last, no change may be repeated.

  3. Between successive changes, no bell move more than one position. For example, \((2\; 1\; 3\; 4\; 5)\) may follow \((1 \; 2 \; 3 \; 4 \;5)\) but \((5 \; 4 \; 3 \; 2 \; 1)\) may not.

  4. No bell rests for more than two consecutive changes.

  5. The list of moves used to create the extent should form a palindrome.

How many extents are possible on 3 bells?

Subsubsection 4.1.1.2 Model

Definition 4.1.2.

A string is any set of characters from a set called an alphabet.

Example 4.1.3.

“ear,” “are,” and “arr” are strings of length three over the alphabet \(\{\)a,e,r\(\}\text{.}\)

Problem 4.1.4.

List all strings of length three from the alphabet {A,B,C}. Alphabetize the list.

Solution.

All string's from the alphabet \({A,B,C}\) in alphabetical order:

Problem 4.1.5.

List all strings of length four from the alphabet \(\{\)A,B,C\(\}\text{.}\) Alphabetize the list.

Solution.
  • {A A A A}

  • {A A A B}

  • {A A A C}

  • {A A B A}

  • {A A B B}

  • {A A B C}

  • {A A C A}

  • {A A C B}

  • {A A C C}

  • {A B A A}

  • {A B A B}

  • {A B A C}

  • {A B B A}

  • {A B B B}

  • {A B B C}

  • {A B C A}

  • {A B C B}

  • {A B C C}

  • {A C A A}

  • {A C A B}

  • {A C A C}

  • {A C B A}

  • {A C B B}

  • {A B B C}

  • {A C C A}

  • {A C C B}

  • {A C C C}

  • {B A A A}

  • {B A A B}

  • {B A A C}

  • {B A B A}

  • {B A B B}

  • {B A B C}

  • {B A C A}

  • {B A C B}

  • {B A C C}

  • {B B A A}

  • {B B A B}

  • {B B A C}

  • {B B B A}

  • {B B B B}

  • {B B B C}

  • {B B C A}

  • {B B C B}

  • {B B C C}

  • {B C A A}

  • {B C A B}

  • {B C A C}

  • {B C B A}

  • {B C B B}

  • {B C B C}

  • {B C C A}

  • {B C C B}

  • {B C C C}

  • {C A A A}

  • {C A A B}

  • {C A A C}

  • {C A B A}

  • {C A B B}

  • {C A B C}

  • {C A C A}

  • {C A C B}

  • {C A C C}

  • {C B A A}

  • {C B A B}

  • {C B A C}

  • {C B B A}

  • {C B B B}

  • {C B B C}

  • {C B C A}

  • {C B C B}

  • {C B C C}

  • {C C A A}

  • {C C A B}

  • {C C A C}

  • {C C B A}

  • {C C B B}

  • {C C B C}

  • {C C C A}

  • {C C C B}

  • {C C C C}

There are \(3^4 = 81\) strings of length four of {A,B,C}.

Problem 4.1.6.

How many strings are there of length three over the alphabet \(\{\Phi,\Xi,\Theta\}\text{?}\)

Problem 4.1.7.

How many strings are there of length three over the alphabet \(\{ A,B,C,D,E \}\text{?}\)

Solution.

With 5 options for each of the three letters we pick, there are \(5 \times 5 \times 5\text{,}\) or 125 options.

Problem 4.1.8.

How many strings are there of length \(s\) over an alphabet with \(n\) distinct letters?

Solution.

Suppose we wish to build a string of length \(s\) over an alphabet of \(n\) distinct letters. Essentially, we must fill \(s\) open slots with a single elements chosen from \(n\) options. Thus there are \(n\) options for the first slot, \(n\) options for the second, and so on until we arrive at \(n\) options for slot \(s\text{.}\) If we label each slot with a subscript to denote its index, we can clear see that the number of strings that can be built is:

\begin{equation} n_1 \cdot n_2 \cdot n_3 \cdot ... \cdot n_s = n^{s}\tag{4.1.1} \end{equation}

Subsubsection 4.1.1.3 Problems

The model above can be used to solve the following. You may solve them any way except for brute force (listing).

Problem 4.1.9.

If Allen, Betty, and Charles bid on three items in an auction and each can afford to buy all three, how many possible outcomes are there?

Solution.

If such a case, it would not matter in what order each item is auctioned off. The amount of outcomes could then be calculated as:

There are three slots (auctioneers) and each of the three items can be placed in any of those slots, we then have \(3^3\) amount of possible outcomes for who gets what at the auction.

Problem 4.1.10.

How many outcomes for semester grades are there in this class? Count the number of students registered and use grade possibilities \(\{\text{A,B,C,D,F}\}\text{.}\)

Solution.

There are 9 students in class. Each student can either get a grade of A,B,C,D,F which equals to 5 options.

So the total amount of outcomes are \(5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 = 1953125\)

Problem 4.1.11.

Guido is building dessert out of vanilla ice cream, fresh raspberries, chocolate chips, and fried dough. How many different options does he have if he selects five items and can repeat any item as many times as possible?

Solution.

The answer to this question depends on some initial assumptions. This solution assumes that the order in which Guido selects ingredients does not matter — they're all going to the same place, after all.

We first assign letters to the ingredients. Since there are four ingredients, we initially consider the alphabet \(\{A,B,C,D\}\text{.}\) Since Guido can choose the same ingredient multiple times, there are \(4^5\) different orders in which he can choose. However, we assumed that, e.g., \(AABCD\) and \(ABCDA\) represent the same dessert. So we need to remove some of these permutations.

The easiest way to achieve this is to reframe the problem. Since each string with the same number of copies of each letter corresponds to the same dessert, we need only concern ourselves with strings in which the four letters always appear in order. That is, we wish to count strings such as \(AABBD\) but not those like \(ACABD\text{.}\)

To count these strings, we need only count how many ways Guido could construct such a sequence. To do so he would always choose a certain number of As, then of Bs, Cs, and Ds. He must always choose some number of each letter (even if that number is zero). Thus, we could model this procedure as placing three “next letter” instructions somewhere in eight places. We arrive at these numbers by noting that three such instructions are required to move through the whole alphabet and that five total letters must be chosen. It follows that the desired count is the same as the number of, e.g., 8-bit binary strings with exactly three ones.

This count happens to be

\begin{equation*} \frac{8!}{5!3!}. \end{equation*}
Problem 4.1.12.

What assumptions are required for the Guido dessert problem?

Solution.

1: 4 letters, no repeats, {A,B,C,D} so the total number of outcomes are \(4 \cdot 3 \cdot 2 \cdot 1 = 4! = 24\)

2: 5 letters, no repeats, {A,B,C,D,E} so the total number of outcomes are \(5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 5! = 120\)

3: 26 letters, no repeats, {entire english alphabet} so the total number of outcomes are \(26 \cdot 25 \cdot 24 \cdot \ldots \cdot 3 \cdot 2 \cdot 1 = 26! = 4.0329146e+26\)

Subsection 4.1.2 Permutations, no repetition

Goal: count problems like the following (problem assigned later). If Allen, Betty, and Charles run a race, how many outcomes are there? Ties are not possible.

Subsubsection 4.1.2.1 Model

Problem 4.1.13.

List all strings of length three from the alphabet \(\{\text{A,B,C}\}\) such that no letter can be used twice. Alphabetize the list.

Solution.

There are six such strings, namely: ABC, ACB, BAC, BCA, CAB, and CBA. This can be counted by noting that we have three choices for the first letter, then two for the next, and finally only one for the final letter.

Problem 4.1.14.

For each of the following sets of conditions, count the number of strings.

  1. length four, no letter repeated, alphabet \(\{\text{A,B,C,D}\}\)

  2. length five, no letter repeated, alphabet \(\{\text{A,B,C,D,E}\}\)

  3. length 26, no letter repeated, alphabet standard English

Problem 4.1.15.

Conjecture a formula for the number of arrangements of \(n\) letters from an alphabet of \(n\) characters such that no letter is repeated.

Solution.

An arrangement of n letters from an alphabet of n characters such that no letter is repeated can be given by the formula:

\begin{equation*} n(n-1)(n-2)(n-3)...(n-(n-1)) = n! \end{equation*}

Where n denotes the total number of characters in the alphabet and each subsequent slot for a letter is denoted by n minus the amount of letters already used previously.

Problem 4.1.16.

Perform the following steps using the alphabet \(\{\text{A,B,C,D}\}\text{.}\)

  1. List all strings of length four with no letter repeated.

  2. Alphabetize the list.

  3. Group the strings such that two strings are in the same group if and only if they have the same first two letters (order matters).

  4. Count the number of strings in each group.

  5. Explain the count.

Solution.

We begin by listing all strings of length four from the alphabet \({A,B,C,D}\) in alphabetical order:

  • ABCD

  • ABDC

  • ACBD

  • ACDB

  • ADBC

  • ADCB

  • BACD

  • BADC

  • BCAD

  • BCDA

  • BDAC

  • BDCA

  • CABD

  • CADB

  • CBAD

  • CBDA

  • CDAB

  • CDBA

  • DABC

  • DACB

  • DBAC

  • DBCA

  • DCAB

  • DCBA

Now we would like to group all of the strings that have the same two first letters where order matters (so \(AB\) is distinct from \(BA\)). We predict that there will be two members in each group since the first two letters will have already been chosen, leaving only two options for the third position and one option for the fourth. We also predict that there will be twelve different groups since there will be four options for the first letter and 3 options for the second. Listing the strings, we see that this is exactly what occurs:

    1. ABCD

    2. ABDC

    1. ACBD

    2. ACDB

    1. ADBC

    2. ADCB

    1. BACD

    2. BADC

    1. BCAD

    2. BCDA

    1. BDAC

    2. BDCA

    1. CABD

    2. CADB

    1. CBAD

    2. CBDA

    1. CDAB

    2. CDBA

    1. DABC

    2. DACB

    1. DBAC

    2. DBCA

    1. DCAB

    2. DCBA

Problem 4.1.17.

How many strings of length three are there with no letter repeated over the alphabet \(\{\text{A,B,C,D,E}\}\text{?}\)

Solution.

There are 5 options for the first letter we pick, 4 options for the second letter, and 3 for the third. \(5 \cdot 4 \cdot 3=60\text{,}\) so we have 60 options.

Problem 4.1.18.

Conjecture a formula for the number of words of length \(s\) from an alphabet of \(n\) characters such that no letter is repeated.

Subsubsection 4.1.2.2 Problems

The model above can be used to solve the following. You may solve them any way except for brute force (listing).

Problem 4.1.19.

If Allen, Betty, and Charles run a race, how many outcomes are there? Ties are never possible.

Solution.

There are 6 outcomes of a race between Allen, Betty, and Charles. For 1st place, there are 3 possible winners. After 1st place, in 2nd place, 2 possible placements. In 3rd place, only 1 possible placement. \(3 \times 2 \times 1 = 3! = 6\text{.}\)

Problem 4.1.20.

If Allen, Betty, Charles, Darla, and Earl run a race, how many outcomes are there for first to third place? Ties are not possible.

Solution.

Let's use the first letter of their first names to represent the person.

\begin{equation*} \{A,B,C,D,E\} \end{equation*}

For each podium (arrangement of first three people in the race) there are 2 ways to arrange the people in places 4 and 5.

To find the total outcomes we can use 5! where first palce we have 5 options, 2nd 4 options, etc. Then we will divide that total by the two ways to arrange the first three.

We end up with the equation \(\frac{5!}{2!} = 60\text{.}\) So there are 60 ways to arrange the first 3 people in the race.

Problem 4.1.21.

Allen, Betty, Charles, Daniel, and Darla run a race.

  1. How many outcomes are there?

  2. If the record keeper only records the first letter of their name, how could the results be grouped?

  3. How many outcomes are there based on this record keeper's method?

Problem 4.1.22.

How many strings can be made using all the letters of the word “meet”?

Solution.

There are 12 strings can be made using all the letters of the word “meet”. The strings are 4 characters long. The first step is to choose where the letter 'm' goes. 4 choose 1 = 4 positions to choose from. Then, choose where the letters 'e' go. 3 choose 2 = 3. Finally, choose where 't' goes. 1 choose 1 = 1. So, \(4 \times 3 \times 1 = 12\) strings.

Problem 4.1.23.

How many strings can be made using all the letters of the word “Mississippi”?

Problem 4.1.24.

A company is going to assign 12 employees to 4 administrative position, 3 research positions, 3 managerial positions, and 2 design positions. How many ways can this occur?

Solution.

Based on our previous work, we can conclude that there are \(12!\) total different permutations of how to arrange the workers if we claim that each job position is completely unique (which in the real world is in fact true, no two job positions are completely identical). But for the sake of exercise, let's pretend that there are only four distinct catagories of job that will get doled out to twelve employees:

  • Four administrative positions (labeled \(a_1, a_2, a_3, a_4\)).

  • Three research positions (labeled \(b_1, b_2, b_3\)).

  • Three managerial positions (labeled \(c_1, c_2, c_3\)).

  • Two design positions (labeled \(d_1, d_2\)).

There are \(12!\) total permutations, but within that list some are copies of the others since all positions of the same type are in fact indistinguishible from one another. For example, \(a_1a_2a_3a_4b_1b_2 \ldots\) is the same as \(a_2a_1a_4a_3b_1b_2 \ldots\text{.}\) We then see that for a collection of orderings where the indices of the \(a\)'s, \(b\)'s, \(c\)'s, and \(d\)'s are the same (the spots in the list are occupied by the same letter types just the subscripts might differ) that there are in fact \(4!=24\) different orderings for the \(a\)'s, \(3!=6\) different orderings for the \(b\)'s, \(3!=6\) different orderings for the \(c\)'s, and \(2!=2\) different orderings for the \(d\)'s. Thus there are:

\begin{equation} \frac{12!}{4!3!3!2!}=\frac{12!}{24 \cdot 6 \cdot 6 \cdot 2}=277200\tag{4.1.2} \end{equation}

possible ways to assign the twelve employees to the different positions.