Question: Design an algorithm that gets as input (1) a 2 2 matrix A with entries in [0, . . . , 99], and (2) a

Design an algorithm that gets as input (1) a 2 2 matrix A with entries in [0, . . . , 99], and (2) a positive integer n. The algorithm computes A^n = A A . . . A ( n times) such that each entry in the answer is modulo 100. The runtime of the algorithm must be O(log(n)). What is the runtime of the algorithm in terms of the entire length of the input?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!