Big O evaluations

136 Views Asked by At

I'm confused about how to approach Big O problems. I'm presented two functions:

$$f(n) = 4^{log_4n}$$ and $$g(n) = 2n +1$$

I simplified f(n) to: $$f(n) = n$$

Now I'm not sure how to compare f(n) and g(n). I tried looking at the ratio of $$\frac{f(n)}{g(n)}$$

But it doesn't come out to 0 or 1. Could anyone help me approach these Big-O problems?

1

There are 1 best solutions below

0
On

I don't understand exactly what is your question here, but if it is about comparing $f$ and $g$ then it is simple and you don't have to use any Big-O notation because,

First, $f$ is defined on $\mathbb{R}_+^*$

And, $$ \forall n\in\mathbb{R}_+^*,\quad g(n)-f(n)=n+1>0$$ Thus,$$ g(n)>f(n)$$

But if you want to calculate the following limit $\lim\limits_{n\rightarrow +\infty}\frac{f(n)}{g(n)} $ then simply you can demonstrate that it is equal to $\frac{1}{2}$.