Counting · Definition
Permutations with repetition
Before you start you need to know
It counts the words or rows that can be formed when some of the objects are identical, which the factorial alone cannot handle.
Definition
The permutations with repetition of \(n\) objects, of which \(n_i\) are indistinguishable of a single type \(i\) (\(i=1,\dots,k\)), are their distinguishable arrangements in a row.
The idea is to first count as if all objects were different, which gives \(n!\) arrangements, and then correct the excess. Swapping two identical letters does not produce a new word, so each real arrangement has been counted \(n_1!\) times because of the internal permutations of the first type, \(n_2!\) times for the second, and so on. Dividing by \(n_1!\,n_2!\cdots n_k!\) undoes that multiplicity.
A guiding example is the word BANANA: its six letters have A three times and N twice, so there are \(\dfrac{6!}{3!\,2!\,1!}=60\) distinct arrangements, not \(6!=720\). The same reasoning counts binary strings with a fixed number of ones and paths in a grid, which are arrangements of repeated steps such as right or up.
Types that appear only once may be included or left out, since \(1!=1\); what must hold is that \(n_1+n_2+\cdots+n_k=n\). With only two types the formula agrees with \(\dfrac{n!}{n_1!\,n_2!}\), the binomial coefficient you will see later; with more types it is called a multinomial coefficient.
Typical mistakes: dividing by \(n_1+n_2+\cdots\) instead of by the product of the factorials, or using \(n!\) without correcting. When there are restrictions, such as fixing a letter at the start, set that letter aside and apply the formula to the rest.
Think about it
Why divide by \(n_i!\) and not by \(n_i\)?
Because the \(n_i\) identical objects of one type can be permuted among themselves in \(n_i!\) ways without changing the arrangement, not in \(n_i\) ways.
How many distinct arrangements does the word AABB have, and what are they?
\(\dfrac{4!}{2!\,2!}=6\): AABB, ABAB, ABBA, BAAB, BABA and BBAA.
Exercises 10
- How many distinct arrangements do the letters of the word AMAMA have?
- How many distinct arrangements does the word BANANA have?
- How many distinct arrangements does the word LEVEL have?
- A binary string of length 8 has exactly three ones. How many such strings are there?
- Two red, two blue and two green flags, identical by colour, are placed in a row. In how many ways?
- A robot goes from the bottom-left to the top-right corner of a grid with 4 steps right and 3 steps up, in any order. How many paths are there?
- How many distinct arrangements do the letters of MISSISSIPPI have?
- How many distinct arrangements of MATEMATICAS are there?
- How many distinct arrangements of MISSISSIPPI start with M?
- If the \(n\) objects are all different (each type has a single object), what does \(\dfrac{n!}{n_1!\,n_2!\cdots n_k!}\) reduce to?
References
- Kenneth H. Rosen, Discrete Mathematics and Its Applications, 8th edition, McGraw-Hill, 2019. §6.5
- Susanna S. Epp, Discrete Mathematics with Applications, 5th edition, Cengage, 2019. §9.5
- Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied Introduction, 5th edition, Pearson, 2003. §1.2