Exams › GATE › Engineering Mathematics
Let aₙ be the number of n-bit strings that do NOT contain two consecutive 1s. Which one of the following is the recurrence relation for aₙ?
- aₙ = aₙ₋₁ + 2aₙ₋₂
- aₙ = aₙ₋₁ + aₙ₋₂
- aₙ = 2aₙ₋₁ + aₙ₋₂
- aₙ = 2aₙ₋₁ + 2aₙ₋₂
Correct answer: aₙ = aₙ₋₁ + aₙ₋₂
Solution
The correct option is right because an n-bit string that does not contain two consecutive 1s can be formed by either appending a '0' to an (n-1)-bit valid string or appending '10' to an (n-2)-bit valid string, leading to the recurrence relation aₙ = aₙ₋₁ + aₙ₋₂.
Related GATE Engineering Mathematics questions
- What are the eigenvalues of the matrix [2, 1, 1; 1, 4, 1; 1, 1, 2]?
- A circle with center at (x,y) = (0.5, 0) and radius = 0.5 intersects with another circle with center at (x,y) = (1,1) and radius = 1 at two points. One of the points of intersection (x,y) is:
- Suppose λ is an eigenvalue of matrix A and x is the corresponding eigenvector. Let x also be an eigenvector of the matrix B = A − 2I, where I is the identity matrix. Then, the eigenvalue of B corresponding to the eigenvector x is equal to
- Let A = [[1, 1], [1, 3], [−2, −3]] and b = [b1, b2, b3]. For Ax = b to be solvable, which one of the following options is the correct condition on b1, b2, and b3:
- If the quadrantal bearing of a line is N 30° W, then the whole circle bearing of the line is
- The matrix [2, -4; 4, -2] has
⚔️ Practice GATE Engineering Mathematics free + battle 1v1 →