__If we start out with just two rings, then:__

Move the smaller ring to the middle peg.

Move the larger ring to the rightmost peg.

Place the smaller ring right on top of the rightmost peg, completing our puzzle for two rings.

__Now, once we know our algorithm for 2, we can use it to solve for 3. __

Start by moving the top two rings (smallest and second smallest) from the left peg to the middle peg using an algorithm similar to (1), but in our steps, we swap what we do for the right and middle pegs.

Then, we can place the largest ring on the rightmost peg.

To finish off, we move the 2 rings currently on the middle peg over to the rightmost peg. We have then completed the puzzle for 3 rings.

__In general:__

If we have n rings, we start by moving (n-1) of the rings from the left peg to the middle peg.

Then, we place the largest ring on the rightmost peg.

Move the (n-1) rings from the middle peg to the right peg. We have then completed our puzzle for n rings.

__Note:__ To get an algorithm for moving the (n-1) pegs, we can work from 2 rings and use the algorithm for 2 to solve for 3, the algorithm for 3 to solve for 4, etc.

Writing an algorithm to solve for the pizzle definitely helped out, since I was able to think through all of the steps and really appreciate the beauty of the recursive algorithm in which we can solve for n rings using an algorithm for (n-1) rings. For higher values of n, this would take longer and would be harder since we would have to start from 2 rings and work up till the algorithm for (n-1) in order to be able to solve the puzzle for n rings. This part was slightly tricky when trying to find and write the algorithm. This also shows a reason why the Tower of Hanoi puzzle would be a nice problem to code since we could make a code with a recursive statement for n.

Sahiba, Thank you so much for writing this out and sharing.