Lecture 11

First we did the proof of the correctness of our checker for matrix multiplication. If the matrix multiplication program is correct, the checker always says CORRECT. If the matrix multiplication program is buggy on A,B, then, with probability at least 1- 1/|R[0,1]|, the checker says BUGGY. This assumes "infinite" precision for the matrix multiplications. The proof just used a bit of algebra.

Next we looked at the problem of checking a sorting program. It is not enough to verify that the numbers are in non-decreasing order; we must also check that the input and output are the same as multisets. After a false start following a student's suggestions we did this by evaluating the polynomials P(x)=(x-a1)(x-a2)...(x-aN) and Q(x)=(x-b1)(x-b2)...(x-bN) at random points from a large set, where {a1,...,aN} and {b1,...,bN} are the multisets we are trying to test for equality. We used the "fundamental theorem of algebra" to see that this worked.