Question on Permutations Please advise Among all seven digit decimal numbers,how many of then contain exactly three 9's?
My Approach:
3 places contains only 9's---> 1*1*1 (No. of Ways to Choose out of 0 to 9)
other 4 places:
since first digit cannot be zero or 9 (since 9 is already chosen): 8*9*9*9
now arranging those numbers:leaving first digit is 6!
so total: 8*  (9*9*9*1*1*1)6!)
If keeping 9 as first digit: then it can selected as 1 ways.
Rest 6 digits can be chosen as (1*1*9*9*9*9)
now arranging those numbers:leaving first digit is 6!
so total digits with 9 as first digit:
1* ((1*1*9*9*9*9)6!)
-->Total Digiits = 8*  (9*9*9*1*1*1)6!) + 1* ((1*1*9*9*9*9)6!)
Please advise.
(It would be helpful if anyone can advise some tips on practicing Permutations and Combinations Questions.)
 A: We use your basic method, but some details differ. There are two types, (i) the numbers that begin with $9$ and (ii) the ones that don't.
(i) Where are the other two $9$'s? Their locations can be chosen in $\binom{6}{2}$ ways. For each of these ways, the remaining $4$ places can be filled in $9^4$ ways, for a total of $\binom{6}{2}9^4$ ways.
(ii) The locations of the $9$'s can be chosen in $\binom{6}{3}$ ways. For each of these ways, the first digit can be chosen in $8$ ways. And the rest of the places can be filled in $9^3$ ways, for a total of $\binom{6}{3}(8)9^3$ ways.
A: You are taking the right approach by calculating separately the case where nine is on the first slot and the case where it isn't. 
In either case, the first thing you need to do is pick places for your $9$s. You will do this with a combination because the $9$s are indistinguishable. 


*

*If there is a $9$ on the first spot, you only need two more spots for $9$s, and there remain 6 unoccupied spots, so there are $\binom 6 2$ combinations.

*If there is not a $9$ on the first spot, you need three spots for $9$s, and there remain 6 unoccupied spots (because we can't place a 9 on the first spot, by assumption), so there are $\binom 6 3$ combinations.


Now we need to think of how many permutations of other numbers (not $9$) there are for the remaining 4 spots.


*

*If there's a $9$ on the first spot, we don't need to worry about there being a 0 anywhere, so we can use any digit except for $9$: there are $9\cdot 9 \cdot 9 \cdot 9 = 9^4$ permutations

*If there isn't a $9$ on the first spot, then there are only 8 choices for the first spot, because it cannot be 0. The other three spots can still be any number but $9$, so there are $8\cdot 9\cdot 9 \cdot 9$ permutations.


Now we add the results, and we get 
$$
\binom{6}{2}\cdot 9^4 + \binom 63\cdot 8\cdot 9^3
$$
A: Also, You can think as


*

*Total  seven digit decimal numbers containing exactly three $9$'s are  $7\choose {3}$.$9^4$ Here we are assuming numbers starting from zero as a seven digit number which are in fact, not a seven digit number. So, in order to get desired answer, we have to find 

*Numbers whose first digit was zero and they are $6 \choose{3}$.$9^3$

*Hence answer: $7\choose {3}$.$9^4$ $-$ $6 \choose{3}$.$9^3$
A: You have to distribute the three 9s on seven places, that gives $\binom{7}{3}$ posibilities. The remaining four places are one of nine alternatives each, for $9^4$ cases. The decisions taken are independent, so the total is $\binom{7}{3} \cdot 9^4$.
