0 0 votes T(n) = T(n/2)+2n find the complexity? A) O(n log n) B)O(n2) C)O(2n) D) O(n) Unknown Category + – anup9544 931 views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply mcjoshi commented Oct 16, 2016 reply Follow flag @anup here, we are reducing the problem by half in each step and we are doing some work of $O(2^n)$. So, it's sufficient enough here to say that (C) is answer. 0 0 replyShare anup9544 commented Oct 16, 2016 reply Follow flag Thank you.. 0 0 replyShare amitlko commented Oct 16, 2016 reply Follow flag @mcjoshi, I got the logic. Is it possible to solve this recurrence relation by substitution? 0 0 replyShare anup9544 commented Oct 16, 2016 reply Follow flag Is it possible by master's theorem 3rd case? 0 0 replyShare mcjoshi commented Oct 16, 2016 i edited by mcjoshi Oct 16, 2016 reply Follow flag Yes, it is possible to do it using substitution and for master's theorem see example-3 here 0 0 replyShare Please log in or register to add a comment.
0 0 votes by applying master theorem if n^logb(a) is >f(n) then tc=o(n^logb(a)) else n^logb(a)==f(n) then tc=o(n^logb(a)logn) else o(f(n)) coming to given problem n^log2(1)<2^n then TC=O(2^n) santhoshdevulapally answered Nov 1, 2016 santhoshdevulapally comment Share Follow 0 reply Please log in or register to add a comment.