Running time ranking also can you give simple reason on comp

Running time ranking. also can you give simple reason on complex term such as log(n!) ? Thank you!

Rank the following functions by increasing order of growth, that is, find an arrangement g_1, ..., g_12 of the functions satisfying g_1(n) = O(g_2(n)), g_2(n) = O (g_3(n)), .... Break the functions into classes so that f and g are in the same class if and only if f(n) = O(g(n)). Note that log(middot) is the base 2 logarithm and log_b(middot) is the base b logarithm. Sigma_i = 1^3n (2i + 1), log_3(n^2), 2^n, n^1/465, nlogn, 3^logn, n^logn, log(n!), n!, n^n, n^log23

Solution

Answer:

The first summation is Theta(n^3), n! is Theta(n^n), log(n!) is nlogn. for comparing the remaining evaluate using 2 different values and compare how fast the value is changing. suppose you want to compare 2^n and 3^logn then first evaluate both at n = x and call it A, then evaluate both at n = y and call it B. then calculate B-A. whichever function gives higher differene grows faster.

The rank will be :

n! > logn(n!) > = 2^n > = n^465 > = summation ( 2i +1) >n^1/465 > = n^n > = nlogn > = n^log3n n^logn > = 3^logn > =

Running time ranking. also can you give simple reason on complex term such as log(n!) ? Thank you! Rank the following functions by increasing order of growth, t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site