Robin chooses a 4-digit PIN number, so that there are exactly two different digits (like 0777). How many different PIN numbers can Robin choose?
\(\dbinom{4}{2} \dbinom{10}{2}+2\dbinom{4}{1}\dbinom{10}{2} = 630\)
The first term picks 2 slots from 4 in the code for the first digit and then picks 2 digits from 10 to use.
The second term picks 1 slot from the 4 to use for the first digit and then picks 2 digits from 10.
The factor of 2 is there because either digit can be the singleton, the other will be the triplet.
How many ways can you choose 2 digits out of 10? 10 C 2 = 45
IN 4 slots how many ways can you arrane these 2 digits? 2^4 = 16
But two of these are without the second digit (like 3333 and 4444) .... so 16-2 = 14 ways
14 x 45 = 630 combos.