Solution to solve the following recurrence relations a. 𝑇(𝑛) = 𝑇( 𝑛/4) + 𝑇( 𝑛/2 ) + … - Sikademy
Author Image

Archangel Macsika

solve the following recurrence relations a. 𝑇(𝑛) = 𝑇( 𝑛/4) + 𝑇( 𝑛/2 ) + 𝑛^2 b. T(n) = T(n/5) + T(4n/5) + n c. 𝑇(𝑛) = 3𝑇( n/4 ) + 𝑐𝑛^2 f. 𝑇(𝑛) = (𝑛/π‘›βˆ’5) * 𝑇(𝑛 βˆ’ 1) + 1 g. 𝑇(𝑛) = 𝑇(log 𝑛) + log 𝑛 h. 𝑇(𝑛) = 𝑇 (𝑛^ 1/ 4) + 1 i. 𝑇(𝑛) = 𝑛 + 7 βˆšπ‘› βˆ™ 𝑇(βˆšπ‘›) j. 𝑇(𝑛) = 𝑇 ( 3𝑛/4 ) + 1/root(n)

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question

a.

T(n)=n^2+5n^2/16+25n^2/256+...=n^2/(1-5/16)

T(n)=O(n^2)


c.

Comparing withΒ T(n)=aT(n/b)+f(n)Β :

a=3,b=4

so, we have:

f(n)=\Omega(n^{log_ba})=\Omega(n^{log_43})

by Master Theorem:

T(n)=\Theta(f(n))=\Theta(n^2)


b.


additive term is exactly the current subproblem size, so T(n) is simply the sum of all numbers that appear in this tree. the:

T(n)\ge nlog_5nΒ andΒ T(n)\le nlog_{5/2}n

so,

T(n)=\Theta(nlogn)


g.

for the upper bound:

T(n)=O(logn)

alsoΒ T(n)=\Omega(logn)

so,

T(n)=\Theta(logn)


j.

using Master Theorem:

f(n)=O(n^{log_{4/3}3})

so,

T(n)=\Theta(n^{log_{4/3}3})


h.

𝑇(𝑛) = 𝑇 (𝑛^{ 1/ 4}) + 1=𝑇 (𝑛^{ 1/ 16}) + 2=𝑇 (𝑛^{ 1/ 64}) + 3=𝑇 (𝑛^{ 1/ 4^n}) + n

T(n)=O(n)


i.

𝑇(𝑛) = 𝑛 + 7 𝑇(\sqrt𝑛)\sqrt n=7\sqrt n(7T(n^{1/4})n^{1/4}+n^{1/2})+n=


=7^kn^{1/2+1/4+1/8+...+1/2^k}T(n^{1/2^k})+...+n


1/2+1/4+1/8+...+1/2^k=1-1/2^k


letΒ n^{1/2^k}=2Β , then:

𝑇(𝑛)=7^nT(2)n/2+...+n

𝑇(𝑛)=O(7^nn)


f.

𝑇(𝑛) = (𝑛/(π‘›βˆ’5)) 𝑇(𝑛 βˆ’ 1) + 1


T(n)=(\frac{n}{n-5})^{n-1}T(1)+(\frac{n}{n-5})^{n-2}+...+1


T(n)=O(1)

Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-514-qpid-400