Fifteen puzzle

Fifteen puzzle
A solved 15-puzzle

The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly the smaller 8-puzzle. If the size is 3×3 tiles, the puzzle is called the 8-puzzle or 9-puzzle, and if 4×4 tiles, the puzzle is called the 15-puzzle or 16-puzzle named, respectively, for the number of tiles and the number of spaces. The object of the puzzle is to place the tiles in order (see diagram) by making sliding moves that use the empty space.

The n-puzzle is a classical problem for modelling algorithms involving heuristics. Commonly used heuristics for this problem include counting the number of misplaced tiles and finding the sum of the Manhattan distances between each block and its position in the goal configuration. Note that both are admissible, i.e., they never overestimate the number of moves left, which ensures optimality for certain search algorithms such as A*.



Johnson & Story (1879) used a parity argument to show that half of the starting positions for the n-puzzle are impossible to resolve, no matter how many moves are made. This is done by considering a function of the tile configuration that is invariant under any valid move, and then using this to partition the space of all possible labeled states into two equivalence classes of reachable and unreachable states.

The invariant is the parity of the permutation of all 16 squares (15 pieces plus empty square) plus the parity of the taxicab distance moved by the empty square. This is an invariant because each move changes both the parity of the permutation and the parity of the taxicab distance. In particular if the empty square is not moved the permutation of the remaining pieces must be even.

Johnson & Story (1879) also showed that the converse holds on boards of size m×n provided m and n are both at least 2: all even permutations are solvable. This is straightforward but a little messy to prove by induction on m and n starting with m=n=2. Archer (1999) gave another proof, based on defining equivalence classes via a hamiltonian path.

Wilson (1974) studied the analogue of the 15 puzzle on arbitrary finite connected and non-separable graphs. (A graph is called separable if removing a vertex increases the number of components.) He showed that, except for polygons, and one exceptional graph on 7 vertices, it is possible to obtain all permutations unless the graph is bipartite, in which case exactly the even permutations can be obtained. The exceptional graph is a regular hexagon with one diagonal and a vertex at the center added; only 1/6 of its permutations can be obtained.

For larger versions of the n-puzzle, finding a solution is easy, but the problem of finding the shortest solution is NP-hard.[1] For the 15-puzzle, lengths of optimal solutions range from 0 to 80 moves; the 8-puzzle can be solved in 31 moves or fewer (integer sequence A087725).

The symmetries of the fifteen puzzle form a groupoid (not a group, as not all moves can be composed);[2][3] this groupoid acts on configurations.


Sam Loyd's unsolvable 15-puzzle, with tiles 14 and 15 exchanged. This puzzle is not solvable because it would require a change of the invariant.
U.S. Political cartoon about finding a Republican presidential candidate in 1880

The puzzle was "invented" by Noyes Palmer Chapman,[4] a postmaster in Canastota, New York, who is said to have shown friends, as early as 1874, a precursor puzzle consisting of 16 numbered blocks that were to be put together in rows of four, each summing to 34. Copies of the improved Fifteen Puzzle made their way to Syracuse, New York by way of Noyes' son, Frank, and from there, via sundry connections, to Watch Hill, RI, and finally to Hartford (Connecticut), where students in the American School for the Deaf started manufacturing the puzzle and, by December 1879, selling them both locally and in Boston (Massachusetts). Shown one of these, Matthias Rice, who ran a fancy woodworking business in Boston, started manufacturing the puzzle sometime in December 1879 and convinced a "Yankee Notions" fancy goods dealer to sell them under the name of "Gem Puzzle". In late-January 1880, Dr. Charles Pevey, a dentist in Worcester, Massachusetts, garnered some attention by offering a cash reward for a solution to the Fifteen Puzzle.[4]

The game became a craze in the U.S. in February 1880, Canada in March, Europe in April, but that craze had pretty much dissipated by July. Apparently the puzzle was not introduced to Japan until 1889.

Noyes Chapman had applied for a patent on his "Block Solitaire Puzzle" on February 21, 1880. However, that patent was rejected, likely because it was not sufficiently different from the August 20, 1878 "Puzzle-Blocks" patent (US 207124) granted to Ernest U. Kinsey.[4]

Sam Loyd

Sam Loyd's illustration

Sam Loyd claimed from 1891 until his death in 1911 that he invented the puzzle, for example writing in the Cyclopedia of Puzzles (published 1914): "The older inhabitants of Puzzleland will remember how in the early seventies I drove the entire world crazy over a little box of movable pieces which became known as the "14-15 Puzzle".[5] However, Loyd had nothing to do with the invention or initial popularity of the puzzle, and in any case the craze was in 1880, not the early 1870s. Lloyd's first article about the puzzle was published in 1896 and it wasn't until 1891 that he first claimed to have been the inventor.[4]

Some later interest was fuelled by Loyd offering a $1,000 prize for anyone who could provide a solution for achieving a particular combination specified by Loyd, namely reversing the 14 and 15.[6] This was impossible, as had been shown over a decade earlier by Johnson & Story (1879), as it required a transformation from an even to an odd combination.


The Minus Cube, manufactured in the USSR, is a 3D puzzle with similar operations to the 15-puzzle.

Bobby Fischer was an expert at solving the 15-Puzzle. He had been timed to be able to solve it within 25 seconds; Fischer demonstrated this on November 8, 1972 on The Tonight Show Starring Johnny Carson.

See also


  1. ^ Daniel Ratner, Manfred K. Warmuth. Finding a Shortest Solution for the N × N Extension of the 15-PUZZLE Is Intractable. National Conference on Artificial Intelligence, 1986.
  2. ^ The 15-puzzle groupoid (1), Never Ending Books
  3. ^ The 15-puzzle groupoid (2), Never Ending Books
  4. ^ a b c d The 15 Puzzle, by Jerry Slocum & Dic Sonneveld. ISBN 1-890980-15-3
  5. ^ Cyclopedia of Puzzles, p. 235
  6. ^ Korf, Richard E. (2000), "Recent progress in the design and analysis of admissible heuristic functions", Recent Progress in the Design and Analysis of Admissible Heuristic Functions, SARA 2000. Abstraction, reformulation, and approximation: 4th international symposium, Texas, USA. LNCS 1864, 1864, Springer, pp. 45–55, doi:10.1007/3-540-44914-0_3, ISBN 978-3-540-67839-7,, retrieved 2010-04-26 


External links

Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Puzzle — For other uses, see Puzzle (disambiguation). Puzzle solving redirects here. For the concept in Thomas Kuhn s philosophy of science, see normal science. Part of a series on Puzzles …   Wikipedia

  • Puzzle People — Studio album by The Temptations Released September 23, 1969 …   Wikipedia

  • Sliding puzzle — A sliding puzzle, sliding block puzzle, or sliding tile puzzle challenges a player to slide usually flat pieces along certain routes (usually on a board) to establish a certain end configuration. The fifteen puzzle is a the oldest type of sliding …   Wikipedia

  • Combination puzzle — Part of a series on Puzzles …   Wikipedia

  • List of puzzle topics — This is a list of puzzle topics, by Wikipedia page.See also: * List of impossible puzzles * List of puzzle based computer and video games * List of game topics.* Acrostic * Anagram * Back from the klondike * Burr puzzle * Chess problem * Chess… …   Wikipedia

  • Transport puzzle — Transport puzzles are logistical puzzles, which often represent real life transport problems.DescriptionIn transport puzzles you move yourself and/or tokens through a given landscape. As in rearrangement puzzles, no piece is ever lost or added to …   Wikipedia

  • Mathematical puzzle — Mathematical puzzles make up an integral part of recreational mathematics. They have specific rules as do multiplayer games, but they do not usually involve competition between two or more players. Instead, to solve such a puzzle, the solver must …   Wikipedia

  • 14-15-Puzzle — 15 Puzzle Spiel aus Plastik (Ordne die Zahlen aufsteigend von 1 bis 15.) Das 15 Puzzle, auch 14 15 Puzzle oder Ohne Fleiß kein Preis Spiel genannt, ist ein in seiner ursprünglichen Aufgabenstellung unlösbares Geduldsspiel. Es wurde zwischen 1870… …   Deutsch Wikipedia

  • 15-Puzzle — Spiel aus Plastik (Ordne die Zahlen aufsteigend von 1 bis 15.) Ausgang …   Deutsch Wikipedia

  • Simon Tatham's Portable Puzzle Collection — is a popular collection of small one player video puzzle games for PCs written by Simon Tatham and others, using a framework written especially for portability to other platforms. Some of the games are original but most are re implementations of… …   Wikipedia