# Math Help - in how many ways?

1. i live on the first floor of my building. everyday we come back after a walk me and my dog need to climb 7 stairs. forget about me, how many ways can my dog climb them if he climbs 1-2 stairs in one step.

eg. he may either climb the 7 stairs by climbing 2, then 2, then 2, then 1, or 1, then 2, then 2, then 2, or he may climb then as 2,2,1,1,1........in total, how may possible ways? thats all i mean.

2. There are two outcomes to each event: the solution is 2^7. there. figure that out, i dont have my calculator on me.

3. Originally Posted by scouser
There are two outcomes to each event: the solution is 2^7. there. figure that out, i dont have my calculator on me.
This is not correct (and you need a calculator? 2^7 = 2^3 x 2^3 x 2 = 8 x 8 x 2 = 64 x 2 = 128)

The possible combinations are:

(2, 2, 2, 1)

(2, 2, 1, 1, 1)

(2, 1, 1, 1, 1, 1)

(1, 1, 1, 1, 1, 1, 1)

You have to calculate the number of distinct arrangements of each combination and add them together:

$\frac{4!}{3!} + \frac{5!}{2! 3!} + \frac{6!}{5!} + 1 = ....$

4. Let $f(n)$ denote the number of ways to climb $n$ stairs.

Therefore, $f(n-2)+f(n-1)=f(n)$

Now $f(1)=1$
$f(2)=2$
$
f(3)=f(1)+f(2)=3
$

$f(4)=f(3)+f(2)=5$
................... and so on
$f(7)=8+13=21$

Therefore number of ways tho dog can climb $7$ stairs in $21$ ways.

5. Originally Posted by pankaj
Let $f(n)$ denote the number of ways to climb $n$ stairs.

Therefore, $f(n-2)+f(n-1)=f(n)$

Now $f(1)=1$
$f(2)=2$
$
f(3)=f(1)+f(2)=3
$

$f(4)=f(3)+f(2)=5$
................... and so on
$f(7)=8+13=21$

Therefore number of ways tho dog can climb $7$ stairs in $21$ ways.
hey! thanks. but yeh neeche likhi wali equation kaise ayi?

f(n-2)+f(n-1)=f(n)

6. There are two ways in which one can reach the $n-th$ stair(to be done in $f(n)$ ways).

One way is that one reaches the $(n-2)th$ stair which can be done in $f(n-2)$ ways and then reach the $n-th$ stair by climbing $2$ steps in one go.

Second way is that one reaches the $(n-1)th$ stair which can be done in $f(n-1)$ ways and then reach the $n-th$ stair by climbing the remaining $1$ stair.

Therefore, $f(n)=f(n-1)+f(n-2)$