DetailBear wrote:I'm wondering if Alfy is misreading, either intentionally or unintentionally, or if the special meaning of the word "Top" isn't known to him.

Of course, I could be misreading Cinni.

If I say much more, though, we might need a NSFW flag on this one.

Yes, I do know. I was deliberately thinking along more literal lines.

GreatLimmick wrote:I don't see any reason not to explain it here.

According to the story, at Hanoi, there were some rods sticking out of the ground, with 64 discs of steadily increasing diameter threaded onto them. The idea was to move the entire stack from the rod on the left to the rod on the right, moving only one disc at a time and never putting a disc on top of a smaller one. Apparently, the story was that the world would end after this was accomplished.

I don't know if the towers actually exist, but the problem is used (usually with smaller discs) in computer science classrooms to help demonstrate the utility of recursive algorithms, since moving 64 discs can be simulated by moving 63 discs, then moving one, then moving 63 discs again, and moving 63 discs can be simulated by moving 62 discs, then one, then moving 62 discs again, and so on until your base goal is moving only one disc-- a trivial proposition.

I did my first big analysis of the problem in my seventh-grade calculus class, where we were asked to create a formula through induction that would predict the number of moves necessary to complete an

n-stack Hanoi problem.

Since a 1-disc stack requires 1 move, and an n+1 stack requires as many moves as an n stack twice over plus 1...it was easy to figure out that each stack takes 2^n - 1 moves. So a 64-stack would take 2^64 - 1 moves. If was assume, say, one move per second, then the whole process of moving the stack takes 18446744073709551615 seconds, or about 584 billion years. So even if we speed up the disc movement, we've got a long wait ahead of us.

Especially if they misfigured which pin to put the first disc on, and thus have to do the whole process TWICE.

(Psst: a good way to go about the solution is to always put odd numbered discs on even numbered and vice versa--and to move the first disc off, make like the peg you're trying to put them on is numbered one greater than the biggest disc. So if you've got an odd number of discs, you start by putting the smallest on the peg you want to move them all to, and if you've got an even number, you put it on the other peg.)

RandomScribe wrote:Backing up a bit, I think that the "Towers of Hanoi assumption" is that the smaller one has to go on top. Because, you know, that's the rule in the puzzle. And so Alfy was just saying that even if he were on top, Alex could probably manage not to crush Pierce while...

Yup, you got it in one!