Skip to content

Mathematics · Ch 4 — Combinatorics and Mathematical Induction

Permutations of not all distinct objects

4.4.5

Permutations of not all distinct objects

So far every object being permuted was distinct. When some objects repeat, naive n!n! 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 E1,E2E_1,E_2 as if distinct: 3!=63!=6 labelled permutations exist (JE1_1E2_2, JE2_2E1_1, E1_1JE2_2, E2_2JE1_1, E1_1E2_2J, E2_2E1_1J), 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 2!=22!=2 ways with no visible effect. So the true count is 3!2!=3\dfrac{3!}{2!}=3.

Theorem 4.4. The number of permutations of nn objects, of which pp are of one kind and the rest all different, is n!p!\dfrac{n!}{p!}. More generally, if p1p_1 objects are of one kind, p2p_2 of a second kind, ..., pkp_k of a kkth kind, and the rest all different, the number of permutations is

n!p1! p2!⋯pk!.\frac{n!}{p_1!\,p_2!\cdots p_k!}.

Illustration (BANANA). 6 letters — 3 A's, 2 N's, 1 B. Arrangements =6!3! 2!=72012=60=\dfrac{6!}{3!\,2!}=\dfrac{720}{12}=60.

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 4!3!×5!2!=4×60=240\dfrac{4!}{3!}\times\dfrac{5!}{2!}=4\times60=240.

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 m×nm\times n grid (from one corner to the opposite corner, moving only right or up) consists of mm horizontal unit steps and nn vertical unit steps — a sequence of m+nm+n symbols with mm of one kind and nn of another. So the number of such paths is (m+n)!m! n!\dfrac{(m+n)!}{m!\,n!}.

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 11 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. …