IAE Academy

GATE 2023 IN GA Q.7: solution and answer

GATE 2023 · INGA Q.7 · 2 marks · MCQ

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 denote the number of possible ways in which Ankita can reach the stair. For example, .

The value of is ______.

  1. (A)

    8

  2. (B)

    7

  3. (C)

    6

  4. (D)

    5

See the question in the paper

Answer and solution

ANSWER

, which is option (A).

Official answer: ASource: Official answer key, GATE 2023 IN (IIT Kanpur)

  1. Condition on the last move. Ankita can never move down, and each move goes up by 1 or 2 stairs, so every way of reaching stair ends with exactly one of two moves: a 1-stair step from stair or a 2-stair step from stair .

  2. Every way ends in one of these two moves, so the two cases cover all ways. They also do not overlap, because a way ending in a 1-stair step cannot also end in a 2-stair step. The ways that end with a 1-stair step are exactly the ways of reaching stair , and there are of them. Likewise ways end with a 2-stair step. The addition rule for disjoint cases gives This is the Fibonacci recurrence.

  3. Check it against the given values: . This matches the question.

  4. Direct check by counting 2-stair steps. With two-stair steps, Ankita needs one-stair steps, which makes moves in total. Choosing which of those moves are 2-stair steps gives orderings, where . So

  5. , which is option (A).

KEY IDEA

Look at the last move. The final move onto stair is either a 1-stair step from or a 2-stair step from . Those two cases are disjoint and cover every way, so , the Fibonacci recurrence. Starting from and , the values run 1, 2, 3, 5, 8.

WATCH OUT FOR

One common mistake is to count only the combinations of step sizes (all 1s; three 1s and one 2; one 1 and two 2s), which gives 3, instead of counting orderings. For example, 1+2+2, 2+1+2 and 2+2+1 are three different ways. Another is to use the standard Fibonacci sequence 1, 1, 2, 3, 5 and pick 5, option (D). The question's own values , shift the sequence by one place, so .

From the GATE 2023 IN paper. Every question of this paper · Download the full paper · All 58 Numerical questions, with notes

More Numerical questions