for $f(n) = (3n-7)/(n+4)$ and $g(n) = 4$, is g = O(f)?

37 Views Asked by At

I am stuck on this problem.

$f(n) = \frac {3n-7}{n+4}$ and $g(n) = 4$, is $g = O(f)$?

when I take the $\lim_{n\to\infty} {g(n) \over f(n)}$, then it's a constant ${4 \over 3}$ which is less then infinity and satisfies the definition of $g = O(f)$.

But I cannot find any $c$ or $n_0$ which can satisfy the inquality $c · f (n) ≥ |g(n)|$, for all $n \geq n_0$

1

There are 1 best solutions below

0
On

$f(n) = \frac{3n-7}{n+4} \geq \frac{3n-7}{2n} = 1.5-\frac{7}{2n} \geq 1$. for $n \geq 7$.

So $g(n) \leq 4f(n)$

Cheers !