GateAI
Recurrence Relations

GATE CSE 2016 Set 1 · Q2

MCQ1 markEasy

Time

Let ana_n be the number of nn-bit strings that do NOT contain two consecutive 1s. Which one of the following is the recurrence relation for ana_n?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) an = an-1 + an-2

Recurrence Relations

Let ana_n denote the number of valid nn-bit binary strings without consecutive 11s.

Any valid nn-bit binary string can either:

  1. End in 00: The first n−1n-1 bits can be any valid (n−1)(n-1)-bit string without consecutive 11s. There are an−1a_{n-1} such strings.

  2. End in 11: The bit immediately preceding it must be 00 (so it ends in 0101) to prevent consecutive 11s. The remaining first n−2n-2 bits can be any valid (n−2)(n-2)-bit string. There are an−2a_{n-2} such strings.

Summing these two mutually exclusive cases gives:

an=an−1+an−2a_n = a_{n-1} + a_{n-2}

Hence, option (B) is the correct recurrence relation.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Recurrence Relations previous year question is Q2 of the GATE CSE 2016 Set 1 paper. Find more GATE CSE PYQs on Recurrence Relations in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 4 related Recurrence Relations PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Recurrence Relations in GATE CSE

Recurrence Relations has 4 GATE CSE PYQs across 4 papers from 2016 to 2024. 3 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2016 Set 1.

How GATE tests Recurrence Relations

More from GATE CSE 2016 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2016 Set 1 · Q2 · MCQ

Let an be the number of n-bit strings that do NOT contain two consecutive 1s. Which one of the following is the recurrence relation for an?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.