Another popular combinatorics concept deals with letters and envelopes. Let’s look at it today in some detail.

Question 1: Robin wrote 3 different letters to send to 3 different addresses. For each letter, she prepared one envelope with its correct address. If the 3 letters are to be put into the 3 envelopes at random, in how many ways can she put

(i) all three letters into the envelopes correctly?

(ii) only two letters into the envelopes correctly?

(iii) only one letter into the envelope correctly?

(iv) no letter into the envelope correctly?

Solution: Let’s say we have 3 letters: La, Lb and Lc and 3 envelopes: Ea, Eb and Ec

Total number of ways of assigning 3 different letters to 3 different envelopes = 3*2*1 = 6 (using our basic counting principle). These total 6 ways of randomly putting letters in envelopes includes all the above given 4 cases. The number of ways in each case should add up to give us 6.

(i) all three letters into the envelopes correctly?

For all three letters to be put correctly, each letter must be put in its corresponding envelope only i.e. La must go into Ea, Lb must go into Eb and Lc must go into Ec. Therefore, there is only 1 way in which all three letters can be put into the envelopes correctly.

(ii) only two letters into the envelopes correctly?

Is this possible? Is it possible that only 2 letters are put into their envelopes correctly? If La goes into Ea and Lb goes into Eb, where will we put Lc? It has to go into Ec. There is no other option. So it is not possible to put only two letters into their correct envelopes.

(iii) only one letter into the envelope correctly?

First of all, we will need to select the letter which has to be put in correctly. We can select one of the three letters in 3 ways (i.e. we can put either La in Ea or Lb in Eb or Lc in Ec) The leftover 2 letters must be put in the wrong envelopes. Say, we put Lb in Eb (one letter which is put correctly). Now we are left with La and Lc and Ea and Ec. La must go into Ec and Lc must go into Ea. There is only 1 way of ensuring that the other two letters go into the wrong envelopes. Hence, total number of ways such that only one letter goes into the correct envelope = 3*1 = 3 ways.

(iv) no letter into the envelope correctly?

Of the total 6 ways, 1+0+3 = 4 ways are already accounted for. Now, in the leftover 2 ways, no letter must be in its correct envelope. Directly calculating this is a little tricky so we prefer to use the method of ‘Total – All Other Cases’. If you still want to get an idea of how we get 2 ways, use an example to understand this:

La can be put in either Eb or Ec (i.e. 2 ways). Say, La is put in Ec. Now we have 2 letters leftover: Lb and Lc and 2 envelopes leftover: Ea and Eb. Mind you, Lb cannot go into Eb so Lb must go into Ea and Lc must go into Eb i.e. there is only one way of putting in the other two letters. So, number of ways of putting in all the letters incorrectly = 2*1 = 2 ways.

The same logic can be used for more letters and envelopes too though it keeps getting more and more complicated.

Question 2: Robin wrote 4 different letters to send to 4 different addresses. For each letter, she prepared one envelope with its correct address. If the 4 letters are to be put into the 4 envelopes at random, in how many ways can we put

(i) all four letters into the envelopes correctly?

(ii) only three letters into the envelopes correctly?

(iii) only two letters into the envelopes correctly?

(iv) only one letter into the envelope correctly?

(v) no letter into the envelope correctly?

Solution: Extending the same logic as used above, we can say that we have 4 letters: La, Lb, Lc and Ld and 4 envelopes: Ea, Eb, Ec and Ed

Total number of ways of assigning 4 different letters to 4 different envelopes = 4*3*2*1 = 24 (using our basic counting principle). These total 24 ways of randomly putting letters in envelopes includes all the above given 5 cases. The number of ways in each case should add up to give us 24.

(i) all four letters into the envelopes correctly?

Using the same logic as in (i) above, there is only 1 way in which all four letters can be put into the envelopes correctly.

(ii) only three letters into the envelopes correctly?

Is this possible? Is it possible that only 3 letters are put in their envelopes correctly? Using the same logic as used in (ii) above, it is not possible to put only three letters into their correct envelope.

(iii) only two letters into the envelopes correctly?

First of all, we will need to select the two letters which have to be put in correctly. We can select two of the four letters in 4*3/2 ways i.e. ^{4}C_{2} = 6 ways (i.e. we can put either La in Ea and Lb in Eb OR La in Ea and Lc in Ec etc) The leftover 2 letters must be put in the wrong envelopes. Say, we put La into Ea and Lb into Eb (two letters which are put correctly). Now we are left with Lc and Ld and Ec and Ed. Lc must go into Ed and Ld must go into Ec. There is only 1 way of ensuring that the other two letters go into the wrong envelopes. Hence, total number of ways such that only two letters go into the correct envelopes = 6*1 = 6 ways

(iv) only one letter into the envelope correctly?

Let’s first select the one letter out of 4 that must be put in its correct envelope. We can do this in 4 ways. In how many ways can we put the rest of the 3 letters into 3 envelopes such that all 3 letters go into incorrect envelopes? Does this question sound familiar? Sure it does! It is our case (iv) in question 1 above. We found that 3 letters can be put into 3 envelopes such that each letter is put in incorrectly in 2 ways. So total number of ways such that only two letters go into the envelopes with their correct addresses = 4*2 = 8 ways

(v) no letter into the envelope with its correct address?

Of the total 24 ways, 1+0+6+8 = 15 ways are already accounted for. Now, in the leftover 9 ways, no letter must be in its correct envelope. Again, directly calculating this is a little tricky but if you want to get an idea of how we get 9 ways, use an example to understand this:

La can be put in either Eb or Ec or Ed (i.e. 3 ways). Say, La is put in Ec. Now we have 3 letters leftover: Lb, Lc and Ld and 3 envelopes leftover: Ea, Eb and Ed. Lc, the letter corresponding to Ec, can be put in any one of these three envelopes. Hence Lc can be put in 3 ways too. Say, Lc is put in Ed. Now, we have two letters, Lb and Ld leftover and two envelopes, Ea and Eb leftover. Lb cannot go into Eb so Lb must go into Ea and Ld must go into Eb i.e. there is only one way of putting in the other two letters. So, number of ways of putting in all the letters incorrectly = 3*3*1 = 9 ways.

Something to think about: Here, why don’t we put one letter incorrectly and say that the leftover – 3 letters and 3 envelopes, each letter has to go in incorrectly – is the same as case iv in question 1 above? After all, we used this method in case iv of this question.

*Karishma, a Computer Engineer with a keen interest in alternative Mathematical approaches, has mentored students in the continents of Asia, Europe and North America. She teaches **GMAT prep** for Veritas Prep and regularly participates in content development projects such as this blog!*

## Quarter Wit, Quarter Wisdom: Of Letters and Envelopes

*Posted on December 26, 2011, filed in: GMAT, Quarter Wit, Quarter Wisdom*

Hi Karishma,

Please clarify the cases where all letters are put in wrong envelopes in both the above questions. Thanks. I calculate the following way –

In case of 3 letters:

(iv) no letter into the envelope correctly?

La has 2 choices – Ec, Eb : La is put into Eb

Lb has 2 choices – Ea, Ec : Lb is put into Ec

Lc has one choice so it is put into Ea

2 x 2 x 1 = 4 ways

In case of 4 letters:

(v) no letter into the envelope with its correct address?

La has 3 choices other than Ea – Say La is put into Eb

Lb has 3 choices (Eb is already taken by La) – Say Lb is put in Ec

– Ea and Ed remain

Lc has 2 choices ans Ld has 1 choice

3 x 3 x 2 x 1 = 18 ways

In case of 3 letters:

(iv) no letter into the envelope correctly?

La has 2 choices – Ec, Eb : La is put into Eb

Lb has 2 choices – Ea, Ec : Lb is put into Ec

Lc has one choice so it is put into Ea

2 x 2 x 1 = 4 ways

Lb does not have 2 choices. Note that Lb cannot be put in Ea. If it is, then Lc will need to go in Ec which is not acceptable.

So there are only 2 total ways.

Similarly, work it out for 4 letters case too.

Yes you are right. Thanks again, Karishma.