girgit.org

Permutations and Combinations

Arranging letters that repeat

The big ideaWhen some objects are identical, swapping them changes nothing, so divide \( n! \) by the factorial of each repeat count: \( \dfrac{n!}{p_1!\,p_2!\cdots p_k!} \).

In simple words

Rearrange the letters of AMMA. If the two A's were different colours you could make 24 strings. But they are the same letter. Swapping one A with the other A gives a string that looks exactly the same, so you have counted each real string more than once. Divide away those useless swaps and you get the true count.

Guess first

RAVI has 4 different letters and \( 4! = 24 \) arrangements. AMMA also has 4 letters. How many different arrangements does it have? Still 24? 12? Fewer? Guess, then open.

See what happens
Only 6: AAMM, AMAM, AMMA, MAAM, MAMA, MMAA. Two pairs of identical letters cut 24 down to a quarter.

Why we divide

Pretend for a moment that the repeated letters are different: label them \( A_1, A_2, M_1, M_2 \). Now all 4 are different, so there are \( 4! = 24 \) arrangements.

Take one real string, say MAMA. With labels it appears as \( M_1A_1M_2A_2 \), \( M_1A_2M_2A_1 \), \( M_2A_1M_1A_2 \) and \( M_2A_2M_1A_1 \): the A's can swap in \( 2! \) ways and the M's in \( 2! \) ways, so each real string appears \( 2! \times 2! = 4 \) times among the 24. So the number of different strings is

\[ \frac{4!}{2!\,2!} = \frac{24}{4} = 6 \]

Objects that are not all distinct

  • \( n \) objects, \( p \) of them alike and the rest different: \( \dfrac{n!}{p!} \) arrangements (Theorem 3).
  • \( n \) objects with \( p_1 \) of one kind, \( p_2 \) of a second kind, …, \( p_k \) of a \( k \)th kind, and the rest different: \( \dfrac{n!}{p_1!\,p_2!\cdots p_k!} \) arrangements (Theorem 4).

Here \( n \) is the total number of objects (count every letter, including repeats), and each \( p \) is how many times one repeated object appears. Letters that appear once contribute \( 1! = 1 \), so they make no difference to the bottom.

See it: every different arrangement, and the identical-looking copies hiding inside each one.

Worked examples

Worked example

How many arrangements of the letters of KOLKATA are there? How many begin with K?

  1. KOLKATA has 7 letters: K twice, A twice, and O, L, T once each.
  2. All arrangements: \( \dfrac{7!}{2!\,2!} = \dfrac{5040}{4} = 1260 \).
  3. Begin with K: fix one K in front. The rest are O, L, K, A, T, A: 6 letters with A twice. \( \dfrac{6!}{2!} = 360 \).

Worked example

For Diwali, 5 red, 3 yellow and 2 green diyas are placed in a row. Diyas of the same colour look identical. How many different rows are possible?

  1. Total \( n = 5 + 3 + 2 = 10 \).
  2. Rows: \( \dfrac{10!}{5!\,3!\,2!} = \dfrac{36\,28\,800}{120 \times 6 \times 2} = 2520 \).

Worked example

In how many arrangements of BANANA are all three A's together?

  1. Glue the A's into one block [AAA]. Now arrange [AAA], B, N, N: 4 objects with N twice, so \( \dfrac{4!}{2!} = 12 \).
  2. Inside the block the three identical A's can be arranged in \( \dfrac{3!}{3!} = 1 \) way.
  3. Total: 12. (All arrangements of BANANA: \( \dfrac{6!}{3!\,2!} = 60 \).)

Worked example

How many 6-digit numbers can be made using all of the digits 0, 1, 1, 2, 2, 2?

  1. All strings: \( \dfrac{6!}{2!\,3!} = 60 \).
  2. Strings starting with 0 (not real 6-digit numbers): fix 0, arrange 1, 1, 2, 2, 2: \( \dfrac{5!}{2!\,3!} = 10 \).
  3. Numbers: \( 60 - 10 = 50 \).

When a list of digits has repeats, each digit may be used only as many times as it appears in the list.

Don't mix these up

  • \( n \) is the total number of letters, repeats included. MALAYALAM has \( n = 9 \), not 4.
  • Divide by the factorial of each repeat count, not by the count itself: for 3 identical letters divide by \( 3! = 6 \), not by 3.
  • After fixing or gluing a letter, recount the repeats in what is left.

Try it. (a) Arrangements of MALAYALAM (M twice, A four times, L twice, Y once)? (b) Arrangements of the letters of ASSAM? (c) In how many arrangements of ASSAM do the two S's stand together?

Answer
(a) \( \dfrac{9!}{2!\,4!\,2!} = 3780 \). (b) 5 letters, A twice, S twice: \( \dfrac{5!}{2!\,2!} = 30 \). (c) Glue [SS]; arrange [SS], A, A, M: \( \dfrac{4!}{2!} = 12 \).

Words to know

Objects of the same kind
Identical objects that cannot be told apart, like the two A's in AMMA.
Not all distinct
Some of the objects repeat.
\( \dfrac{n!}{p_1!\,p_2!\cdots p_k!} \)
Arrangements of \( n \) objects with repeat counts \( p_1, p_2, \dots, p_k \).
Labelling trick
Pretend the repeats are different, count, then divide by the useless swaps.

How many different arrangements do the letters of PAPAYA have?

  1. 720
  2. 60
  3. 120

A row is made of 4 identical white marbles and 2 identical black marbles. How many rows?

  1. 15
  2. 30
  3. 64

In arrangements of KOLKATA that begin with K, which count is right?

  1. \( \dfrac{6!}{2!\,2!} = 180 \)
  2. \( \dfrac{6!}{2!} = 360 \)
  3. \( 6! = 720 \)