Jon Abraham
Jon Abraham

Reputation: 955

Order of growth of following function

Can someone tell me if the ranking of following functions by order of growth is correct ? (increasing to decreasing)

2^n, n^2, (nlgn, lg(n!)), n^(1/lgn), 4

Upvotes: 0

Views: 83

Answers (1)

templatetypedef
templatetypedef

Reputation: 372784

Most of these are right. However, look at

n1/lg n.

Notice that, for nonzero n, we have n = 2lg n, so

n1/lg n = (2lg n)1/lg n = 2lg n / lg n = 21 = 2.

So while 2 and 4 do grow at the same (nonexistent) rate, n1/lg n is always smaller than 4 for any nonzero n.

Upvotes: 1

Related Questions