# Probability that consonants and vowels are at same position and no letter is at its previous place

The letters of the word "MATHEMATICS" are arranged in all possible ways. Then, which is the probability that, in a randomly selected arrangement, vowels and consonants are at same position and no letter is at its previous place?

Vowels are AEAI and consonants are MTHMTCS. The total number of arrangements is $$\displaystyle \frac{11!}{2!\cdot 2!\cdot 2!}$$

I am not able to go further, could someone help me? Thanks.

• I think it may involve the concept of "derangements with repetition" but I am not sure. – Rohan Feb 9 '17 at 11:59
• How do you treat the repeated M and T in your requirement that no letter is at its previous place? – Jan Feb 11 '17 at 17:51

Taking into account the standard formulas for total permutations and permutations with repetitions, the $11$ letters can be arranged in $11!\,$ ways, of which $$\frac {11!}{2!2!2!}=4.989.600\,\,\, \,$$ are different. Since in any arrangement we can switch two identical letters without changing the letter sequence, and because there are three pairs of equal letters (A, M, and T), this $1:8 \,$ ratio between distinct (i.e., taking into account repetitions) and general (i.e. ignoring repetitions) sequences is also valid for the subset of valid arrangements, that is to say those which satisfy the conditions described in the OP. As usual, the searched probability can be obtained by dividing the number of valid arrangements (distinct or general) to the corresponding number of total ones (again distinct or general). Clearly the resulting ratio is the same, irrespective of whether we consider distinct or general arrangements in both the numerator and the denominator. In this answer, I will focus on the number of distinct arrangements.

To count the distinct valid arrangements, since vowels and consonants must be at the same position, we can start by considering them separately as a sequence of $4$ vowels and another sequence of $7$ consonants. So we can continue as follows. For the vowels, we have to count only the arrangements where the letters A are not in the first or third position in the vowel sequence, i.e. those where they are in the second and fourth position (which also implies that the other two vowels are not in the original position). There are clearly $2$ distinct arrangements of this kind, given by EAIA and IAEA.

For the seven consonants, we can start by placing the two M, reminding that they cannot be in the first or fourth position in the consonant sequence. Let us consider three cases:

• 1) the two M are in the second and fifth position of the consonants sequence (i.e. in the original places of the T). Then the remaining five letters can be arranged in $5!/2!=60\,\,$ distinct ways. These $60$ sequences can have one or more among the letters H, C, S (but not a T) in the original position, so they are not all valid. To select the valid sequences among these, we can note that, choosing any of the three letters HCS (e.g., the C), $1/5$ of the sequences contains it in the original position. This is also true for the other two letters (in this example, H and S): because the groups of permutations in which these three letters are in their original position are overlapped, the proportion of sequences that includes at least one of the three letters in the original position can be obtained as $$3 \cdot \frac{1}{5}-3 \cdot \frac {1}{5 \cdot 4}+\frac {1}{5 \cdot 4 \cdot 3}=\frac {28}{60}$$ giving a total of $32$ valid arrangements.

• 2) only one of the two M is in the second or fifth position of the consonant sequence and the other is in another position. There are $2 \cdot 5 =10 \,\,$ distinct ways of placing the M in this manner. In this case, one of the places originally occupied by the T is still blank. We can fill this place in $3$ ways, choosing one letter among H, C, or S. There remain four places that have to be filled with two T and the two remaining letters among H, C, or S. This can be done in $4!/2! =12$ distinct ways. However, among these $12$ arrangements, some must be excluded because the two remaining letters among H, C, or S cannot be positioned in their original places. By an argument similar to that used in point 1, the proportion of arrangement to be excluded is $$2\cdot \frac {1}{4} -\frac {1}{4 \cdot 3}=\frac {5}{12}$$ All this procedure gives $10 \cdot 3 \cdot 7=210\,\,\,$ valid arrangements.

• 3) none of the two M is placed in the second or fifth position of the consonant sequence. There are $\binom {5}{2}=10\,\,\,$ distinct ways of placing the M in this manner. In this way, both places originally occupied by the T are still blank. We can fill these two places in $6$ ways choosing two letters among H, C, or S. There remain three places that have to be filled with two T and the only remaining letter among H, C, or S. This can be done in $3!/2! =3$ distinct ways. However, among these $3$ arrangements, one must be excluded because the only remaining letter among H, C, or S cannot be positioned in its original place. All this procedure gives $10 \cdot 6 \cdot 2=120\,\,\,$ valid arrangements.

So, collecting the results above, there are $32+210+120=362\,\,\,\,\,$ valid arrangements for the consonants. Multiplying it by the $2$ valid arrangements of the vowels, we get $724\,$ distinct valid arrangements. Dividing these by the total number, we obtain a probability of

$$\frac {724}{4.989.600} \approx 0.000145$$

corresponding to about one possibility out of $6892\,$.