Question: In part b , you derived that ( N ) = AN 1 ( 1 ) , so writing N 1 in the binary system,
In part b you derived that N AN so writing N in the binary system, N Pai j we get: N A N A Paj j A j aj A aA a For clarity if we want to nd it can be explained as follows: A A A A A So we just need to start from computing A and multiplying it by itself to get A and again multiply by itself to get A and so on Instead of doing matrix multiplications, we only do multiplications to get A i Implement the mentioned algorithm to rebuild your function in part dis algorithm will allow us to speed up the execution time of the program. You will need to use your binary convert function in part h j Evaluate the algorithmic eciency of your code in part h in the same way you did in part f I implemented the algorithm and ran it on my own computer and I have added my result below for your reference. k How long will running your code for N take using this algorithm? Compare your nding with part g Algorithm maers
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
