Need help plz...... 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
Simply plug n = 16 into \[\Large \log_{2}(n)\] to get \[\Large \log_{2}(n)\] \[\Large \log_{2}(16)\] \[\Large \log_{2}(2^4)\] \[\Large 4\log_{2}(2)\] \[\Large 4(1)\] \[\Large 4\] So \[\Large \log_{2}(n)=4\] when n = 16 This means that it takes at most 4 steps to search a table with 16 elements.
Do the same thing with n = 512 and tell me what you get
OK THANK YOU
sure thing
YW
Join our real-time social learning platform and learn together with your friends!