Asymptotic Notation Analysis Problem

127 Views Asked by At

I'm new here. I have some question on asymptotic analysis I am trying to calculate the Big-O of these five functions and rank them up:

a: $$2^{\log(n)}$$ b: $$2^{2\log(n)}$$ c: $$n^{5\over2}$$ d: $$2^{n^2}$$ e: $$n^2\log(n)$$

These are my approaches:

a: $$O(n)$$ because I log the both sides and cancel out the log

b: $$O(n)$$ same as the approach of a c: $$O(n^{5\over2})$$ d: $$O(2^{2n})$$ e: $$n^2\log n$$

So d is definitely the largest. The second largest would be c because $$n^{5\over2}$$ is just $$n^2\times n^{1\over2}$$ and $$n^{1\over2}$$ is larger than $$\log n$$ so the third would be e. Then a and b are the same. So to rank from the lowest growing rate, I get "abecd". But my answers are wrong, can someone explain, please?

1

There are 1 best solutions below

3
On BEST ANSWER

I don't see anything wrong if it is $\log_2$. In general $2^{\log_b(n)} = n^{\log_b(2)} = n^{\log_2(b)^{-1}}$ and so the asymptotic behaviour would depend on $b$.

Wait your reasoning for (d) is wrong. $2^{n^2} = 2^{(n^2)} \ne (2^n)^2$... Though it really is the biggest, much bigger than what you thought.