3

I tried to prove $f(n) = 4^n + 5n^2 \log n$ is not $O(2^n ).$ by using contradiction.

$4^n + 5n^2 \log n \le C \cdot 2^n$ for $n\ge k$

Then, divide by $2^n$

$2^n \le C - \frac{(5n^2 \cdot \log n)}{2^n}$ for $n\ge k$

but I stuck here. How can I move?

  • 1
    Hint: pick $n$ so that $2^n>C.$ – Thomas Andrews Nov 29 '21 at 19:01
  • @ThomasAndrews how can i pick arbitrary C ? –  Nov 29 '21 at 19:04
  • 3
    Who said $C$ is aebitrary? I said pick $n.$ You are doing a proof by contradiction. So you are assuming there is some $C,k$ with the condition true. Then you are trying to get a contradiction. – Thomas Andrews Nov 29 '21 at 19:06
  • 1
    It would help if you used punctuation and capital letters. Twice I’ve read tour post and read “… $k$ divide by $2^n$ …” as instructions, rather than what I think you meant, “…$k.$ Divide by $2^n,$ getting…” – Thomas Andrews Nov 29 '21 at 19:09
  • 1
    Curious - why was this downvoted? An honest attempt was made. – Alvin Jin Nov 29 '21 at 19:27
  • 1
    Please do not scuttle your own question by deleting all of its content ! I'm forced to rollback it. – zwim Nov 29 '21 at 20:29

2 Answers2

2

From the last step you get $2^n<C$ for $n\ge k$. Put $n=\max\{\log_2C+1,k\}$ to get a contradiction.

Martund
  • 14,706
  • 2
  • 13
  • 30
1

You can prove that $f(n) \notin O(g(n))$ by saying that $f(n) \in \omega(g(n))$.

To do this we will have to find $\omega$ by using its definition which is stated as: $\omega(g(n))$ is found when $C >0, \exists k, k\ge 1$ such that $0 \le f(n) > C \cdot g(n), \forall n \ge k$. In English we need to show all of $C$ and $k$ are not in $O(g(n))$.

We can do this by the following:

$f(n) < C \cdot g(n) \space \forall n \ge k \\ 4^n + 5 n^2\cdot \log n > C \cdot 2^n \space \forall n \ge k\\ \text{We see that there is an inequality so we can say,} \\ 4^n + 5n^2\log n > 4^n + 5n^2 > 4^n > C\cdot 2^n \\ \text{Then, } 4^n > C \cdot 2^n \to 2^n > C \to \log_2(2^n) > \log_2(C) \to n > \log_2(C) \\ \text{We have shown that we have a $n$ and now we will choose a k that will be greater than our $C$.} \\ \text{Say, } k = \log_2(C)+1, \text{then } n > \log_2(C) \space \forall n \ge \log_2(C) +1 \\ \therefore 4^n + 5n^2 \cdot \log n \in \omega(2^n) \text{ meaning } 4^n + 5^n \cdot \log n \notin O(2^n).$

James
  • 742