GATE CS 2008 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0126

Let \(x_{n}\) denote the number of binary strings of length n that contain no consecutive 0s. Which of the following recurrences does \(x_{n}\) satisfy?
  1. A
    \(x_{n}=2x_{n-1}\)
  2. B
    \(x_{n}=x_{\left \lfloor n/2 \right \rfloor}+1\)
  3. C
    \(x_{n}=x_{\left \lfloor n/2 \right \rfloor}+n\)
  4. D
    \(x_{n}=x_{n-1}+x_{n-2}\)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/497/gate2008-78

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com