# The Tower of Hanoi.

In 1958 a mensa-type student showed me a puzzle. Many years later I saw the puzzle in a psychology book. In the book it was called the Tower of Hanoi. Its purpose was to cause a concentration of focus and memory.
The student’s puzzle was a flat surface with three vertical pegs. On the first peg were 9 disks of sizes ranging from small at 1 to large at 9. The discs had holes in their centers so as to fit on the pegs. The object of the puzzle was to move the disks, one at a time, to another peg. No large disk could be placed on a smaller one.
I made a customized, compact version of the puzzle. I started with a small block of wood on which I affixed three equidistant pegs. I found disks of the same size and labeled the 1 through 9. I labeled the posts A, B and C. That way I was able to write down all 416 correct moves and to find a pattern of sets of moves.
My ex, now deceased, could work this puzzle in a little over 5 minutes. The puzzle is easy to make and working it improves brain function.

sounds like a fun puzzle to do. I’m doing it in my head. already up to 5. probably wouldn’t be too hard to make a flash game out of the concept. if i knew flash, that is…

I once played it on a ships computer (HMS Bulwark), whilst out in the Channel. Or a version there of, but it was limited to 3 pegs. So being as that was 24 years ago I’m sure you could make a flash version.

mathsisfun.com/games/towerofhanoi.html
this one only goes up to 6. i did it though.

i know the secret btw, the way to get the minimum amount of moves

ah, good fun. thanks for the link FJ. It took me a few tries, but I understand how to get the minimum amount of moves as well. once you understand the method, you can use it no matter the number of starting blocks.

Yeah. There’s some algorithm, I’m sure, that can work no matter what the number of starting blocks. I’m sure because I was using the algorithm, but, as is the case with so many human thought processes, it’s far easier to use the algorithm than to describe it.

One thing about the algorithm that I know for sure: if there are an odd number of plates to be moved from peg1 to peg3, your first move must always be to peg3. if there are an even number, your first move must be to peg2.

Thanks, F.J.
Here’s what I discovered with 9 disks. It took 16 correct moves to get the 5 off peg A. It took another 16 moves to get the six off stack A. I thought I was onto an algorythm. It took 32 moves, however to get the 7 off peg A. Then the algorthm struck me. The last 16 moves for the 7 were the same as the first 16 moves for the five. The sets repeated themselves as I (16 moves), II and III until the puzzle was solved.
There is a very simple clue that allows all correct moves. My hint is O/E.

mazeworks.com/hanoi/
this one offers puzzles of various sizes, up to and past 9. the min. number of moves necessary for 9 is 511. i did it in 13 minutes. if OPs wife could do the 9 puzzle in 5 minutes, she’d have to have amazingly dexterous, fast hands! The kind of hands necessary to be a cup-stacker!

I’ve got the 9 down to 416 moves. Where did I go wrong?
16 moves for 5, 16 for 6, 48 for 7, 64 for 8, 128 for 9, 160 for 9 back to 1.

Well, if you’re doing it better than perfect…idk. maybe ur only using 8 plates?

Nope. 9! Correcting my addition I get 432 moves. In any event does O/E make sense to you?

idk what OE is.

anyway, i’ve looked at a number of sources. i’ve seen the same thing in a number of places: 511 is the minimum number of moves for 9 disks.
for example, page 10: cs.uvm.edu/~snapp/teaching/c … /hanoi.pdf
i’m like 95% sure that 511 is the minimum number of moves. you’re probably cheating.

What would a flash version be like?

idk

but here:
mazeworks.com/hanoi/
if you do it in under 511 moves and give us a screenshot proving as much (I’ll trust that you haven’t photoshopped it), you will henceforth be the philosopher king and I will believe everything you say, and self-flagellate every time I inadvertently disagree with you in the future.

actually, on second thought, if i’m gonna place that much on the line, it’s gotta be more than a screenshot. you’ve gotta put it on youtube.

Am not computer savvy. I have a page proof of the algorythm at 432 moves, but do not have a computer that could deliver the page here. Write down your moves in the first three sets of sixteen repeated and see what you come up with as a total. O/E means odds must be placed on evens.
I’m willing to admit a mistake in calculation.

I see. Yes, my algorithm uses O/E too.

It’s easier to do the game on that link that I sent than it is to make an account and post on ILP, I promise.
This one’s even easier: novelgames.com/flashgames/game.php?id=31

I developed an easy way to calculate the number of moves necessary for any given number of disks, and it verifies my 511. If you’d like to hear it, and you’re at all math-inclined, I can explain. I think the way you calculated your number was incorrect.