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

Sam Loyd's Fifteen

When it appeared in 1879 as The Gem Puzzle, the 15 Puzzle was accompanied by a cryptic instruction: Place the blocks in the box irregularly, then move until in regular order. At the outset, the applet below shows the 15 blocks in the "regular order". Pressing the "Shuffle" button in combination with the "Cheat" button is a modern day substitute for the block placing instruction. Pressing ether one of the buttons or both of them shuffles the numbers in the box. You move the blocks by clicking in the row or column containing the blank field.


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

The curious fact about the puzzle is that each configuration of the tiles represents a permutation of 16-element set N16. It is known that every permutation is representable as a product of disjoint cycles. We also know that a cycle of length k can be split into a product of k-1 transpositions. It follows that, if T is the total number of board cells (T = 16 for the Fifteen puzzle), C is a number of disjoint cycles in a permutation, and P is its parity, then

  T = C + P (mod 2),

which, in the case of the 15 puzzle, means that the parity of a permutation equals that of the length of its cycle decomposition. This remark serves the basis for one of the first rigorous solutions to the 15 Puzzle. The solution, by William Woolsey Johnson, came out in December 1879.

The cycle representation of the tiles in regular order consists solely of unicycle, i.e. 1-element cycles:

(1) f1 = (1)(2)(3) ... (14)(15)(16),

where the last tile (#16) stands for the blank cell. The number of cycles in its representation is 16, an even number. In other words the parity of the "regular order" is even. There are of course odd permutations. One of these is obtained by swapping tiles 14 and 15:

(2) f1 = (1)(2)(3) ... (13)(14 15)(16),

a product with 15 cycles, which represents an odd permutation. In itself the difference in parities does not imply that one permutation can't be obtained from the other. Each legal move in the puzzle changes the parity of the configuration. However, permutations (1) and (2) share the position of the blank cell, or the tile #16. Assume permutation (1) can be obtained from (2) by legal moves. Each of the moves involves tile #16. Thus as a sequence of transpositions involving tile #16, the latter will have returned to its original position. This is only possible if the number of moves in the sequence was even. (The easiest way to see this is to imagine that the puzzle board was cut off a regular checker board. Then each legal move shifts the empty cell from between cells of different colors. Each second move brings it back to the starting color.)

But an even number of transpositions applied to the permutation (2) will produce a permutation of odd parity, whereas the parity of (1) is even.

Additional puzzle information.

References

  1. J. Slocum, D. Sonneveld, The 15 Puzzle, The Slocum Puzzle Foundation, 2006

Copyright © 1996-2008 Alexander Bogomolny

28765968Page 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