edited by
538 views

1 Answer

Best answer
4 votes
4 votes
$$\def\t#1{T\left (n/3^{#1}\right )}
\begin{align}
T(n) &= 5\cdot \t1 + 7\\[1em]
\hdashline
&= 5 \times \Biggl (5\cdot \t2 + 7 \Biggr )  + 7\\[1em]
&= 5^2 \cdot \t2 + 5^1 \cdot 7 + 7\\[1em]
\hdashline
&= 5^2 \times \Biggl (5\cdot \t3 + 7 \Biggr )  + 5^1 + 7\\[1em]
&= 5^3 \cdot \t3 + 5^2 \cdot 7 + 5^1 \cdot 7 + 7\\
\hdashline\\[1em]
&\vdots\\
&= 5^k\cdot\t k + 7 \cdot \sum_{i=0}^{k-1} 5^i
\end{align}$$

When $k = \log_3 n$, we have:

$$\begin{align}
T(n) &= 5^{\log_3 n}\cdot T(1) + 7 \cdot \sum_{i=0}^{(\log_3 n)-1} 5^i\\[1em]
&= 5^{\log_3 n}\cdot T(1) + 7 \times \left ( \frac{5^{1 + (\log_3 n - 1)} - 1}{5 - 1} \right )
\end{align}$$

It is given that $T(1) = 5$, hence, we get:

$$\begin{align}
T(n) &= \frac1 4 \cdot \Bigl ( (4\cdot 5 + 7) \cdot 5^{\log_3 n}  - 7\Bigr )\\[1em]
&= \frac1 4 \cdot \Bigl(27 \cdot n^{\log_3 5} - 7 \Bigr )\\[1em]
&\lessapprox \frac1 4 \cdot \Bigl (27 \cdot n^{1.465} - 7 \Bigr )
\end{align}$$
selected by

Related questions

1 votes
1 votes
1 answer
1
iarnav asked Jul 29, 2017
2,509 views
Given RR as -T(n) = 2T(n/2)+n ; n>1T(1) = 1Solve this using only BACK SUBSTITUTION method? Note - I am stuck at T(n)= 2^k.T(n/2^k)+(2^k-1).nand I'm putting 2^k=n Please h...
2 votes
2 votes
1 answer
2
indrajeet asked Feb 10, 2016
540 views
T(n) = 2*T(n/2) + n*logn please explain
1 votes
1 votes
0 answers
3
0 votes
0 votes
0 answers
4
rexritz asked Aug 13, 2023
315 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?