in Algorithms
236 views
0 votes
0 votes

Arrange the following functions in decreasing asymptotic order:

f(n)= 32^n

g(n)= n!n3

(a) f(n),g(n)

(b) g(n),f(n)

in Algorithms
236 views

3 Comments

Shouldn't the answer be option (b) since factorial functions grow faster than exponential functions?
0
0

Apply log on both functions 

log(32^n) = 2n log3 = O(2n)

log(n!n3) = log n! + 3logn = O(nlogn)  [ we know log n! = O(nlogn) ] 

O(2n) > O(nlogn) 

So, option (a) is correct.

 

3
3
ok..got it..thanks :)
0
0

Please log in or register to answer this question.