0
$\begingroup$

Is simply to demostrate that if I have a 4-digit numeric passcode PIN, I need to try 10.000 PINs (in the worst case) to match the passcode. I want to know, with an analytical demonstration, if the probability would be the same if I change the passcode random times in the "try process".

Lets say that my passcode is "2000" and I a naughty persona tried the first 1000 passcode, respectively: (0000 to 0999), then I change my passcode to "0777", so this naughty person can try the entire 10.000 passcode without success, this change the probability of success, what happen with this situation (changing the passcode during the process of "tries") how affect the probability?

Thanks for reading and please forgive my horrible way to write English.

$\endgroup$

2 Answers 2

1
$\begingroup$

If the process by which the bad guy is trying to discover the code is known to the good guy, then a few random changes can drastically reduce the probability of success for the bad guy, and make the time-to-success huge.

If the process by which the bad guy is trying to discover the code is unknown, then random changes can reduce the probability somewhat. For in that second case, we may assume that the good guy changes codes every time; in that case, the probability of success, for each bad-guy attempt, is 1/10,000. The expected time to success is therefore 10,000, but the worst-case time to success is infinite. By contrast, when the good guy is forced to pick one passcode and stick with this, the expected time to success is 5000, and the worst-case time is 10,000.

If the bad guy's sequence of guesses is known, the good guy needs to merely wait until the bad guy is about to guess the current passcode, and then randomly pick another. The only time this strategy fails is when the random pick is exactly the bad guy's next guess. Since the expected time to "about to guess my number" is about 5000, and the probability of the random guess being bad is 1/10,000, the expected time to failure of this (not very clever) strategy is about 5000 * 10,000 guesses, which is pretty good.

$\endgroup$
0
0
$\begingroup$

Assuming that whoever is trying to guess the code will stop at 9999 then the probability is 0 that they will guess it correctly. If they will keep going then the new probability is is 9000 (the amount left from the original) + 777 (the amount they will have to try once they start over). If you keep changing it and know what they have guessed then there is no way to calculate the probability anymore since that is more a game theory question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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