Combinatorics: how many ways to create a password

combinatoricsdiscrete mathematicspermutations

A IT professional needs to create a password for new employees joining the company, the password must be of length 6. The letters must be from lowercase letters or digits. The passwords must contain at least two lowercase letters, at least one digit, and repetition is not allowed for digits. How many ways are there to generate the password?

6 characters length.
At least 2 lower case letters.
At least 1 digit.
No repetition allowed for digits.

Please correct me if I'm wrong, but the way I have been thinking would be to calculate with 5 lower case letters + 1 digit, then calculate 2 lower case letter + 4 digits. After getting these two subtract and that would be my result, is this right?

26^5 X 10 = 118813760

26^2 X 10 X 9 X 8 X 7 = 3407040

Now 118813760 – 3407040 = 115406720?

Is this right? I feel like I'm doing something wrong here.

Best Answer

No, that won't do.
You should choose and place the digit(s), then place letters

  • Using $1$ digit: $\binom{10}1\cdot6\cdot{26}^5$

  • Using $2$ digits: $\binom{10}2\cdot6\cdot5\cdot{26}^4$ and so on.

Finally, add up

Related Question