Monday, February 3, 2014

Recursion

These days I have been busy about the Assignment 1. In the assignment, there is a puzzle called Tower of Hanoi. Actually the first 4 steps are easy, which require to follow the instruction and comment to fill the blank and make the program functional. However the fifth step was so hard that I struggled for 2 days but still stand in still!

That step require to think of an method to automatically run the game and find the least-step solution. I knew that recursion is required in that method but can' t find a clue. After the Monday lecture and some searching job on the Wiki, I can understand most of the three stools method. It will take me more time, let's say at least a week, to come to the method for four stools.

Therefore, recursion is easy to trace and understand but hard to generate your own recursion. It requires your better understanding of the puzzle and the ability to separate it into several steps.

No comments:

Post a Comment