The GATE Grind

GATE 2023 IN – Question 7

General Aptitude · Quantitative Aptitude: Algebra, Geometry and Mensuration · 2 marks · Multiple choice

Ankita climbs five stairs from the ground. Each move is one or two stairs upward, and she cannot move down. Let $F(N)$ count the ways to reach stair $N$; $F(1)=1,F(2)=2,F(3)=3$. The value of $F(5)$ is ______.

  1. 8
  2. 7
  3. 6
  4. 5

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) 8

Explanation

The final move is either one stair from $N-1$ or two from $N-2$.

Thus $F(N)=F(N-1)+F(N-2)$. Starting from 1, 2 gives 3, 5, 8.

Hence $F(5)=8$, **A**.