Substitution method to solve recurrences.

computational complexityinductionrecurrence-relations

Apparently, I didn't fully understood the substitution method to find upper/lower bounds of a recurrence relation.
I know that this method have it's basis on the induction principle.
For example:
$$
T(n) = \begin{cases}
1 & n = 1\\
T(n – 1) + 1 & n \gt 1\\
\end{cases}
$$

I have to prove that $T(1) = 1$ as base case and that I have to prove some "guessed" upper\lower bound for $n>1$ using the definition of big theta, big oh, big omega, small oh or small omega, by induction, am I right?
In summary, I want to know how substitution method works.
I am asking this because more I see the answers about this topic in this community and more I feel like I did not understand it.

Best Answer

Algorithms texts often introduce substitution as a guess and check method. In my opinion, it's just that. As a matter of personal taste, I am not usually all that good about guessing a solution. But I'm much better at using more decisive techniques to reason things out. The two common techniques are the Tree Method and the Unrolling Technique, though these are not the only techniques. For instance, the Master Theorem packages the Tree Method into a black box.

For this example, I'd advise trying the unrolling method. Notice that you have a recurrence of the form $T(n) = T(n-a) + f(n)$. Such recurrences are usually amenable to unrolling and writing down a series.

If the recurrence was of the form $T(n) = aT(n/b) + f(n)$, then you would want to try the tree method, as you have a recurrence tree with $a$ branches at each node and an input of size $n/b$ to each child.

I hope this is helpful.

Related Question