In the puzzle below, the squares are colored either red, blue or white. A square may change its color, subject to the following two conditions:

  1. It is the leftmost square of the color to be replaced.
  2. Newly painted, it will become the leftmost square of its color.

To change the color, click on the square. The legal colors, if any, will rotate through the sequence red-blue-white, with illegal colors omitted. The goal of this activity is to change all the squares to the same color. At the beginning, all squares are red, so that you'd like to have them either blue or white. The starting distribution of colors may also be randomized, in which event any of the three colors can be used for the target color.

When in doubt, you may ask for help by pressing the "Suggest a move" button. Beware, though, that the algorithm used for suggestions is heavily biased toward the white color.

This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at https://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.

What if applet does not run?

A few words

|Activities| |Contact| |Front page| |Contents| |Store| |Games|

Copyright © 1996-2017 Alexander Bogomolny

The puzzle is the Tower of Hanoi in disguise. In the original puzzle, the disks are identified by their size; their location is identified by the number of the peg they are on. In the present puzzle, the disks all have the same size, but, due to their orderly arrangement, they are unambiguously identified by their location in the row. The color of a square indicates the peg it is currently on. The two imposed conditions safeguard the requirement that only the top disks can be moved and only onto bigger disks.

I learned of this representation of the Tower of Hanoi puzzle from a course handouts by Fernando Rodriguez Villegas, University of Austin.

  1. Tower of Hanoi
  2. Tower of Hanoi, the Hard Way
  3. Bicolor Towers of Hanoi
  4. 3-Colors Tower of Hanoi
  5. 3-Colors Tower of Hanoi (Algorithm)
  6. Hanoing
  7. Sierpinski Gasket and Tower of Hanoi

|Activities| |Contact| |Front page| |Contents| |Store| |Games|

Copyright © 1996-2017 Alexander Bogomolny


Search by google: