Number of 8 character passwords including numbers and letters without repetition

8.1k Views Asked by At

A password must be created with 8 characters. It can use number or letters, but they cannot be repeated (and letters are not case sensitive so we have only 36 characters). How many passwords are possible if they must include numbers and letters?

I was thinking $26\cdot 10\cdot34\cdot33\cdot32\cdot31\cdot30\cdot29$, which would be $26P1 + 10P1 + 34P6$ but does this account for the different orders that these characters can be in? Also if it must start with a letter and end with a letter would the same equation work?

2

There are 2 best solutions below

3
On

$36$ options for first character, $35$ for second and so on...

So we get $36\times 35 \times 34 \times 33 \times 32 \times 31\times 30 \times 29$

Unfortunately some of these passwords have only letters or only numbers.

Using the same method there are

$10\times 9 \times 8 \times 7 \times 6 \times 5\times 4 \times 3$ that use only numbers and

$26\times 25 \times 24 \times 23 \times 22 \times 21\times 20 \times 19$ that use only letters.

Thus there are $(36\times 35 \times 34 \times 33 \times 32 \times 31 \times 30 \times 29)-(10\times 9 \times 8 \times 7 \times 6 \times 5 \times 4 \times 3)-(26\times 25 \times 24 \times 23 \times 22 \times 21 \times 20 \times 19)$

acceptable passwords

0
On

Let $i$ be the number of digits in your password, where $ 1 \leq i \leq 7$, since you must at least have $1$ digits and can have at most $7$ digits.

Consider the case where you choose $c$ digits in your password, that leaves you with being able to choose the remaining $8-c$ characters to be used for characters.

You can choose your digits in $10\choose c$ ways, consequently you can choose the letters in $26\choose 8-c$ ways. So ${10\choose c}{26\choose 8-c}$ includes all the unique groups of digits and letters. Since these are groups of digits and letters, you must multiply by $8!$ to count all the permutations of each such group, thus $${10\choose c}{26\choose 8-c}8!$$ counts all the passwords in which you have $c$ digits in total.

Generalize this for all possible numbers of digits that may be chosen, where $i$ denotes the total number of digits, you have $$\sum\limits_{i=1}^7 {10\choose c}{26\choose 8-c}8!= 1157104166400$$ passwords containing numbers and letters.