# How many solvable permutations of the Rubik's cube exist where each color appears at least once on every side?

Every now and then, scrambling my Rubik's cube I find it in a state where every side has at least one tile in each of the six colors. For example here's a scramble I just did (obviously put through a solver after-the-fact to get an optimized algorithm):

F2 U' L2 R2 B2 U R2 D U2 B2 U R2 F' R' B2 D' B' L' D2 B' F R2


This results in the following configuration (where U is white and F is green):

There are absolutely no other special properties about these scrambles that I can think of, other than the fact that every color appears at least once, but never more than three times, on each side. In particular, any number of tiles of the same color may be adjacent to one another, and it doesn't matter to me "how" randomized it is.

These cases don't seem particularly uncommon, as I stumble upon them once every few dozen solves. How many such permutations that are solvable exist?

Also, are there any legal permutations where the same color appears four times on the same side (leaving one for each of the remaining five colors), and why/why not? I'm surprised I haven't come across any yet — I figured I would have come across a few of them if they did in fact exist.

• did you mean "but never more than four times"? – JLee Jul 13 '15 at 18:33
• @JLee: I thought I did, but I've encountered at least 20 of these permutations now and absolutely none of them had any face with 4 tiles of the same color. – BoltClock Jul 13 '15 at 18:43
• 20 out of the possible 43 quintillion doesn't seem so convincing! :) – JLee Jul 13 '15 at 18:45
• I think the answer might require group theory, combinatorics, equivalence classes... I'm not trying to scare you off, but this may be better suited for Math.SE. Have you tried it there? But plenty of math geniuses are here also, though. – JLee Jul 13 '15 at 18:49
• @JLee: Considering ~43 quintillion is the total number of solvable states (besides the solved state) I'm sure I'm thinking of a fairly smaller subset here (maybe in the trillions), but I see your point... – BoltClock Jul 13 '15 at 18:51

Seems like this works?

B  L' D  U' B' R  U' L2 B' U  L' U' L  R' U' R  U2 F' U' F  B  U
B' U' B  U  B' D  U  L' U  L  D  U  F' U  F  D  U2 B  U' B' D  U  L  U'
L' U' B' U  B  R  U  B  U' B' R' U' F  U' B' U  F' U' B2 U' F  U  L
F  L' B' L  F' L' U' F' U


It's not unique btw, the bottom four edge colours can easily be permuted, for example.

I don't know the answer to the OP's question and doubt anyone knows, but I find the question about "any permutation" interesting and may be it can help as a first step.

So the task is to put 6x9 coloured objects, 9 of each colour into 6 distinguishable faces, each face has 9 distinguishable cells, in a way that each face contains each colour. And we don't distinguish two ways, which are differ by interchange of objects of the same colour between faces.

I got the result of ~= 2*10^27.

Note, this number is quite bigger than number of any solvable positions of the cube: ~=4*10^19. This is because we consider not only solvable+unsolvable positions of the cube, but any placement of colour on it's faces (so some of our permutations can't be reached even by disassembling the cube).
But anyway I find it nice that one can find this number. For example, when I tried to find number of "any combinations" (ignoring positions of colours within each face) I failed to do this (this is doable, but would take several hours of quite stupid work for considering different possibilities).

The next step would be taking into account that different cells are dependent on each other because of technical properties of the Rubik's cube. May be instead of considering faces one should consider rotations.

Here is the prove for the given number:

Each face must contain one object of each colour, independently of the permutation. That gives 6x6=36 objects in total. Each of 6 objects can be puted onto a face in P(9,6) = 9!/6! ways. This gives P(9,6)^6 permutations for those 36 objects.

For each of those permutations we have some permutation of the rest 6x3=18 objects. They can be distributed between 6x3 = 18 cells arbitrary. Using Permutations with Repetition formula we get here 18!/(3!)^6 permutations.

Therefore, in total we have (9!/6!)^6*18!/(3!)^6 = 18!*(9!/6!/3!)^6 = 18!*84^6 ~= 2*10^27 permutations.