Hope that I will get a good mark.
_(:з」∠)_
The term test2 is pretty much similar to the old term test but withonly 2 questions. I arrived late but got the exampaper at the right time.
After glancing the exam paper. Question may not be as difficult as I had thought before.Now I totally forgot what I wrote but I remember it was all about T(n).
However the first question asked us about proving correctness and termination.
I was trying to prove termination first but then I realized I can put them together. But from the lecture, they should be proved individually. I wish I didnt lose too many marks cause of that.
In my opinion, precondition is like the input of a function and postcondition is the output in other words.
Precondtion=>function terminate=>Postcondtion. It just like domain and range in mathematics.
Master Theorem (for divide-and-conquer recurrences)will determine T(n).
When T(n)=aT(n/b)+f(n) where
n:the size of the problem.
a:the number of subproblems in the recursion
n/b: the size of each subproblem ,d: the cost of the work done outside the recursive calls
f(n):the cost of the work done outside the recursive calls.
and T(n) will be different when a,b,f(n) changes.
It is not same as what we have learned but it is pretty similar.
I think I will keep working on this and fully understand it.
没有评论:
发表评论