So, someone posted this question earlier, but essentially no effort was put into it, it was poorly tagged and then closed. Nonetheless, I think it could have been a good questi
This is a cool method that I learned, so I thought I'll share it with you.It's really simple to estimate the time complexity. Looking at the recurrence we guess that the time complexity is exponential.
Lets say:
T(N)=x^n
The given recurrence is
T(N) = T(N-1) + T(N-2) + T(N-3)
Substituting
x^n = x^n-1 + x^n-2 + x^n-3
Dividing throughout by x^n-3
x^3 = x^2 + x^1 + 1
Rearranging
x^3 - x^2 - x - 1=0
You can find out it's cubic roots here.
This cubic equation has one real root( 1.8392867552141612) and two complex roots(of magnitude 0.7373527).
Thus asymptotically our algorithm's running time is bounded by T(N)=1.839^n.