Compare the growth of the functions

PUBLISHED: MAY 2, 20261 MIN READ

DAA Assignment 1Compare the growth of the functions and lett(n) = g(n) = This is an form, so apply L'Hopital's RuleApply L hopital Ruledifferentiate the numer

Divya Sachan
Divya SachanAuthor
ludicolo
#272
ludicolo

DAA Assignment 1

Compare the growth of the functions and

let
t(n) =
g(n) =
limnt(n)g(n)=limnn2nlog2n\lim_{n\to\infty}\frac{t(n)}{g(n)}=\lim_{n\to\infty}\frac{n^2}{n\log_2n}

This is an form, so apply L'Hopital's Rule

Apply L hopital Rule

differentiate the numerator

t(n)=ddnn2=2nt^{\prime}(n)=\frac{d}{dn}\cdot n^2=2n

Differentiate thedinominator

t(n)g(n)=2nlog2n+1ln2\frac{t'(n)}{g'(n)}=\frac{2n}{\log_2n+\frac{1}{\ln{2}}}
limnt(n)g(n)=\lim_{n\to\infty}\frac{t^{\prime}\left(n\right)}{g^{\prime}(n)}=\frac{\infty}{\infty}

Apply L hopital Rule, Again

t=a+bt^{}=a+b
t(n)=ddn2nt^{}\left(n\right)=\frac{d}{dn}\cdot2n
t(n)=2\boxed{t^{}(n)=2}
g"(n)=ddn(log2n+1ln2)g"(n)=\frac{d}{dn}\left(\log_2n+\frac{1}{\ln{2}}\right)
g"(n)=ddnlog2n+0g"(n)=\frac{d}{dn}\log_2n+0
g"(n)=1nln2\boxed{g"(n)=\frac{1}{n\ln{2}}}
t"(n)g"(n)=2(1/nln2)\frac{t"(n)}{g"(n)}=\frac{2}{\left(1/n\ln2\right)}
t"(n)g"(n)=2nln2\frac{t"(n)}{g"(n)}=2\cdot n\ln2
limn=\lim_{n\to\infty}=\infin
 implies t(n) has larger order of growth than g(n)\boxed{\infin\text{ implies t(n) has larger order of growth than g(n)}}
t(n)>g(n)t(n)>g\left(n\right)
n2>nlog2nn^2>n\log_2n
let
t(n) =
g(n) =
limnt(n)g(n)=limnn23n\lim_{n\to\infty}\frac{t(n)}{g(n)}=\lim_{n\to\infty}\frac{n^2}{3^{n}}

This is an form, so apply L'Hopital's Rule

Apply L hopital Rule

differentiate the numerator

t(n)=ddnn2=2nt^{\prime}(n)=\frac{d}{dn}\cdot n^2=2n

Differentiate the Denominator

g(n)=ddn3ng^{\prime}(n)=\frac{d}{dn}\cdot3^{n}
g(n)=3nln3g^{\prime}(n)=3^{n}\ln3
t(n)g(n)=2n3nln3\frac{t'(n)}{g'(n)}=\frac{2n}{3^{n}\ln{3}}
limn2n3nln3=\lim_{n\to\infty}\quad\frac{2n}{3^{n}\ln{3}}=\frac{\infty}{\infty}

Apply L hopital Rule, Again

t"(n)=ddn2n=2t"(n)=\frac{d}{dn}\cdot2n=2
g"(n)=ddn3nln3g"(n)=\frac{d}{dn}3^{n}\ln3
g"(n)=ln3ddn3ng"(n)=\ln{3}\frac{d}{dn}\cdot3^{n}
g"(n)=ln33nln3g"(n)=\ln{3}\cdot3^{n}\cdot\ln3
g"(n)=(ln3)23ng"(n)=(\ln{3})^2\cdot3^{n}
t"(n)g"(n)=2(ln3)23n\frac{t"(n)}{g"(n)}=\frac{2}{(\ln{3})^2\cdot3^{n}}
limn=2\lim_{n\to\infty}=\frac{2}{\infin}
limn=0\lim_{n\to\infty}=0
0 implies t(n) has smaller order of growth than g(n)\boxed{\text{0 implies t(n) has smaller order of growth than g(n)}}
t(n)<g(n)t(n)<g\left(n\right)
n2<3nn^2<3^{n}

Result

FunctionOrder of Growth
Highest
Highest
Smallest