in Algorithms edited by
432 views
0 votes
0 votes

 

Which of the given options provides the increasing order of asymptotic complexity of functions $\text{f}_{1}, \text{f}_{2}, \text{f}_{3}$ and $ \text{f}_{4} $ ?

$\text{f}_{1} = 2^{n}, \qquad \text{f}_{2} = n^{\lg n}, \qquad \text{f}_{3} = n^{\sqrt{n}}, \qquad \text{f}_{4} = n^{2}$

  1. $\text{f}_{2}, \text{f}_{3}, \text{f}_{1}, \text{f}_{4}$
  2. $\text{f}_{4}, \text{f}_{2}, \text{f}_{3}, \text{f}_{1}$
  3. $\text{f}_{3}, \text{f}_{2}, \text{f}_{1}, \text{f}_{4}$
  4. $\text{f}_{4}, \text{f}_{3}, \text{f}_{2}, \text{f}_{1}$
in Algorithms edited by
by
432 views

1 comment

Simply we can take the log and can evaluate.
0
0

1 Answer

0 votes
0 votes

$ f1=2^n, f2=n^(logn)  ,     f3=n^√n  ,    f4=n^2  $

lets check for large value of n i.e $2^6$

$f1=2^(64),  f2=(2^5)^6,   f3=(2^6)^8,   f4=(2^(12)) $

$f1= 2^(64),f2=2^(30) f3=,2^(48),f4=2^(12) $

Increasing Order of Asymptotic complexity:

f4<f2<f3<f1

Hence B is the correct option.

Answer:

Related questions