Is it true that $\dfrac{n}{2\sqrt{n}-1}=\Theta(\sqrt{n})$?

52 Views Asked by At

I have a function of the form

$$f(n)=\dfrac{n}{2\sqrt{n}-1}.$$

I would like to find the big-O of this function (or big-Theta). How can I find these?

I tried this method: Multiply both the denominator and the numerator by $\sqrt{n}$. I get:

$$f(n)=\dfrac{n\sqrt{n}}{2n-\sqrt{n}}.$$ Now, as $n$ goes large, we get $f(n)=\sqrt{n}/2$. Can I say that $f(n)=\Theta(\sqrt{n})$?

2

There are 2 best solutions below

3
On BEST ANSWER

Recall the definition and note that for $n\to \infty$

$$\frac{\dfrac{n}{2\sqrt{n}-1}}{\sqrt n}=\dfrac{n}{2n-\sqrt{n}}\to \frac 12$$

0
On

If you make the denominator bigger, that makes the fraction smaller, and vice versa. We can get both inequalities for $\Theta(\sqrt{n})$, though: $$\sqrt{n}=\dfrac{n}{\sqrt{n}}=\dfrac{n}{2\sqrt{n}-\sqrt{n}}\ge\dfrac{n}{2\sqrt{n}-1}\ge \dfrac{n}{2\sqrt{n}}=\dfrac{\sqrt{n}}{2}.$$ Therefore, $f(n)=\Theta(\sqrt{n})$.