Q: 1 Let us assume a person climbing the stairs can take one stair or two stairs at a time. How many ways can this person climb a flight of eight stairs?
(a) 21
(b) 24
(c) 31
(d) 34
Answer : d
Solution:
First Method :
If number of stairs = n then total ways will be fib(n+1).
Here, we have to use the concept of combination to find the number of ways in which a person can walk up a stairway which has 8 steps. So, we have to make
pairs of the combination of 1 and 2 steps and then by using the concept of the combination we will get the number of ways a person can walk up a stairway of 8 steps.
It is given that there are 8 steps of the stairway and he can take only 1 or 2 steps up the
stairs at a time.
No comments:
Post a Comment