All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Two Towers Hanoi (Posted on 2020-05-27) Difficulty: 3 of 5
A Towers of Hanoi puzzle has all of its discs colored black or white according to parity. Looking at the starting/finished tower the discs alternate back and forth between black and white.

Take a colored set like this and separate the white discs from the black discs. The white discs are placed on one pole in order and the black discs are placed on a second pole in order.

Devise an algorithm that will transfer the discs back into the complete tower on the third pole. As a function of N, how few moves can a tower of N discs be reassembled on the third pole?

An example: the XS, S, M, L, XL discs in the linked puzzle would start with the XS, M, and XL discs colored black and be on the first pole while the S and L discs would be colored white and be on the second pole.

No Solution Yet Submitted by Brian Smith    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(2): Most of solution Comment 4 of 4 |
(In reply to re: Most of solution by FrankM)

I don't have time to look closely at your solution but our sequences  deviate very quickly. You have f(3)=3 and I have f(3)=5.  Maybe you missed the fact that final stack is on the third pole.  


Here's my f(3)=5 solution
[13][2][]
[3][12][]
[][12][3]
[1][2][3]
[1][][23]
[][][123]

  Posted by Jer on 2020-05-30 15:47:34
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (23)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information