Combinations to Reach Nth Stair by moving up one step or two step at a time.
The answer to this can be found out by induction.
To reach the Nth Stair, we can reach by jumping one step from the (N - 1)th stair or jumping 2 steps from the (N-2)th chair.
If we denote Number of Ways of reach N as F(N)
F(N) = F(N-1) + F(N-2).
Does that ring any bells ?
It is the general form of the Nth term of the Fibonacci sequence.
So to reach the Nth stair, the (N+1)th number in the Fibonacci sequence is the total Number of combination, if the sequence starts from 0 as shown below.
F(0) = 0
F(1) = 1
F(2) = 1
F(3) = 2
etc...
25 Jan, 2010
Comments (0)
You may also like
Recent Comments
- Siri and Uber also uses Location Services
10 years, 9 months ago
- i connected my dell laptop to videocon lcd …
10 years, 10 months ago
- 05/03/2014_22:09:18,97 C:\Users\kampar>touch .htaccess 'touch' is not recognized as …
11 years ago
- IRCTC Tatkal ticket booking script required...
11 years, 1 month ago
- I have a similar solution. I was told …
11 years, 9 months ago
- Can you try checking with a different cable …
11 years, 11 months ago
- wow that's hilarious
11 years, 11 months ago
- Perfect! Thanks! :D
11 years, 11 months ago
- Having the same issue. Were you able to …
12 years ago
- hi im having problem with the hdmi port.. …
12 years ago
- Hi, As of today the way2sms website has …
12 years, 1 month ago
- HI! I have a problem with my lg …
12 years, 4 months ago
- You know what would be a GREAT idea …
12 years, 4 months ago
- Hi, For changing MAC address in win7 just …
12 years, 4 months ago
- anybody who might read this now should be …
12 years, 4 months ago