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
Get step-by-step solutions from verified subject matter experts
