An iPhone developer was having difficulty parsing the input that his users provided. As such, instead of having users enter a single password of 8 characters, he requires that the user enter 8 passwords of a single character each. The passwords are entered sequentially, with the app asking the user to
enter the next password only once when he/she has successfully entered the previous passwords
. He feels that this gives the same level of security, as there are 8 letters in the password.
If each character of the password is either a digit from 0 through 9 or a capital letter A to Z , what is the minimum number of guesses that a hacker must make in order to be sure to correctly enter all the passwords?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
It should be 35*8+1=281 because after he hacker guesses the first pass correctly, he gets to guess the second pass in the same attempt.
Log in to reply
I think this question was not written properly. I asked for the explanation of the question but was never answered.
My attempt was 281.
yes, the logic of last character applies to all the 8 blanks. hence the answer is 281.
Log in to reply
Ah, but it says not for him to correctly guess the last one, but for him to actually log in.
It is stated that "the app asking the user to enter the next password only once when he/she has successfully entered the previous passwords"
So, even though you may know what the correct value is, you still have to enter it in. As such, you don't 'save' one step.
Log in to reply
Pretend the pass is "99999999".
First 35 guesses: A-Z,0-8
36th guess, 9A
37th guess, 9B
...
70th guess, 98
71st guess, 99A
...
380th guess, 99999998
381st guess, 99999999
Log in to reply
@Daniel Wang – Very clear (evident typos apart). This, if logic is not an opinion , is an irrefutable demonstration that the hacker is "sure to correctly enter all the passwords" after 280 guesses. The 281th, indeed, is not a guess hence the 8 digits are already known.
@Daniel Wang – The point is that "enter the next password only once when he/she has successfully entered the previous passwords."
So your 36th guess cannot be 9A, and has to be 9, in order for you to proceed on.
Yeah, but unless you're a really dumb hacker, you should remember it at least.
the answer should be 287. Because after that 287 tries he would be sure about the last character. So, according to me it should be 287
Log in to reply
I see what you are saying, but by that reasoning, it should be 280. There are 36 possilble "combinations" for each password, but in each of those passwords he only needs 35 guesses, as the last "guess" is never a guess but certain knowledge. That happens for every password, so 35*8=280.
Log in to reply
I think the main problem here is the ambiguity of the problem. What is called a "guess" is not clearly defined.
In this context, "guess" means "an attempt"
I see what you're saying. However, the question doesn't ask for the maximum number of guesses it could take to be sure of the answer. It asks for the minimum number of guesses that a hacker must make in order to be sure to correctly enter all the passwords. So I think it'd still be 288.
Log in to reply
Exactly!! "minimum no. of guesses" i.e. the no. of guesses after which he is sure about the password. so don't you think it would be 287
Log in to reply
@Sanket Agrawal – Ooh, I see what you're seeing. Except, it keeps going. "To be sure to correctly enter all the passwords." If he cares about actually entering all of them, it's still 288. Right?
I think the number of attempts after which the hacker can be sure of the entire Password is 280. It goes this way: Say the first letter is K. The hacker tries 35 times any letter other other than K. So after 35 attempts, he can be sure that the only letter missing from his attempts is K. Then in 36th attempt, he knows that the first pass-code is K. Now he enters K as his first pass-code and guesses the second passcode .So the first attempt of guessing the second pass-code is, in fact, his 36th attempt. So after 70 total attempts, he can be sure of the second pass-code as well. Now in his 71st attempt, he guesses the third pass-code for the first time. He does so for all the 8 passwords 35 * 8 times, after which he is sure of all the eight pass-codes. So it's 35 * 8=280 attempts.
Please feel free to correct me if my logic is flawed.
Yes, I got that answer too. But I got another answer which I am sure it is correct after trying to figure out the problem out after my first attempt of 281 was wrong (which sadly brought my combinatorics rating under 2000).
On the first password, if the user tries 3 5 passwords and they're all wrong, then it is g a u r a n t e e d that the only password he hasn't tried is correct (for example, if the password was 11112211, then after he\she tries 0 , 2 , 3 , ⋯ 9 , A , B , C ⋯ Z , he/she knows immediately that the first password is 1 ). So therefore the user can enter the first password and then make a guess on the 2nd password on his 3 5 t h try on the first password. Therefore after, since the user already got a free try for it on his last attempt on the previous password, then for all the other passwords we can use the same logic as above of trying 3 4 passwords then knowing that the only password left is correct for a total of 3 5 + 3 4 ⋅ 7 = 2 7 3 tries.
Log in to reply
On his 35th try the hacker can insert a guess for the second password only whether he/she has the first one... * and he/she has not *. Because the first password is ... (what a bad luck!) the 36th and last digit not yet tried.... So the correct answer is 35X8. After 280 guesses the hacker, has no need to insert another try, given he/she has the mathematical knowledge of the entire set of passwords.
solution doesn't clear
This is a highly ambiguous question.. suppose u got the 1st, 2nd.... passwords with less than 36 guesses... what then? 288 is not the minimum no of guesses but maximum...
I think that the minimum number of guesses is the minimum number he has to take to get all 8 passwords correctly. So by that reasoning, if the password is 00000000, and the hacker always guesses 0 first, the minimum is 1. It is always true that if he guesses correctly the first time, the MINIMUM is one.
Log in to reply
The question asks the number of minimum guesses to be sure , not just by chance.
It's really not too tough. There are 36 numbers/letters, and 8 times you must type them in, but it isn't dependent probability! Thus, 3 6 × 8 = 2 8 8 .
It must be 35*8.
total 8 entries and 36 way to fill each entry to be sure that it is correct minimum is to try all possible 36 *8 = 288
The question states that there are 8 passwords of 1 character each, and if upto the nth password has been correctly found then only he can guess the (n+1)th password.
To guess the 1st password the hacker would mostly require 36 guesses(0 to 9 and A to Z). Once he finds out the 1st password, the would again need 36 guesses for the next one. So when he finding the 3rd password he already knows the 1st and 2nd, and he needs 36 guesses for the 3rd one.
This way proceeding to 8 passwords the hacker would have guesses 36 X 8 = 288 times
it should be 280 which is 8*(26 for A to Z+ 9 for 0 to 8 ) it no one is match then it should be 9 which is understood
The fact is I tried the same way and it told me my answer was wrong :( . You are right, but 280 was not accepted
Problem Loading...
Note Loading...
Set Loading...
It's tempting to say that the answer is 3 6 8 , but that is the number of possible passwords that the user can create. The password goes one character at a time, so there are 3 6 possible choices for each individual character. For a given place in the sequence, you get turned back when you get one character wrong, so you can simply try each character and see if it turns you back. If it doesn't then that is the correct character for the sequence.
You need to check 3 6 different entities per character in the sequence. There are 8 characters in the sequence. Therefore, the answer is 3 6 × 8 = 2 8 8 .................................................................................................................................. Extra
The software developer is making a very bad idea. There are only 3 6 × 8 = 2 8 8 possible sequences to check for their idea, but if you are guessing passwords that are 8 characters long, there are 3 6 8 = 2 , 8 2 1 , 1 0 9 , 9 0 7 , 4 5 6 sequences to check. This means that the developer's idea would make it 9 9 . 9 9 9 9 9 9 9 9 % easier for hackers to guess the password.