How do you find the bigO of a fraction?

232 Views Asked by At

I am given

$$f(n) = \frac{\log (n^n)}{n^6 - 1}$$

I am told to find the least integer $k$ such that $f(n)=O(n^k)$.

I am completely stuck.

All I know to try is big-oh of the top over big-oh of the bottom, that is

$$\frac{n\log n}{n^6}=\frac{\log n}{n^5}$$

but I still can't get an integer from that. Not only that, but neither our teacher nor the textbook have any examples of big-oh involving fractions. I got to where I am now by Googling "big-oh with fractions" over and over.

If anyone could please help me, that would be awesome. And it you could please explain how you arrived at the answer? Thank you.

2

There are 2 best solutions below

2
On

Now you have that $f(n)$ eventually becomes larger than any $\frac k{n^5}$ so it cannot be $O(n^{-5})$, but it becomes smaller than any $\frac k{n^4}$ so it is $O(n^{-4})$

0
On

Explanation for previous answer as requested by CodingMee, but it's too long for a comment:

Obv. $\lim_{n \to \infty} \log n = \infty$, so you know that $f(n) \neq O(n^{-5})$. So $\log n$ increases to infinity, but it does so really 'slowly' compared to any kind of power of $n$. We have $\log n = O(n)$, $\log n = O(n^{0.5})$, $\log n = O (n^{0.001})$, $\ldots$. As Clayton wrote we have $\log n=O(n^\epsilon)$ for any $\epsilon > 0$. If you didn't know that before, accept this for the moment. From that follows that $f(n) = O(n^{-4.5})$ (just take $\epsilon=0.5$), that means $\frac{f(n)}{n^{-4.5}} \le M$ for some M and for all $n \ge 1$. Since $\frac1{n^{0.5}} \le 1$ for all $n \ge 1$ it follows that $\frac{f(n)}{n^{-4}} =\frac{f(n)}{n^{-4.5}}\frac1{n^{0.5}} \le M\times 1 = M$, for all $n \ge 1$, which is the definiton of $f(n) = O(n^{-4})$.