Matrix multiplication testing
We start with a simple computational problem. Given three -by- matrices , our goal is to design an algorithm that checks whether . Notice that one way to solve this problem is by performing the matrix multiplication and checking whether the result is the same as . This takes time where is defined as the minimum value such that matrix multiplication can be done in time. The current best known value is (proving or disproving that is a long-standing open question). While we are still far from proving that , the problem of testing whether can be solved by a simple randomized algorithm using (item) multiplications.
The algorithm is simple and illustrates the idea of "random checks". Take a random vector and check whether ; answer "" if they are equal, and otherwise answer "". This algorithm only needs item multiplications (i.e., to compute , we first compute and multiply with the result). We prove that the probability of this algorithm failing at most .
Let be a random vector where each coordinate is chosen independently and uniformly. If , then .
The proof here will illustrate an important concept in probabilistic analysis, namely, the principle of deferred decision. Assume that , so there must exist where the -th row of differs from the -th row of , or equivalently the -th row of is non-zero. Denote by the (non-zero) row vector that corresponds to the -th row of . We know that (if the vector is then its -th coordinate is zero).
Let be an entry for which . We assume that all 's were already sampled for . So we have that . In other words, the probability that is equal to the probability that . This probability is at most .
One way of decreasing the probability of failure (at the cost of an increased running time) is by repeating the algorithm several times using independent choices of each time. In particular, if we run the algorithm times and report if and only if all executions report , then the running time is and the probability of failure is at most . This is a common method used in randomized algorithms known as boosting (the success probability).
Revisit the previous proof. Now, we pick where each coordinate is drawn uniformly at random. Prove: If , then .
Let be such that not all coordinates of are zero. Pick where each coordinate is drawn uniformly at random. Prove:
Hint: Use the principle of deferred decision.