In a previous topic, you got to know permutations, which are orderings of a list of elements. You learned how to calculate the number of different permutations of elements. This is useful, but there are cases when you want to count the permutations of only some elements instead of all of them. For example, suppose you want to count the number of possible -letter passwords that contain only lowercase letters. Here, you do not want to count the permutations of all letters. Instead, you want to count the ways you can choose and permute letters. In this topic, you will learn how this counting can be done both when repetition of elements is and is not allowed in the permutation. In case you are curious, there are possible passwords if repetition is not allowed and if repetition is allowed. Keep reading to understand how these calculations are done.
Arrangements without repetition
Let's consider the problem of counting possible passwords. To simplify, let's consider an alphabet of four characters and passwords of length . Given the set , in how many ways can you choose two different letters and write them in order if a letter cannot be chosen more than once?
Let's list out the different pairs of letters as follows.
There are pairs. Each of these orderings of two elements is called a -permutation of the set .
A -permutation of without repetition is a sequence of distinct elements of a set of elements. The number of -permutations denoted or . It is calculated as follows.
In general, finding a -permutation of a set with distinct elements can be thought of as a -step operation:
1. Choose the first element from the set of elements.
2. Choose the second element from the remaining elements.
…
k. Choose the th element from the remaining elements.
The number of -permutations of a set is equal to the number of ways the above operation can be performed. You can calculate this by the rule of product. There are ways to perform the first step, ways to perform the second step, and so on until the final step where there are elements left. This gives the formula:
In the problem at the start of this section, the given set contains no repeating elements. Using the formula for the number of -permutations of , you get the answer , which is precisely what you enumerated above.
Arrangements with repetition
Let's consider a problem that is similar to the one given in the previous section. Given the set , in how many ways can you choose two letters and write them in order? The chosen letters can be the same.
You count ways. Note how the answer has changed from the example in the previous section.
A -permutation of with repetition is a sequence of elements of a set of elements. The number of such -permutations is calculated as :
Like with arrangements without repetition, choosing a -permutation can be thought of as a -step process. However, in this case repetition is allowed, so each step has the options. elements are selected from a set of elements, and the same elements can be selected multiple times. By the rule of product, .
Revisiting the problem from the start of this section, we calculate , which is exactly what we counted.
A complex example
Let's consider a slightly trickier example.
Suppose that there are seats in a row. There are adults and children. How many seating arrangements are possible where every child has an adult to his/her immediate left and right seats?
We can start off by arranging just the adults in a row: there are ways to do this. There are spots between the adults where the seats for the children can be placed. Placing a child into one of these spots ensures that they have an adult to their immediate right and left. of the available spots need to be chosen to seat the children: the number of seating arrangements of the children is (no repetition is allowed, because a child cannot sit in two seats at the same time). The total number of seating arrangements of everyone is calculated by the product rule:
Conclusion
A -permutation of without repetition is calculated as:
A -permutation of with repetition is calculated as:
It is important to note that solving problems about permutations may not always be possible with the above formulas. One strategy for solving such problems is to think of choosing a permutation as a process with a certain number of steps. You can calculate the number of desired permutations by the rule of product.