Lesson Explainer: Counting Using Permutations Mathematics

In this explainer, we will learn how to use permutations to solve counting problems.

A permutation is used to count the number of different ways we can rearrange a subset of a collection of elements. For instance, say we want to arrange 3 different letters from the English alphabet. First, we must pick 3 different letters and then we can arrange them in order. This leads to arrangements like BJA, EMQ, XPG, etc. We cannot use arrangements like BVB since the letter B is repeated. On the other hand, BJA, AJB, and JBA will all count as distinct arrangements despite the fact that they use the same 3 letters. In permutations, the order of elements matters.

Let us recall the formula for permutations, which represents the number of distinct arrangements of a subset of a collection of elements.

Definition: Permutation

Given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 objects from the total of 𝑛 distinct objects. Its formula is given by 𝑃=𝑛𝑛−𝑟.

Let us begin with an example where we will use the permutation to count the number of distinct arrangements.

Example 1: Counting Using Permutations

Let 𝑋={𝑥∶𝑥∈ℤ,7≤𝑥≤16} and 𝑌={(𝑎,𝑏)∶𝑎,𝑏∈𝑋,𝑎≠𝑏}. Determine the value of 𝑛(𝑌), where 𝑛(𝑌) is the number of elements in 𝑌.

Answer

In this example, we want to count the number of distinct elements in set 𝑌, where the elements of set 𝑌 are the ordered pairs of elements of set 𝑋. Also, the ordered pairs in set 𝑌 cannot contain 2 identical elements.

To form an ordered pair of distinct elements, we can first select 2 elements from set 𝑋 and then arrange the 2 selected elements in order. Hence, the number of ordered pairs is equal to the number of different ways to arrange 2 distinct elements in order from set 𝑋. This leads to the concept of permutations.

Recall that, given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 objects from the total of 𝑛 distinct objects. Its formula is given by 𝑃=𝑛𝑛−𝑟.

Since 𝑋 contains all integers between 7 and 16, the number of elements in 𝑋 is given by 16−7+1=10.

This gives 𝑛=10. We want to arrange 2 elements in order; hence, 𝑟=2. Then, the number of ways to order 2 elements from a collection of 10 total elements is given by 𝑃, which is equal to 𝑛(𝑌). We can compute 𝑛(𝑌)=𝑃=1010−2=108=10×9×88=10×9=90.

Therefore, 𝑛(𝑌)=90.

In real-world counting problems, it is sometimes unclear whether to use the permutation rule and how to use it. To use the permutation rule in a real-world scenario, we need to identify a sequence of events in permutations leading to the same outcomes as the given scenario.

How To: Solving Real-World Counting Problems Using Permutation Rules

Given a real-world counting problem, we can construct a sequence of events that has the same number of outcomes as in the given real-world scenario by doing the following:

  1. Selecting 𝑟 distinct objects from 𝑛 total distinct objects where 𝑟<𝑛
  2. Ordering the 𝑟 selected objects

Then, the number of outcomes in the real-world scenario is given by 𝑃.

In the next example, we will apply the above method to a real-world counting problem by using permutations to count the number of possible arrangements of a group of people.

Example 2: Counting Using Permutations

Determine the number of different ways for 4 players to sit on 11 seats in one row.

Answer

In this example, we need to count the number of different ways 4 players can sit on 11 seats in one row. We can solve this problem by using permutations to count the number of possible arrangements of the players. Recall that, given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 distinct objects from 𝑛 total distinct objects. In other words, we need to find a sequence of events by

  1. selecting 𝑟 distinct objects from 𝑛 total distinct objects,
  2. ordering the 𝑟 selected objects.

To determine the seating arrangements for 4 players, we can first choose 4 seats from 11 distinct seats. After choosing the 4 seats to be occupied, we can order the 4 selected seats. The ordering of the selected seats can be interpreted as follows. Say that the 4 players are numbered 1, 2, 3, and 4. After ordering the 4 seats, player 1 sits on the first seat, player 2 sits on the second seat, and so on.

We can see that, following this logic, we can cover every possible seating arrangement for 4 players. Hence, the number of different seating arrangements is given by the permutation 𝑃. Recall that the formula for permutation is given by 𝑃=𝑛𝑛−𝑟.

Substituting 𝑛=11 and 𝑟=4, we compute 𝑃=1111−4=117=11×10×9×8×77=11×10×9×8=7920.

Hence, there are 7‎ ‎920 ways for 4 players to sit on 11 seats in one row.

Identifying a sequence of events leading to the same outcomes can be tricky. Let us consider another example where we will count the number of different outcomes using this method.

Example 3: Solving Problems Involving Permutations

How many unique anagrams are there of the word ERROR?

Answer

In this example, we need to find the number of unique anagrams of the word ERROR. In other words, we need to find the number of different arrangements using all the letters in this word. If the word had had five distinct letters, then we could have applied the factorial rule to conclude that there are 5 distinct arrangements, or anagrams, of this word. However, this is not the case here, since the letter R appears three times in this word.

We can apply the permutation rule to this counting problem by identifying a sequence of events leading to the same number of outcomes. Recall that, given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 distinct objects from 𝑛 total distinct objects. In other words, we need to find a sequence of events by

  1. selecting 𝑟 distinct objects from 𝑛 total distinct objects,
  2. ordering the 𝑟 selected objects.

Any anagram of the word ERROR must be a five-letter word containing one E, one O, and three Rs. We can define the sequence of events as follows.

We note that as the three Rs are not distinct, the order they go in does not matter. Hence, the number of permutations depends only on the placements of E and O. The remaining three placements can be filled by three R’s. As the word is five letters long and the two letters can be placed in either order, we are considering permutations of two letters in five total possible positions.

For instance, if we have chosen and ordered (5th placement, 3rd placement), then this would result in the anagram RRORE. An anagaram ERORR would correspond to the ordering (1st placement, 3rd placement). We can see that this sequence of events leads to each anagram from the word ERROR. Hence, the number of such anagrams is given by the permutation 𝑃. Recall that the formula for permutation is given by 𝑃=𝑛𝑛−𝑟.

Substituting 𝑛=5 and 𝑟=2, we compute 𝑃=55−2=53=5×4×33=5×4=20.

Hence, there are 20 unique anagrams of the word ERROR.

We can also apply the fundamental counting principle (also known as the product rule) with permutations to find the number of different outcomes in a given scenario. Let us recall the counting principle.

Theorem: Fundamental Counting Principle

If we have two independent events 𝐴 and 𝐵 such that the number of possible outcomes for event 𝐴 is 𝑥 and the number of possible outcomes for event 𝐵 is 𝑦, the total number of distinct possible outcomes of these two events together is the product 𝑥×𝑦.

Two events are independent if the outcome of one event does not change the number of possible outcomes of the other event. Furthermore, the fundamental counting principle works when there are more than two events. In short, we can multiply the number of possible outcomes for each event, as long as they are independent.

In the next example, we will apply the fundamental counting principle and permutations to find the number of different outcomes.

Example 4: Applications of the Counting Principle (Product Rule) and Permutations

A company labels their products with codes that start with 3 English letters followed by 8 nonzero digits. Which of the following represents the number of codes that can be created with no repetition of any letter or digit?

  1. 𝑃+𝑃
  2. 𝑃+𝑃
  3. 𝑃×𝑃
  4. 𝑃×𝑃

Answer

In this example, we want to count the number of different codes that can be created with no repetition of any letter or digit. We are given that a code must begin with 3 English letters and be followed by 8 nonzero digits. We can create a code by first ordering 3 English letters and then ordering 8 nonzero digits so that there are no repetitions.

We recall the fundamental counting principle: given two independent events 𝐴 and 𝐵 such that the number of possible outcomes for event 𝐴 is 𝑥 and the number of possible outcomes for event 𝐵 is 𝑦, the total number of distinct possible outcomes of these two events together is the product 𝑥×𝑦. We also recall that two events are independent if the outcome of one event does not change the number of possible outcomes of the other event.

To apply the fundamental counting principle, let 𝐴 be the event of ordering 3 English letters and 𝐵 be the event of ordering 8 nonzero digits. We can see that a specific order of 3 English letters does not affect the number of different orderings of 8 nonzero digits. Hence, 𝐴 and 𝐵 are independent events. We now need to find the number of each event separately and then multiply them to obtain the total number of ways to form codes.

Let us find the number of different ways to order 3 English letters. Recall that, given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 objects from the total of 𝑛 distinct objects. Its formula is given by 𝑃=𝑛𝑛−𝑟.

Since there are 26 letters in the English alphabet, there are 𝑃 different ways to arrange 3 different letters in order from the English alphabet. Also, since there are 9 different nonzero digits, there are 𝑃 different ways to order 8 distinct nonzero digits.

Applying the product rule, the number of codes that can be created with no repetition of any letter or digit is 𝑃×𝑃.

This is option D.

Let us consider another example where we need to apply both the product and permutation rules to count different outcomes.

Example 5: Applications of the Counting Principle (Product Rule) and Permutations

Find the number of ways we can select 2 milk chocolate bars first and 2 dark chocolate bars next from a box of 10 milk chocolate bars and 8 dark chocolate bars, considering that the elements are distinct, the selection is without replacement, and the order of selection matters.

Answer

In this example, we want to count the number of ways to select 2 milk chocolate bars and 2 dark chocolate bars, where the order of selection matters and the selection is without replacement.

We recall the fundamental counting principle: given two independent events 𝐴 and 𝐵 such that the number of possible outcomes for event 𝐴 is 𝑥 and the number of possible outcomes for event 𝐵 is 𝑦, the total number of distinct possible outcomes of these two events together is the product 𝑥×𝑦. We also recall that two events are independent if the outcome of one event does not change the number of possible outcomes of the other event.

To apply the fundamental counting principle, let 𝐴 be the event of selecting 2 milk chocolate bars and 𝐵 be the event of selecting 2 dark chocolate bars. We need to keep in mind that the order of selection matters, both for milk and dark chocolate bars. We can see that a specific order of selection for 2 milk chocolate bars does not affect the number of different ways to select 2 dark chocolate bars. Hence, 𝐴 and 𝐵 are independent events. We now need to find the number of each event separately and then multiply them to obtain the total number of ways to select chocolate bars.

Let us first find the number of different ways to select 2 milk chocolate bars, where the order of selection matters and the selection is without replacement. Recall that, given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 objects from the total of 𝑛 distinct objects. Its formula is given by 𝑃=𝑛𝑛−𝑟.

Since there are 10 milk chocolate bars in the box, there are 𝑃 different ordered ways to achieve this task. We can compute 𝑃=1010−2=108=10×9×88=10×9=90.

Next, let us find the number of different ways to select 2 dark chocolate bars, where the order of selection matters and the selection is without replacement. Since there are 8 dark chocolate bars in the box, there are 𝑃 different ordered ways to achieve this task. We can compute 𝑃=88−2=86=8×7×66=8×7=56.

Applying the product rule, the number of different outcomes of the given event is 90×56=5040.

We recall that permutations can also be used to describe the number of circular arrangements from a collection of distinct elements.

Theorem: Counting Circular Arrangements

The number of different ways to arrange 𝑟 objects in a circular pattern from 𝑛 total distinct objects is 𝑃𝑟.

In particular, the number of different ways to arrange 𝑛 total distinct objects in a circular pattern is 𝑛−1.

In our final example, we will apply this formula to count the number of circular arrangements.

Example 6: Counting Circular Arrangements

True or False: In a flower shop, there are 40‎ ‎320 ways to arrange 8 flowers in a circle.

Answer

Recall that the number of different ways to arrange 𝑛 total distinct objects in a circular pattern is 𝑛−1.

In this example, we want to find the number of different circular arrangements of 8 flowers; hence, 𝑛=8. This leads to 8−1=7=5040.

This is different from the number stated in the problem. We can see that the number given in the problem is 8, which is the number of different ways to arrange 8 flowers in a straight line. This number does not account for the fact that some circular arrangements are considered identical due to the rotational symmetry of a circle.

Hence, the given statement is false.

Let us finish by recapping a few important concepts from this explainer.

Key Points

  • Given nonnegative integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟, the permutation 𝑃 represents the number of different ways to order 𝑟 objects from the total of 𝑛 distinct objects. Its formula is given by 𝑃=𝑛𝑛−𝑟.
  • We can solve a counting problem using permutations if it is equivalent to the following events: For integers 𝑛 and 𝑟 satisfying 𝑛≥𝑟>0,
    1. select 𝑟 distinct objects from 𝑛 total distinct objects,
    2. order the 𝑟 selected objects.
    Then, the number of outcomes in the real-world scenario is given by 𝑃.
  • The number of different ways to arrange 𝑟 objects in a circular pattern from 𝑛 total distinct objects is 𝑃𝑟. In particular, the number of different ways to arrange 𝑛 total distinct objects in a circular pattern is 𝑛−1.

Download the Nagwa Classes App

Attend sessions, chat with your teacher and class, and access class-specific questions. Download the Nagwa Classes app today!

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.