> Is $2^{n+1} = O(2^{n})$ ?
- Yes.
- Reason : $\space 2 \cdot 2^{n} \le c \cdot 2^{n}$ where $c$ is a positive real number, $c \ge 2$ in this particular case.
> Is $2^{2n} = O(2^{n})$ ?
- No.
- Reason :
$2^{n+n} \le c \cdot 2^{n} $ where c is a positive real number. There's no such constant $c$ that satisfies this inequality.
Yes. You're right. It can be 3, 4, 5... etc. I stopped after 2 since we need only one. I'll edit the answer anyways. Thank you for pointing it out :p
64.3k questions
77.9k answers
244k comments
80.0k users