show whether $n2^n = 2^{O(n)}$ is true or not.
In my opinion, it's false because O(n) can be n and thus the equality will be wrong, because $n2^n$ grows much faster than $2^n$
show whether $n2^n = 2^{O(n)}$ is true or not.
In my opinion, it's false because O(n) can be n and thus the equality will be wrong, because $n2^n$ grows much faster than $2^n$
One way, if you want to prove that $n2^n \in 2^{\mathcal{O}(n)}$, is to show that there exists a $c \in \mathbb{R}$ such that $n2^n \le 2^{cn}$ for all $n$ greater than some $n_0 \in \mathbb{N}$.
Correspondingly, if you want to show the contrary, then you have to show that such a $c$ does not exist. However, we will see that the statement is true.
Choose $c = 2$, i.e., we ask whether $n2^n \le^? 2^{2n} = 4^n$ for all $n > n_0$. We know that $n \le 2^n$ for all $n \in \mathbb{N}$. Therefore, it also holds that $n2^n \le 2^n\cdot 2^n = 2^{2n}$. Hence, we have an upper bound for the function $n2^n$ by choosing $c = 2$. In this case, we can set $n_0 = 1$, for instance.
The main issue here is to read that awful abuse of notation in the "right" way.
Let me translate:
Show whether $n2^n \in O(2^{f(n)})$ for some $f \in O(n)$.
That is, we understand
$\qquad\displaystyle 2^{O(g)} := \{ f \mid f \in O(2^{h(n)}), h \in O(g) \}$.
Note how, in particular, $c^n \in 2^{O(n)}$ with $f : n \mapsto n \cdot \log_2 c$ for all $c>1$.
The rest is mechanical.