Guest

a boy take one or 2 steps at a time how he can climb a 10 steps

a boy take one or 2 steps at a time how he can climb a 10 steps

Grade:11

1 Answers

Aman Bansal
592 Points
10 years ago

Dear Aashish,

Let a be the number of ways to climb up a stairs of n steps with each time climbing 1 or 2 steps.
We are to compute
a .
To climb n steps, we may first climb 1 or 2 steps. In the former case, we are to climb  n −1 more
steps, and this can be done in
a(n-1)  ways. In the latter case, we are to climb  n − 2 more steps, and this can be done in
a(n- 2) ways. Therefore, we obtain the recurrence relation
a(n).= a(n-1) + a(n-2)
Since the recurrence relation for
a(n) depends on two previous terms, we need two initial conditions.
We have
a (1)=1 and
a(2) = 2 . By direct computation, it is easy to obtain
a(10) = 89

Best Of luck

Cracking IIT just got more exciting,It s not just all about getting assistance from IITians, alongside Target Achievement and Rewards play an important role. ASKIITIANS has it all for you, wherein you get assistance only from IITians for your preparation and win by answering queries in the discussion forums. Reward points 5 + 15 for all those who upload their pic and download the ASKIITIANS Toolbar, just a simple  to download the toolbar….

So start the brain storming…. become a leader with Elite Expert League ASKIITIANS

Thanks

Aman Bansal

Askiitian Expert

Think You Can Provide A Better Answer ?

Provide a better Answer & Earn Cool Goodies See our forum point policy

ASK QUESTION

Get your questions answered by the expert for free