aji's Molecube Page

January 14, 2024 (last edited January 15, 2024)

Note: The diagrams in this article are interactive! You can click and drag on them with your mouse to rotate the cube and view it from all sides.

Table Of Contents

The Puzzle

The Molecube, sometimes called a Nine-Color Cube, is like a combination of a Rubik's Cube and a sudoku puzzle. The puzzle consists of spheres in a 3×3×3 arrangement where each face can be rotated in increments of 90°, and the goal is to find a state where each of the 9 colors appears exactly once on each face.

The cube in a solved state.

While superficially it seems like the puzzle could be solved in the same manner as a Rubik's Cube, there is an important difference. With a Rubik's Cube, it's easy to tell if the solution is getting closer or farther, since each piece is labeled with its exact location. The Molecube, however, is not so generous. The two green spheres, for example, are corner pieces, so they must be diagonally opposite from each other, but there are 4 such configurations to choose from, and it's not immediately clear which of them would be correct or how this interacts with the placement of the other corner pieces.

It turns out, however, that the Molecube is constrained in such a way that there are 80 possible solutions, which we will show in this article. In doing this, we will familiarize ourselves with the constraints of the cube and learn how the different solutions can be broken down and classified. Familiarity with the Rubik's Cube and basic group theory is a helpful prerequisite, but is not required.

Piece Inventory

Like a Rubik's Cube, a piece can never change type. For example, a corner piece can never become an edge piece, and vice versa. Furthermore, like a Rubik's Cube, the relative location of all the face pieces can never change. Although there are nine colors, not all colors have the same inventory of piece types. The colors can be sorted into three types.

Note that we will frequently distinguish between colors and pieces. When we talk about an "edge color" or a "face color" we are referring to the entire inventory of pieces that consist of that color. On the other hand if we say "edge piece", "corner piece", or "face piece", we are referring either to all the pieces of that type, or to the locations on the cube where those pieces could go. It's important to pay attention to this distinction, because the term "face color" does not obviously imply edge and corner pieces, but that is exactly the sense in which we are using it. Likewise, while the term "edge pieces" does include the edge colors, it also includes the edge pieces of the face colors.

Note: It's helpful to take a moment to consider some of the relationships between piece types. A corner piece sees 3 faces, 9 edges, and 6 corners. An edge piece sees 2 faces, 6 edges, and 6 corners. A face piece sees 4 edges and 4 corners. The most important of these will be how many faces each piece type sees, but the others will come up from time to time as well.

Green

The green pieces will always appear on opposite corners.

The simplest color is green which consists of two corner pieces. Because each corner sees 3 faces, the green pieces will always need to be placed on opposite corners. This gives 4 possible choices for how to place them. As we will see, this is an important starting point for finding solutions.

Edge Colors

A highly symmetric arrangement of red and purple pieces.
A less symmetric arrangement, following a different kind of pattern.

The next simplest colors are red and purple, which only appear as edge pieces so they are called edge colors. There are three edge pieces for each edge color. The possible arrangements are harder to classify than for the green pieces, but do follow a pattern, as we will see later.

Face Colors

Only the face pieces.
One possible arrangement of the blue pieces.

The remaining six colors are face colors, and have one face piece, one edge piece, and one corner piece. It will occasionally be useful to group these colors in pairs according to which colors appear opposite to each other. The face color pairs are white and black, blue and cyan, and yellow and orange.

Exploring The Constraints

Having familiarized ourselves with the types of pieces, it's now time to dive deeper into the constraints on the placement of face colors and edge colors. For now we'll only focus on one color at a time. The interactions between colors will be explored when we count the solutions. This section is mainly about familiarizing ourselves with how the rules of the puzzle constrain the placement of the different piece types, and characterizing the possible arrangements in a way that will make it easier to wrap our heads around how these constraints interact.

Arranging The Face Colors

The green pieces are the easiest to place, and when introducing them we already explained that they must go on opposite corners. After the green pieces, the face colors are the easiest to characterize. The locations of the face pieces are fixed, so for each color we only need to place a corner piece and an edge piece. Because each face piece sees four corners, the matching corner piece must go on one of the remaining four corners. Once the corner piece is placed, the location of the edge piece is forced. In all four cases, the corner piece will be in the opposite face, and the edge piece will be in the layer between the two faces.

The blue face piece. The blue corner piece can go in any of the spots marked in white, and not in any of the spots marked in black.
The blue face and corner pieces placed. These pieces see all but one edge, marked in white, where the blue edge piece must go.
The final arrangement for this particular choice of corner piece.

Notice how there are only 4 choices for how to place the corner and edge pieces for any given face color, and also that all of these arrangements are rotations of each other around the axis intersecting the matching face piece. Knowing this, we could also imagine first placing the edge piece in one of its 4 valid positions in the middle layer, followed by placing the corner piece. However, it's best to imagine placing both pieces at the same time by choosing one of the 4 valid configurations.

All valid arrangements of the blue pieces are rotations of each other around the blue axis. In white are the other positions that can be used.

What kinds of things might further constrain the placement of a face color's edge and corner pieces? For the corner piece we know that one of the possible corners will always be used by a green piece, since every face must have a green piece and they always show up as corners. For the edge piece, the available edges can only be used by an edge color or another face color. However, not all face colors are possible. Since a face color's edge piece must be placed on an edge perpendicular to that face and every edge is only perpendicular to two faces, each edge can in fact only support two face colors and the two edge colors. Later will develop tools for understanding the interactions between these constraints at a global level.

Arranging The Edge Colors

An illegal placement of red edge pieces. We can't place the third red piece because the remaining faces, marked in white, are not adjacent.

The placement of edge colors is slightly harder to visualize than for face colors, but follows a straightforward pattern. The first thing to note is that, because each edge piece sees two adjacent faces, we can imagine our task as dividing the cube up into 3 pairs of adjacent faces. In particular this means we can never place two edge colors diagonally opposite of one another, because the remaining two faces would not be adjacent.

There are 8 ways to place each edge color which are all reflections and rotations of each other. We can count them in the usual way. We know that the top layer must contain one of the edge pieces, and there are 4 places for it. This will use up two faces. The bottom face must also contain an edge piece, and only 2 of them are a valid choice. The placement of the remaining edge piece is forced, giving a total of 8 possible arrangements.

Note that the placement of one color will reduce the options for how to place the other color. For example, if we choose to place red first, we have 8 options for red, but less than 8 for how to place purple. In other words, there are less than 64 options for how to place the red and purple pieces together. However, the exact number is not important to us, because later on we will need to consider the restrictions imposed by the placement of face colors on the edges as well. All that matters for now is the patterns followed by the edge colors individually, of which there are only 8.

There are many ways we can classify the options for edge color placement. One that will be useful to us is based on the long diagonals, and the direction that the pieces wind around it. Note that every layer contains a piece, regardless of the type of layer (e.g. front to back, left to right, or top to bottom). If we look at the cube down the long diagonal and step through the layers from front to back, the pieces will go around the long diagonal in either a clockwise or counterclockwise direction. This gives another way for counting the possible arrangements: there are 4 choices of long diagonal, and 2 choices of winding direction.

The long diagonal in green, and in white the "equator" that the pieces will wind around.
The red edges in a "clockwise" arrangement around the long diagonal in green.
The red edges in a "counterclockwise" arrangement around the long diagonal in green.

Counting The Solutions

To count the solutions, we will have to explore the constraints in more detail and figure out what decisions we get to make and how many choices there are. We will also need to do this in a way that convincingly leaves out no possibilities.

An important question to ask at this point is whether a particular arrangement of pieces is actually reachable by twisting the faces of the cube. We can in fact reach any arrangement by solving the cube like a Rubik's Cube. Many approaches are possible, but one is to use CFOP strategies for the first two layers, skip OLL, and use 2-look PLL algorithms for last layer. If we find ourselves in a situation where we only need to swap two edge pieces, we can do a PLL pair swap with a setup move that places two red or purple pieces where one of the pairs is. Swapping the red or purple pieces will have no effect on the overall solution, meaning the pair swap acts like a single edge swap.

A Different Kind Of Puzzle

Before we continue, we need to start looking at the cube differently. We can represent the cube and its edges as a hexagon. Note that, except for the two corners of a long diagonal, every corner and edge of the cube is represented with a corner or edge of the hexagon diagram.

Rearranging the cube and its edges into a hexagon.
The cubes in the top row correspond to the hexagons underneath them.

This might seem like a small change, but it has an important effect: the cube is a 3-dimensional object, while the hexagon is 2-dimensional. The hexagon and the cube have a different set of geometric symmetries, meaning some symmetric aspects of the constraints which are hard to visualize on the cube become much easier to reason about when represented on the hexagon. Furthermore, we know the green pieces will be placed on a long diagonal, and that the center point of the hexagon corresponds to two diagonally opposite corners, meaning that, if we place the green pieces at the center, we no longer have to think of them as being in two places.

Edge Colors On The Hexagon

We know that we can place edge colors by picking a long diagonal and winding the pieces around in either a clockwise or counterclockwise direction. We also know that the long diagonals are symmetric under rotation by 90° around the axes perpendicular to the faces, an action with a cycle length of 4. So, our strategy for enumerating the hexagon diagrams for all the placements of edge colors will be to write out the clockwise and counterclockwise arrangements for one choice of long diagonal, then rotate it by 90° four times for one choice of axis. Luckily for us, starting with the long diagonal represented by the center of the hexagon turns out to produce the simplest diagrams.

Placing the red pieces clockwise (top row) and counterclockwise (bottom row) around the long diagonal in the center of the hexagon.

Now all we need to do is rotate these diagrams by 90° around an axis. We'll do a clockwise rotation looking at the top of the cube, called a y move in Rubik's Cube notation. To visualize the effect this will have on the hexagon, it's easiest to imagine the three 4-cycles of edges:

The three 4-cycles of edges when rotating the cube around the Y axis.
The same cycles on the hexagon.

Each 4-cycle has one edge piece in it. When we rotate the cube by 90°, the edge piece will move to the next edge in the cycle. Doing this 3 times from our two starting positions will give us the 8 possible arrangements of the red pieces on the hexagon, listed out in the following table.

90°
90°
90°
90°
90°
90°
All 8 possible placements of edge colors, represented on the hexagon.

The reason this is so awkward on the hexagon is because we are exploiting a symmetry of the cube. Geometrically, the cube and the hexagon are different objects with different symmetry groups, so a geometric permutation of edges and corners on one object can look a lot different on the other. However, having listed out the hexagon diagrams for all the arrangements of edge color pieces, a different set of hexagon-based symmetries show up. The patterns can be organized into two sets, where the patterns in each set are all 60° rotations of each other, a symmetry which is very natural on the hexagon.

The above table arranged differently, according to symmetries of the hexagon. The first type of solution, using 3 outside edges, repeats after two 60° rotations. The second type of solution, using 1 outside edge, repeats after six 60° rotations.

Note that, because a 60° rotation never causes an outside edge to become an inside edge or vice versa, all diagrams within a set will always have the same number of outside edges. The diagrams in the set of two all have 3 outside edges, and the diagrams in the set of six all have 1 outside edge. Because a complete solution needs both the red and purple pieces to be placed, and because those pieces must be placed according to these diagrams, the outside edge of the hexagon will always contain a nonzero and even number of edge color pieces, specifically 2, 4, or 6.

Face Colors On The Hexagon

To place the face colors on the hexagon, we'll start by reminding ourselves of the constraints we explored earlier. We know that for each face color there are 4 possible arrangements, that one of these will be occupied by the green corners, and that the pieces will always lie in the edges perpendicular to the face whose color we're placing. Let's start by visualizing one of the colors on the hexagon to see what we get.

The possible arrangements of blue pieces, given a particular choice of green corner. In our hexagon diagrams, the green corner always occupies the center spot.

This is a start! But it would be nice if the corner and edge piece were next to each other and moved like a single object. This would make it a lot easier to visualize the placement of face colors. What we can do is rotate just the vertices by 180°, to put them next to the corresponding edge.

Rotating the vertices by 180° to place them next to the edges.
All on the same diagram

This seems to be what we want! It appears as if corner pieces are restricted to an outside vertex, and the edge must be going in a particular direction relative to it. Indeed, if we were to do this with the other face colors we would find a similar pattern. Each face color is placed as a vertex-edge pair like this, with the edge going in a unique direction. We will need to remember that the hexagon vertices no longer correspond directly to the cube vertices as we were doing previously, but instead to the vertices 180° away.

Note that, because, for a given choice of green placement, the color of each corner and edge piece combination is uniquely determined by its direction, and vice versa, we will omit the colors and use arrows instead. We can always recover the colors for each arrow.

Recall that, in order to fit all the edge colors, we must leave 2, 4, or 6 outside edges unused by face colors. If we leave all 6 outside edges open, we arrive at one particular highly symmetric solution. This is the only solution of this type.

The unique hexagon diagram that leaves 6 outside edges unused.

To turn this diagram into a complete face color placement, we need to choose a placement of the green colors, recover the unique face colors for each arrow, and undo the 180° rotation. The following figures show this process.

The face pieces and one choice of green placement.
The above hexagon diagram, with colors for this choice of green placement.
Rotating the vertices by 180° and adding one of two placements of edge colors.
The resulting solution.

At this point it's worth pointing out that transforming any solution according to a symmetry of the hexagon (i.e. rotations or reflections) will give another valid solution, after relabeling the colors appropriately, since the number of outside edges and the set of angles used by the arrows are not changed by the transformation. We can tell that any such transformation of the above solution would result in the same solution.

How many ways are there to leave 4 outside edges open, i.e. use 2 edges for arrows? Since solutions are symmetric up to reflections and rotations of the hexagon, we can start, without loss of generality, by placing one arrow on the outside. To leave 4 outside edges unused, we know that 4 of the 5 remaining arrows will have to be pointing inward, but one of these directions is already used by the first arrow we placed, meaning there is only one possible choice for how to place the remaining arrows. We also need to check that this solution can fit an arrangement of red and purple pieces.

The first choice of edge, with no loss of generality.
The only valid completion of this pattern that leaves 4 outside edges unused.
Adding in the red and purple edges.
The solution described by this hexagon for a choice of green placement.

Because this solution is symmetric with respect to reflection, there are only 5 other solutions of this type, via repeated rotation by 60°, for a total of 6.

Having found all the arrow placements that leave 6 and 4 outside edges open, and confirming that an arrangement of red and purple pieces exists for the remaining edges, all that's left to do is determine how many arrow placements leave 2 outside edges open while still leaving room for red and purple.

Once again, because solutions are symmetric with respect to reflection and rotation, we can start by placing an arbitrary arrow pointing inward and examine the 3 ways we can place a second arrow pointing inward. We find that only one case works:

The arrows 1 vertex away. This arrangement forces the two vertical arrows into one spot, marked in red, so does not work.
The arrows 2 vertices away. The only valid placement of an arrow on the vertex between them is pointing inward, so this solution does not work.
The arrows 3 vertices away. This solution works, and the placement of the remaining arrows is forced. It can also fit the red and purple edges.

This solution symmetric with respect to reflection and 180° rotation, meaning the symmetries of the hexagon will give us two more solutions, for a total of 3.

The Final Tally

We identified 10 different ways to fill out the arrow diagram, each one corresponding to a unique arrangement of face color pieces for each choice of green placement. Each arrow diagram forces a specific arrangement of red and purple pieces, where the only thing we can do is swap the red and purple.

Every arrangement of arrows. The diagrams in each row are rotations and reflections of each other.

Thus, we can finally tally up the number of solutions:

This gives us a total of 80 solutions. □

Other Work

The Rubik's Cube Variants section of Jaap's Puzzle Page mentions the Molecube, which he refers to as the Nine-Color Cube, and also concludes that there are 80 solutions. (Note that his version of the puzzle uses different colors, but the color types and piece inventory are the same as I used in this article.) As far as I was able to find, he was the first person to identify and characterize all 80 solutions, and did so years before I was even aware of the puzzle.

His argument is based on finding 3 different types of solution, characterizing the permutations that go between them, and then counting the solutions based on that. For example, the second type of solution can be reached from the first type of solution by holding the cube such that a green corner (which on his puzzle is red) is at a particular location, and executing a particular algorithm. Since there are 6 ways of doing this, there are 6 times as many of the second pattern as the first pattern.

I found Jaap's argument unsatisfying, since he doesn't explain why these permutations always lead to a new solution, meaning there could possibly be fewer than 80 unique solutions. Furthermore, no explanation is given for why there are only 3 types of solution, meaning there could possibly be more than 80 solutions. It's possible there's something I'm not seeing, but I need it spelled out for me.

That's not to say I think Jaap's argument is wrong. And in any case, he seems more interested in satisfying his curiosity than about building an airtight argument, and I think the level of detail he used is perfectly acceptable in that context. Indeed, what's remarkable is that, despite the vagueness of his explanation, he has arrived at the correct number regardless. It took me a lot more writing to convince myself that this number was correct. Maybe Jaap has spent so much time with so many different puzzles that he doesn't need so many details and diagrams and enumerations to convince himself. Maybe if I had studied his explanation in more detail, I would also be convinced. However, I decided I would instead start from the ground up with a different approach.