I want to find the possible amount of combinations of a password that is 5 characters long, and each character could either be a lowercase letter or a digit. Also, each password should start with a lower case letter and contain at least two digits. The answer I got was 26 * 10 * 10 * 36 * 36.
Am I correct?
Best Answer
Given there are only $5$ characters you can do this directly by working individual cases.
Case $1$: There are exactly two digits out of last four characters -
$\displaystyle 26 \cdot {4 \choose 2} \cdot 10^2 \cdot 26^2$
Case $2$: There are exactly three digits out of last four characters -
$\displaystyle 26 \cdot {4 \choose 3} \cdot 10^3 \cdot 26$
Case $3$: Last four characters are all digits -
$\displaystyle 26 \cdot 10^4$
Add all of the arrangements from the three cases.
You can also calculate by subtracting cases where there are no digits or only one of the last four characters is a digit, which is given by -
$\displaystyle 26 \cdot (36^4 - 26^4 - 4 \cdot 10 \cdot 26^3)$