These past 2 weeks, we've been working on Recursion - what I view to be one of the fundamental concepts in computer science, and also a concept that can result in rather powerful functions being created in simple ways. In terms of class content, I felt that I was quite comfortable with the simpler examples and exercises in recursion presented in class - perhaps because it's a topic that I've dealt with in the past, and which requires some level of mathematical/analytical skill, which I feel is one of my stronger traits as a computer scientist.
I was quite interested in the concept of solving recurrences, as that links closely to topics that have been covered in other classes that I have taken or am taking (MAT495 and CSC240), and so I found it quite enjoyable to break down a recurrence to understand what it truly does - and in many cases, the function is actually quite complex for a very short segment of code - the power of recurrence, I suppose.
But in effect, I believe that I was more interested in employing recurrences, and thus I spent quite a deal of time thinking about areas in which recurrences could be used. I was quite intrigued to learn that the recursively defined Fibonacci number function was actually substantially slower than that using a loop (it proceeds in O(2^n), exponential time) and so there were areas where a recurrence might actually be detrimental to a program. However, I also learned over the week that it becomes a much simpler task to employ sorting methods using recurrences, as well as to define tree structures. In fact, I found the tree with directed edges defined under the recurrence method to be quite a clever construction.
In effect, I'm quite excited to continue learning about recurrences, as well as to employ them in my future ventures wherever necessary and viable.
No comments:
Post a Comment