← Back to Cookie Club

The Rubik's Cube

A colorful Rubik's Cube

A Rainbow Box! 🌈

The Rubik's Cube is a box with lots of colors. Each side has a different color! Red, blue, green, yellow, orange, and white.

🟥🟦🟩

Twist and Turn!

You can twist it! The colors get all mixed up. The game is to put all the same colors back together on each side.

🔄

So Many Pieces!

It has lots of little squares. You twist and turn them. It is like a puzzle you hold in your hands!

🧩🤩

What Is a Rubik's Cube? 🧊

A Rubik's Cube is a puzzle that fits in your hand. It has 6 sides and each side is a different color. When you twist it, the colors get mixed up!

Who Made It?

A man named Ernő Rubik made it in 1974. He lived in Hungary. He was a teacher who loved building things. It took HIM a whole month to solve his own puzzle!

Why Is It So Hard?

When you fix one side, the other sides get messed up! That is what makes it tricky. You have to think about ALL the sides at the same time.

Fun Fact!

More than 500 million Rubik's Cubes have been sold. That is more than any other puzzle toy ever! Some people can solve it in just a few seconds. 🤯

The World's Most Famous Puzzle 🧩

The Rubik's Cube is the best-selling puzzle toy of all time. Over 500 million have been sold since it was invented in 1974. But here is the wild part: there are 43 QUINTILLION possible ways to scramble it. That is a 43 followed by 18 zeros.

The Inventor

Ernő Rubik was an architecture professor in Budapest, Hungary. He did not set out to make a toy. He wanted to build a model that could show how 3D objects move. When he twisted his creation for the first time and saw the colors scatter, he realized he had accidentally made a brilliant puzzle.

It took him about a month to solve it himself.

How It Works

A standard Rubik's Cube is 3 layers tall, 3 layers wide, and 3 layers deep (called a 3×3). It has 26 small pieces called "cubies." Six center pieces stay fixed. Eight corner pieces and twelve edge pieces rotate around them.

The 6 center squares never move relative to each other. White is always opposite yellow. Red is always opposite orange. Blue is always opposite green.

Speedcubing

Competitive solving is called "speedcubing." The fastest solvers can finish in under 4 seconds. They memorize sequences of moves called algorithms. The world record single solve is 3.13 seconds, set by Max Park in 2023.

Try It Yourself

Most beginners learn to solve it layer by layer. First the white cross, then the white corners, then the middle layer, and finally the yellow side. With practice, anyone can learn to solve it!

43 Quintillion Scrambles, One Goal

The Rubik's Cube has exactly 43,252,003,274,489,856,000 possible positions. That number is hard to picture, so try this: if you had one cube for every possible scramble and lined them up, the line would stretch from Earth to the nearest star system, Alpha Centauri, and back. Thousands of times.

The Invention Story

Ernő Rubik created the cube in spring 1974 in Budapest. He was 29, teaching interior design at the Budapest College of Applied Arts. His goal was to create a structural model where parts could move independently without the whole thing falling apart. He used wood blocks, rubber bands, and paper clips for his first prototype.

The puzzle launched commercially in Hungary as the "Bűvös Kocka" (Magic Cube) in 1977 and went international as the Rubik's Cube in 1980. Within two years, it was the most popular toy on the planet.

The Math Behind the Moves

Every Rubik's Cube position belongs to a mathematical structure called a group. Each twist is an operation, and combinations of twists follow the rules of group theory. The "Rubik's Cube group" has those 43 quintillion elements.

A group is a set of elements combined with an operation. For the Rubik's Cube, the elements are positions and the operation is a twist. Every twist has an inverse (twist it back), and doing nothing counts as the "identity" element.

God's Number

In 2010, a team of researchers proved that any scrambled Rubik's Cube can be solved in 20 moves or fewer. This optimal worst-case count is called "God's Number." The proof required 35 CPU-years of computation donated by Google.

If you tried every possible scramble at 1 per second, it would take about 1.37 trillion years. The universe is only 13.8 billion years old.

Speedcubing Methods

Two dominant methods exist. The CFOP method (Cross, F2L, OLL, PLL) requires memorizing 78 algorithms. The Roux method uses block-building and requires fewer algorithms but more intuition. Top competitors average under 6 seconds using CFOP.

Group Theory in Your Hands

The Rubik's Cube is arguably the most widely owned physical representation of abstract algebra. Its 43,252,003,274,489,856,000 reachable states form a permutation group under composition. The group can be described by six generators (the six face rotations: U, D, L, R, F, B) and their relations.

Why Not More Positions?

A naive count suggests more possibilities. There are 8 corner cubies, each with 3 orientations, and 12 edge cubies, each with 2 orientations. That gives 8! × 38 × 12! × 212 ≈ 5.19 × 1020. But physical constraints impose three parity rules:

So: 8! × 38 × 12! × 212 / (2 × 3 × 2) = 43,252,003,274,489,856,000.

The Rubik's Cube group is a subgroup of S₄₈ (the symmetric group on 48 movable facelets). Its structure has been fully characterized: it is isomorphic to (Z₃⁷ ⋊ S₈) × (Z₂¹¹ ⋊ S₁₂) / Z₂, where the Z₂ quotient enforces the permutation parity constraint.

God's Number: The Diameter Problem

The diameter of the Cayley graph for the Rubik's Cube group, using the half-turn metric, is exactly 20. Morley Davidson, John Dethridge, Herbert Kociemba, and Tomas Rokicki proved this in 2010. Their proof partitioned all 43 quintillion positions into 2.2 billion cosets, solved each coset optimally, and verified no position required more than 20 moves. The computation used Google-donated cloud resources equivalent to 35 CPU-years.

Algorithmic Approaches

Herbert Kociemba's two-phase algorithm dominates both competitive and computational solving. Phase 1 reduces an arbitrary position to the subgroup ⟨U, D, R2, L2, F2, B2⟩ (roughly 20 billion positions). Phase 2 solves within that subgroup. The approach exploits coset decomposition to drastically prune the search space.

Competitive Frontier

Max Park holds the single-solve world record at 3.13 seconds (2023). His average-of-5 record is 4.86 seconds. The robot record, held by Mitsubishi's TOKUFASTbot, is 0.305 seconds. Machine solves use dedicated step motors and computer vision; they are interesting engineering exercises but solve a fundamentally different optimization problem than human speedcubing.

From Budapest to Permutation Groups: The Rubik's Cube at 50

Ernő Rubik built his first prototype in spring 1974 from wooden blocks held together with rubber bands, intending not a puzzle but a teaching aid for spatial reasoning. The mechanism's genius is its internal pivot: a rounded core allows each of the six faces to rotate independently while holding 26 cubies in a stable lattice. When he scrambled it and struggled for a month to restore it, he recognized the commercial potential.

Mathematical Structure

The cube's state space comprises exactly 43,252,003,274,489,856,000 reachable positions, forming a group under the composition of face rotations. The group is generated by six elements {U, D, L, R, F, B} and is isomorphic to (Z₃⁷ ⋊ S₈) × (Z₂¹¹ ⋊ S₁₂) / Z₂. Three constraints (edge orientation parity, corner orientation parity, and permutation parity) reduce the naive combinatorial count by a factor of 12.

This structure makes the Rubik's Cube one of the most accessible physical examples of a non-abelian group. It has been used in university mathematics courses worldwide as an introduction to group theory, conjugation, and commutator structures.

The Diameter of the Cayley Graph

The proof that God's Number equals 20 (Rokicki, Kociemba, Davidson, Dethridge, 2010) is one of the largest mathematical results obtained through massive computation. The team exploited symmetry reduction (the 48-element symmetry group of the cube itself) and Kociemba's two-phase coset decomposition to reduce the problem to verifying about 56 million coset representatives. Google donated the equivalent of 35 CPU-years of idle compute time.

In the quarter-turn metric (where a 180° turn counts as two moves), the diameter is 26, proved by Rokicki in 2014.

Cultural and Economic Impact

Rubik's Brand Ltd. (majority-owned by Spin Master since 2021) reports cumulative sales exceeding 500 million units, making it the best-selling single toy in history. The World Cube Association (WCA) sanctions competitions in 17 event categories across 130+ countries. The speedcubing community grew roughly 40% annually from 2018 to 2024, driven by social media tutorials and affordable hardware from Chinese manufacturers (GAN, MoYu, QiYi).

Computational Solving

Kociemba's two-phase algorithm remains the gold standard for near-optimal solving. Phase 1 maps an arbitrary cube state into the subgroup G₁ = ⟨U, D, R², L², F², B²⟩, which has about 19.5 billion elements. Phase 2 solves within G₁. Modern implementations (e.g., min2phase by Chen Shuang) find near-optimal solutions in under 10 milliseconds on consumer hardware.

Machine learning approaches (DeepCubeA, Agostinelli et al., 2019) have demonstrated that deep reinforcement learning can learn to solve the cube without human-designed heuristics, finding near-optimal solutions by training on reverse scrambles from the solved state. However, these approaches remain slower than classical IDA* with Kociemba's pruning tables.

Sources

  1. Rokicki, T., Kociemba, H., Davidson, M., Dethridge, J. "God's Number is 20." (2010). cube20.org
  2. Joyner, D. Adventures in Group Theory: Rubik's Cube, Merlin's Machine, and Other Mathematical Toys. Johns Hopkins University Press, 2008.
  3. Agostinelli, F., McAleer, S., Shmakov, A., Baldi, P. "Solving the Rubik's Cube with Deep Reinforcement Learning and Search." Nature Machine Intelligence, 1, 356-363 (2019).
  4. Rubik, E. Cubed: The Puzzle of Us All. Flatiron Books, 2020.