I'm trying to calculate the possible combinations for $8$ character passwords under specific rules:
- The password must contain $2$ of each of the following:
lower case
letters,upper case
letters,digits
, andspecial characters
. - I have $78$
ASCII
characters ( lower case letters, upper case letters, digits, and special characters ). - lower case letters $= 26.\quad$ upper case letters $= 26.\quad$ digits $= 10.\quad$ special characters $= 16.$
How would I go about calculating the possible combinations under these conditions $?$.
( Additionally, the order in which the characters occur is not important ).
Best Answer
It is said that $2$ elements will be selected from each groups so we can do it by $C(26,2) \times C(26,2) \times C(16,2) \times C(10,2)$.Now we have $2$ digits , $2$ lower letters , $2$ upper letter , $2$ special character.
Lets show them with capital letter such that $D-D-U-U-L-L-S-S$ , we can arrange them by $\frac {8!}{2! \times 2! \times 2! \times 2! }$
Hence , our password can be formed by $C(26,2) \times C(26,2) \times C(16,2) \times C(10,2) \times \frac {8!}{2! \times 2! \times 2! \times 2! } $