Ask your own question, for FREE!
Mathematics 13 Online
OpenStudy (anonymous):

a.One important application of logarithms is found in various computer search routines. For example, a binary search algorithm on a table (or array) of data takes a maximum of log2n (“log base 2, of n”) steps to complete, where n is the number of data elements that can be searched. How many steps (at most) are needed for a search of a table with 16 elements? 512 elements? Explain

OpenStudy (anonymous):

I need to know how to come up with the answer without using a calculator

OpenStudy (anonymous):

My answer are: log(base 2) 16 = 4 log(base 2) 512 = 9 2^4 = 16 2^9 = 512 i dont know how to explain though. i guess you would have to relate this with exponents.

OpenStudy (anonymous):

\[\log_{2}n = x \] Here, \[2^x = n\] It's just a matter of knowing your powers of 2.

OpenStudy (anonymous):

So to hit a BST of 16 elements, the tree height will be at most 4. For a BST of 512 elements, the tree will be at most 9 high.

OpenStudy (anonymous):

Thanks. Putting it in an exponential form gives me a better way of looking at it.

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!