Permutations/Combinations: How many different passwords are possible?

Hello everyone. I have a couple questions this time, but I think if I understand how to do this one, I'll understand the others.

A particular online banking system uses the following rules for its passwords:
a. Passwords must be 6-8 characters in length
b. Passwords must use only alphabetical and numeric characters, and must have at least one alpha and one numeric character.
c. Letters are case sensitive.

Under these rules, how many different passwords are possible?

• Count all possible passwords of length 6, 7, 8, add them up, then count all possible all-letter and all-number passwords of length 6, 7, 8, and subtract them. – k.stm Mar 9 '14 at 20:05

Count the number of legal passwords of length $6$, $7$, $8$ separately, and then add up.

We do the length $7$ case.

If we are using the standard alphabet, there are $26$ lower case characters, $26$ upper case characters, and $10$ digits, for a total of $62$.

There are $62^7$ words of length $7$ made up by choosing symbols from our $62$-element symbol set.

This is because the first symbol of the word can be chosen in $62$ ways, and for each of these ways the second symbol can be chosen in $62$ ways, and so on.

However, some of these words are forbidden. We count the forbidden words.

There are $52^7$ "all-letter" words. There are $10^7$ "all-digit" words. So there are $52^7+10^7$ forbidden passwords of length $7$. This leaves $62^7 -52^7-10^7$ allowed passwords of length $7$.

• Thank you so much. I think that makes perfect sense! – XxTIBZxX Mar 9 '14 at 20:17
• You are welcome. In principle we could have counted the "allowed" passwords directly, but that is quite a bit more complicated. The "tick" of counting the "bads" and subtracting from total is often useful. – André Nicolas Mar 9 '14 at 20:20