in Algorithms retagged by
1,045 views
2 votes
2 votes

in Algorithms retagged by
1.0k views

4 Comments

you take, $n=10^{50}$ then tell me which one is larger.

the method you are following to compare asymptotic complexity is not reliable.
0
0

@joshi_nitish

$1)n^{\sqrt{n}}$=$10^{50}$$^{\sqrt{10^{50}}}$

=$\left ( 10^{50} \right )^{50/2}$=$\left ( 10^{50} \right )$$^{25}$=101250
$2)$ $2^{n}$ =$2^{10}$$^{50}$=2500

Now, see which one greater

1 st one

right?

0
0

srestha 

for n=1050

nn/2=n25=101250

2= ${{2}^{10}}^{50}$=(210........(50 times) )

2nd one is greater

0
0

1 Answer

4 votes
4 votes
Best answer

$1)$ $n^{\sqrt{n}}=2^{\sqrt{n}.logn}$

$2)$ $2^{n}$

$3)$ $n^{10}.2^{n/2}=2^{(10.logn+n/2)}$

$4)$ $\frac{n.(n+1)}{2}-1$


Last one is trivial so comparing the exponent part of first $3$.

$\Rightarrow \sqrt{n}logn$

$\Rightarrow n=\sqrt{n}.\sqrt{n}$


$\Rightarrow 10.logn+\frac{n}{2} \approx \frac{n}{2}=\frac{1}{2}(\sqrt{n}.\sqrt{n})$

$\therefore logn<\frac{\sqrt{n}}{2}<\sqrt{n}$

$\Rightarrow$ $1<3<2$


$\color{Red}{4<1<3<2}$

selected by

4 Comments

@saxena sir

how you converted n^sqrt(n)   to    2^sqrt(n).logn

please explain
0
0
$\Large\rightarrow n^{\sqrt{n}}\rightarrow2^{log_2{n^{\sqrt{n}}}}\rightarrow2^{\sqrt{n}.log_2n}$
1
1
@saxena

u can see this algebric formula

$\left ( a^{x} \right )^{y}=a^{xy}$

I know u used right associativity as per C precedence

but according to algebric formula multiplication of power should applicable

That point what do ur view??
0
0

Related questions