Prove or disprove the following asymptotic relations

218 Views Asked by At
  1. $P(x) = 2^x$ Prove or disprove that $p(n^3 + 4) \in O\left(p\left(n^3\right)\right)$

$2^{(n^3 + 4)} \in O(2^{n^3})$

$\lim_{n \rightarrow \infty} \space \frac{2^{n^3 + 4}}{2^{n^3}}$

using L'Hopital's rule, $\lim_{n \rightarrow \infty} \space \frac{2^{n^3 + 4}}{2^{n^3}} = 1/4$

Therefore it is $O(p(n^3))$


  1. Prove or disprove that if $f(n) \in O(g(n))$ then $f(n) + n \in O(g(n) + n)$

This is one I'm less sure about. We know that $f(n) \leq c * g(n)$ and $n \leq c*n$ since $f(n) \in O(g(n))$ and $n \in O(n)$ Then $f(n) + n \in O(g(n) + n)$

Seems flawed by how short it was (i know thats bad logic but it was worth 8 marks)

2

There are 2 best solutions below

0
On

Suppose your small "p" is your big "p". Since $2^{n^{3}+4}/2^{n^{3}} = 2^{4}$, so in fact $2^{n^{3}+4} = O(2^{n^{3}})$ for all $n \geq 1$.

0
On

for 2)

$f(n) \leq c * g(n)$ and $n \leq d * n$ since $f(n) \in O(g(n))$ and $n \in O(n)$ then $f(n) + n \leq c *g(n) + d * n$


is there anyway I can say that since $n \leq d*n$ can work for any d greater than $0$ that if $c = d$ then it follows that $f(n) + n \leq c * (g(n) + n)$ and that it proves that $f(n) + n \in O(g(n) + n)$ ?