Use the idea of binary powering and matrices


Suppose we define the Fibolucci numbers by
f0=0, f1=1, f2=1, and in general fn+1 = fn + fn-1 + fn-2 for n greater than 1.

So, the sequence goes 0, 1, 1, 2, 4, 7, 13, 24, 44, 81,... Use the idea of Binary Powering and matrices covered to write a python program which can calculate the nth Fibolucci number (the number n should be read in from the user). You must not use recursion. Test your program by calculating
The 72nd Fibolucci number
The 117th Fibolucci number 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Use the idea of binary powering and matrices
Reference No:- TGS093925

Expected delivery within 24 Hours