retagged by
501 views

2 Answers

1 votes
1 votes
$\large T(n)=T(\frac{7n}{8})+0.05$

$\large T(n)=T(\frac{n}{\frac{8}{7}})+0.05$

$\large T(n)=T(\frac{n}{(\frac{8}{7})^{2}})+0.05+0.05$

$\large T(n)=T(\frac{n}{(\frac{8}{7})^{3}})+0.05+0.05+0.05$

After substituting k time ,

$\large T(n)=T(\frac{n}{(\frac{8}{7})^{k}})+k*0.05$

Now Let,

$\LARGE \frac{n}{(\frac{8}{7})^{k}}=1$

$\large n=(\frac{8}{7})^{k}$

taking $log$ with base $\large \frac{8}{7}$,

$\large k=\log_{\frac{8}{7}}n$

Now as we con

$\large T(n)=T(1)+k*0.05$

$\large T(n)=T(1)+\log_{\frac{8}{7}}n *0.05$

As nothing is mentioned Let $\large T(1)=c$,

$\large T(n)=c+\log_{\frac{8}{7}}n*0.05$

So, Time complexity is $\large \Theta (logn)$
0 votes
0 votes
A = 1 , B=8/7 , apply masters theorem.

Related questions

0 votes
0 votes
1 answer
1
Magma asked Dec 27, 2018
650 views
…………………………..
0 votes
0 votes
1 answer
2
Shubham Aggarwal asked Nov 13, 2018
1,233 views
Which of the following functions given by their recurrences grows the fastest asymptotically?$T(n) = 8T(n/4) + 100n^2$$T(n) = 81T(n/9) + 10n^2$$T(n) = 16T(n/4)+ 100(n \lo...
2 votes
2 votes
1 answer
3
0 votes
0 votes
1 answer
4