Even if you can help with one of these it would be much appreciated. 1. One impo
ID: 3101044 • Letter: E
Question
Even if you can help with one of these it would be much appreciated.
1. 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 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.
2. The approximation of the natural logarithm of 2: ln 2 ˜ 0.693 is commonly used by applied scientists, biologists, chemists, and computer scientists. For example, chemists use it to compute the half-life of decaying substances. Based on this approximation and the power rule for logarithmic expressions, how could you approximate ln 8? Explain.
Explanation / Answer
1. So if n=the number of data elements, we can just plug back the variables you got. The first value of n=16, so plug that into the equation of logbase2(n). So you get logbase2(16). 16=2^4, because 2*2*2*2=4*4=16. Remember that the logarithmic function is the same as saying "To what power do I have to raise the base to get value n?" So for this instance, you have to raise 2 to the 4th power to get 16. So logbase2(16)=4. An easy way to see this is to change it to logbase2(2^4). For the second one, 512, you can plug it into the calculator or, if you recognize it, find to what power of 2 512 is after putting it into the equation. So logbase2(512)=? If you recognize that 512 is a power of 2, you'd see that it is the same as 2^9. So 2*2*2*2*2*2*2*2*2=4*4*4*4*2=16*16*2=256*2=512. So logbase2(2^9)=9. If you put it into the calculator, you have to know a certain rule of logs where you can calculate any logarithm using a single base. The formula is logbasea(x)=logbasez(x)/logbasez(a). What this means is that you can use the regular logarithm on the calculator or the natural logarithm to calculate any other one. So for instance, if we were to use logbase10 (the common log on the calculator) we can calculate logbase2(512) by typing into the calculator logbase10(512)/logbase10(2) Do you want the explanation for this? If so, I can put it in another answer. So the answer for the second part is 9. 2. One handy rule of logarithms is how we can switch out powers. For instance, if we have logbasea(x^n), we can make it into n*logbasea(x) where a and x are any numbers. So you need to recognize that 8=2^3 (2*2*2=4*2=8). Change ln8 into ln(2^3). Using the rule I just descriped, pull out the exponent n (which is equal to 3 here) and make it into 3*ln2. Substitute the value of ln 2 (about .693) into that eqn, so you get 3*.693=2.079. Look below if you get confused 8=2^3 ln8=ln(2^3)=3*ln(2) ln2~.693 (plug it in ^^) 3*(.693)=2.079 Let me know if anythings confusing!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.