Tuesday, November 10, 2009
lecture 17 - first half
We have gone through the first half of lecture 17 about recursion. The first half is about setting up the recurrence relations, and the second half is about solving them. Today we have stopped at the last but a very important example - the Tower of Hanoi. We will continue our discussion on this example next Monday, and now is a good time for you to think about this problem. Recursion is only useful in mathematics, but also very useful in computer programming. Once you have understood the idea of recursion, you will be a much better programmer!
Subscribe to:
Post Comments (Atom)
I would like to ask about Parenthesis
ReplyDeleteIn slide 16 of lecture 17, why the summation does not start with k=0??? thank you
()(----)
(--)----
(----)()
(-------)
Yes, the summation should start from k=0. It has been updated. Thanks for the correction.
ReplyDelete