Find the number of ways that the letters of CAMPFIRE may be arranged given that atleast two of vowels must be next to each other.

combinatorics

I was helping my son with homework and was able to solve this problem (verified answer with textbook) by considering that there are total $8!$ ways of arranging the letters. Now considering that no vowel is next to the other, we have $5!$ ways of arranging 5 consonants and with 6 slots available for vowels we choose $6 \choose 3$ ways of selecting slots for 3 vowels. And again the 3 vowels can be arranged in $3!$ ways. So the answer is $8! – 5! $ $6 \choose 3$ $3! = 25920$. This matches text book answer.

Now follows my son's chain of thought and I am unable to spot the flaw in this. Please help.

We can choose 2 out of 3 vowels in $3 \choose 2$ ways and the can flipped around in 2 ways. The remaining letters are 6 (5 consonants, 1 vowel) and they can be arranged in $6!$ ways. There are seven slots among the six remaining letters and the pair of two vowels next to each other can be placed in any one of them. So in all we have $3 \choose 2$ $2$ $6!$ $7$ = 30240.

Best Answer

You are double counting in the case that all three vowels are consecutive. That is, if you consider the block $AIE$ for example, you get that by fixing the block $AI$ and then assigning $E$, or by fixing the block $IE$ and assigning $A$.

There are $6!=720$ strings containing $AIE$ and there are $6$ ways to sort the block of vowels, so you double count $6\times 720=4320$ strings...just subtract that from the total to get the correct result ($30240-4320=25920$).

Might be worth pointing out: usually in this sort of overcounting, it's not so easy to correct the error to get the true answer. This example was especially simple in that there is only one sort of overcounting and it always results in double counting.