does $f(n) = O(g(n))$ implies $(f(n))^{log(n)} = O((g(n))^{log(n)}) ?$

111 Views Asked by At

if $f(n)$ and $ g(n)$ are monotonically increasing, and $f(n) = O(g(n))$.

Does it imply that $(f(n))^{log(n)} = O((g(n))^{log(n)}) ?$

Well I had a go at it saying I need to show that $f(n)^{log(n)} \le c_1\cdot g(n)^{log(n)}$

Now using the information that $f(n)\le c_2\cdot g(n)$

I think i can replace $f(n)$ with a bigger term $(c_2\cdot g(n))^{log(n)} \le c_1\cdot g(n)^{log(n)}$

and devide by $ g(n)^{log(n)}$ to get $c_2^{log(n)} \le c_1$

now I have a feeling its not true because of the case $c_2 \gt 1$ , pretty stuck here. thanks.

1

There are 1 best solutions below

0
On

Your idea is pretty much correct. For a very explicit counterexample, take $f$ to be the constant function $2$ and $g$ to be the constant function $1$. Then it's clear that $f(n)^{\log n} \ne O(g(n)^{\log n})$.

If you want strictly increasing functions, change these to $n$ and $2n$.