1
$\begingroup$

I'm reading the problem from this stanford material (http://infolab.stanford.edu/~ullman/focs/ch04.pdf). Can you please help me understand this?

Question: At Real Security, Inc., computer passwords are required to have four digits (of $10$ possible) and six letters (of $52$ possible). Letters and digits may repeat. How many different possible passwords are there?

** my approach** So for the $10$ password chars: $10^4$ (for digits) and $52^6$ (for letters)

But how do I combine these permuting groups?

$\endgroup$
1
  • $\begingroup$ Please read this tutorial on how to typeset mathematics on this site. $\endgroup$ Jul 23 '15 at 9:51
4
$\begingroup$

You're good so far. Notice that a password is ten characters, four of which are digits. So, we must find all the ways in which we can stick the digits into the password. Luckily, this is easy to do, as this is the same as the number of $4$-element subsets of a $10$-element set; that is, $\binom{10}{4}$.

Hence, your total count is $\binom{10}{4} \cdot 10^4 \cdot 52^6$.

$\endgroup$
1
  • $\begingroup$ Oh okay. So we use combinations to select 'unique 4-spaces' which can be filled in 10^4 ways (so 10C4 * 10^4) and then the rest of the 6 spaces can be filled in 52^6. Thank you so much! $\endgroup$ Jul 22 '15 at 16:58
3
$\begingroup$

Out of the 10 characters in the password, exactly 4 of them must be digits. The number of ways to choose 4 spots out of 10 is $\binom{10}{4}$. Each of these ways uniquely determines the other 6 spots, which must be letters.

So, the total number of ways is $\binom{10}{4}10^452^6$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.