Permutation
Countable sequences!
Broadly speaking, a permutation of a set is a sequence made from its elements. The generalized rule of product can be applied to count the number of permutations, or in other words, different arrangements, that can be made from a set.
Since permutations are sequences, the order of their elements matters, unlike combinations.
\(r\)-permutation
An \(r\)-permutation of a set is a sequence of \(r\) of its elements, with no repetitions. For example, \((9, 5, 6)\) and \((6, 1, 7)\) are both \(3\)-permutations of the set \(\set{9, 1, 6, 5, 7, 8}.\) However, \((7, 7, 9)\) would not be a \(3\)-permutation of that set, because it repeats \(7.\) By the generalized rule of product, the total number of \(3\)-permutations that can be made from that set is \(6 * 5 * 4 = 120.\) This is because, when an element is selected, there is \(1\) fewer choice for the next element, as repetitions are not allowed in \(r\)-permutations. This line of thinking leads to the following formula:
Plenty of problems can be solved by counting \(r\)-permutations. Here's some quick examples. How many ways are there to elect a president, vice president, and treasurer from \(6\) people? How many ways can \(3\) people be seated at \(6\) desks? How many ways can \(3\) dice all show different numbers? Though the wording may vary, these questions are all asking for the number of \(3\)-permutations that can be made from a set of \(6\) elements. The answer, as you know by now, is \(P(6, 3) = \frac{6!}{(6 - 3)!} = 6 * 5 * 4 = 120.\)
\(r\)-permutations happen between two sets. Previously, it was asked how many ways \(3\) dice could all roll different numbers. Let's arrange the dice in an arbitrary order, \((\text{dice}_1, \text{dice}_2, \text{dice}_3)\), and consider the set of numbers that could be rolled \(\set{1, 2, 3, 4, 5, 6}.\) If we make the decisions in order, \(\text{dice}_1\) has \(6\) choices of numbers, then \(\text{dice}_2\) has \(5\) choices, and finally \(\text{dice}_3\) has \(4\) choices, with the result being \(6 * 5 * 4 = 120.\) This may be a more intuitive way of thinking about counting \(r\)-permutations.
In the event that \(n = r\), \(r\)-permutations are called "permutations" and the formula from above simplifies greatly:
Here, what is being counted is the number of different sequences which use each element of a set exactly once, which is essentially just how many ways the elements of that set can be ordered. Consider the set \(\set{a, b, c}.\) It has \(6\) permutations in total: \((a, b, c), (a, c, b), (b, a, c), (b, c, a), (c, a, b), (c, b, a).\)
A bride, a groom, \(3\) bridesmaids, and \(3\) groomsmen line up for a photo at a wedding. How many ways can the party line up with the bride next to the groom? Well, the bride could be either left or right of the groom, meaning there are \(2\) ways for them to be next to each other. Treat the bride+groom pair as if it represented \(1\) person. Now, we only need to figure out how many ways a bride+groom pair, \(3\) bridesmaids, and \(3\) groomsmen can be arranged. This is a permutation of \(7\) things. There are \(7!\) ways to arrange \(7\) things. Therefore, taking into account the \(2\) ways the bride and groom can be next to each other, there are, in total, \(2 * 7! = 10,080\) ways the party could be lined up with the bride and groom next to each other.
If a password must be \(10\) characters long, consist of only lowercase alphabetical characters, and characters cannot be repeated, then there are \(P(26, 10)\) different passwords that can be made.
Permutation with repetition
A permutation with repetition of a sequence (in which some elements appear more than once) is a sequence that uses all of its elements the same number of times they appeared in the original sequence. For instance, \(P(3,3) = 3! = 6\) permutations of \(ANT\) (\(ANT\), \(ATN\), \(NAT\), \(NTA\), \(TAN\), \(TNA\)) exist, but just \(3\) non-identical permutations of \(BEE\) (\(BEE\), \(EBE\), \(EEB\)) exist, because swapping the identical \(E\)'s will have no effect. Since these sequences have repetitions, the previous formula for counting permutations will need a correction to avoid overcounting:
Dividing by the factorials of the frequencies of each element has the effect of ensuring identical rearrangements are never counted more than once. Each factorial represents the number of ways rearranging that element will result in an identical sequence.
Let's try this out. How many ways can you uniquely scramble \(TENNESSEE\)? There are \(9\) letters. Since \(T\) is used \(1\) time, \(E\) is used \(4\) times, \(N\) is used \(2\) times, and \(S\) is used \(2\) times, the answer is simply \(\frac{9!}{1! \times 4! \times 2! \times 2!} = 3,780.\)
Imagine you have \(4\) slices of pepperoni pizza, \(3\) slices of cheese pizza, and \(1\) slice of Hawaiian pizza to share with \(8\) friends. How many different ways can you give \(1\) slice of pizza to each friend? Let's make use of the bijection rule here. Assign each of your \(8\) friends to a slot in a sequence. Assign each of the \(3\) types of pizza to a letter \(\set{P, C, H}.\) Then, a bijection exists between the number of ways of scrambling \(PPPPCCCH\) and the number of ways of giving slices of pizza to your friends. Counting permutations with repetition, the answer is \(\frac{8!}{4!3!1!} = 280.\)