• edited by
2,358 views
2 2 votes
On solving the Recurance

T(n) = 3T(n/4) + cn2

I was stuck at summation

$\sum_{i=0}^{log_4 n} (\frac{3}{16})^{i} cn^{2}$

Can someone could help ?

4 Answers

5 5 votes
$\sum_{i=0}^{log_4 n} (\frac{3}{16})^{i} cn^{2}$

$\Rightarrow cn^2\Bigg [ 1 + \frac{3}{16} + \frac{3}{16}^2 + \dots + \frac{3}{16}^k \Bigg]$ ($\color{green}{k = log_4n}$)

$\Rightarrow \large cn^2 \Bigg [ \frac{1 - (\frac{3}{16})^{log_4n + 1}}{1 - \frac{3}{16}} \Bigg ]$

$\Rightarrow \frac{16}{13}cn^2 \Bigg [ 1 - (\frac{3}{16})^{log_4n}*\frac{3}{16} \Bigg ]$

$\Rightarrow \frac{16}{13}cn^2 \Bigg [ 1 - n^{log_4\frac{3}{16}}*\frac{3}{16} \Bigg ]$

$\Rightarrow \frac{16}{13}cn^2 \Bigg [1 - n^{log_43 - 2}*\frac{3}{16} \Bigg ]$

$\Rightarrow \large \frac{16}{13}cn^2*\Bigg [\frac{16-3*\frac{n^{log_43}}{n^2}}{16} \Bigg ]$

$\color{navy}{\large \Rightarrow \frac{c}{13} \Bigg [ 16n^2 - 3n^{log_43} \Bigg ]}$
• edited by
4 4 votes


NOTE: 

  • No need to do this calculation 
  • With $\text{ratio} < 1$ a sum of $GP$ series evalutes to $\Theta(1)$
• edited by
0 0 votes

You should Use directly Master's Algo in this type of Questions

a=3,b=4,k=2,p=0

a<bk

Complexicity = O(n2log0n)=O(n2)

Position:
Show:

Related questions

3 3 votes
2 answers 2 answers
2.7k
2.7k views
Diksha Aswal asked Jul 3, 2017
2,743 views
T(n) = T(n/3)+T(2n/3)+n What is the solution of Above Given recurrence relation?Give full method to solve this
6 6 votes
2 answers 2 answers
1.8k
1.8k views
indrajeet asked Feb 1, 2017
1,759 views
Let T(n) be defined by T(0) = T(1) = 4 and $T(n) = T(\left \lfloor \frac{n}{2} \right \rfloor) +T(\left \lfloor \frac{n}{4} \right \rfloor) + cn$ for all integers n >=2,...
3 3 votes
2 answers 2 answers
1.1k
1.1k views
pC asked Jan 15, 2016
1,122 views
an = an-1 + n , n>=1a0=2Find a100... ?SolutionI actually wanted to know what is wrong with this method .Could you pls help Whats wrong here .T(n) = T(n-1)+nand back su...
0 0 votes
1 1 answer
9.2k
9.2k views
PEKKA asked Dec 6, 2016
9,194 views
Solve the following Recurrence Equation using back substitution methodT(n)= T(n-1)+log n​