God's algorithm

God's algorithm

God's algorithm is a notion originating in discussions of ways to solve the Rubik's Cube puzzle, but which can also be applied to other combinatorial puzzles and mathematical games. It stands for any practical algorithm that produces a solution having the least possible number of moves, the idea being that an omniscient being would know an optimal step from any given configuration.

Scope and definition

The notion applies to puzzles that can assume a finite number of "configurations", with a relatively small, well-defined arsenal of "moves" that may be applicable to configurations and then lead to a new configuration. Solving the puzzle means to reach a specific designated "final configuration" (or one of a collection of final configurations) by applying a sequence of moves, starting from some arbitrary initial configuration.

Some well-known puzzles fitting this description are mechanical puzzles like Rubik's Cube, Towers of Hanoi, and the 15 puzzle. The one-person game of peg solitaire is also covered, as well as many logic puzzles, such as the missionaries and cannibals problem. These have in common that they can be modelled mathematically as a directed graph, in which the configurations are the vertices, and the moves the arcs.

An algorithm can be considered to solve such a puzzle if it takes as input an arbitrary initial configuration and produces as output a sequence of moves leading to a final configuration, if the puzzle is solvable from that initial position, otherwise signals the impossibility (of a solution). A solution is optimal if the sequence of moves is as short as possible. God's algorithm, then, for a given puzzle, is an algorithm that solves the puzzle and produces only optimal solutions.

For an algorithm to be properly referred to as "God's algorithm", it should also be "practical", meaning that the algorithm does not require extraordinary amounts of memory or time. For example, using a giant lookup table indexed by initial configurations would allow solutions to be found very quickly, but would require an extraordinary amount of memory.

Instead of asking for a full solution, one can equivalently ask for a single move from an initial but not final configuration, where the move is the first of some optimal solution. An algorithm for the single-move version of the problem can be turned into an algorithm for the original problem by invoking it repeatedly while applying each move reported to the present configuration, until a final one is reached. Conversely, any algorithm for the original problem can be turned into an algorithm for the single-move version by truncating its output to its first move.

Examples

It is unknown whether a practical God's algorithm exists for Rubik's Cube.further|Optimal solutions for Rubik's Cube

For the N-puzzle, a generalized 15-puzzle, the problem of finding a solution is known to be NP-hard. However, whether a practical God's algorithm for this problem exists remains unknown. [Richard E. Korf, "Finding optimal solutions to Rubik's Cube using pattern databases", "Proc. Nat. Conf. on Artificial Intelligence" (AAAI-97), Providence, Rhode Island, Jul 1997, pp. 700–705.]

For the Towers of Hanoi puzzle, a God's algorithm exists for any given number of disks. [Carlos Rueda, "An optimal solutionto the Towers of Hanoi Puzzle". [http://yupana.autonoma.edu.co/publicaciones/yupana/003/hanoi/hanoi_eng.html] ]

An endgame tablebase in chess can find a God's algorithm for the shortest path to checkmate.

Notes

References

* David Joyner, Adventures in Group Theory. Johns Hopkins University Press (2002). ISBN 0-8018-6947-1.
* [http://www.rubiks-cube-solution.com A seven-stage (but non-optimal) solution to Rubik's Cube]

ee also

*Oracle machine
*Divine move


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • God's algorithm — noun The optimal solution that uses the fewest moves. See Also: Gods number …   Wiktionary

  • God's number — noun The maximum number of moves needed to solve a puzzle using Gods algorithm …   Wiktionary

  • Optimal solutions for Rubik's Cube — Computer Graphics of a scrambled Rubik s cube There are many algorithms to solve scrambled Rubik s Cubes. The maximum number of face turns needed to solve any instance of the Rubik s cube is 20.[1] This number is also known as the diameter of the …   Wikipedia

  • Rubik's Cube — Other names Magic Cube …   Wikipedia

  • List of mathematics articles (G) — NOTOC G G₂ G delta space G networks Gδ set G structure G test G127 G2 manifold G2 structure Gabor atom Gabor filter Gabor transform Gabor Wigner transform Gabow s algorithm Gabriel graph Gabriel s Horn Gain graph Gain group Galerkin method… …   Wikipedia

  • Endgame tablebase — A typical interface for querying a tablebase An endgame tablebase is a computerized database that co …   Wikipedia

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

  • Pocket Cube — From left to right: original Pocket Cube, Eastsheen cube, V Cube 2, V Cube 2b. The Pocket Cube (also known as the Mini Cube or the Ice Cube) is the 2×2×2 equivalent of a Rubik s Cube. The cube consists of 8 pieces, all corners. Contents …   Wikipedia

  • Zauberwürfel — Rubiks Zauberwürfel Der Zauberwürfel (oft auch wie im englischsprachigen Raum Rubik’s Cube genannt) ist ein mechanisches Geduldsspiel, das vom ungarischen Bauingenieur und Architekten Ernő Rubik erfunden wurde und 1980 mit dem Sonderpreis Bestes… …   Deutsch Wikipedia

  • Cube Rubik — Rubik s Cube Rubik’s Cube avec une face en cours de rotation …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”