Why might it be useful to design an algorithm that is allowed to make random decisions?
Matrix Identification problem
You are given 3 matrices A,B,C: nxn

Important point
Two useful facts:
First:
Second:
First fact
Second fact

we perform mod q after each multiplication
Horner’s method tell us we can compute polynomial in O(n) step.
Thus the total time of the following computation is O(n), where the length of the input is log(q).
That is, we perform O(n) operations that take log(q), which is O(1) because the size of the input is O(log(q)).
