3
$\begingroup$

How many passwords can be constructed of length 6 which must use at least one letter and at least one number (not case sensitive)?

I got $36^{6}-10^{6}-26^{6}$. But I don't know if I missed something there.

$\endgroup$
  • 1
    $\begingroup$ Assuming the only possible signs are 26 letters and 10 digits, then you're right. $\endgroup$ – Jakub Konieczny Nov 5 '13 at 19:08
2
$\begingroup$

Exactly correct, assuming a 26-letter alphabet and a pool of 10 digits:

We take the total number of strings possible using 36 distinct characters, with no restrictions, and then subtract from this total the number of strings which contain only digits and the number of strings that contain only letters.

$\endgroup$
2
$\begingroup$

It is correct. This is a direct application of the Subtraction Principle. First count the total number of $6$-length passwords using the $26$ letters in the English alphabet $\{a,b,c,...y,z\}$ and the $10$ numbers $\{0,1,2,...,8,9\}$. We see that there are a total of $36$ usable characters for our password. So the total number of $6$-length passwords is $36^6$. Now we count all the $6$-length passwords using only letters and numbers. There are $26^6$ $6$-length passwords only using letters and $10^6$ $6$-length passwords only using numbers. Thus the number of $6$-length passwords that contain at least $1$ letter and $1$ number is $36^6-26^6-10^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.