The Rubik's Cube is a mechanical puzzle invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik. Originally called the "Magic Cube" by its inventor, this puzzle was renamed "Rubik's Cube" by the Ideal Toy Company in 1980 and won the German Game of the Year special award for Best Puzzle that year. It is said to be the world's best-selling toy, with over 300,000,000 Rubik's Cubes and imitations sold worldwide.

In a classic 3×3×3 Rubik's Cube, each of the six faces is covered by 9 stickers, among six solid colours (traditionally being white, yellow, orange, red, blue, and green). A pivot mechanism enables each face to turn independently, thus mixing up the colours. For the puzzle to be solved, each face must be a solid colour.

Three size variations first produced in the 1980s were the 2×2×2 (Pocket Cube), the 4×4×4 (Rubik's Revenge, or Master Cube), and the 5×5×5 (Professor's Cube). In the 2000s, larger sizes appeared on the market (beginning with the V-Cube 6 and V-Cube 7). All of these items belong to a broad category of puzzles commonly referred to as "twisty puzzles".

For readability, 3×3×3 is frequently abbreviated 3×3 (and similarly for the other sizes) when there is no ambiguity. Common misspellings include "rubix cube", "rubics cube", "rubick's cube", and "rubiks cube".

Conception and development

In March 1970, Larry Nichols filed a Canadian patent for a 2×2×2 "Puzzle with Pieces Rotatable in Groups". Nichols's cube was held together with magnets which could be easily pulled apart. Nichols was granted US patent 3655201 on April 11, 1972. Around the same time Uwe Mèffert was experimenting with slicing polyhedra into symmetric slices and attaching them with rubber bands to a center ball, but his puzzles end up in a drawer until 1981 when he released the Pyraminx.

Erno Rubik invented his "Magic Cube" in 1974 and obtained Hungarian patent HU170062 for the Magic Cube in 1975 but did not take out international patents. The first test batches of the product were produced in late 1977 and released to Budapest toy shops. The Magic Cube was held together with interlocking plastic pieces and was thus much superior to Nichols's design. In September 1979, a deal was signed with the Ideal Toy Company to bring the Magic Cube to the Western world, and the puzzle made its international debut at the toy fairs of London, Paris, and New York in January and February 1980. A lighter cube was produced, and the Ideal Toy Company decided to rename it "Rubik's Cube", since they needed a distinctive name they could trademark.

The first batches were exported from Hungary in May 1980. It quickly became a huge craze, peaking in 1981, and only ending in late 1982. Numerous other puzzles appeared in its wake, including the 4×4×4 Rubik's Revenge, and Uwe Mèffert's Pyraminx. Taking advantage of an initial shortage of Cubes (and no international patent), many cheap imitations of Rubik's Cube also appeared.

Nichols assigned his patent to his employer, the Moleculon Research Corporation, which sued the Ideal Toy Company in 1982. In 1984, Ideal lost the patent infringement suit and appealed. In 1986, the appeals court overturned the judgment on Rubik's 3×3×3 Cube and allowed that only Rubik's 2×2×2 Pocket Cube infringed Nichols's patent.

Even while Rubik's patent application was being processed, Terutoshi Ishigi, a self-taught engineer and ironworks owner near Tokyo, filed for a Japanese patent for a nearly identical mechanism and was granted patent JP55‒8192 (1976); Ishigi's is generally accepted as an independent reinvention.

In 2004 Greek inventor Panagiotis Verdes patented a method of creating cubes beyond the 5×5×5, up to 11×11×11. His designs also included improved mechanisms for the 3×3×3, 4×4×4, and 5×5×5. In June 2008, the first ever 6x6x6, and 7x7x7 cubes became available on the V-Cube Official website.

Workings

A standard cube measures approximately 2¼ inches (5.7 cm) on each side. The puzzle consists of the twenty-six unique miniature cubes on the surface. However, the centre cube of each face is merely a single square façade; all are affixed to the core mechanisms. These provide structure for the other pieces to fit into and rotate around. So there are twenty-one pieces: a single core piece consisting of three intersecting axes holding the six centre squares in place but letting them rotate, and twenty smaller plastic pieces which fit into it to form the assembled puzzle. A Cube can be taken apart without much difficulty, usually by removing center caps and using a screwdriver. It is a very simple process to solve a Cube by taking it apart and reassembling it in a solved state. There are twelve edge pieces which show two coloured sides each, and eight corner pieces which show three colours. Each piece shows a unique colour combination, but not all combinations are present (for example, if red and orange are on opposite sides of the solved Cube, there is no edge piece with both red and orange sides).

For most recent cubes, the colours of the stickers are red opposite orange, yellow opposite white, and green opposite blue. However, cubes with alternative colour schemes also exist; for example, they might have the yellow face opposite the green, and the blue face opposite the white (with red and orange opposite faces remaining unchanged).

Permutations

A normal (3×3×3) Rubik's Cube has eight corners and twelve edges. There are ways to arrange the corner cubies. Seven can be oriented independently, and the orientation of the eighth depends on the preceding seven, giving possibilities. There are ways to arrange the edges, since an odd permutation of the corners implies an odd permutation of the edges as well. Eleven edges can be flipped independently, with the flip of the twelfth depending on the preceding ones, giving possibilities.

There are exactly possibilities. In other words, there are forty-three quintillion or forty-three trillion possibilities. The puzzle is often advertised as having only billions of positions, as the larger numbers could be regarded as incomprehensible to many. To put this into perspective, if every permutation of a 57-millimeter Rubik's Cube were lined up end to end, it would stretch out approximately 261 light years.

The preceding figure is limited to permutations that can be reached solely by turning the sides of the cube. If one considers permuations reached through disassembly of the cube, the number becomes twelve times as large. The full number is or 519 quintillion possible arrangements of the pieces that make up the Cube, but only one in twelve of these are actually solveable. This is because there is no sequence of moves that will swap a single pair of pieces or rotate a single corner or edge cube. Thus there are twelve possible sets of reachable configurations, sometimes called "universes" or "orbits", into which the cube can be placed by dismantling and reassembling it.

Despite the vast number of positions, all Cubes can be solved in twenty or fewer moves.

The large number of permutations is often given as a measure of the Rubik's cube's complexity. However, the puzzle's difficulty does not necessarily follow from the large number of permutations.

Centre pieces

The original (official) Rubik's Cube has no orientation markings on the centre pieces, although some carried the words "Rubik's Cube" on the centre sticker of the white face, and therefore solving it does not require any attention to orienting those faces correctly. However, if one has a marker pen, one could, for example, mark the centre pieces of a solved cube with four coloured marks on each edge, each corresponding to the colour of the adjacent face. Some cubes have also been produced commercially with markings on all of the squares, such as the Lo Shu magic square or playing card suits. Thus one can scramble and then unscramble the cube yet have the markings on the centers rotated, and it becomes an additional test to "solve" the centers as well. This is known as "supercubing".

Putting markings on the Rubik's Cube increases the difficulty mainly because it expands the set of distinguishable possible configurations. When the cube is unscrambled apart from the orientations of the central squares, there will always be an even number of squares requiring a quarter turn. Thus there are possible configurations of the centre squares in the otherwise unscrambled position, increasing the total number of possible Cube permutations from 43,252,003,274,489,856,000 to 88,580,102,706,155,225,088,000.

Solutions

Many general solutions for the Rubik's Cube have been discovered independently. The most popular method was developed by David Singmaster and published in the book Notes on Rubik's "Magic Cube" in 1979. This solution involves solving the cube layer by layer, in which one layer, designated the top, is solved first, followed by the middle layer, and then the final and bottom layer. After practice, solving the cube layer by layer can be done in under one minute. Most tutorials teach the layer by layer method, as it gives an easy-to-understand step-by-step guide on how to solve it. Though, other general solutions include "corners first" methods or combinations of several other methods, one method of which was produced by the Ideal Toy Company itself, being called The Ideal Solution.

Speedcubing solutions have been developed for solving the Rubik's Cube as quickly as possible. The most common speedcubing solution, CFOP was developed by cubers in the Netherlands and Czechoslovakia in the early 1980s. It was later popularised by Jessica Fridrich (and was often called the Fridrich method). It is a very efficient layer-by-layer method that requires a large number of algorithms, especially for orienting and permuting the last layer. The first-layer corners and second layer are done simultaneously, with each corner paired up with a second-layer edge piece. Another well-known method (Petrus method) was developed by Lars Petrus. In this method, a 2×2×2 section is solved first, followed by a 2×2×3, and then the incorrect edges are solved using a three-move algorithm, which eliminates the need for a possible 32-move algorithm later. This method tends to give solutions in fewer moves and was popular for fewest move competitions. In 2003 Gilles Roux developed the Roux method, which has since become the main alternative to CFOP.

Solutions follow a series of steps and include a set of algorithms for solving each step. An algorithm, also known as a process or an operator, is a series of twists that accomplishes a particular goal. For instance, one algorithm might switch the locations of three corner pieces, while leaving the rest of the pieces in place. Basic solutions require learning as few as four or five algorithms but are generally inefficient, needing around 100 turns on average to solve an entire Cube. In comparison, CFOP requires learning roughly 120 algorithms but allows the Cube to be solved in only 55 moves on average. A different kind of solution (Heise method) developed by Ryan Heise uses no algorithms but rather teaches a set of underlying principles that can be used to solve in fewer than 40 moves.

Algorithms

In cubers' parlance, an algorithm means "a memorized sequence of moves whose effect on the cube is known". This fully conforms with the mathematical and logical use of algorithm defined as a list of well-defined instructions for completing a task from a given initial state, through well-defined successive states, to a desired end-state. A Rubik's Cube algorithm transforms the state of the cube in such a way that a small part of the cube becomes solved without "scrambling" any parts that have previously been solved, or else places the cube in a state from which the solver knows it can now be partly, or fully, solved by the application of further algorithms.

The search for optimal solutions

The manual solution methods described above are intended to be easy to learn, but much effort has gone into finding optimal solutions to the Rubik's Cube. The maximum theoretical number of moves required to solve a Rubik's Cube is known as God's Number.

In 1982, David Singmaster and Alexander Frey hypothesized that the number of moves needed to solve the Rubik's Cube, given an ideal algorithm, might be in "the low twenties". In 2007, Daniel Kunkle and Gene Cooperman used computer search methods to demonstrate that any 3×3×3 Rubik's Cube configuration can be solved in a maximum of 26 moves.

In 2008, Tomas Rokicki lowered the maximum to 22 moves. In July 2010 Tomas Rokicki, Herbert Kociemba, Morley Davidson, and John Dethridge proved that God's Number is exactly 20.

The arrangement known as the super-flip, where every edge is in its correct position but flipped, requires 20 moves to be solved (Using the official notation, these are: U R2 F B R B2 R U2 L B2 R U' D' R2 F R' L B2 U2 F2).

Competitions and record times

Many speedcubing competitions have been held to determine who can solve the Rubik's Cube in the shortest time. The number of contests going up every year: there were 72 official competitions from 2003 to 2006; 33 were in 2006 alone.

The first speedcubing competition took place in Hungary in January 1980, which Viktor T. Toth won with a time of 55 seconds.

The first world championship was held in Budapest on June 5, 1982, and was won by Minh Thai, a Vietnamese student from Los Angeles, California, with a time of 22.95 seconds.

Since 2003, competitions are decided by the best average of 5, dropping the best and worst time and averaging the middle 3 solves. The World Cube Association maintains a database of all World Cube Association official attempts. In 2004, the WCA made it mandatory to use a special timing device called a Stackmat timer.

Alternative competitions

In addition, alternative competitions are held (these are official WCA recognised events). These include:

Blindfolded solving

Rubik's 3x3x3 Cube: Blindfolded records

Solving the Cube using a single hand

Rubik's 3x3x3 Cube: One-handed

Solving the Cube with one's feet

Rubik's 3x3x3 Cube: With feet