GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
316 views
Where c is constant.
asked in Algorithms by (311 points)   | 316 views

1 Answer

+8 votes
Best answer

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

answered by Boss (6.9k 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)$.


Top Users May 2017
  1. akash.dinkar12

    3166 Points

  2. pawan kumarln

    1648 Points

  3. sh!va

    1600 Points

  4. Arjun

    1380 Points

  5. Bikram

    1372 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1132 Points

  8. Angkit

    1044 Points

  9. LeenSharma

    900 Points

  10. srestha

    714 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    458 Points

  2. pawan kumarln

    274 Points

  3. Ahwan

    236 Points

  4. Arnab Bhadra

    234 Points

  5. bharti

    190 Points


22,778 questions
29,106 answers
65,165 comments
27,647 users