Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

Lecture 3: Problem solving. When professor Guttag talked about bisection search at about 41 minutes. He said the number of guesses of the square root of 12345 is 26. And then he said something about the size of the search space, which is roughly 12345 divided 0.01 square. and the answer is 26.89.... Can someone explain this formula to me? because I can't get the answer. Is it 12345/(0.01**2) or (12345/0.01)**2?

OpenStudy (anonymous):

The formula is not the important point, rather the concept that bisection search can make programs much faster is. :)

OpenStudy (anonymous):

the maximum (and probably approximate) number of guesses is log base 2 of the search field which makes sense intuitively if you think about what log2 is:-)

OpenStudy (anonymous):

The value obtained by teacher results from log base 2 of (12345 / (0.01 ** 2)) import math aa = ( 12345 / (0.01 ** 2) ) bb = math.log(aa,2) print (bb)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!