# Thread: Is Log(max(m,n)) equivalent to log(m+n)

1. ## Is Log(max(m,n)) equivalent to log(m+n)

Guys can someone explain me whether

log(max(m,n)) equivalent to log(m+n) ?

I am studying analysis of a certain algorithm and the book says so. Please reply.

Thanks.

2. Originally Posted by tsjagan
Guys can someone explain me whether

log(max(m,n)) equivalent to log(m+n) ?

I am studying analysis of a certain algorithm and the book says so. Please reply.

Thanks.
properties of logarithms. Check here: Logarithm - Wikipedia, the free encyclopedia

3. as an example let us take 2 numbers m=5,n=4
log(max(m,n))=log5
but log(m+n)=log(5+4)=log9
but log5 not equal to log9
therefore log(max(m,n)) not equal to log(m+n) speaking mathematically.

4. as an example let us take 2 numbers m=5,n=4
log(max(m,n))=log5
but log(m+n)=log(5+4)=log9
but log5 not equal to log9
therefore log(max(m,n)) not equal to log(m+n) speaking mathematically.

5. Originally Posted by tsjagan
Guys can someone explain me whether

log(max(m,n)) equivalent to log(m+n) ?

I am studying analysis of a certain algorithm and the book says so. Please reply.

Thanks.
Put $\displaystyle m=1,\ n=2$ then $\displaystyle \log(\max(m,n))=\log(2) \ne \log(m+n)=\log(3)$

Now go back and try to find out why for the purposes of the algorithm in question they are effectively equivalent.

CB

6. What, exactly, do you mean by "equivalent"?

That question is directed to both tsjagan and Captain Black!

7. Originally Posted by HallsofIvy
What, exactly, do you mean by "equivalent"?

That question is directed to both tsjagan and Captain Black!
When m and n differ significantly in magnitude then the two logs are approximately the same. If the expression occurs in the analysis of an algorithm this is likely to be the case and if using one form rather than the other yields a significant simplification you jump at it..

CB

8. Originally Posted by CaptainBlack
When m and n differ significantly in magnitude then the two logs are approximately the same. If the expression occurs in the analysis of an algorithm this is likely to be the case and if using one form rather than the other yields a significant simplification you jump at it..

CB
Ah, thanks.