00:01
Okay, so for this problem, we'll let a .n.
00:04
Be the number of ways.
00:07
A person can climb the stairs, but the stairs can be taken one, two, or three steps at a time.
00:32
Okay, so we can break this down into three cases.
00:38
So case one is if the last stair, or the last step is taken by one step.
00:55
Okay, so last step was one stare in length.
01:03
Well, then we're going to have the number of ways you can climb this way, be the number of ways you can climb all the previous steps minus the one last step you took.
01:18
So that's going to give us a sub n minus 1.
01:25
The second case is if our last step is taken by two stairs at that time.
01:37
Okay, so the number of ways we can do this, right, if you imagine, we have a little staircase.
01:43
And we took two steps the last time.
01:48
Well, the number of ways you can do this are all the number of different ways that you could climb all the preceding steps, right? and that value is going to be a n minus 2.
02:02
You might see where case 3 is going here.
02:07
If our last step is taken three stairs.
02:23
Well, in that case, we'll have a, but n minus the last three stairs.
02:29
So the total number of ways that we can climb the stairs is going to be all the ways we can have our last step be one stair.
02:36
All the way is that it can be two stairs, and all the ways it can be three stairs added together.
02:41
So that gives us that it is going to be equal to a to n minus 1 plus a sub n minus 2 plus a sub n minus 3...