HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Calculator for time complexity of recursive functions

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
timerecursiveforfunctionscalculatorcomplexity

Problem

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.

Solution

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:

Just click on Show weaker bound.

Context

StackExchange Computer Science Q#134916, answer score: 4

Revisions (0)

No revisions yet.