2 2 votes Which of the given options provides the increasing order of asymptotic complexity of functions $f1$, $f2$, $f3$ and $f4$? $f1(n) = 2^n \\ f2(n) = n^{(3/2)} \\ f3(n) = nlogn \\ f4(n) = n^{(logn)}$ How $n^{3/2}$ is greater than $n^{logn}$ Algorithms algorithms time-complexity + – shipra tressa 2.7k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Anand. commented Jun 18, 2018 reply Follow flag is the answer $f_1 > f_4> f_2> f_3 ????$ 0 0 replyShare arungate commented Jun 18, 2018 reply Follow flag @shipra tressa $n^\frac{3}{2}$ is not greater than $n^{log n}$ I think. May I know what is the answer given for this? 0 0 replyShare Please log in or register to add a comment.
2 2 votes Increasing order of asymptotic complexity of these functions is $f3<f2<f4<f1$. ie; $nlogn < n^{3/2} < n^{logn} < 2^n $. Let's see how: To check this, choose a value of $n$ which is positive and a fairly large one. A power of $2$ is preferred. I am taking $2^{16}$. $f3 \rightarrow nlog n \Rightarrow$ $2^{16} log (2^{16}) = 2^{16}$ x $2^4 = 2^{20}$ $f2 \rightarrow n^{3/2} \Rightarrow$ $ (2^{16})^{\frac{3}{2}} = 2^{24}$ $f4 \rightarrow n^{log n} \Rightarrow$ $ (2^{16})^{log({2^{16}})} = (2^{16})^{16} = 2^{256}$ $f1 \rightarrow 2^n \Rightarrow$ $2^{(2^{16})} = 2^{65536}$ arungate answered Jun 18, 2018 • edited Jun 18, 2018 by arungate arungate comment Share Follow See all 12 Comments 12 12 Comments reply Show 9 previous comments arungate commented Jun 24, 2018 reply Follow flag Ok, thanks a lot for the explanation @ankitgupta.1729. 1 1 replyShare srestha commented Jun 25, 2018 reply Follow flag @ankit another point according to cormen "we cannot compare the functions $n$ and $n^{1+sinn}$ using asymptotic notation, since the value of the exponent in $n^{1+sinn}$ oscillates between $0$ and $2$, taking on all values in between.." Similar case happens for $n^{logn}$ too right? 0 0 replyShare ankitgupta.1729 commented Jun 26, 2018 reply Follow flag @srestha , no. In nlogn , both n and logn are strictly increasing increasing function, so overall nlogn is also increasing. we can check it by graph by putting values of n...but graph of sin n oscillates. sometimes increasing and sometimes decreasing. so we don't know the asymptotic nature when n tends to infinity. (or) if we apply the above definition of these non-negative functions, then $\lim_{n\rightarrow \infty } sinn$ does not exist . but $\lim_{n\rightarrow \infty } logn = \infty$ . Now we can't apply L'Hopital's rule because then $\lim_{n\rightarrow \infty } cosn$ does not exist. and no other trick will work because we don't know which particular value it is going to... ................................................................. In algorithms , n and f(n) are always non-negative and f(n) should be monotonically increasing function of running time because when input size increases then machine will take more time to process it. so it can't be decreases. 0 0 replyShare Please log in or register to add a comment.