Solving asymptotic notation based on a given constant

31 Views Asked by At

How does one show that $(n + b)^2 = Θ(n^2)$ is for any real constant b?

2

There are 2 best solutions below

0
On

It suffices to note that $\lim_{n \to \infty}\frac{(n+b)^2}{n^2}$ is finite and non-zero. In particular, we find that $\lim_{n \to \infty}\frac{(n+b)^2}{n^2} = 1$.

0
On

First, let's reduce the equation:

$(n + b)^2 = n^2 + 2nb + b^2$

We observe that $n^2$ is the biggest term that grows faster than the other two terms. We also observe that this term is a tight bound by looking at its growth compared to the equation. Therefore, the asymptotic complexity of this equation is $\Theta(n^2)$.