31 31 votes The recurrence relation $T(1) = 2$ $T(n) = 3T (\frac{n}{4}) +n$ has the solution $T(n)$ equal to $O(n)$ $O (\log n)$ $O\left(n^\frac{3}{4}\right)$ None of the above Algorithms gate1996 algorithms recurrence-relation normal + – Kathleen 13.5k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply ashishtomarx commented May 7, 2024 reply Follow flag n^(logb a) = n^(log4 3) = n^e where e<1 f(n) = n hence, f(n) is polynomially greater then f(n). Extended Master's theorm CASE3: f(n)=Ω(n^(logb a)+e) e>0,then T(n)=Θ(f(n)) T(n)= Θ(n) 1 1 replyShare ꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂ commented Jun 7, 2024 i edited by P0535_Yedidyah_Sagar Jun 14 reply Follow flag $Log_{4}^{3}\approx .79$ which is less than the $1$ so according to master's theorem $T(n ) =\theta(F(n)$ it will be $\theta(N)$ 2 2 replyShare One_Last_Hope commented Jan 11 reply Follow flag This is one of gate beautiful question i never seen but let me give some clarity if here u use master's theorm u get theta notation but in question asking (O) notation if in case this is msq then if one option changed to O(n**2) then u need to select O(n^2) if use use master's theorm select theta(n) then here u get negative marks please keep in Mind 1 1 replyShare Please log in or register to add a comment.
Best answer 34 34 votes Answer: A According to Master theorem, $T(n) = aT(\frac{n}{b}) + f(n)$ can be expressed as: $T(n) = [n^{\log_ba}][T(1) + u(n)]$ where $u(n) = \Theta(h(n))$ where $h(n) = \frac{f(n)}{n^{\log_ba}} = \frac{n}{n^{\log_43}} = n^{1-\log_43}$ as $h(n) = n^r$ where $r>0$. So, $T(n) = [n^{\log_ba}][T(1) + u(n)] = T(n) = [n^{\log_43}][T(1) + \Theta(n^{1-\log_43})] = \Theta(n^{1})$. Rajarshi Sarkar answered Jun 3, 2015 • edited Nov 7, 2017 by kenzou Rajarshi Sarkar comment Share Follow See 1 comment 1 1 comment reply pavansan commented Nov 26, 2025 reply Follow flag for log a to the base b if a>b then value >1 and a = b then = 1 and a<b then <1 0 0 replyShare Please log in or register to add a comment.
49 49 votes Using Extended Master Theorem $T(n)=3T(\frac{n}{4})+n^{1} \log^{0} n$ $a=3 , b =4 , k=1 , p=0$ case 3 : $a<b^{k}$ is true case 3.a follows as $p=0$ Hence $T(n)$ is $\Theta (n^{1} \log^{0} ) \Rightarrow \Theta (n )$ pC answered Dec 30, 2016 pC comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments Verma Ashish commented Aug 21, 2018 reply Follow flag Yes dude 2 2 replyShare vishalshrm539 commented Jan 20, 2019 reply Follow flag @vupadhayayx86 Anything raised to the power 0 is 1. 2 2 replyShare palashbehra5 commented Aug 12, 2021 reply Follow flag @vishalshrm539 not 0 tho 1 1 replyShare Please log in or register to add a comment.
27 27 votes Master theorem: $n^{\log_4 3} < n$, so it is $O(n)$. Bhagirathi answered Oct 16, 2014 • edited Jun 3, 2015 by Rajarshi Sarkar Bhagirathi comment Share Follow See all 10 Comments 10 10 Comments reply Show 7 previous comments svas7246 commented Feb 17, 2021 reply Follow flag @haider000 3T(n/4) is different from T(3n/4) 0 0 replyShare haider000 commented Feb 17, 2021 reply Follow flag thanks, @svas7246 for mentioning, I really did not pay the attention and miss read the question, will correct it. 0 0 replyShare Rusty_01 commented Apr 28, 2022 reply Follow flag You have calculated depth of the tree wrong. It should be like this – depth of the tree getting reduced by n/4 at each level . And let’s say that at k th level size of our problem will hit 1 means T(1). then n/4^k = 1 and k = log n (base4) 0 0 replyShare Please log in or register to add a comment.
0 0 votes can directly use extended masters theorm as here a < b^k so t(n)=O(n^k log^p) [:- k=1,p=0] t(n)=O(n) ashwani kumar sharma answered Aug 8, 2018 ashwani kumar sharma comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes T(n) = 3T(n/4) + n Using Master's Method, n^log₄3 = n^0 = 1 Since, 1 < n Therefore T(n) = O(n) And Correct Option is A. amaanshaikh_27 answered Jun 29 amaanshaikh_27 comment Share Follow 0 reply Please log in or register to add a comment.