2012年10月31日星期三

Master Theorem,Gaussian elimination and A2

Last week we had quite a few recursive functions that are not strange but unfamiliar in another way: their complexity. During the lecture last week we had a little review of the Master Theorem with the example of multiplying two 4-digit binary numbers. As we went over the process of "unwind--non-decreasing--general cases", the result we came upon was T(n) = theta(n^2), which seemed fair enough for me because I thought there were no other way that can do it better (I am probably not the only one). However, by the wise of Gaussian elimination, which was originally a method in linear algebra, we change the function

into one that seemed a little more complicated:
one might think that this modification have only made the problem worse at the first look, but if we try to analyse it, Gaussian elimination successfully reduced the number of multiplication (in this case is the "a" in the Master Theorem) from 4 to 3. Hence, the T(n) now would be theta(n^(lg3)). Though the difference of lg4 and lg3 is fairly small, it can mean a huge difference when n is large enough.
Red line - n^lg3
Blue line - n^lg4
We also discussed about the closest pair-of-point on the lecture, it was fun and interesting!!!!!

For now I have done my first draft of A2 and my feeling is it is very much different from A1, now we not only need to provide a formally induction-based proof, we also need to try hard to work out a claim to proof, and it sometime can be difficult...

Well, I guess it's time to stop and get back to work on the second term test, hope I can do well this time too!


没有评论:

发表评论