• edited by
2,814 views
15 15 votes

Consider the following functions, where $n$ is a positive integer.

\[
n^{1 / 3}, \log (n), \log (n!), 2^{\log (n)}
\]
Which one of the following options lists the functions in increasing order of asymptotic growth rate?

Note: Assume the base of log to be $2$.

  1. $\log (n), n^{1 / 3}, 2^{\log (n)}, \log (n!)$
  2. $n^{1 / 3}, \log (n), \log (n!), 2^{\log (n)}$
  3. $\log (n), n^{1 / 3}, \log (n!), 2^{\log (n)}$
  4. $2^{\log (n)}, n^{1 / 3}, \log (n), \log (n!)$

5 Answers

10 10 votes
Asymptotically, $log(n!)=nlog(n)$  $ \&$ $2^{log(n)}=n$

So:  $log(𝑛) , 𝑛^{1/3}, 2^{log(𝑛) }, log(𝑛!) $ is correct order
• moved by
1 1 vote

by taking log we can get the answer as Option D.

$n^{1/3}  → 1/3 *log(n)$

$log(n!)$ we can write as $log(n^n)$ $→n *log(n)$

$log(n) →log(log(n))$

$2^{log(n)}$ $→log n* log2$

$log(log(n)) ≪ 1/3 *log(n) ≪ log n* log2 ≪ n *log(n)$

1 flag:
✌ Edit necessary (s mahesh “Wrong Answer”)
1 1 vote

$\textbf{Points to consider}$

  • $\text{You can take any  smallest power of $n$ eg.  $n^{\frac{1}{100}} $ that will be still asymtotically greater than $log n$.}$
  • $\text{$log(n!)= \theta(nlogn) $  [Acc to Sterling's Approximation].}$
  • $\text{ $2^{logn}=  n  \space\space [a^{\log_a x} = x]$}$

$\text{Consider the points above we can eliminate option B and D , as we know $ logn < n^{1/3}$ }$
$\text{Now $n$ is smaller than $nlogn$ so we can say that $ 2^{logn} <log(n!)$}.$

$\text{Both conditions are matched by OPTION A  i.e CORRECT}.$

 
 
 A)     $log(n) < n^{1/3} <2^{logn}  < log (n!) . $ 
• edited by
1 1 vote
log(n!) = nlogn by striling approximation

2^logn = n by log property

so our options are: n^1/3 , logn, nlogn, n

evidently: logn < n^1/3 < n< nlogn

correct answer is option A
Answer:
Position:
Show:

Related questions

13 13 votes
7 7 answers
2.1k
2.1k views
gatecse asked Feb 23
2,123 views
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity $\Theta(n)$?$T(n)=T(n-1)+1, \quad T(1)=1$$T(n)=2 T\left(\frac{n}{2...
6 6 votes
6 6 answers
1.9k
1.9k views
gatecse asked Feb 23
1,892 views
The keys $5,28,19,15,26,33,12,17,10$ are inserted into a hash table using the hash function $h(k)=k \bmod 9$. The collisions are resolved by chaining. After all the keys ...
11 11 votes
3 3 answers
2.1k
2.1k views
gatecse asked Feb 23
2,051 views
Consider an array $A=[10,7,8,19,41,35,25,31]$. Suppose the merge sort algorithm is executed on array $A$ to sort it in increasing order. The merge sort algorithm will car...
9 9 votes
2 2 answers
2.1k
2.1k views
gatecse asked Feb 23
2,071 views
Let $G$ be a weighted directed acyclic graph with $m$ edges and $n$ vertices. Given $G$ and a source vertex $s$ in $G$, which one of the following options gives the worst...