• retagged by
2,933 views
0 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-

1 Answer

Best answer
5 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:
Position:
Show:

Related questions

2 2 votes
1 answers 1 answer
1.7k
1.7k views
1 1 vote
2 answers 2 answers
834
834 views
Utk asked Jan 20, 2016
834 views
$T(n)=2T(\frac{n}{2})+n\log n$ for n>=2 and T(1)=0, then T(n) is(a.) $O(n)$(b.) $O(n \log n)$(c.) $O( n (\log n)^{2})$(d.) $O(n^{2})$ Answer given is (c.) The solution is...
1 1 vote
1 1 answer
1.1k
1.1k views
Sajal Mallick asked Nov 28, 2023
1,121 views
Consider the problem that given a set Sof n integers and another integer x, whether or not there exist two elements in S whose sum is exactly x. What is the worst case ti...
0 0 votes
0 0 answers
533
533 views
Sajal Mallick asked Nov 28, 2023
533 views
What will be the complexity?Q. 8 Given a set $A=\left\{A_{1}, A_{2}, \ldots, A_{n}\right\}$ of $n$ activities with start and finish time ( $S i, f i$ ), $1 \leq i \leq n$...