527 views

1 Answer

Best answer
4 votes
4 votes

> 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.

 

selected by

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
0 answers
3
akash.dinkar12 asked Apr 4, 2019
263 views
Prove that the running time of an algorithm is $\Theta (g(n))$ if and only if its worst-case running time is $O(g(n))$ and its best-case running time is $\Omega(g(n))$.
0 votes
0 votes
2 answers
4
akash.dinkar12 asked Apr 4, 2019
614 views
Explain why the statement, “The running time of algorithm A is at least $O(n^2),$” is meaningless.