Help with Logarithms: Binary Searches & Phone Books

  • Thread starter Thread starter lokisapocalypse
  • Start date Start date
  • Tags Tags
    Logarithms
Click For Summary

Homework Help Overview

The discussion revolves around the application of logarithms in the context of binary searches, specifically using a phone book as an example. The original poster is exploring how the structure of a phone book, with names distributed across multiple pages, affects the number of searches required to locate a name.

Discussion Character

  • Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts to relate the logarithmic search method to the structure of a phone book, questioning how the number of searches changes when considering names per page and pages in total. Some participants question the clarity of the proof being requested, while others reference logarithmic properties to address the inquiry.

Discussion Status

The discussion is currently focused on clarifying the original poster's request for proof regarding logarithmic identities. Some guidance has been offered regarding the product rule for logarithms, but there is no explicit consensus on the broader implications of the original question.

Contextual Notes

There is a potential ambiguity in the original poster's request, as it is not entirely clear whether they seek a mathematical proof or a deeper understanding of the implications of their logarithmic relationship in the context of binary searches.

lokisapocalypse
Messages
32
Reaction score
0
I am working on some homework about binary searches. In case you don't know, a binary search of x items takes at most log base 2 (x) searches to find what you are looking for (assuming it is sorted data of course). Now we are asked if using a phone book as an example, we have a reference to the first name on each page, how does that change the at most number of searches.

In other words, if I have x names in the phone book with y names on z pages (x = y*z). How much is that different than log base 2 (x). Using this method it takes at most log base 2 (y) searches to find the page and then log base 2 (z) searches to find the name on that page ( log base 2 (y) + log base 2 (z) ). It seems to be the case that log base 2 (x) = log base 2 (y) + log base 2 (z). Can anyone prove this for me? Thanks.
 
Physics news on Phys.org
It's not clear what you want to prove. If you sinply want to prove that, given x = yz, then log(x) = log(y) + log(z) simply recall the product rule for logarithms : log(yz) = log(y) + log(z).
...but I suspect you are asking for something else.

I'm not sure, so I'll allow you to clarify.
 
Last edited:
OR that 2^(x)*2^(y)=2^(x+y)
 
Actually that was all I was asking for, thanks!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
0
Views
2K
  • · Replies 2 ·
Replies
2
Views
17K
  • · Replies 6 ·
Replies
6
Views
2K