retagged by
400 views
0 votes
0 votes
T(1) = 1 T(n) = 2T(n - 1) + n, n ≥ 2 evaluates to

(a) 2n + 1 - n – 2

(b) 2n – n

(c) 2n + 1 – 2n – 2

(d) 2n – n     

HOW TO EVALUATES USING MASTER THEOREM
retagged by

1 Answer

0 votes
0 votes
You can do it without using Master's theorem.

Just do repeated substitutions.

After $k$ iterations, your recurrence will be:

$T(n) = 2^k\times T(n-k) + n(1 + 2 + 4 + \dots + 2^k)$.

The base case for this is satisfied when $n - k = 1$ or $k = n -1$.
You can substitute this in the original equation to get the answer in terms of $n$.

Related questions

1 votes
1 votes
1 answer
1
ItzDc asked Jun 3, 2022
2,986 views
I can't figure out how to proceed and which case it's falling under after calculating h(n)
0 votes
0 votes
0 answers
2
rexritz asked Aug 13, 2023
303 views
$T\left ( n \right )= 8T\left ( \frac{n}{2} \right )+\left ( n\cdot logn \right )^{2.99}$Also can $\mathcal{O}(n^{3})$ be an upper bound to above recurrence relation?
0 votes
0 votes
1 answer
3
lucasbbs asked Feb 28, 2022
6,816 views
How do I apply the master theorem in the above recurrence? Please give details about which case and on hiow to solve the asymptotic analysis...