Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
1  
The digit can be in any one of the $6$ places. So your first term should be $6\times26^5\times 10$ instead (and so on for the other terms). –  Lord Soth Jul 26 '13 at 18:46
    
Similarly for all parts.Yes .Now I understand where I went wrong . Thanks . –  Harish Kayarohanam Jul 26 '13 at 18:55

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

${\bf Hint}$: in your sum, you have not accounted for the amount of ways to choose where to place each digit for each of the 6 cases.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.