Tuesday, March 17, 2015

Recursion and mathematical Induction

In the Tower of Hanoi Puzzle, I learned how many different possible methods of moving the rings around. I decided to move the first ring to the middle, so that I could get the other rings to the far side. However, it became difficult because the rings had to be stacked from greatest on the bottom to the smallest on the top. Because of this, I couldn't stack the third ring first and then the fourth on top. I had to make smart choices of where I would place each ring because there were many obstacles and rules in the puzzle itself. I also learned many things from recursion and mathematical induction such as that n always equals one and then we must assume that the statement is held true for n equals k, and also prove it true for k+1. When solving the proof for the Tower of Hanoi Puzzle, the general equation was Tn=2 to the n exponent minus one. The first step was that I had to show this true for n=1 and I had to explain why this was true. The second step was that I assumed true for n=k and I substituted k in for n. Lastly I had to show true for Tk+1 and plug in k+1 for n in the equation. I was able to solve and prove the proof was correct. 


No comments:

Post a Comment