All Exams Test series for 1 year @ ₹349 only
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 ________.

The correct answer is
8

Problem Understanding: Stair Climbing Ways

Ankita needs to climb 5 stairs. She starts at the ground (step 0). At each step, she can either climb 1 stair or 2 stairs up. She cannot move down. We need to find the total number of distinct ways ($F(5)$) she can reach the 5th stair.

Defining the Recurrence Relation

Let $F(N)$ be the number of ways to reach the $N^{th}$ stair. To reach the $N^{th}$ stair, Ankita must have come from either the $(N-1)^{th}$ stair (by taking a single step) or the $(N-2)^{th}$ stair (by taking two steps). Therefore, the total number of ways to reach the $N^{th}$ stair is the sum of the ways to reach the $(N-1)^{th}$ stair and the ways to reach the $(N-2)^{th}$ stair.

The recurrence relation is: $F(N) = F(N-1) + F(N-2)$

Calculating F(5) Step-by-Step

We are given the values for the first few stairs:

  • $F(1) = 1$ (Only one way: 1)
  • $F(2) = 2$ (Two ways: 1+1, 2)
  • $F(3) = 3$ (Three ways: 1+1+1, 1+2, 2+1)

Now, we use the recurrence relation to find $F(4)$ and $F(5)$:

  1. Calculate F(4): Using the relation $F(N) = F(N-1) + F(N-2)$: $F(4) = F(3) + F(2)$ $F(4) = 3 + 2$ $F(4) = 5$
  2. Calculate F(5): Using the relation again: $F(5) = F(4) + F(3)$ $F(5) = 5 + 3$ $F(5) = 8$

Thus, there are 8 possible ways for Ankita to reach the 5th stair.

Was this answer helpful?

Important Questions from Numerical Reasoning

  1. Let $p_1$ and $p_2$ denote two arbitrary prime numbers. Which one of the following statements is correct for all values of $p_1$ and $p_2$?
  2. If $\oplus \div \odot = 2$, $\oplus \div \triangle = 3$, $\odot + \triangle = 5$, and $\Delta \times \otimes = 10$,  
    then the value of $(\otimes - \oplus)^2$ is:

  3. The remainder when $98!$ is divided by $101$ is equal to ________
  4. A 'frabjous' number is defined as a 3 digit number with all digits odd, and no two adjacent digits being the same. For example, 137 is a frabjous number, while 133 is not. How many such frabjous numbers exist?
  5. In a zoo, three lions and four tigers eat 390 kg of food every week. In another zoo, four lions and five tigers eat 500 kg of food every week. Lions and tigers eat different amounts of food, but all individuals of the same species eat the same amount. The amount of food a single lion eats per week is ________ kg.
    (Answer in integer)
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App