Related articles
Edit |
Discuss Article
N-puzzleThe n-puzzle is known in various versions, including the 8 puzzle, the 15 puzzle, and with various names. It is a sliding puzzle that consists of a grid of numbered squares with one square missing, and the labels on the squares jumbled up. If the grid is 3×3, the puzzle is called the 8-puzzle or 9-puzzle. If the grid is 4×4, the puzzle is called the 15-puzzle or 16-puzzle. The goal of the puzzle is to un-jumble the squares by only making moves which slide squares into the empty space, in turn revealing another empty space in the position of the moved piece.
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*.
It is possible to use parity arguments to show that some 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 labelled states into equivalence classes of reachable and unreachable states.
How Sam Loyd made his fortune
In its most famous version, the fifteen puzzle is a game in which 15 of the 16 squares of a 4×4 frame are filled with numbered sliding pieces, leaving one space in which to slide one piece at a time. The object is to slide the 15 pieces into numerical order.
Thus, the goal is to produce this configuration:
If the pieces 14 and 15 are exchanged, resulting in the following initial configuration:
-
then the puzzle is not soluble.
The "hook" in the fifteen puzzle is that there are two distinct sets of positions which can be assembled from the pieces with different parity, and there is no way of moving between them using the allowed moves, as they preserve parity. The parity in this context (the invariant) is the parity (odd or even) of the number of pairs of pieces in reverse order plus the row number of the empty square. For the order of the 15 pieces consider line 2 after line 1, etc., like words on a page.
Thus an even permutation of the order of the 15 pieces can only be obtained if the empty square is not moved or moved two rows, and an odd permutation of the order of the 15 pieces can only be obtained if the empty square is moved one or three rows.
- By contrast, note that considering the parity of permutations of all 16 squares (15 pieces plus empty square) is not meaningful here, because it changes with every move.
This allowed Sam Loyd, who invented the puzzle in the 1870s, to offer a prize of $1000 which could never be claimed, fueling the popularity of the game. The game became a craze in both the USA and in Europe.
For larger versions of the fifteen puzzle, the problem of finding a solution is easy. The problem of finding the shortest solution is NP-hard.
See Also
External links
Source | Copyright
|
 |
 |
 |
Webmasters: Add your website here:
Readers: Edit |
Discuss Listings
Livewire Puzzles Makes wire puzzles of various levels of difficulty. http://www.puzzles.ca/
Tavern Puzzle Collection Metal puzzles, created by blacksmith Dennis Sucilsky. Puzzle descriptions, and solution pages, complete with diagrams for taking apart puzzles and reassembly. Produced by Tucker-Jones House, Inc. http://www.tavernpuzzle.com
Tangrams Ancient Chinese moving-piece puzzle consisting of 7 geometric shapes. Allows visitors to learn its history, make a set, try solving one of the shapes or explore the author's links. http://www.tangrams.ca
Mozaika Spherical puzzles with unique designs and color combinations. http://www.mozaika.com/
Puzzles.com Home site for the Binary Arts line of mind puzzles. http://www.puzzles.com/
PuzzleSolver Solutions for the Rubik's Cube and many other mechanical puzzles. Post questions and get answers on the puzzle message board. Has a Puzzle of the Month page. http://www.puzzlesolver.com/
Meffert's World of Puzzles Manufacturer of many different types of Rubik like puzzles. http://www.mefferts-puzzles.com
Puzzle People Page Directory of mechanical puzzle collectors, as well as other information. http://www.toad.net/~elva/slocum.html
Puzzle World Different varieties of mass produced mechanical puzzles as well as individual hand crafted puzzles and information for collectors. http://www.johnrausch.com/PuzzleWorld/default.htm
Potty Puzzles Puzzle site with wooden assembly, burrs, wire and many other types of mechanical puzzles. (UK) http://www.pottypuzzles.co.uk/
Parlor Puzzles Collectibles, puzzles, and gifts. http://www.parlorpuzzle.com
Russian Puzzles Connect the cubes to complete the picture on each side. Makes customized puzzles from your pictures. http://www.nurica.com/
The Puzzle Museum Source of information concerning mechanical puzzles and their history. http://www.puzzlemuseum.com/
Tumbler Puzzle Solution Step by step guide to solving the Nintendo Tumbler puzzle. http://www.smartbytes.co.uk/Tumbler/
Hockey Puck Puzzle Offers a Rubik's cube related 3D puzzle shaped like a hockey puck, with many different design patterns. http://look.net/hockeypuck/
Brass Puzzles by Rocky Maker of hand machined brass puzzles. http://brasspuzzlesbyrocky.com/
Brain Binders Paper puzzles free to download. http://www.teachnet.com/brainbinders/
Thomas Ball Offers soccer ball shaped mechanical puzzles. http://www.thomas-ball.com
Puzzle Passion Collector site offers information about puzzles like Rubik, includes pictures, solutions, and strategys. http://www.puzzlepassion.com/
Puzzle & Craft Factory Provides Puzzles, Brain teasers, Toys and Games to people of all ages and skill levels http://www.puzzle-factory.com/
Impossible Bottles Learn the puzzling art of putting large objects into small bottles. http://www.puzzlesolver.com/list.php?cat=5
|