retagged by
733 views
0 0 votes
If f(n) = O(g(n)),  is log(f(n)) = O(log(g(n))) ?

I just learnt today that this relation does not hold, because log changes the behavior of the functions. But is it true? An example will be good. Any help is appreciated.

1 Answer

0 0 votes
Suppose f(n) =2pow(n) and g(n)=3pow(n)

Clearly f(n) = O(g(n))

but on taking log on both sides

log(f(n)) = nlog(2)

log(g(n)) = nlog(3)

 Now clearly log(f(n)) = Thetha(log(g(n)))

So the given statement is false
Position:
Show:

No related questions found