edited by
17,815 views
54 votes
54 votes

Consider the following functions from positive integers to real numbers:

$10$, $\sqrt{n}$, $n$, $\log_{2}n$, $\frac{100}{n}$.
The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:

  1. $\log_{2}n$, $\frac{100}{n}$, $10$, $\sqrt{n}$, $n$
  2. $\frac{100}{n}$, $10$, $\log_{2}n$, $\sqrt{n}$, $n$
  3. $10$, $\frac{100}{n}$, $\sqrt{n}$, $\log_{2}n$, $n$
  4. $\frac{100}{n}$, $\log_{2}n$, $10$, $\sqrt{n}$, $n$
edited by

12 Answers

0 votes
0 votes

In this problem, they are expecting to find us “increasing order of asymptotic complexity”.
Step-1: Take n=2048 or 211 (Always take n is very big number)
Step-2: Divide functions into 2 ways
1. Polynomial functions
2. Exponential functions
Step-3: The above functions are belongs to polynomial. So, simply substitute the value of n,
First compare with constant values.
→ 100 / 2048 = 0.048828125
→ 10 > 100/ 2048
→ log2 2048 =11
→ √n = 45.25483399593904156165403917471
→ n = 2048
So, Option B is correct

0 votes
0 votes
according to the increasing order of complexitites it is clear that
Constant < < logn < < n^(1/2) < < n
So the conflict is in between 100/n and 10 here for values  n <= 9, 10 < 100/n
but the question is about positive integers to real numbers so this section from 1 to 9 is  <<<<« than positive integers so option B will be correct
Answer:

Related questions

25 votes
25 votes
7 answers
3
khushtak asked Feb 14, 2017
7,021 views
Consider the following table:$$\begin{array}{|l|}\hline \textbf {Algorithms} & \textbf{Design Paradigms } & \\\hline \text{P. Kruskal} & \text{i. Divide and Conquer} \...