# Better time complexity.

I am new to complexity theory and want to know,

Which one is better time complexity(faster) for an algorithm ?? $$n^{k+log_2(n)}/log_2(n)2^{n(n+1)/2}$$

or $$2^{O(n^{1/2}log^{2}n)}$$

where k is a constant. the first one, I guess?!!?

• Is there a missing ordo in the first equation? – Artem Mar 12 '15 at 16:50

$$2^{n(n+1)/2} \frac {n^{k+\log_2(n)}} { \log_2(n) }$$ Then this is at least $\Omega(2^{n(n+1)/2})$ while the second one is at most $2^{O(n)}$. So the first one is much slower than the second.
If for the first one you mean instead: $$\frac {n^{k+\log_2(n)}} { \log_2(n) 2^{n(n+1)/2} }$$ Then this is smaller than $O(1)$ and the second one is much slower.