Weakest calculator/pocket computer that can do Tower of Hanoi?
08-12-2018, 01:19 PM (This post was last modified: 08-12-2018 01:34 PM by Thomas Okken.)
Post: #12
 Thomas Okken Senior Member Posts: 1,828 Joined: Feb 2014
RE: Weakest calculator/pocket computer that can do Tower of Hanoi?
(08-12-2018 09:35 AM)Thomas Klemm Wrote:
(08-12-2018 07:46 AM)Thomas Okken Wrote:  That program always returns 1, for any input.

That's weird. Are you sure that you've entered these lines?
Code:
13 1 14 +

I am. Are you sure you have even tested this program? Those two lines are never reached. Here's what happens:

Code:
01▸LBL A   X:n 02 1       X:1 Y:n 03▸LBL 0 04 x<>y    X:n Y:1 05 2       X:2 Y:n Z:1 06 ÷       X:n/2 Y:1 07 FRAC    X:0 or 0.5 Y:1 08 x≠y     always true, see above! 09 GTO 1 16▸LBL 1 17 R↓      X:1 T:0 or 0.5 18 RTN

UPDATE: Ah, we posted at the same time -- never mind.

However,

(08-12-2018 09:35 AM)Thomas Klemm Wrote:  If you desperately need to know the positions they could be calculated from n and a(n)

I wouldn't call myself particularly desperate, but merely specifying which disc is moved at each step, without saying from where to where, looks like only half a solution to me. If you had read my second program more carefully, you would have noticed that it performs the same calculation that yours does, and then it works out the exact move. All your program accomplishes is to amputate two thirds of the logic. What's left certainly fits in an HP-25, but I wouldn't call that sequence a solution to the Towers of Hanoi puzzle, but merely an interesting property of such a solution.
 « Next Oldest | Next Newest »

 Messages In This Thread Weakest calculator/pocket computer that can do Tower of Hanoi? - Dave Britten - 08-11-2018, 05:26 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-11-2018, 06:42 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Dave Britten - 08-11-2018, 06:52 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-11-2018, 08:35 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-12-2018, 01:46 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Dave Britten - 08-12-2018, 01:52 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-12-2018, 07:16 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-12-2018, 07:46 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-12-2018, 08:10 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-12-2018, 09:35 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-12-2018 01:19 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-12-2018, 01:16 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-12-2018, 01:32 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-12-2018, 05:08 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-12-2018, 06:07 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Paul Dale - 08-13-2018, 01:38 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Okken - 08-13-2018, 03:40 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Paul Dale - 08-13-2018, 07:03 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - SlideRule - 08-13-2018, 12:45 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-13-2018, 11:47 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - SlideRule - 08-13-2018, 01:31 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Dave Britten - 08-13-2018, 01:07 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-13-2018, 03:58 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-13-2018, 04:02 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-14-2018, 12:47 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Paul Dale - 08-14-2018, 04:18 AM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Jake Schwartz - 08-15-2018, 03:49 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Dave Britten - 08-15-2018, 04:39 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Gene - 08-15-2018, 05:31 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Thomas Klemm - 08-15-2018, 08:12 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - SlideRule - 08-29-2018, 11:32 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - Dave Britten - 08-30-2018, 03:36 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - SlideRule - 08-30-2018, 11:57 PM RE: Weakest calculator/pocket computer that can do Tower of Hanoi? - SlideRule - 10-29-2018, 02:15 PM

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