Question: 0. We will develop a recurrence solution to the following problem: How many different ways are there to climb n stairs, if you can either

0. We will develop a recurrence solution to the following problem: How many different ways are there to climb n stairs, if you can either step up one stair or hop up two steps? For example, there are five different ways to climb four stairs: 1. step, step, step, step; 2. hop, hop; 3. hop, step, step; 4. step, hop, step; 5. step, step, hop. Let f(n) denote the number of different ways to climb n stairs. For example f(4)=5 in the example above. (a) [4 marks] Find explicit values of f(1), that is, the number of ways to climb one step, and f(2), that is, the number of ways to climb two steps. (b) [5 marks] Then derive a recurrence relation for f(n) in terms of f(n1) and f(n2) for each integer n3. Give an argument justifying your derivation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
