Weakest calculator/pocket computer that can do Tower of Hanoi?
|
08-13-2018, 01:38 AM
Post: #17
|
|||
|
|||
RE: Weakest calculator/pocket computer that can do Tower of Hanoi?
(08-12-2018 05:08 PM)Thomas Klemm Wrote: PS: I wasn't aware that the ENTER in the first line is needed. Specify that the program is run after ENTER has been pressed. To expand this to a complete solution the oddness of the input is required, so a STO as the first step avoids the issue. I wonder if the sign of the output could indicate the direction of the move rather than calculating the final position? Anyway, here is a 49 step programme for the HP 25 that gives the solution to an n level Tower of Hanoi problem: Code: 01 STO 4 To run:
The program will display a sequence of two digits numbers that represent the poles moved between, pick the legal move in each case. For a three high tower these are: Code: Display Meaning Pauli |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)