BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Tower of Hanoi variant

Good afternoon! 

Does anyone know the source of the variant of Tower of Hanoi attached? I searched it on the Internet and I don't find it anymore...

0 Kudos
Message 1 of 3
(5,526 Views)

I don't (quite) understand the question.  You are showing the "Classic" Tower of Hanoi problem, but with only three disks (represented by the numbers 1, 2, and 3).  The rules are the same -- you have N disks and three pegs.  The disks start out all placed on, say, Peg 1, and the task is to move them all to, say, Peg 2, subject to the following rules:

  1. You can only remove the top disk from a peg.
  2. You must place the removed disk on a peg such that it is the smallest disk on the peg (thus maintaining the "invariant" that all disks on all pegs are in "size order").

The Solution is a classic example of Recursion.

 

Bob Schor

Message 2 of 3
(5,495 Views)

In what way does your question have anything to do with NI? While the breakpoint is for offtopic discussions, you must have a reason to ask on this site?

 

Are you trying to implement it in LabVIEW, for example? Are you looking for this?

0 Kudos
Message 3 of 3
(5,433 Views)