In: Computer Science
Does the Master theorem apply to the following recurrences. Justify your answer in each case. If it applies, then also state the case and the solution. (a) T(n) = √ nT(n/2)+logn, (b) T(n) = T(n/2+ 31)+log n, (c) T(n) = T(n−1)+T(n/2)+n and (d) T(n) = T(n/7)+T(5n/13)+n?
(a) T(n) = √nT(n/2)+logn This is not in the form of T(n) = aT(n/b) + f(n). because a must be a constant but here a is √n so, we can not apply master's theorem here. (b) T(n) = T(n/2+ 31)+log n we can modify T(n) = T(n/2+ 31)+log n to T(n) = T(n/2)+log n now we can apply the master's theorem here (c) T(n) = T(n−1)+T(n/2)+n This is not in the form of T(n) = aT(n/b) + f(n). because there are two T() terms in right hand side of the equation. so, we can not apply master's theorem here. (d) T(n) = T(n/7)+T(5n/13)+n This is not in the form of T(n) = aT(n/b) + f(n). because there are two T() terms in right hand side of the equation. so, we can not apply master's theorem here.