JNU 2018-2 PhD CS
October 26, 2023Asymptotic-Complexity
October 26, 2023Asymptotic-Complexity
Question 9 |
Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3 and f4?
f1(n)=2n f2(n)=n3/2 f3(n)=n log2 n f4(n)=nlog2n
f3, f2, f4, f1 | |
f3, f2, f1, f4 | |
f2, f3, f1, f4 | |
f2, f3, f4, f1 |
Question 9 Explanation:
If they are expecting to find an asymptotic complexity functions means
→ Divide functions into 2 categories
1. Polynomial functions
2. Exponential functions
Above 4 functions we have only one exponential function is f1 (n) = 2n . So, It’s value is higher than to rest of the functions.
Substitute log on both sides then we get an ascending order is f3, f2, f4.
→ Divide functions into 2 categories
1. Polynomial functions
2. Exponential functions
Above 4 functions we have only one exponential function is f1 (n) = 2n . So, It’s value is higher than to rest of the functions.
Substitute log on both sides then we get an ascending order is f3, f2, f4.
Correct Answer: A
Question 9 Explanation:
If they are expecting to find an asymptotic complexity functions means
→ Divide functions into 2 categories
1. Polynomial functions
2. Exponential functions
Above 4 functions we have only one exponential function is f1 (n) = 2n . So, It’s value is higher than to rest of the functions.
Substitute log on both sides then we get an ascending order is f3, f2, f4.
→ Divide functions into 2 categories
1. Polynomial functions
2. Exponential functions
Above 4 functions we have only one exponential function is f1 (n) = 2n . So, It’s value is higher than to rest of the functions.
Substitute log on both sides then we get an ascending order is f3, f2, f4.
Subscribe
Login
0 Comments