# Magic Cube 4D

MagicCube4D is a fully functional four-dimensional analog of Rubik's cube plus dozens of other beautiful 4D puzzles. The image above shows the 34 puzzle in its solved state.

The program is packaged in an executable jar file which should run on any system with a Java virtual machine installed. Save it to your desktop or anywhere you like, so long as you can find it later. Simply double click it to launch; no installation required. On Windows, you can create a desktop shortcut by right-clicking and selecting "Send to > Desktop" from the drop-down. Please read the FAQ for a more complete description of the puzzle. Polish FAQ here. If it doesn't run, you may need to install a current Java virtual machine. Click here for the latest version.

Don Hatch and Melinda Green have developed this puzzle on and off starting in 1988. Jay Berkenbilt and Roice Nelson later joined and made major contributions. Don and Jay were the first to have solved the puzzle making extensive use of macros. Roice was the first person to solve the puzzle without using macros. For his solution he extended Philip Marshall's 3D "Ultimate Solution to Rubik's Cube" into 4D. You can learn Roice's solution if you don't feel like trying to solve it yourself first. Don even wrote a program that can solve Rubik's cubes in any number of dimensions, and created an alternate MC4D implemention. Finally, the Mathologer on YouTube created a solution tutorial that makes solving this puzzle surprisingly straightforward.

## Melinda's 2x2x2x2

At long last, the world's first true physical 4D twisty puzzle! This is a physical version of the 24. Watch the intro video below and visit the project home page to learn more and get one for yourself.

## Nerd Notes

The mathematically inclined may be interested to know that the number of possible states for the 4D cube is exactly

(24!x32!)/2 x 16!/2 x 2^23 x (3!)^31 x 3 x(4!/2)^15 x 4

which can also be expressed as
32! 24! 16! 2^22 6^32 12^15

or in decimal as 1 756 772 880 709 135 843 168 526 079 081 025 059 614 484 630 149 557 651 477 156 021 733 236 798 970 168 550 600 274 887 650 082 354 207 129 600 000 000 000 000

For comparison the normal 3D Rubik's Cube has only 43 252 003 274 489 856 000 unique positions which is still huge. On the other hand the 4D cube has more potential positions than the total number of atoms in the universe! Far more. Talk about a needle in a cosmic haystack! Click the following link to learn how to calculate 4D cube permutations. Surprisingly even though the number of 4D cube positions is frighteningly large this doesn't mean this puzzle is that many times harder to solve. If you can already solve the 3D cube then you're more than half way to solving this one. All the techniques you already know will apply here as well.

## Related Puzzles

• MagicCube5D - Roice wrote an amazing 5D version of this puzzle that he and some others have even solved. After you get into the 4D hall-of-fame you may want to try for the 5D Hall-Of-Insanity. Here is a video showing the world record shortest 5D solution by Andras Ecseki. And if the 35 with its 810 stickers frightens you, just know that Matthew Sheerin solved the 75 with 24010 stickers!
• Magic120Cell - Roice's standalone 4D analog of the Megaminx twisty puzzle. This monster is composed of 120 hyperfaces each of which is a dodecahedron looking exactly like a Megaminx. It has a total of 7 560 hyper-stickers and a truly astounding 2.3 x 108126 possible positions only one of which is the solved state. Before going any further we should really stop and meditate on just how big a number that is because you really don't see numbers like that every day. Remember above how there are more 34 positions than particles in the universe? Well imagine that every particle in the universe is really a tiny universe, each with as many particles as ours. That's a lot more right? Now imagine that all of those particles in all of those universes is also a whole universe like ours. Much more right? Well imagine repeating that exercise 100 levels deep and only then are we getting close to the number of positions in this puzzle. MagicCube4D now also supports this monster but Roice's version is better if you intend to make a serious attempt at solving it. Noel Chalmers became the first person to solve this behemoth. Be sure to watch the time-lapse video of Noel's solution on YouTube. Congratulations Noel!
• John Bailey's early implementation of a 24 in Javascript.
• In 2010, Andrey Astrelin joined our community and immediately broke several of our most cherished records. Not satisfied, he then wrote and released his own seven dimensional version! MagicCube7D solves the problem of visualizing such a high-dimensional object by starting with our now-familiar 4D projection and then partially unrolling the last three dimensions using a clever fractal-like design. Not just one puzzle this amazing piece of code supports all 12 cubes from 34 through 57. Oh and then he went and solved the 37. Nice going Andrey!
• Magic Cube 3D - David Vanderschel wrote a 3D Rubik's cube simulator using the 3D equivalent of the 4D projection and user interface to the 4D puzzle. It may seem odd to create a 3D analog of a 4D analog of a 3D puzzle but there is a logic to it as it helps to make clear the meaning of the working and user interface of the higher dimensional puzzles. This is a patched version that fixes a crash on the latest Java versions. You can find David's original version here.
• MagicCube2D - Just for fun and to see what the equivalent 2D puzzle would look like.
• A 4D building blocks game by Henryk Trappmann gives us yet another interesting activity to do in 4-dimensions.
• Magic Cube 4D for Android, the mobile version.
• MagicTile from Roice lets you roll your own 2D hyperbolic twisty puzzles including the amazing Klein's Quartic as well as Euclidean elliptical infinite regular polyhedra and even 4D skew polyhedra! MagicTile is a thing of beauty.
• Magic Hyperbolic Tile {6,3,3} from Andrey is the 3D version of Roice's MagicTile because it lives in a hyperbolic 3-space. This puzzle turns out to be devilishly hard but also gloriously beautiful to behold.
• Magic Puzzle Ultimate also from Andrey is his version of MagicCube4D. The user interface is quite different and some experienced users prefer it. It includes some unique and special puzzles such as the much desired and very difficult 24-cell, the 48-cell, the 600-cell along with deep-cut truncated, runcinated, rectified, and snub versions of many of these plus some 5D and 6D puzzles.
• 2D implementations of 3D and 4D twisty cubes by Alex.
• Refle Cube from Nan Ma gives us a 3D Rubik's cube with the ability to allow only reflection moves and other combinations of that basic idea.
• Light's Out 3D Another puzzle by Nan Ma supports dozens of symmetric polyhedra. Nan is getting really good at puzzle making!
• Eleven Cell by Nan Ma may be the most incredible puzzle of all. It's based on an abstract polytope. What's an abstract polytope you say? It's a generalized type of polyhedron entirely unconstrained by geometry.
• Hyperspeedcube by Andrew Farkas is a modern, beginner-friendly 3D and 4D Rubik's cube simulator with customizable mouse and keyboard controls and advanced features for speedsolving.
• Magic Cube 4D VR From GumusGames via Steam, this looks like the sort of 2-handed interaction I always dreamed of for a VR version of MC4D, since anything 1-handed would be no better than a normal PC game. This is just my impression from watching their YouTube announcement video.
Roice wrote a paper describing many of the above puzzles and the way they exploaded from the original Rubik's cube. It was accepted as the cover article in the April 2018 edition of the journal Math Horizons.