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!
-
This kind of question should be covered by the already mentioned reference question as well as many others I would think. – Guildenstern Nov 07 '17 at 13:06
-
2Sorry, but your screen grab is barely legible. Please don't use images to represent text. Also, note that recurrence relations don't have complexities and the screen grab isn't a recurrence relation. – David Richerby Nov 07 '17 at 18:34
-
The screen shot was of the same quality that my instructor provided, and the recurrence is in line 8 when it calls func4. Thanks David. – christina Nov 07 '17 at 19:06
-
also thanks so much for the clear answers, I know EXACTLY what to do now – christina Nov 07 '17 at 19:07
-
1Don't use images as main content of your post. This makes your question impossible to search and inaccessible to the visually impaired; we don't like that. Please transcribe text and mathematics (note that you can use LaTeX) and don't forget to give proper attribution to your sources! – D.W. Nov 11 '17 at 02:25
1 Answers
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.

- 276,994
- 27
- 311
- 503