Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Reciprocal links
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Hanoing

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 http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet

A few words

Copyright © 1996-2008 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

Copyright © 1996-2008 Alexander Bogomolny

28761623Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
Math
Posted by Laura
2 messages
06:56 AM, Apr-15-08

Divisibility rules - Jargon buste ...
Posted by Carolyn
2 messages
08:35 AM, Apr-04-08

drawing puzzle
Posted by martin gran
31 messages
06:53 PM, May-09-08

conway's game of life
Posted by frequency
0 messages
11:52 PM, May-12-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

A Riddle
Posted by idavis1
33 messages
06:59 AM, May-15-08

Josephus Flavius (correction)
Posted by David Turner
1 messages
09:42 AM, May-14-08