How many different ways can I get up a flight (of stairs) with 11 steps?

Hint: Start at the beginning, not the end.

Step $1$: If there is one step, there is only one way to take the stairs.

Step $2$: If there are two steps, you can either take take $2$ steps or one step twice, leading to two ways to take the stairs.

Step $3$: Consider your first step, if you start with $1$ step, then $2$ steps remain and we know that there are two ways to go up two stairs. On the other hand, if you start with $2$ steps, this leaves one step and we know that there is one way to go up one stair. This gives $1+2=3$ ways to go up three steps.

Step $4$: Consider the first step, if you start with $1$ step, then $3$ steps remain and we know that there are three ways to go up three stairs. On the other hand, if you start with $2$ steps, then there are only two steps left, and we know that there are $2$ ways to go up $2$ steps. This gives $2+3=5$ ways to go up $4$ steps.

Continue in this way. You may recognize the numbers that you get as being in a popular sequence.


Here's a way to look at this visually. Draw out the path possibilities:

enter image description here

In this directed graph, you start at step 0 and follow the arrows to step 11. Horizontal arrows represent two steps, and diagonal arrows represent one step. You can see that if a person takes every step, they'll zig zag through the graph. If a person skips as many steps as possible, they'll travel mostly horizontally left-to-right with one diagonal step in there somewhere.

Now let's count the possibilities starting at step 10. There's only one way to go from step 10 to step 11, so let's write 1 next to step 10. There are two ways to go from step 9 to step 11, one of those ways goes through step 10, so let's write 2 next to step 9. From step 8, your options are either to continue to steps 9 or 10. From step 9 you have 2 possibilities to continue to step 11, and from step 10 you have only one. Adding that up means that from step 8 you have 3 possibilities, so let's write 3 next to step 8. Continuing backwards, you can see that at every step, the number of possibilities is the sum of the number of possibilities of the next two immediate steps. Filling this in looks like this:

enter image description here

You can now see that the total number of possibilities is 144.


One can define the $n$-th Fibonacci number (*) as the number of ways you can write $n$ as a sum of $1$'s and $2$'s.

Thus, your answer is the $11$-th Fibonacci number.

(*) Note that there are several definitions of the Fibonacci numbers in common use, so make sure you use the right one, which matches with this definition (note that $F_1 = 1, F_2 = 2$).