How would I go about proving these.

31 Views Asked by At

I need to prove or disprove these two problems, but I'm not sure I did it right. $$(a).\quad f(n) = 2^n+1 = O(2^n)\\ (b).\quad f(n) = 2^n+1 = Θ(2^n) .$$

What I tried for the first one is, $2^n+1/2^n \le C$ when $K>1$, and then get stuck.

I think I'm just having trouble proving BigO

2

There are 2 best solutions below

3
On

$2^{n+1}\leq 3\times 2^n$ for all $n$. So, $2^{n+1}=O(2^n)$

0
On

$${2^{n}+1 \over 2^n}=1+{1\over{2^n}}\le 1+{1\over{2}}={3\over 2}$$ that is $$2^{n}+1\le {3\over 2}\times 2^n$$