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?

  Submitted by levik    
Rating: 3.3333 (12 votes)
Solution: (Hide)
Let's define F(n) as the number of ways to climb a stair of n steps either one or two steps at a time.
      F(0) = 1, 
      F(1) = 1, and
      F(2) = 2
Now, let us think about a generic staircase with n steps.

Consider the last step you will take. It will either be a "single" step, if you are now at step n-1, or a "double" step if you are at n-2. (You could take a single step from n-2 to n-1, but that wouldn't be your last step in climbing the n-step stairway).

For each of the above last steps, you will have had a multitude of ways of getting to either n-1 or n-2. Actually, if you think about it, standing on n-1, you could have gotten there in F(n-1) ways. Likewise, you had F(n-2) ways to get to step n-2.

Since in each case, the next step will be your last, and there is only one way to take it, the total number of ways to reach n is

      F(n) = F(n-1) + F(n-2) 
This is the equasion for the Fibonacci sequence. However, the Fibonacci sequence f(n) starts with
      f(1) = 1,
      f(2) = 1,
      f(3) = 2 etc... 
Therefore,
      F(n) = f(n+1), and
      F(100) = f(101) 
      F(100) = 5,731,478,440,138,170,84,101 
(That's pretty big)

Comments: ( You must be logged in to post comments.)
  Subject Author Date
re(2): 2 answersJohn zadeh2009-11-11 12:38:42
AnswerK Sengupta2008-07-25 12:25:49
re: 2 answersJohn zadeh2007-06-21 23:14:28
2 answersJohn zadeh2007-06-21 22:51:29
SolutionSolutionStephen Ticsay2005-10-15 03:27:40
First timematthew2003-09-27 19:16:00
re(3): who's Fibonacci? Simple answerCharlie2003-09-01 10:56:56
re(2): who's Fibonacci? Simple answerDacre2003-09-01 06:33:49
re: A new approach with no proofLawrence2003-08-27 14:28:31
SolutionLawrence2003-08-27 14:24:48
OOPS: THIS IS THE ANSWERHarish2003-01-31 23:47:33
WANNA CHECK THIS ONEHarish2003-01-31 23:46:01
SolutionHm...suna2002-11-12 09:55:33
re(6): A new approach with no prooflucky2002-09-07 00:34:33
re(5): A new approach with no prooflucky2002-09-07 00:32:43
By the way....Dulanjana2002-09-06 16:12:20
re(4): A new approach with no prooflucky2002-09-06 09:25:52
re(3): A new approach with no proofTomM2002-09-06 06:28:58
re(3): A new approach with no prooflevik2002-09-06 04:42:22
re(2): A new approach with no prooffriedlinguini2002-09-05 21:56:09
re: A new approach with no prooflevik2002-09-05 20:44:08
Hints/TipsA new approach with no proofTomM2002-09-05 19:37:34
Some ThoughtsLimitTomM2002-09-05 19:19:41
Some ThoughtsA ToughieTomM2002-09-05 19:02:27
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (16)
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