Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A homework about growth rate of function

Tags:

function

big-o

Please order the function belows by growth rate

n ^ 1.5
n ^ 0.5 + log n
n log ^ 2 n
n log ( n ^ 2 )
n log log n
n ^ 2 + log n
n log n
n

ps: Ordering by growth rate means, as n gets larger and larger, which function will eventually be higher in value than the others.

ps2. I have ordered most of the functions: n , n log log n, n log n, n log^2 n, n log ( n ^ 2 ), n ^ 1.5

I just do not know how to order: n ^ 2 + log n, n ^ 0.5 + log n, these 2 values

Can anyone help me? Thank you

like image 397
Newbiee Avatar asked Dec 03 '25 00:12

Newbiee


2 Answers

You can figure this out fairly easily by graphing the functions and seeing which ones get larger (find a graphing calculator, check out Maxima, or try graphing the functions on Wolfram Alpha). Or, or course, you just pick some large value of n and compare the various functions, but graphs can give a bit of a better picture.

like image 158
James McNellis Avatar answered Dec 06 '25 16:12

James McNellis


The key to the answer you seek is that when you sum two functions, their combined "growth rate" is going to be exactly that of the one with the higher growth rate of the two. So, you now know the growth rates of these two functions, since you appear (from knowing the correct ordering of all the others) to know the proper ordering of the growth rates that are in play here.

like image 40
Alex Martelli Avatar answered Dec 06 '25 16:12

Alex Martelli