All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Climbing the stairs (Posted on 2002-09-05) Difficulty: 3 of 5
A stairway has 100 steps. You can climb it by one step at a time, or by two steps. How many different ways to ascend this stairway exist?

See The Solution Submitted by levik    
Rating: 3.3333 (12 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(6): A new approach with no proof | Comment 11 of 24 |
(In reply to re(5): A new approach with no proof by lucky)

Therefore, we get the final expression:
SUM (s+1)!/(s+1)!0!, s!/(s-1)!1!, (s-1)!/(s-3)!2!, ... , ((s+2)/2)!/1!(s/2)! which is exactly the expression for the number of combinations for s+1 stairs (odd number).

If s was odd, we would have the same thing, where (s+0)!/s!0! would transform into the first member of the series s+1, i.e. (s+1)!/(s+1)!0! = 1, next we'd be pairing up members of the two series with same numerator as showed above forming the body of the series for s+1, while the last member of the series s-1, i.e. ((s-1)/2)!/0!((s-1)/2)! = 1, which could not be paired up, would transform into the last member of the series s+1, i.e. ((s+1)/2)!/0!((s+1)/2)! = 1, thus giving us the exact number of combinations for s+1 stairs.

This proves the Fibonacci approach to solving this problem.

All of this of course, translates into what Levik smartly said in just a few sentences:
If we have n stairs, then all the possible combinations would end ip in either the last skip being by 2 stairs or the last skip being by 1 stair. This means that in the first case, we can ignore the last two stairs and calculate the number of combinations for n-2 stairs, and in the second case we can ignore the last 1 stair and calculate the number of combinations for n-1 stairs. This gives us two sets of combinations that will not have any overlappings when the last skip is applied since one set will end with 2 stairs and the other with 1 stair. These two sets together give us all possible combinations for climbing n stairs which is again a Fibonacci approach.
  Posted by lucky on 2002-09-07 00:34:33

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (19)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information