in Combinatory closed by
475 views
0 votes
0 votes
closed as a duplicate of: GATE CSE 2016 Set 1 | Question: 2

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

  1. $a_{n}=a_{n-1}+2a_{n-2}$
  2. $a_{n}=a_{n-1}+a_{n-2}$
  3. $a_{n}=2a_{n-1}+a_{n-2}$
  4. $a_{n}=2a_{n-1}+2a_{n-2}$
in Combinatory closed by
475 views

3 Comments

https://gateoverflow.in/39636/gate2016-1-2

Check the last answer  of above question
0
0

The best way to solve such questions is by taking the example of strings and try for neglecting the options.

1 bit binary strings : {0,1}

2 bit binary strings :{00.01,10,11}

3-bit binary strings:{000,001,010,011,100,101,110,111}

a1=2

a2=3

a3=5

Now try to calculate a3 from the given options..

A) an =an-1 + 2an-2       a= a2 + 2a1  = 3 + 2*2 =7

B) an = an-1 + an-2         a3 = a2 + a1 = 3 + 2 = 5

C) an = 2an-1 + an-2      a3 = 2*a2 + a1   = 2*3 + 2 =8

D) an =2an-1 +2an-2      a3 = 2*a2 + 2*a1 =2*3 + 2*2 = 10

Only B is Correct....

2
2
edited by
Yes i solve this way

can i write $a_{0}=0$

             So$,a_{0}=1$

this is right??
1
1

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true