The importance of pre-condition in Recursion: Tower of Hanoi

  1. Recall that a problem suitable for Recursive Method must satisfy:

  2. A better to state identical in nature is:

  3. Pre-condition:

  4. To illustrate what having the same pre-conditions means, consider the "Tower of Hanoi" problem:

    Problem(N):

  5. Here is a web site with a nice Tower of Hanoi applet for you to play: click here

  6. Recursive solution for Tower of Hanoi: reality check

  7. Recursive Solution 1: click here

  8. Recursive Solution 2: click here