We have a rabbit at the bottom of a staircase having
8
steps. The rabbit has to climb the
8
steps to reach the top. The rabbit can make three different moves - jump from one step to the very next, make a 2 step jump (skip one step and land at the next) or make a
3
step jump (skip 2 steps and land at the next). In how many different ways can the rabbit reach the top?
Details and Assumptions:
Suppose the rabbit is just one step from the top, then it has to make a one step jump to reach the top (same with other analogous cases). At the end of the staircase extra jumps are not allowed. .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
So many choices... I can't decide.
Denote a combination by (xyz), x, y, z are number of one , two, three step jump. It is easy to get some combinations of jumps to get the top: (012) get: 3!/2! ways to get the top (040) get: 1 ways, (121) get: 12 ways, (202): 6, (230): 10, (311): 20, (420): 15, (501): 6, (610): 7, (800): 1. So the number of difference ways is: 8 1
won't we use permutation in this question rather than using combinations
I used a laborious but sure way to solve the problem. Using a spreadsheet, I found out all the combinations of step to reach the top of staircase. There are 10 combinations as follows. Please note that sum of steps is 8 in all cases.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 3 1 1 1 1 2 2 1 1 1 2 3 1 1 2 2 2 1 1 3 3 1 2 2 3 2 2 2 2 2 3 3
I then calculated the permutation for each combination and the results are:
1 , 7 , 6 , 1 5 , 2 0 , 1 0 , 6 , 1 2 , 1 , 3
And the sum of all the cases:
s = 1 + 7 + 6 + 1 5 + 2 0 + 1 0 + 6 + 1 2 + 1 + 3 = 8 1
wrong approach....
Log in to reply
Why? I would love you elaborate.
BUT a solution.
too tedious
From step 7 to go to step 8, there is 1 way
From step 6 to step 8 there are 2 ways (directly to 8 or go to 7 & then to 8)
From step 5 to step 8 is 4 ways (directly to 8 Or to 7 Or to 6 so 1+1+2 = 4)
From step 4 the rabbit can reach 7 or 6 or 5, so the number of ways from step 4 is (1+2+4)=7
Working this way to step 0 it will give us 81 ways.
Problem Loading...
Note Loading...
Set Loading...
Let us think of the problem in terms of a recurrence relation. Let a n denote the number of possible ways this can be done in a staircase having n steps.
1.Finding base cases:
Now let us find the base cases.Clearly, a 1 = 1 .
If there are 2 steps then either it can take one two step jump or two one step jumps.So a 2 = 2 .
Similarly, a 3 = 4 .
2.Obtaining a recursive definition:
Now let us consider n steps ,first if the rabbit takes a 1 step jump then the whole process can be executed in a n − 1 steps.If it takes a 2 step jump the process can be completed in a n − 2 steps and for a 3 step jump in a n − 3 steps.
So writing the larger case in terms of smaller ones we get the recurrence relation a n = a n − 1 + a n − 2 + a n − 3 .
Solving using the base cases we can easily find that a 8 = 8 1 .