...
Algorithms
October 12, 2023
Algorithms
October 12, 2023
Algorithms
October 12, 2023
Algorithms
October 12, 2023

Asymptotic-Complexity

Question 1

Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
A

f2, f3, f1

B
f3, f2, f1
C
f2, f1, f3
D
f1, f2, f3
Question 1 Explanation: 

The asymptotic notation order should be 

Constant < logarithmic < linear < polynomial < exponential < factorial 

F2 and F3 → Polynomial 

F1 → Exponential

By the order of asymptotic notations F1 is definitely larger. 

Method-1: 

Consider n=100

F1 : 100 ^100 ⇒ 1.e+200

F2 : N^log(100) base 2 ⇒  100 ^ log(100) base 2 ⇒ 100^6.6438561897747 = 1,93,96,00,91,15,564.181300016469223466

F3 : N^Sqrt(n) ====> 100^Sqrt(100) ⇒ 100^10 ⇒ 10,00,00,00,00,00,00,00,00,000

Method-2:

We can apply “log” on both sides. 

log(F1)=nlog10 (base 2)

log(F2)=(logn)^2 = logn * logn (base 2)

log(F3)=sqrt(n)logn (base 2) 

Answer: F2< F3< F1

Correct Answer: A
Question 1 Explanation: 

The asymptotic notation order should be 

Constant < logarithmic < linear < polynomial < exponential < factorial 

F2 and F3 → Polynomial 

F1 → Exponential

By the order of asymptotic notations F1 is definitely larger. 

Method-1: 

Consider n=100

F1 : 100 ^100 ⇒ 1.e+200

F2 : N^log(100) base 2 ⇒  100 ^ log(100) base 2 ⇒ 100^6.6438561897747 = 1,93,96,00,91,15,564.181300016469223466

F3 : N^Sqrt(n) ====> 100^Sqrt(100) ⇒ 100^10 ⇒ 10,00,00,00,00,00,00,00,00,000

Method-2:

We can apply “log” on both sides. 

log(F1)=nlog10 (base 2)

log(F2)=(logn)^2 = logn * logn (base 2)

log(F3)=sqrt(n)logn (base 2) 

Answer: F2< F3< F1

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!