15 Puzzle
   HOME

TheInfoList



OR:

The 15 puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and more) is a
sliding puzzle A sliding puzzle, sliding block puzzle, or sliding tile puzzle is a combination puzzle that challenges a player to slide (frequently flat) pieces along certain routes (usually on a board) to establish a certain end-configuration. The pieces to ...
. It has 15 square tiles numbered 1 to 15 in a frame that is 4 tile positions high and 4 tile positions wide, with one unoccupied position. Tiles in the same row or column of the open position can be moved by sliding them horizontally or vertically, respectively. The goal of the
puzzle A puzzle is a game, problem, or toy that tests a person's ingenuity or knowledge. In a puzzle, the solver is expected to put pieces together ( or take them apart) in a logical way, in order to find the solution of the puzzle. There are differe ...
is to place the tiles in numerical order (from left to right, top to bottom). Named after the number of tiles in the frame, the 15 puzzle may also be called a ''"16 puzzle"'', alluding to its total tile capacity. Similar names are used for different sized variants of the 15 puzzle, such as the 8 puzzle, which has 8 tiles in a 3×3 frame. The ''n'' puzzle is a classical problem for modeling
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
s involving
heuristic A heuristic or heuristic technique (''problem solving'', '' mental shortcut'', ''rule of thumb'') is any approach to problem solving that employs a pragmatic method that is not fully optimized, perfected, or rationalized, but is nevertheless ...
s. Commonly used heuristics for this problem include counting the number of misplaced tiles and finding the sum of the taxicab distances between each block and its position in the goal configuration. Note that both are '' admissible''. That is, they never overestimate the number of moves left, which ensures optimality for certain
search algorithm In computer science, a search algorithm is an algorithm designed to solve a search problem. Search algorithms work to retrieve information stored within particular data structure, or calculated in the Feasible region, search space of a problem do ...
s such as A*.


Mathematics


Solvability

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 binary function of the tile configuration that is invariant under any valid move and then using this to partition the space of all possible labelled states into two mutually inaccessible
equivalence class In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements ...
es of the same size. This means that half of all positions are unsolvable, although it says nothing about the remaining half. The invariant is the parity of the permutation of all 16 squares plus the parity of the taxicab distance (number of rows plus number of columns) of the empty square from the lower right corner. 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 in the lower right corner, then the puzzle is solvable only if the permutation of the remaining pieces is even. also showed that on boards of size ''m'' × ''n'', where ''m'' and ''n'' are both larger or equal to 2, all even permutations ''are'' solvable. It can be proven by induction on ''m'' and ''n'', starting with ''m'' = ''n'' = 2. This means that there are exactly two equivalency classes of mutually accessible arrangements, and that the parity described is the only non-trivial invariant, although equivalent descriptions exist. gave another proof, based on defining
equivalence class In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements ...
es via a
Hamiltonian path In the mathematical field of graph theory, a Hamiltonian path (or traceable path) is a path in an undirected or directed graph that visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a cycle that visits each vert ...
. studied the generalization of the 15 puzzle to arbitrary
finite graph In discrete mathematics, particularly in graph theory, a graph is a structure consisting of a set of objects where some pairs of the objects are in some sense "related". The objects are represented by abstractions called '' vertices'' (also call ...
s, the original problem being the case of a 4×4
grid graph In graph theory, a lattice graph, mesh graph, or grid graph is a Graph (discrete mathematics), graph whose graph drawing, drawing, Embedding, embedded in some Euclidean space , forms a regular tiling. This implies that the group (mathematics), g ...
. The problem has some degenerate cases where the answer is either trivial or a simple combination of the answers to the same problem on some subgraphs. Namely, for paths and
polygons In geometry, a polygon () is a plane figure made up of line segments connected to form a closed polygonal chain. The segments of a closed polygonal chain are called its '' edges'' or ''sides''. The points where two edges meet are the polygon' ...
, the puzzle has no freedom; if the graph is disconnected, only the connected component of the vertex with the "empty space" is relevant; and if there is an articulation vertex, the problem reduces to the same puzzle on each of the biconnected components of that vertex. Excluding these cases, Wilson showed that other than 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 In geometry, a hexagon (from Greek , , meaning "six", and , , meaning "corner, angle") is a six-sided polygon. The total of the internal angles of any simple (non-self-intersecting) hexagon is 720°. Regular hexagon A regular hexagon is de ...
with one diagonal and a vertex at the center added; only of its permutations can be attained, which gives an instance of the exotic embedding of S5 into S6. For larger versions of the ''n'' puzzle, finding a solution is easy. But, the problem of finding the ''shortest'' solution is
NP-hard In computational complexity theory, a computational problem ''H'' is called NP-hard if, for every problem ''L'' which can be solved in non-deterministic polynomial-time, there is a polynomial-time reduction from ''L'' to ''H''. That is, assumi ...
. It is also NP-hard to
approximate An approximation is anything that is intentionally similar but not exactly equal to something else. Etymology and usage The word ''approximation'' is derived from Latin ''approximatus'', from ''proximus'' meaning ''very near'' and the prefix ...
the fewest slides within an additive constant, but there is a polynomial-time constant-factor approximation. For the 15 puzzle, lengths of optimal solutions range from 0 to 80 single-tile moves (there are 17 configurations requiring 80 moves) or 43 multi-tile moves;"The Fifteen Puzzle can be solved in 43 "moves""
Domain of the Cube Forum
the 8 Puzzle always can be solved in no more than 31 single-tile moves or 24 multi-tile moves (integer sequenc
A087725
. The multi-tile metric counts subsequent moves of the empty tile in the same direction as one. The number of possible positions of the 24 puzzle is ≈ , which is too many to calculate God's number feasibly using brute-force methods. In 2011, lower bounds of 152 single-tile moves or 41 multi-tile moves had been established, as well as upper bounds of 208 single-tile moves or 109 multi-tile moves. In 2016, the upper bound was improved to 205 single-tile moves.


Group theory

The transformations of the 15 puzzle form a
groupoid In mathematics, especially in category theory and homotopy theory, a groupoid (less often Brandt groupoid or virtual group) generalises the notion of group in several equivalent ways. A groupoid can be seen as a: * '' Group'' with a partial fu ...
(not a group, as not all moves can be composed); this groupoid acts on configurations. Because the combinations of the 15 puzzle can be generated by 3-cycles, it can be proved that the 15 puzzle can be represented by the
alternating group In mathematics, an alternating group is the Group (mathematics), group of even permutations of a finite set. The alternating group on a set of elements is called the alternating group of degree , or the alternating group on letters and denoted ...
A_. In fact, any 2 k - 1 sliding puzzle with square tiles of equal size can be represented by A_.


History

The puzzle was "invented" by Noyes Palmer Chapman, a postmaster in
Canastota, New York Canastota is a village within the town of Lenox in Madison County, New York, United States. The population was 4,556 at the 2020 census, down from 4,804 in 2010. The village was incorporated in 1835, but was reorganized in 1870. Located along ...
, 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 (see
magic square In mathematics, especially History of mathematics, historical and recreational mathematics, a square array of numbers, usually positive integers, is called a magic square if the sums of the numbers in each row, each column, and both main diago ...
). Copies of the improved 15 puzzle made their way to
Syracuse, New York Syracuse ( ) is a City (New York), city in and the county seat of Onondaga County, New York, United States. With a population of 148,620 and a Syracuse metropolitan area, metropolitan area of 662,057, it is the fifth-most populated city and 13 ...
, by way of Chapman's son, Frank, and from there, via sundry connections, to Watch Hill, Rhode Island, and finally to
Hartford Hartford is the List of capitals in the United States, capital city of the U.S. state of Connecticut. The city, located in Hartford County, Connecticut, Hartford County, had a population of 121,054 as of the 2020 United States census, 2020 ce ...
,
Connecticut Connecticut ( ) is a U.S. state, state in the New England region of the Northeastern United States. It borders Rhode Island to the east, Massachusetts to the north, New York (state), New York to the west, and Long Island Sound to the south. ...
, where students in the
American School for the Deaf American(s) may refer to: * American, something of, from, or related to the United States of America, commonly known as the "United States" or "America" ** Americans, citizens and nationals of the United States of America ** American ancestry, ...
started manufacturing the puzzle. By December 1879, these were sold both locally and in
Boston Boston is the capital and most populous city in the Commonwealth (U.S. state), Commonwealth of Massachusetts in the United States. The city serves as the cultural and Financial centre, financial center of New England, a region of the Northeas ...
,
Massachusetts Massachusetts ( ; ), officially the Commonwealth of Massachusetts, is a U.S. state, state in the New England region of the Northeastern United States. It borders the Atlantic Ocean and the Gulf of Maine to its east, Connecticut and Rhode ...
. Shown one of these, Matthias Rice, who ran a 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, Charles Pevey, a dentist in
Worcester Worcester may refer to: Places United Kingdom * Worcester, England, a city and the county town of Worcestershire in England ** Worcester (UK Parliament constituency), an area represented by a Member of Parliament * Worcester Park, London, Engl ...
, Massachusetts, garnered some attention by offering a cash reward for a solution to the 15 Puzzle. The game became a craze in the U.S. in 1880. Chapman applied for a patent on his "Block Solitaire Puzzle" on February 21, 1880. However, this 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.''The 15 Puzzle'', by Jerry Slocum & Dic Sonneveld, 2006.


Sam Loyd

From 1891 until his death in 1911, Sam Loyd claimed that he had invented the puzzle. However, Loyd had no connection to the invention or initial popularity of the puzzle. Loyd's first article about the puzzle was published in 1886, and it was not until 1891 that he first claimed to be the inventor. Some later interest was fueled by Loyd's offer of a $1,000 prize () to anyone who could provide a solution for achieving a particular combination specified by Loyd, namely reversing the 14 and 15, which Loyd called the 14-15 puzzle. This is impossible, as had been shown over a decade earlier by , because it requires a transformation from an even to an odd permutation.


Varieties of the 15 puzzle

The Minus Cube, manufactured in the
USSR The Union of Soviet Socialist Republics. (USSR), commonly known as the Soviet Union, was a List of former transcontinental countries#Since 1700, transcontinental country that spanned much of Eurasia from 1922 until Dissolution of the Soviet ...
, is a 3D puzzle with similar operations to the 15 Puzzle. Versions of the 15 puzzle include a different number of tiles, such as the 8-puzzle or 24-puzzle.


Pop culture

Chess world champion
Bobby Fischer Robert James Fischer (March 9, 1943January 17, 2008) was an American Grandmaster (chess), chess grandmaster and the eleventh World Chess Championship, World Chess Champion. A chess prodigy, he won his first of a record eight US Chess Champi ...
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 ''The Tonight Show Starring Johnny Carson'' is an American television talk show broadcast by NBC. The show was the third installment of ''The Tonight Show''. Hosted by Johnny Carson, it aired from October 1, 1962 to May 22, 1992, replacing ''T ...
''.Adam Spencer, ''Adam Spencer's Big Book of Numbers: Everything you wanted to know about the numbers 1 to 100'', p. 58, Brio Books, 2014 .


See also

* Combination puzzles * Jeu de taquin, an operation on skew Young tableaux similar to the moves of the 15 puzzle * Klotski * Mechanical puzzles * Pebble motion problems * Rubik's Cube *
Three cups problem The three cups problem, also known as the three cup challenge and other variants, is a mathematical puzzle that, in its most common form, cannot be solved. In the beginning position of the problem, one cup is upside-down and the other two are ri ...


Notes


References

* * * Edward Kasner & James Newman (1940)
Mathematics and the Imagination ''Mathematics and the Imagination'' is a book published in New York by Simon & Schuster in 1940. The authors are Edward Kasner and James R. Newman. The illustrator Rufus Isaacs provided 169 figures. It rapidly became a best-seller and received ...
, pp 177–80,
Simon & Schuster Simon & Schuster LLC (, ) is an American publishing house owned by Kohlberg Kravis Roberts since 2023. It was founded in New York City in 1924, by Richard L. Simon and M. Lincoln Schuster. Along with Penguin Random House, Hachette Book Group US ...
. * *


External links

{{Commons category
The history of the 15 puzzle

15 Puzzle Game



Maximal number of moves required for the m X n generalization of the 15 puzzle


with download (from Herbert Kociemba) Mechanical puzzles Combination puzzles NP-complete problems Permutations 19th-century fads and trends