The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+3 votes
457 views
Where c is constant.
asked in Algorithms by (341 points) | 457 views

1 Answer

+9 votes
Best answer

I am getting $\Theta$ (2^n) .

answered by Boss (7.2k points)
selected by
You should use $\Theta$ though $O$ is not wrong here :)
Done.
Very nicely explained. Thanks for the answer. :)
Sir ,how to get the intution while solving a recurrence whether we should use theta or Big-O ?And why  here theta is more appropriate ?
Unless we approximate we always get $\Theta$. Theta says = while O says <=. So, Theta is more appropriate if it can be used.
But theta(n) is used when T(n) =Omega(n) as well as O(n) , so seeing the above solution how to conclude that both of them are asymptotically same .
Here, it is other way. In the proof all statements were "=". So, finally we can say it is $\Theta(2^n)$ and hence $O(2^n)$ and $\Omega(2^n)$.


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,100 questions
36,904 answers
91,826 comments
34,770 users