# How to solve this counting problem easily?

Letters of the word $$BRILLIANT$$ are rearranged. What is the probability that the extreme positions are always occupied by consonants? Assume that all permutations are equally likely to occur.

My attempt: There are 6 consonants (B, R, L, L, N and T). Select two of these in $$\binom{6}{2}$$ ways. These 2 letters can be permuted in 2! ways. Put these 2 selected consonants at the extremes and then the remaining 7 characters can be permuted in 7! ways. But we are over-counting since there are 2 Is and 2 Ls. I am unable to proceed further.

• You are already doing it correctly and do not need to worry about over-counting. You can think of it as numbering the letters from 1 to 9 (repeated letters get their own number) and then just let $C\subseteq \{1, 2, ..., 9\}$ be the subset corresponding to consonants. So then you can repeat your same argument without worrying about repeated letters. It is like a "balls in bin" problem where there are 9 balls, 6 are red: You sequentially choose 9 without replacement and want to know the probability the first and last are red. [In fact you might as well choose the "last" location second.] – Michael Jan 27 '19 at 11:23

You can calculate it like this:

Probability of first letter becoming a consonant = 6 / 9


(Total letters = 9, Consonants = 6)

Probability of first letter becoming a consonant = 5 / 8


(After first letter becoming a consonant, remaining counts are: Total letters = 8, Consonants = 5)

Therefore probability of first AND last letters becoming a consonant
= (6 / 9) * (5 / 8)
= 30 / 72
= 5 / 12

• Can you also explain the approach where we actually count the valid strings? – Stupid Man Jan 27 '19 at 14:17
• @StupidMan, counting valid strings? Is there a part like that in the question? I don't see. – Prasad Karunagoda Jan 27 '19 at 14:49
• Your answer is correct and I have already accepted it as the correct answer. I am just interested in knowing another way to solve this, which is by actually counting the valid strings and dividing by the total number of permutations of the string "BRILLIANT". – Stupid Man Jan 27 '19 at 15:23
• Oh ok. Now I understood your question :) – Prasad Karunagoda Jan 27 '19 at 15:34

In the comments, you requested a solution in which the probability is calculated by dividing the number of arrangements in which both ends are filled by consonants by the total number of arrangements.

The word BRILLIANT contains nine letters, including one B, one R, two Is, two Ls, one A, one N, and one T.

First, we count the number of distinguishable arrangements of the word BRILLIANT. Choose two of the nine positions for the Is, two of the remaining seven positions for the Ls, and then arrange the remaining five distinct letters in the remaining five positions.

There are $$\binom{9}{2}\binom{7}{2}5! = \frac{9!}{2!7!} \cdot \frac{7!}{2!5!} \cdot 5! = \frac{9!}{2!2!}$$ distinguishable arrrangements of the letters of the word BRILLIANT. The factors of $$2!$$ in the denominator represent the number of ways the two Is and two Ls can be permuted within an arrangement without producing an arrangement that is distinguishable from the given arrangement.

Next, we count the number of arrangements of the word BRILLIANT in which both ends are occupied by consonants. Note that this means that the three vowels must be located in the seven interior positions. Choose two of those seven positions for the Is and one of the remaining five interior positions for the A. That leaves six positions to fill, including both ends. Choose two of those six positions for the two Ls. Arrange the remaining four distinct consonants in the remaining four positions.

There are $$\binom{7}{2}\binom{5}{1}\binom{6}{2}4! = \frac{7!}{2!5!} \cdot \frac{5!}{1!4!} \cdot \frac{6!}{2!4!} \cdot 4! = \frac{7! \cdot 6 \cdot 5}{2!2!}$$

Thus, the desired probability is

$$\frac{\dbinom{7}{2}\dbinom{5}{1}\dbinom{6}{2}4!}{\dbinom{9}{2}\dbinom{7}{2}5!} = \frac{\dfrac{7! \cdot 6 \cdot 5}{2!2!}}{\dfrac{9!}{2!2!}} = \frac{7! \cdot 6 \cdot 5}{9!} = \frac{6 \cdot 5}{9 \cdot 8}$$ which agrees with the simpler calculation given by Prasad Kaunagoda.