Imagine that you have three fruits: an apple, an orange, and a banana. You want to eat all three fruits, one after the other. In how many ways can you order the fruits?
A permutation of a set of objects is a specific linear arrangement of such objects. For example, is a permutation of the three fruits. Enumerating permutations is useful for counting problems where the order is important, such as for the problem above. Combinatorics is a field of mathematics that deals with the number of arrangements, subject to certain conditions, that can be made up of elements of a given set. Keep reading to see how to solve the problem above.
Permutations of distinct objects
Let's revisit the problem from the introduction. If you eat the apple first, then you have to choose an order for the remaining fruits. The next fruits can be: orange, then banana; or banana, then orange. Likewise, if the first fruit is orange, the next fruit can be: apple, then banana; or banana, then apple. Similarly, if the first fruit is banana, then either apple, then orange, or orange, then apple come next. So there are six different ways to order the fruits.
In general, you can think of finding a permutation of a set with distinct elements as an -step operation:
1. Choose the first element from the set of elements.
2. Choose the second element from the remaining elements.
…
n. Choose the remaining element.
The number of permutations of a set is equal to the number of ways you can perform the operation. 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 is one element left.
The number of permutations of a set of distinct elements, which is denoted by , is determined by the formula:
is a designation that is used to mean the product of all natural numbers from 1 to inclusive, and is called "-factorial". We define .
Thus, the total number of permutations of three fruits is , which is exactly what we counted above.
Two-line notation
In general, there can be so many permutations that two of them look a lot alike. It would be nice to have a more compact notation to visualize them. The two-line notation is one such notation.
The two-line notation for permutations allows us to specify a particular arrangement of elements, with emphasis on the position of the elements. In this notation, numbers are used to represent elements. The first row is the numbers in natural order . The second line contains the ordering of the elements.
For example, the permutation in two-line notation would be written as
Permutations with repeated objects
Let's look at two problems that seem similar but need different approaches for solving them.
The first problem is the following. How many ways can the letters in the word be arranged in a row? Since each of the eight letters in the word is distinct, the number of permutations is .
The second problem is the following. How many ways can the letters in the word be arranged in a row? In this case, some letters in the word are repeated. There are three 's, three 's, one 's, two 's, and one .
If the letters were different, then there would be permutations. However, for a particular permutation, since there are three 's, the repeated 's can be arranged in ways to give the same arrangement of the word. Likewise, there are two 's, so the repeated 's can be arranged in ways to give the same arrangement of the word. We can take repetition into account by dividing by the total number of repeated arrangements. We get the following result:
In general, if there are total objects with identical objects of one type, objects of a second type, and so on until the last type with objects, the number of permutations of these objects are
Another example
Let's consider the following example:
The strategy to solving this problem is to count the number of permutations where the books are together, and then use the difference rule to calculate the number of permutations where the books are not together.
We determine the total number of permutations of elements by the formula: .
To calculate the number of "extra" permutations, we first determine how many variants there are where the 2nd book is on the right of the 1st. In such permutations, the 1st book can take places from the first to the 39th, and the 2nd from the second to the 40th– only places for this pair of books. And for each such position of the first two books, the remaining books can occupy the remaining places in no particular order. Permutation options for books: . In total, if the 2nd book is located to the right of the 1st book, there will be .
Similarly, let's consider the case when the 2nd book is located next to the 1st, but to the left of it. With the same reasoning as before, the number of options is .
This means that there are "superfluous" permutations. And the necessary arrangement methods are . Let's calculate this value:
Therefore, there are ways to arrange forty books such that the first and second are not next to each other.
Conclusion
Permutations are specific orderings of the elements of a set. The two-line notation is useful for visualizing a permutation compactly. As an example, a specific ordering of the elements in two-line notation is
The total number of permutations of different elements is equal to . When there are repeated elements, this number is divided by the number of repeated arrangements.