2012年11月7日星期三

Keep going

On Monday of this week, we had the term test2 for this course.There are only two questions in this test.In my opinion, it is supposed to be an easy task. However, I spent nearly all of my time doing the first question, because I made a mistake when I unwind the formula to find a close form.Of course i got a wrong answer but didn't realize it until the test was end. There must be something wrong with my mind during this test, how can i make mistake on the question which is almost similar to the one we have in the tutorial.
For the question1:
When we deal with the situation that n = 2^k, T(n) can be written as T(2^k) = 4T(2^(k-1)) + 2^k, and keep unwinding we have T(2^k) = 4^k + 2^k(2^k - 1) so T(n) is obviously equal to 2n^2 - n, and this form can be proved by induction.
For the question2:
When we got the upper bound and lower bound for the formula it is easy to find a B when m>B,the inequality is true,but i don't sure whether we need to prove the result by induction.
Anyway, this course is not hard for me, i think i can get a good mark on the final exam.

没有评论:

发表评论