I am trying to solve this problem and looking for any tips. I have 5 D's, 6 E's and 3 F's and I have two conditions.
The first D must be before the first E.
The first E must be before the first F.
I thought I could solve this through determining the ways to make a string of letters with a D before an E before an F, however, that is not enough because it does not cover instances like DEFDEF... or DEFFD... since there can be letters that come after the initial string that meets the conditions.
I also contemplated using the Inclusion Exclusion principle as follows
cases where a D comes before an E + cases where an E comes before an F subtract their intersection (which I'm not sure how I'd calculate) however I still cannot account for cases where there are letters after the initial D, E, F...
Any ideas?
Place one $E$ and three $F$s as follows: $$ E \wedge F \wedge F \wedge F \wedge $$ The remaining $E$s can be placed any where in the wedges where a wedge can be chosen multiple times. Thus we can place the remaining 5 $E$s in $\dbinom{4+5-1}{5} = 56$ ways. Now we have an arrangement $$ \wedge E \wedge F \cdots \cdots $$ There are 9 letters in the word and these create 10 positions. For placing $D$s, we need to choose the first position at least once. Thus the number of ways of choosing 5 places out of 10 places such that the first is chosen is the same as the number of solutions to $$x_1 + x_2 + \cdots +x_{10} = 5$$ with $x_1 \geq 1$ and $x_i \geq 0$ for $i \geq 2$. Thus the number of solutions is $\dbinom{10+4-1}{4} = \dbinom{13}{4}$. Thus the number of arrangements is $56 \dbinom{13}{4} = 56 \times 715 = 40040$.