1

I'm trying to understand how to find the asymptotic complexity of a linear recurrence relation. So far, what I understand is that if only one linear recurrence call is made (ex. cn + T(n-4)), substitution or the recurrence tree can be used. However, what should one do if there are 2 or more linear recurrence calls? For the example I got in class (shown below), I got that T(n) = T(n-4) + logn + T(n-10). I tried setting a lower bound of T(n)> log n + 2T(n-10) since that's how we solved Fibbonacci Numbers, but I wound up with a complex summation that I could not solve. Any help is appreciated, thank you!

enter image description here

christina
  • 11
  • 2

1 Answers1

0

The first step is to solve the easier recurrence $$ T(n) = T(n-4) + T(n-10). $$ This is explained in our reference question. The solution to your recurrence will likely be larger by a factor of $\log n$, roughly speaking.

Indeed, you can consider a recursion tree in which the root is $n$, and a node $m$ has children $m-4$ and $m-10$ (you stop the recursion at some constant $m$). The solution to the recurrence $T(n) = T(n-4) + T(n-10)$ is proportional to the number of leaves, which we expect to be proportional to the number of nodes. For all $m \geq \sqrt{n}$ (say), $\log n = \Theta(\log m)$, which leads us to expect that the solution of your non-homogeneous recurrence is larger by a factor of $\log n$ than the solution of the corresponding homogeneous recurrence $T(n) = T(n-4) + T(n-10)$.

The preceding paragraph contains some intuition which will need to be proven. But whether or not the $\log n$ factor appears in the final formula makes little difference, since the growth rate of the recurrence is exponential.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514