Answer to Question #283947 in Discrete Mathematics for Rambo

Question #283947

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)



1
Expert's answer
2022-01-18T06:13:49-0500

a.





so, we have geometric series:

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

"T(n)=\\Theta(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 recursion tree:

there areΒ "log^*(n)"Β Β levels, and each subproblem at level i has one problem of sizeΒ "log^{(i)}n"

whereΒ "log^{(i+1)}n=log(log^{(i)}n)"Β andΒ "log^{(i)}n=logn"

So, the upper bound we have:

"T(n)=logn+T(logn)=O(\\displaystyle \\sum^{log^*(n)}_{i=0}log^{(i+1)}n)=O(logn)"

This is true becauseΒ "logn<1\/2"Β for large n, andΒ "log^{(i+1)}n<\\frac{1}{2^i}logn"Β and use geometric series.Β 

Also,Β "T(n)=\\Omega (logn)"

so,

"T(n)=\\Theta(logn)"


j.

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

"a=1,b=4\/3"

"f(n)=1\/\\sqrt n"

so, we have:

"log_ba=log_{4\/3}1=0"

"n^{log_ba}=n^{log_{4\/3}1}=1"

"f(n)=O(n^{log_ba})=O(n^{log_{4\/3}1})=O(1)"

then, by Master Theorem:

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


h.

"\ud835\udc47(\ud835\udc5b) = \ud835\udc47 (\ud835\udc5b^{ 1\/ 4}) + 1=\ud835\udc47 (\ud835\udc5b^{ 1\/ 16}) + 2=\ud835\udc47 (\ud835\udc5b^{ 1\/ 64}) + 3=\ud835\udc47 (\ud835\udc5b^{ 1\/ 4^n}) + n"

"T(n)=O(n)"


i.

"\ud835\udc47(\ud835\udc5b) = \ud835\udc5b + 7 \ud835\udc47(\\sqrt\ud835\udc5b)\\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:

"\ud835\udc47(\ud835\udc5b)=7^nT(2)n\/2+...+n"

"\ud835\udc47(\ud835\udc5b)=O(7^nn)"


f.

"\ud835\udc47(\ud835\udc5b) = (\ud835\udc5b\/(\ud835\udc5b\u22125)) \ud835\udc47(\ud835\udc5b \u2212 1) + 1"


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


"T(n)=O(1)"

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS