Read · 1 min
Recurrence relation is about reducing a problem to smaller problem, by finding the dependence of the term (generally denoted as ,the answer for a specific value given in a question) on previous terms. This gives as a recursive formula for a thing we're looking for.
- Find the number of ways in which a man can climb a staircase of steps, if he climbs only or steps at once.
- Let be the number of ways in which step-staircase can be climbed. Then, we see that the man can come to the step by either taking one step from step, or by taking 2 steps from step.
And number of ways of climbing the and steps is actually and .
Thus we conclude
It's easy to see that 1 step can be climbed in way, and 2-step can be climbed in ways (1+1 or directly 2) , giving .
Thus the number of ways of climbing 3-step will be for 4-step will be and so on... Thus the sequence will be And here speciically, the term is , so our asked answer will be
Thus, generalising a problem makes it easy at times !
Look for the coming parts of this, I'll be posting notes about Recurrence relations...