How would I go about proving this statement?

Θ(n) + O(n^2) ≠ Θ(n^2)

I know how to prove if given a function f(n) if it's big o but I do not understand how to go about this type of problem.

  • 2
    $\begingroup$ Welcome to Computer Science! What have you tried? Where did you get stuck? We do not want to just hand you the solution; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so we can not begin to help. See here for tips on asking questions about exercise problems. If you are uncertain how to improve your question, why not ask around in Computer Science Chat? $\endgroup$ – Raphael Sep 6 '16 at 8:21
  • 2
    $\begingroup$ What if you start by writing down the definition of Θ(n) and O(n)? Once you do this, the answer is blatantly obvious. $\endgroup$ – gnasher729 Sep 6 '16 at 8:26

Think of Θ and O as sets (the sets of function satisfying the asymptotic conditions) : you need to prove set difference, i.e. give a function in the left-hand part that does not belong to the right-hand part.

An example would be

$$ f(n) = n + n $$

Clearly $f(n) \in Θ(n) + O(n^2)$. However, $\frac{f(n)}{n^2} = 2/n$, which shows that $f(n)\not \in Θ(n^2)$.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.