Dump(8) and the Modified Tower of Hanoi

Rick Busdiecker rfb at cmu-cs-h.ARPA
Fri Jul 19 23:09:23 AEST 1985


As to how the sequence:
	0 3 2 5 4 7 6 9 8

relates to the Tower of Hanoi algorithm, I'm not completely sure however I can
generate the sequence:
	1 3 2 0 5 4 7 6 9 8...

I believe dump(8) refers to a modified version of the sequence.

Number discs starting with 0 on the top.  The post numbered 0, 1, 2.  Consider
the sequence moves as ordered pairs (stone, post).  If you add these numbers
and then take the first occurrance of any given number, you get the above
sequence.


  1	3     2		  0		    5			    4
(0,1) (1,2) (0,2) (2,1) (0,0) (1,1) (0,1) (3,2) (0,2) (1,0) (0,0) (2,2) (0,1)

(1,2) (0,2) (4,1) (0,0) (1,1) (0,1) (2,0) (0,2) (1,0) (0,0) (3,1) (0,1) (1,2)

				7
(0,2) (2,1) (0,0) (1,1) (0,1) (5,2) (0,2) (1,0) (0,0) (2,2) (0,1) (1,2) (0,2)

						  6
(3,0) (0,0) (1,1) (0,1) (2,0) (0,2) (1,0) (0,0) (4,2) ...

As for an inventor, the story I've always heard is that there is a 64-disk
Tower that is being moved by Bhuddist Monks, and that when they complete their
task (they believe) the world will come to an end.  However, if they move a
disk per second it will take 2^64  (~ 1.84 x 10^19) seconds to complete.  This
is about 584 billion years, so it shouldn't affect people reading the bboard
very much!

				Rick Busdiecker
				rfb at cmu-cs-h.arpa



More information about the Comp.unix.wizards mailing list