There are M letters. N>M. How many N letter "words" include all M letters?
A nice solution provided by my neighbor relies on the "inclusion-exclusion" principle. Apply it to the intersection of the M sets $\displaystyle A_i$={words that include the i'th letter}.
The answer is
$\displaystyle M^{N}$ - $\displaystyle \binom{M}{1}$$\displaystyle (M-1)^N$ + $\displaystyle \binom{M}{2}$$\displaystyle (M-2)^N$ - ... $\displaystyle \binom{M}{M-1}$$\displaystyle (M-(M-1))^N$
Note the alternating signs.