3
$\begingroup$

Is there an online tool that returns the time complexity of recursion functions?

For instance, when I enter $T(n) = T(n/2) + n$, I'd like to get $\Theta(n)$.

I tried using Wolfram Alpha, but it doesn't return the above result I was looking for.

$\endgroup$

2 Answers 2

4
$\begingroup$

Wolfram Alpha is giving you a more accurate estimate, $T(n) \sim 2n$. However, it can also give you the weaker estimate $T(n) = O(n)$ you are after:

Wolfram Alpha screenshot

Just click on Show weaker bound.

$\endgroup$
3
$\begingroup$

You can use my master theorem solver to get tight asymptotic bounds. Using your example:

Master theorem solver

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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