combinatorics questions from studying Hi all I need some assistance 
How many 5-digit briefcase combinations contain
1.Two pairs of distinct digits and 1 other distinct digit. (e.g 12215)
I wasn't sure on which approach was correct.
10 * 9 * 8 (because there are three distinct digits)
or 
10C2 * 5C2* 3C2 * 8 (because you have to take into account how the doubles can be orientated)
2.A pair and three other distinct digits. (e.g 27421)
same issue as above
10*9*8*7
or 
(5C2*10) * 9 * 8 * 7 
lastly
How many ways are there to pick a collection of 12 coins from piles of pennies, nickels, dimes, quarters, and half-dollars? Base on the following condition:
1.There are only 10 coins in each pile.
16C4 - 5^2 because it's the total minus how many ways I can get from the 11th coin and the 12th coin. = 1795
2.There are only 10 coins in each pile and the pick must have at least one penny and two nickels?
1795 - 13C4(?)
my logic is that it's because 12-3+4 C 4 but I'm not sure if I have to set it to 12 or 10.
Saw a variation on the problem:
stating that it original had 10 and now there 8 piles 1 Penny, and 2 nickels.
but the answer was 11C4 - 1. (how is this possible?)
Thank you!
 A: For two pairs The digits which we have two of can be chosen in $\binom{10}{2}$ ways. For each way of doing this, there are $\binom{8}{1}$ ways to choose the loney digit. Once the digits have been chosen, the pair of largest equal digits can be placed in $\binom{5}{2}$ ways. For each of these, the other pair can be placed in $\binom{3}{2}$ ways. And, if we feel like it, we can say that the lonely digit can be placed in $\binom{1}{1}$ ways. 
One pair and $3$ lonelies: The choosing of the digits can be done in $\binom{10}{1}\binom{9}{3}$ ways. For each choice, the placing can be done in $\binom{5}{3}3!$ ways. 
Must have a penny and $2$ nickels: Pick out a penny and $2$ nickels. We must choose $9$ coins, under the restriction that at the end we don't have more than $10$ of any coin. Use the ordinary "Stars and Bars" procedure (if the term is not familiar, please see Wikipedia). We need to make a small adjustment, to make sure we don't pick more than $8$ additional nickels. among the choices we counted using Stars and Bars, the only one we should not have counted is the $9$ (additional) nickels choice. 
We leave the other coin problem to you. Again, it is Stars and Bars, with removal of "bad" choices. There are indeed $25$ bad choices.  
