The Generalized Colour Towers of Hanoi: An Iterative Algorithm
M. C. Er · The Computer Journal · 1984
An iterative algorithm for solving the generalized colour Towers of Hanoi problem is presented; and its underlying principles are discussed. The problem is a variant of the Towers of Hanoi problem; it has n black and white discs randomly stacked on three pegs as an initial configuration. The objective is to move all coloured discs to a specified peg subject to the usual constraints of the standard problem; in addition, white and black discs may only move clockwise and counterclockwise, respectively. A comparison with a recursive algorithm for solving the same problem is also made.