If this is homework, please try to solve the problem on your own first, before you ask us to help you. Then, post your code or other work product here for comments, corrections, etc.

In any case, fibonacci numbers are where fib(n) = fib(n-1) + fib(n-2), so exponentiation should not a factor here. Show us the math!

FWIW, I have been using fibonacci sequences for almost 30 years for many situations ranging from balancing stock portfolios to determining the most optimal server to process a network request. Needless to say, it is a subject of which I have some small knowledge... I first implemented the algorithm in C in 1983. :-)

Yes, this is the one that rubberman is talking about.

Edited
by np complete

0

OPDiscussion StarterI_m_rude

Let F be the matrix
1 1
1 0
Then F^n (2x2 matrix multiplication) equals
F(n+1) F(n)
F(n) F(n-1)
because:
(F(n+1) F(n) ) (1 1) = ( F(n+1)+F(n) F(n+1))
(F(n) F(n-1)) (1 0) = ( F(n)+F(n-1) F(n) )

So, @rubberman when F matrix is multiplied n times using divide and conquer(which is very casual as we can calculate n^p in logn time) we get F(n). But my problem is that i have done n^p for integers only. I am not getting how can i do this with F matrix given above? I have given the logic above, So please try to help me. thanks in advance.

Hello friends, I'm trying to remove all tags from a Wikipedia entry, leaving a simple text file. I have downloaded an HTML file from Wikipedia and hunted through my ...