RudraM wrote:
Chris gave Brian a four-digit code to disarm Chris’s security system. However, when Brian typed in the code, it didn’t work. If Brian realizes that Chris must have written exactly one digit incorrectly, but Brian does not know which digit is incorrect or what its correct value is, how many more attempts will Brian need to guarantee that he identifies the correct four-digit code?
A. 36
B. 39
C. 3024
D. 6561
E. 9999
My analysis was -
"Since, does not know which digit is incorrect or what its correct value is" there are 10 possibilities for each digit of the code (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). However, since it is 4-digit code, 0 cant be a possibility for the 1 digit of the code. so the number of attempt would be --
4*10 -1 = 39.
Can someone please explain why I am wrong !!
Hi
My thoughts.
First of all, we are talking about 4 digit code not about four digit number, that means first digit can be zero. (0459 is also four digit code).
Now let's take our code:
A B C D
We know for sure that only one digit is incorrect, others are correct.
Let's assume that A is incorrect. We already typed 1 digit and it does not work, hence we are left with 9 digits to try. Total:
9*1*1*1 = 9 choices for incorrect A. If it still does not work, that means A is correct and we are moving to B.
Now we are assuming that B is not correct. Same logic:
1*9*1*1 = 9 choices.
Worst scenario will be when the correct digit appears to be the last we try on D. Hence we need to try total:
9*4 = 36 times.
Answer A.
Hope this helps.
Cheers.