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.
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.
- 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.
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.
Source | Copyright
Webmasters: Add your website here:
Readers: Edit |
Quia! Mathematics Activities
Educational activities for teaching mathematics including concentration, matching, flash cards, word search puzzles, and Java games.
Interactive Mathematics Miscellany and Puzzles
Java-based math resource including articles, puzzles and links.
Interactive math help for K-12 students with flashcards, Math Wordfind, Homework Helper and worksheets.
Educational software presents advanced mathematics to K-12 students in a game-oriented approach, using coloring and drawing techniques to illustrate concepts from graph theory and computer science.
Description and instruction of using the ancient Pythagorean Abacus to do arithmetic.
A collection of riddles, puzzles, and technical interview questions, with a discussion forum.
Detailed exploration of a selection of mathematical topics.
The Contest Center
Classic puzzles and riddles requiring only simple logic and elementary math.
A collection of riddles and logic puzzles with solutions.
15 Puzzle of Sam Lloyd
Play online Sam Lloyd's "15" puzzle The funny story of this game Mathematical implications of this game Some funny logical problems with the 15 game.
Torus and Klein Bottle Games
Collection of Java-based educational puzzles.
SMSU Problem Corner
Math challenges Southwest Missouri State University in three levels of difficulties.
BCIT Mathematical Entertainment
Famous mathematical problems, puzzles, facts, games and trivia.
Logic puzzles and riddles with some solutions.
Object of puzzle is to try to get color pieces to create certain patterns in cube.
Nmerous puzzles, links, puzzle solver, and a generator.
The rec.puzzles Archive
This newsgroup archive is a list of puzzles, categorized by subject area. Each puzzle includes a solution, compiled from various sources, which is supposed to be definitive.
Puzzles for web, computers, and print; ambigrams.
Sequence Puzzles and Problems
With links to related sites. Compiled by Torsten Sillke.
Clever Games for Clever People
Games that interest John Conway including Rim and Traffic Jam.
Contest Center Cryptarithms
Examples of cryptarithms, with prize competitions for subscribers.
Alphametics and Cryptarithms
Puzzles in which letters or symbols are substituted for the digits in an arithmetical operation like addition.
Compiled by Mike Keith. Examples of various genres.
Collection of original numerical-logic puzzles. Many are long and difficult, involve sorting and comparing long lists and are intended to be solved using a good spreadsheet program.
A Primer on Cryptarithmetic
Instructions, examples, references and links.
Nick's Mathematical Puzzles
A collection of puzzles, with hints, solutions, and links to relevant mathematical topics.
A set of puzzles and riddles, ranging from basic math to college level, with full solutions.
Paul Hsieh's Puzzles
Logical and mathematical brain teasers, with an indication of difficulty. Hints are provided; solutions are available by email.
Interactive math problems for abilities ranging from middle school to university.
Archive Creative puzzles
Interactive puzzle archive with descriptions for puzzle construction and a special childrens puzzle page.
A collection of mathematical puzzles, jokes and articles.
A website dedicated to the puzzling world of mathematics and computer programming.
Ken Duisenberg's Puzzle of the Week Archives
Challenging puzzles and problems.
Celebrates math puzzles and mathematical recreations.
Algebraic Math Puzzles
A collection of puzzles at high school level. Does not include answers.
Animations that develop the theory behind such puzzles as the Rubik cube.
Free Puzzle Collections
Educational and recreational puzzles for teachers, students and parents. Each puzzle is graded by difficulty and has a hint. Solutions are available to members.
Puzzles, books, games and tests with designed by Lloyd King, author of "Test Your Creative Thinking".
Storkey: Two Envelope Paradox
A tough but simply defined problem which demonstrates key issues in probability.
Over one hundred and fifty math problems ranging from basic math to differential equations.
Resources, problems and forum for teachers and students in mathematics.
Brain Teasers and Maths Puzzles
Interactive logical and mathematical puzzles with feedback and detailed solutions.
Educational puzzles, brain teasers, and word games such as anagrams, cryptograms, alphametics, doublets, tangrams.
Indian site featuring calculation tricks and math puzzles.
Polymorf - Symmetry of Polyhedra
A demonstration of the symmetry and transformational properties of the Platonic and Archimedean solids.
Lateral puzzles from "Puzzles for the High IQ" author Lloyd King and founder of The Puzzle Wizards SiteRing.
Pastime and activity links for various geometric patterns, polygons and polyhedra by Jill Britton.
Mr Titen's More Than Math
Mathematics teacher provides puzzles for students.
A tribute to the lighter side of math including puzzles, humor, trivia, quotes, inspirations, and math links.
The Puzzling World of Barry R. Clarke
Brain teasers, articles and puzzles forum.
Tile a spheroid working room aperiodically or periodically. Includes free demo download.
Brain Teasers by QBrute
Original brain teasers with solutions.
Magic Math Kingdom
Learn math through games and quiz-oriented tutorial.
The Enigmatic World of Philip Carter
Collection of brain teasers from the author of IQ books.
Teaches and assesses fluency of multiplication and division tables using online cards. Submit data and compare results.
Mixed Up Math
Logic problems, where equations are mixed up. In various formats like boxes, crosses, diagonals, mazes. Free download.
The Null Set
Puzzles collected by Guy Kindler, most requiring some undergraduate mathematical knowledge. Some hints are provided.