StreakPeaked· Practice

ExamsGATEEngineering Mathematics

Statement for Linked Answer Questions 78 and 79: Let xₙ denote the number of binary strings of length n that contain no consecutive 0s. Which of the following recurrences does xₙ satisfy?

  1. xₙ = 2xₙ₋₁
  2. xₙ = x_([n/2]) + 1
  3. xₙ = x_([n/2]) + n
  4. xₙ = xₙ₋₁ + xₙ₋₂

Correct answer: xₙ = xₙ₋₁ + xₙ₋₂

Solution

The recurrence relation xₙ = xₙ₋₁ + xₙ₋₂ correctly accounts for the construction of binary strings of length n without consecutive 0s. A valid string can either end with a 1 (which allows any valid string of length n-1 before it) or end with a 0 (which must be preceded by a 1, thus allowing any valid string of length n-2 before it).

Related GATE Engineering Mathematics questions

⚔️ Practice GATE Engineering Mathematics free + battle 1v1 →