# Basic Password permutation question

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?

• Please read this tutorial on how to typeset mathematics on this site. Jul 23 '15 at 9:51

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$.
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$.