How many distinct permutations of the string "NADAMADRID" have the word DAM appearing in them? How many distinct permutations of the string "NADAMADRID"  have the word DAM appearing in them?
Normally, under the Mississippi Rule, you would take the total number of characters factorial, then divide by the product of all the characters that repeat factorial. In this case however, they ask how many times a certain word will appear in the permuations of a bigger string. I was confused on how to do this problem, and how i would count these possibilites.
 A: I assume you don't distinguish between the same letters, e.g. $D_1$ and $D_2$ are the same, i.e. they are the same color. In such case, you have $10-3+1=8$ position for DAM. For each such position you have $\binom{7}{2}\binom{5}{2}\binom{3}{1}\binom{2}{1}$ allocations for remaining letters.
If you distinguish between letters as above, you also need to account for selection of 'D' and 'A' for DAM, e.g. D can be selected in $\binom{3}{1}$ ways, etc.
A: If we discard the word $DAM$ temporarily, we have $7$ letters to arrange, out of which two letters of two types are similar. The arrangement of these can be done in $\frac{7!}{(2!)^2}$ ways. Once this is done, we have $8$ spaces for the word $DAM$ to be inserted into , so in total you get $$\frac{7!}{(2!)^2} \times 8 = 10080$$ ways.
A: Just treat $DAM$ like another unique letter.  Then you have 8 letters total, with two $A$'s and two $D$'s (after you take out those used in $DAM$).  So the total number of arrangements is $$\frac{8!}{2!2!}$$
Note this would get more complicated if there were more than one $M$, as then you'd have to account for instances with two $DAM$'s by inclusion-exclusion.
A: The string "NADAMADRID"  contain exactly total 10 characters.
Now consider DAM  as a single character (Say DAM = X), so the new string of
total 8 characters will be XNAADDRI.
Here we see,

*

*X occurs once

*N occurs once

*A occurs twice(2)

*D occurs twice(2)

*R occurs once
6.I occurs once

Hence the permutations of XNAADDRI (i.e "NADAMADRID" have the word DAM ) with repeataion of A and D is 8!/(2! * 2!).
