How many arrangements of the word $ABBBCCDD$ contain the subword $BCD$

combinationscombinatoricspermutations

Context:

While brushing up on some combinatorics, I came across a problem that I couldn't get the correct answer to. After looking at this question, I saw that I was double counting some cases, so I have tried to fix my reasoning. It would be nice to get confirmation as to whether or not my reasoning is now correct.

The problem:

How many arrangments of the word $ABBBCCDD$ contain the subword $BCD$?

My approach:

There are 6 ways to place the subword $BCD$. Let's say we have the following

$$\#\#\color{blue}{BCD}\#\#\#$$

Next, there are $C(5,2)$ ways to place the remaining $B$'s, and then $3!$ ways to place the remaining letters. Say we get the arrangement $$\color{red}{AB}\color{blue}{BCD}\color{red}{BCD} \ \ \ (*)$$ In total, we have $$6 \cdot C(5,2) \cdot 3! = 360$$ arrangements, however we have overcounted. The problem is that we could have obtained the arrangement in $(*)$ another way; initially placing $BCD$ at the end, and then filling in the rest of the letters. Thus, arrangements with two occurrences of $BCD$ get double counted.

Conversely, if $BCD$ only occurs once, that arrangement does not get double counted, so we need to subtract the number of arrangements with $BCD$ occuring twice from $360$. There are $C(4,2) \cdot 2$ arrangements with two occurences of $BCD$, so the final answer is $$360 – C(4,2) \cdot 2 = 348.$$

My question:

Is my approach okay? Am I missing any over/under counts?

Best Answer

Yes, you correctly applied the inclusion-exclusion principle. The same result can be obtained as the difference of the number of anagrams of $\fbox{BCD}ABBCD$ and the number of anagrams of $\fbox{BCD}\fbox{BCD}AB$: $$\frac{6!}{2!}-\frac{4!}{2!}=(6\cdot 5-1)\cdot 12=348.$$