There is a computer password , whose restriction is that it .
1)Each character is an upper case alphabet (A…Z) or a digit (0 to 9))
2) It should be of length 6
3) It should have at least 1 digit
I solved it as
combinations of password with at least 1 digit = Total password combinations – Number of passwords without digit
$$ = 36^6 – 26^6 $$
$$ = 1867866560 $$
This answer is the correct answer . But I wanted to do it by another way too .
Here I do
combinations of password with at least 1 digit = combinations of password with 1 digits + combinations of password with 2 digits + combinations of password with 3 digits + combinations of password with 4 digits + combinations of password with +5 digits + combinations of password with 6 digits
$$ 26^5*10^1 + 26^4*10^2 + 26^3*10^3 + 26^2*10^4 + 26^1*10^5 + 10^6 $$
Answer comes as $192447360$ .Is the approach right, If so where am I going wrong in this method ? Please help .
Thanks
Best Answer
When you calculate no. of passwords with $k$ digits $1\le k\le 6$, the number is $$\binom{6}{k}10^k(26)^{6-k}$$ So, in your calculations you are missing the binomial coefficients.