retagged by
1,151 views
0 votes
0 votes

How to solve this recurrence relation

T(n)= T(0.09n) + T(0.91n) + cn

where c is constant and T(1)=1

options are-

retagged by

1 Answer

Best answer
5 votes
5 votes

Answer: Both Option A and Option B.

The total cost becomes = $n.log_{0.91}(1/n)$.

Now we can say : $n\log_{0.09}\frac{1}{n}\leq T(n)\leq n\log_{0.91}\frac{1}{n}$

Thus, $O(n.log_{0.91}(1/n))$ and  $\Omega(nlog_{0.09}\frac{1}{n})$

-------------------------------------------------------------------------------------------------------------------------------------------------

Attaching the proof by @Kabir5454 for $\Theta(n.log_{0.91}(1/n))$ or $\Theta(n.log_{0.09}(1/n))$:-

Lets do it formally ,

as already explained $\Omega (n.\frac{\log_{a}n}{\log_{a}\frac{100}{9}})$[ a is some constant base]

$T(n)=O (n.\log_{\frac{100}{91}}n)=O(n.\frac{\log_{a}n}{\log_{a}\frac{100}{91}})=O(n\log_{a}n)$

So,we know ,

$T(n)=Θ(f(n))$ if and only if $T(n)=Ω(f(n)) $ and $T(n)=O(f(n))$ .

So we can conclude ,$T(n)=\Theta(n \log_{a}n).$

This also proof option (B) is true .if we put $a=100/9 .$

 

selected by
Answer:

Related questions

2 votes
2 votes
1 answer
1
0 votes
0 votes
0 answers
4