Question:

Ankita has to climb 5 stairs starting at the ground, while respecting the following rules: 1. At any stage, Ankita can move either one or two stairs up. 2. At any stage, Ankita cannot move to a lower step. Let \(F(N)\) denote the number of possible ways in which Ankita can reach the \(N^{th}\) stair. For example, \(F(1) = 1\), \(F(2) = 2\), \(F(3) = 3\). The value of \(F(5)\) is \(\underline{\hspace{1cm}}\).

Show Hint

This is a classic Fibonacci sequence problem disguised in a stair-climbing context. Always check for recurrence relations in such combinatorial setups.
Updated On: Aug 28, 2025
  • 8
  • 7
  • 6
  • 5
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Recognize the recurrence. At the \(N^{th}\) stair, Ankita can arrive either: - from the \((N-1)^{th}\) stair with a 1-step move, or - from the \((N-2)^{th}\) stair with a 2-step move. Thus, \[ F(N) = F(N-1) + F(N-2) \]

Step 2: Base cases. \[ F(1) = 1, \quad F(2) = 2 \]

Step 3: Compute step by step. \[ F(3) = F(2) + F(1) = 2 + 1 = 3 \] \[ F(4) = F(3) + F(2) = 3 + 2 = 5 \] \[ F(5) = F(4) + F(3) = 5 + 3 = 8 \]

Final Answer: \[ \boxed{8} \]

Was this answer helpful?
0
0

Questions Asked in GATE GG exam

View More Questions