Mathematics · Ch 4 — Combinatorics and Mathematical Induction
Permutations of not all distinct objects
Permutations of not all distinct objects
So far every object being permuted was distinct. When some objects repeat, naive over-counts, because swapping two identical copies produces an arrangement that looks the same.
Motivating case — JEE. There are 2 identical E's. Temporarily label them as if distinct: labelled permutations exist (JEE, JEE, EJE, EJE, EEJ, EEJ), but each unlabelled arrangement (JEE, EJE, EEJ) is counted twice — once for each way of relabelling the two E's — since the 2 E's permute internally in ways with no visible effect. So the true count is .
Theorem 4.4. The number of permutations of objects, of which are of one kind and the rest all different, is . More generally, if objects are of one kind, of a second kind, ..., of a th kind, and the rest all different, the number of permutations is
Illustration (BANANA). 6 letters — 3 A's, 2 N's, 1 B. Arrangements .
Illustration — fixed positions (RAMANUJAN). When vowels and consonants must keep their relative positions (i.e. every vowel slot stays a vowel slot and every consonant slot stays a consonant slot, but which vowel/consonant sits where can vary), arrange the vowel multiset among the vowel slots and the consonant multiset among the consonant slots independently, then multiply (rule of product) — RAMANUJAN has 4 vowels (A,A,A,U) and 5 consonants (R,M,N,J,N), giving .
Illustration — position-restricted repeats. When some positions are constrained by type (e.g. "even digits occupy even places"), split the string into its constrained slots and unconstrained slots, permute the fitting multiset of symbols within each slot-group separately (again by Theorem 4.4), and multiply the two counts.
Lattice-path counting. A path on an grid (from one corner to the opposite corner, moving only right or up) consists of horizontal unit steps and vertical unit steps — a sequence of symbols with of one kind and of another. So the number of such paths is .
The rank of a word (dictionary/lexicographic order). The rank of a word is its position when every string formed from its letters is listed in dictionary (alphabetical) order. To find it: sort the distinct letters alphabetically; at each position of the target word, count how many of the remaining available letters are alphabetically smaller than the letter actually used there, and for each such smaller letter, count the arrangements of the (remaining) letters that would fill the rest of the string — sum these counts across all positions, then add for the word itself. When a letter repeats, computing "arrangements of the remaining letters" at each step must divide out the repeats still present, exactly as in Theorem 4.4. …