Open In App

GATE | GATE-CS-2017 (Set 1) | Question 25

Consider the following functions from positives integers to real numbers

10, √n, n, log2n, 100/n.



The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
(A) log2n, 100/n, 10, √n, n
(B) 100/n, 10, log2n, √n, n
(C) 10, 100/n ,√n, log2n, n
(D) 100/n, log2n, 10 ,√n, n

Answer: (B)
Explanation: For the large number, value of inverse of number is less than a constant and value of constant is less than value of square root.

10 is constant, not affected by value of n.
√n Square root and log2n is logarithmic. So log2n is definitely less than √n
n has linear growth and 100/n grows inversely with value of n. For bigger value of n, we can consider it 0, so 100/n is least and n is max.
So the increasing order of asymptotic complexity will be :



100/n 2n 

So, option (b) is true.


Quiz of this Question

Article Tags :