Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Two algorithms $A$ and $B$ solve the same problem. $A$ solves a problem of size $n$ with $n^2~2^n$ operations. $B$ solves it with $n!$ operations. As $n$ grows, which algorithm uses fewer operations?

share|cite|improve this question
Hi & welcome! Firstly, please try to use $\LaTeX$ to write mathematics in future - for example, I don't know what "n22n" means, mathematically. Secondly, you should tell us what you do know, and any thoughts you've had about the problem. – Sharkos May 25 '13 at 19:44
Is it $n^² 2^n$ by any chance? – Andreas Caranti May 25 '13 at 19:45
thank you, sorry for that but yes thats what it means. and i have no idea on how to solve this. – mmk May 25 '13 at 19:47
up vote 3 down vote accepted

I believe Stirling is your friend.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.