[Math] Find value of constant factor in asymptotic notation

algorithmsasymptotics

I have to find the value of constant factor $c_1$ and $c_2$ and $n_0$ in equation for which this equation satisfy:

$$c_1\leq \frac12 – \frac3n \leq c_2$$

Here $n\geq n_0$.

So for what value of $c_1, c_2 $ and $n_0$, this equation will hold,
Please help me out here.
This is question of chapter name Asymptotic notation, In korman book it's answer is $c_1 = 1/14$, $c_2=1/2$ and $n_0 =7$ , But I am not able to figure out here how he found that value of $c_1, c_2$ and $n_0$.

Thanks in advance

Best Answer

That $c_2=\frac{1}{2}$ is common sense.

You understand that the LHS i.e.$(\frac{1}{2}-\frac{3}{n}) \le \frac{1}{2}$, so take the limit

$\lim_{x \rightarrow \infty}(\frac{1}{2}-\frac{3}{n})=\frac{1}{2}$.

Now, once we fix $c_2$, $c_1$ will depend upon $n_0$. As Robert pointed out,$(\frac{1}{2}-\frac{3}{n})\le 0$ till $n_0\le 6$.Hence we have $n_0=7$ and accordingly $c_1=\frac{1}{14}$.

Related Question