So the Algorithms 1 class by Professors Robert Sedgewick and Kevin Wayne of Princeton on the Coursera platform just ended. I just made my second of three attempts on the final exam, scoring 18.31 / 20.00. I may yet make another attempt next week as everything officially closes only on 30 September 2012. It’s been an amazing experience and I learned way more than I expected. Some thoughts:
- I found that I’m pretty strong on practical programming. I could complete all of the programming assignments with not much trouble, and ended up spending a fair amount of time on the forums helping others out with their programs too. I only struggled somewhat when implementing the optional extra optimizations that the professors suggested which are not graded. This mostly involved doing the same thing with half the memory or less, or cutting running time down drastically. For example, the toughest timing trial of the collinear points assignment gave you a maximum of 10 seconds to solve the problem. My first attempt came in at just under 7 seconds, and after much agonizing I got it down to just under 3 seconds. The very best students were able to get it down to just under 2 seconds.
- However I am terrible on the theory. I blame that on a lack of solid grounding in mathematics. I really suck at calculating things like the order of growth of running time for different algorithms or the minimum and maximum heights of different tree-like data structures. This calls for a good grasp of discrete mathematics. I’m also bad at internalizing geometrical principles, so assignments like collinear points gave me more trouble than the supposedly more sophisticated A* algorithm we used to solve the 15-puzzle. I’m currently signed up for Sedgewick’s Analytic Combinatorics class which runs next year but I’ll probably flunk that one.
- This class really thought me how beautiful some algorithms are and how you can achieve so much in just a few lines of code. At heart, they’re all about pure logic so it’s possible to even describe them to people with no programming knowledge whatsoever. I also think I finally managed to get the hang of recursive functions while doing the Kd-Tree assignment. I’ve always had trouble visualizing them before.
- I also learned how very limited even the powerful computers we have available to us today are. As a science-fiction fan, I’ve always taken it for granted that one day, perhaps sooner than we expect, we’ll be able to simulate sentient minds and even whole worlds inside computers. Unfortunately, even the lowly 15-puzzle is enough to make modern computers struggle. It’s pretty humbling. As Sedgewick likes to emphasize, while we can always look forward to ever faster computers in the future, it is even more certain that the size of the problems we need to solve in the future will grow faster than our computers will become more powerful. As we can’t rely on ever more powerful computers to do the work, we must instead design ever more clever algorithms.
Anyway, Algorithms II starts up in November so I’ll be back at it pretty soon. In the meantime, I should have a little extra free time.