Number of 7 lettered words each consisting of 3 vowels and 4 consonants which can be formed by using the letters of the word DIFFERENTIATION 
Find the number of 7 lettered words each consisting of 3 vowels and 4 consonants which can be formed by using the letters of the word DIFFERENTIATION.

Vowels are IIIEEAO. Consonants are DFFNNTTR.Vowels can be selected in $\binom{4}{3}$ ways and consonants can be selected in $\binom{5}{4}$ ways and total ways are $\binom{4}{3}\binom{5}{4}7!=100800$ ways, but the answer is 532770. Where did I go wrong?
 A: The problem is that you assume that each vowel and consonant can only occur one time. However, some vowels and consonants appear multiple times. One way to solve this problem is the following. First, let us select three vowels and their respective order:


*

*Three same vowels (III only): 1

*Two same vowels (either II or EE) and one unique vowel: ${2 \choose 1}{3 \choose 1} {3 \choose 2} = 18$

*Three unique vowels: ${4 \choose 3}3! = 24$


This results in a total of 43 possible combinations. Second, let us select four consonants and their respective order:


*

*Two times two same consonants: ${3 \choose 2}{4 \choose 2} = 18$

*Two same consonants and two unique consonants: ${3 \choose 1}{4 \choose 2}{4 \choose 2}2! = 216$

*Four unique consonants: ${5 \choose 4}4! = 120$


This results in a total of 354 possible combinations. Selecting three positions to place the vowels, the total number of words thus equals:
$$43 \cdot 354 \cdot {7 \choose 3} = 532770$$
A: Another approach worth mentioning is that of exponential generating functions (egfs). Let $x$ enumerate vowels, $y$ enumerate consonants and $z$ enumerate total letters. Then the egf factors for vowels break down as follows
III
$$1+xz+\frac{1}{2!}(xz)^2+\frac{1}{3!}(xz)^3$$
EE
$$1+xz+\frac{1}{2!}(xz)^2$$
A, O
$$1+xz$$
and consonants:
FF, NN, TT
$$1+yz+\frac{1}{2!}(yz)^2$$
D, R
$$1+yz$$
The product of these is the egf for words 
$$\begin{multline}f(x,y,z)=\left(1+xz+\frac{1}{2!}(xz)^2+\frac{1}{3!}(xz)^3\right)\times\\\left(1+xz+\frac{1}{2!}(xz)^2\right)\left(1+\vphantom{\frac{1}{1}}xz\right)^2\left(1+yz+\frac{1}{2!}(yz)^2\right)^3\times\\\left(1+\vphantom{\frac{1}{1}}yz\right)^2\end{multline}$$
and we want the $x^3y^4z^7/7!$ coefficient of $f(x,y,z)$. Using the sage input
y,z=var('y','z')
show(factorial(7)*expand((1+z*x+(z*x)^2/2+(z*x)^3/6)*(1+z*x+(z*x)^2/2)*(1+z*x)^2*(1+z*y+(z*y)^2/2)^3*(1+z*y)^2).coefficient(z^7).coefficient(x^3).coefficient(y^4))

gives our answer:

$$532\,770\tag{Answer}$$

