I'm trying to understand from a combinatoric point of view why a particular answer is wrong. I'm given the alphabet $\Sigma = \{ 0,1,2 \}$ and the set of 8 letter words made from that alphabet, $\Sigma_8$ . There are $3^8 =6561$ such 8 letter words.
How many words have exactly three 1's?
How many words have at least one each of 0,1 and 2?
In the first question I reasoned that first I choose $\binom{8}{3}$ places for the three 1's. Then I have 5 place left where I can put 0's and 2's which is $2^5$. Since I can combine each choice of 1 positions with every one of the $2^5$ arrangements of 0's and 2's then I get $\binom{8}{3}\cdot 2^5 = 1792$ which is correct.
I tried applying the same reasoning to the second question and got $\binom{8}{3}\cdot 3^5 = 13608$ which is obviously wrong.
Was my reasoning sound in the first question or did I just happen to get the correct answer by chance? If it is sound, why doesn't it work with the second question?