The Student Room Group

Which of these statements about orders of growth are true?

1.

n O(n^2)

2.

n^2 O(n logn)

3.

2^n O(n 2^n)

4.

n O(2^n)



I am sure one of them is 3 because they are basically the same thing. But no idea about the others, they all seem different to me but the question is asking for more than one answer.
Big-O notation is an upper bound for the rate of growth. Think about how the function inside the O and outside grow for large values of n. For 1 for example, as the functions grow n^2 will be greater than n, and since n^2 is an upper bound, n is indeed an element of O(n^2).

Quick Reply

Latest

Trending

Trending