write an efficient algo to compute no. of sequences of n binary digits
that do not contain 2 1's in a row. eg 1100001 is invalid whereas
1001001 is valid.

HERE the number of sequences comes to be a fibonacci number , precisely
fib(n+2).
So this prob is equivalent to finding fibonacci numbers

--------------------------------------------------
Rohit Saraf
Second Year Undergraduate,
Dept. of Computer Science and Engineering
IIT Bombay
http://www.cse.iitb.ac.in/~rohitfeb14


On Thu, Jun 10, 2010 at 11:47 AM, Sundeep Singh <[email protected]>wrote:

> @rohit: fibonacci sequence may be the answer to the prob, but I am curious
> why? I haven't come across any such fib sequence property...
>
> On Wed, Jun 9, 2010 at 9:16 PM, Rohit Saraf 
> <[email protected]>wrote:
>
>> @junta : are fibonacci sequence is the answer of the prob, it is not used
>> :D
>>
>> --------------------------------------------------
>> Rohit Saraf
>> Second Year Undergraduate,
>> Dept. of Computer Science and Engineering
>> IIT Bombay
>> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14>
>>
>>
>> On Wed, Jun 9, 2010 at 9:13 PM, Rohit Saraf 
>> <[email protected]>wrote:
>>
>>> @debajyoti: read the prob before posting
>>>
>>> --------------------------------------------------
>>> Rohit Saraf
>>> Second Year Undergraduate,
>>> Dept. of Computer Science and Engineering
>>> IIT Bombay
>>> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14>
>>>
>>>
>>> On Wed, Jun 9, 2010 at 2:37 PM, Debajyoti Sarma <
>>> [email protected]> wrote:
>>>
>>>> First 20 fibo no as follows with binary form
>>>>   0 = 0
>>>>   1 = 1
>>>>   1 = 1
>>>>   2 = 10
>>>>   3 = 11
>>>>   5 = 101
>>>>   8 = 1000
>>>>  13 = 1101
>>>>  21 = 10101
>>>>  34 = 100010
>>>>  55 = 110111
>>>>  89 = 1011001
>>>> 144 = 10010000
>>>> 233 = 11101001
>>>> 377 = 101111001
>>>> 610 = 1001100010
>>>> 987 = 1111011011
>>>> 1597 = 11000111101
>>>> 2584 = 101000011000
>>>> 4181 = 1000001010101
>>>>
>>>> Now please explain how fibo no is coming under consideration.Both kind
>>>> of no is mixed here.
>>>>
>>>> On Wed, Jun 9, 2010 at 8:02 AM, Rohit Saraf <
>>>> [email protected]> wrote:
>>>>
>>>>> Fib comes because she wants the number of such sequences
>>>>>
>>>>> --
>>>>> --------------------------------------------------
>>>>> Rohit Saraf
>>>>> Second Year Undergraduate,
>>>>> Dept. of Computer Science and Engineering
>>>>> IIT Bombay
>>>>> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14>
>>>>>
>>>>> --
>>>>>
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]<algogeeks%[email protected]>
>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<algogeeks%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<algogeeks%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to