@Divya: That was the question i previously asked. If n=3 000,001,010,100,101 are valid. So the solution for this is fib(n+2). If n=4 no. of sequences will be fib(6) i.e 8
On Tue, Jun 8, 2010 at 9:31 AM, Rohit Saraf <[email protected]>wrote: > getting fibonacci nos is trivial using matrix multiplication in almost > constant time. > > -------------------------------------------------- > 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]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
