difference-equations

How do I solve this complexity equation,T(n) = T(n-3)+T(n-5)


While solving a puzzle, I ended up having a complexity of T(n)=T(n-3)+T(n-5). I was trying subtraction method. But I am unable to solve this. Please explain what should be the procedure.


Solution

  • This is a linear homogeneous difference equation with constant coeffs.. It is usually solved by transforming it to the complex plane and solving a polynomial.

    Without a CS background (as you state), I'm afraid the details wouldn't fit in here. Start with the Wikipedia entry, if you're interested.

    If you want to skip to the final solution, here is the Wolfram Alpha for it.