In the Problem Solving lecture ,#3, Prof. Guttag, is able to estimate the number of guesses that a program to find square roots by using the following: "And so it's going to be roughly 12345 divided by 0.01 squared, which turns out to be 26.897 more or less. So we could predict it. And son of a gun, when we ran it, we actually matched the prediction." I must be missing something, I don't see how the above method gets anywhere near 26.
heyhey! totally agree with you. I paused and repeated a few times, took my notebook and scrabbled. I ended up with n= ln(s)/ln(2) where n= number of guesses, s=searching area measured in epsilon units (so 12345 divided by epsilon=0.01). Hope this helps you out.
I still don't see how he came up with 26. Can you write it out as a numerical problem? I am a little confused by the word problem. Thanks for the reply.
Join our real-time social learning platform and learn together with your friends!