edited by
2,631 views
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}$

1 Answer

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}$
edited by
Position:
Show:

Related questions

1 1 vote
1 1 answer
113
113 views
GO Classes asked Aug 29
113 views
Consider Dijkstra's algorithm on a graph having $V$ vertices and $E$ edges.Suppose an indexed priority queue is not used.Instead, the tentative distances are stored only ...
0 0 votes
1 1 answer
468
468 views
Neeraj_patel asked Nov 14, 2024
468 views
What is the Time Complexity of the Dijkstra when it is using Adjacency list + Array (sorted or unsorted ) ? If it is O( V^2 + E ) then ,According to the General form of A...
0 0 votes
1 answers 1 answer
892
892 views
Mrityudoot asked Mar 7, 2024
892 views
For flag based approach in Bubble sort we can check first by a flag if the list is sorted or not in O(n), and if it is sorted, then no need to sort and the operation ends...