math - Alternate plain English algorithm for Towers of Hanoi -


there 4 plain english algorithms towers of hanoi puzzle available on wikipedia, when first solving puzzle, came algorithm different of solutions have seen.

wikipedia algorithms:

  1. iterative solution
  2. simpler statement of iterative solution
  3. equivalent iterative solution
  4. recursive solution

of course results of algorithms same, , different ways of thinking same thing, talking plain english ways of describing process.

my process goes this:

  1. never move same tile twice in row(obviously)
  2. prioritize moving right
  3. when moving right, move closest pole can legally moved to.
  4. when moving left, move farthest pole can legally moved to.

..

towers of hanoi

these rules differ other descriptions of algorithm in that:

  • the initial stack can placed on of 3 pillars , still work without adjustment rules needed.(unlike solutions 2 , 3 , 4)

  • you don't have number disks(unlike solutions 1 , 3 , 4)

i have tested programmatically, , solved puzzle in (2^n)-1 moves n number of rings.

it seems me description different other plain english descriptions have found. has 1 seen description before? if so, please show reference.

i think description pretty same iterative solution. imagine posts arranged around circle or triangle, mod 3 style. instructions , wikipedia's instructions translate same thing in way of viewing things.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -