GATE DA › Programming, Data Structures and Algorithms › Searching & Sorting Algorithms › Asymptotic Analysis & Recurrences
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?
A \(x_{n}=2x_{n-1}\)
B \(x_{n}=x_{\left \lfloor n/2 \right \rfloor}+1\)
C \(x_{n}=x_{\left \lfloor n/2 \right \rfloor}+n\)
D \(x_{n}=x_{n-1}+x_{n-2}\)
Solve it on GATE DA practice → More Searching & Sorting Algorithms problems
Show the worked solution Official 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