Post Reply 
Weakest calculator/pocket computer that can do Tower of Hanoi?
08-13-2018, 01:31 PM (This post was last modified: 08-13-2018 01:39 PM by SlideRule.)
Post: #22
RE: Weakest calculator/pocket computer that can do Tower of Hanoi?
(08-13-2018 11:47 AM)Thomas Klemm Wrote:  I've used from Binary solution of Tower of Hanoi:
Another formulation is from peg (m - (m & -m)) % 3 to peg (m + (m & -m)) % 3
And then from A006519:
Highest power of 2 dividing n.
FORMULA
a(n) = n AND -n (where "AND" is bitwise).
But I went the other way round: first I've generated the from and to sequences and looked them up in OEIS. Only when I figured out the formulas I found them in Wikipedia.
from Martin Gardner's [attachment=6205] chapter 6, page 67 …
Quote:The isomorphism of the Tower ofHanoi’s solution and the Hamil-
tonian path on cubes and hypercubes is perhaps not so startling
when we realize that in both cases the sequence of moves is a pattern
familiar to anyone working with binary computers. We first
write the binary numbers from 1 to 8 and label the columns A, B,
C, D as shown in Figure 27. We then write opposite each row the
letter that identifies the “1” that is farthest to the right on each row.
The sequence of these letters from top down will be the pattern in
question
.
bold & italic my emphasis

BEST!
SlideRule

yet another reference [attachment=6206]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - SlideRule - 08-13-2018 01:31 PM



User(s) browsing this thread: 1 Guest(s)