This week we went more in-depth with the time complexity and saw more examples of different algorithms. We talked about divide-and-conquer recurrences, or something like that, and I got confused as to what exactly was going on. The lectures had given us a proof sketch of these types of recurrences, so from what I was reading it says we should split up the problem into some amount of subproblems and solve that. We then recombine (which I am not sure what that means) and from there it should be proved. I'm guessing that the concept is that you have to prove a smaller case of the problem and extend it to the problem given - it sounds kind of like induction.
We then took a look at multiplying bits recursively and analyzed the time complexity of it, and in the end we ended up with big theta(n^2). However, our professor then proceeded with showing us Gauss' trick to reduce the number of multiplications for recombining the divided factors. Although it was only reduced by one, the time complexity became n^(1.5). Initially I thought "it was only reduced by 0.5?", but when seeing the graph of n^2 and n^(1.5) I was shocked at how big of a difference it made.
After that our professor showed us the time complexity of finding the two closest point pairs for a whole set of randomly scattered points. Once again he divided the problem into two, but after that I got very confused. There was something about taking the difference between two points and using that difference to narrow down the search, but I vaguely understood that part of the lecture, I will definitely need to review it.
The tutorial for this week was pretty much the same; I couldn't really hear what my TA was saying and his writing was very faint on the board.
Also, my second assignment for this course is due this coming Friday but I have yet to start it. I've been caught up with a midterm in AST221 this coming Monday that I need to study for, and it has been difficult for me to grasp some concepts, but I've been holding out. I also received my mark for the first assignment in CSC236 and I had gotten perfect, which was something I wasn't expecting! At the time I found it difficult and doubted my answers but now I feel like I have a good understanding on the flavours of induction.
No comments:
Post a Comment