6

I wonder if I can apply some kind of formula given a few colors with the location on a Rubik's Cube to calculate the locations of all other colors on it. Best would be if this formula would be so general that one could apply it for any kind of Rubik's Cube like 2x2x2, 3x3x3 4x4x4, etc.

I'm not very good at math and I don't even know how to try to start analyzing this problem but I'm very curious how this could be done.

  • 4
    To my knowledge for a 3x3 it would have to be all but 2 colors, as it is possible to permute 3 such that it is unknown whether they are in position 1, 2 or 3. Haven't thought about it for higher orders but for 4x4x4 by extension it would be at most all but 6. – Jordan Abbott Jul 19 '19 at 11:46
  • The question [obscuring squares of Rubik's cube] is a similar problem, but is different because there you start by deciding which stickers to peel off while the cube is in a solved state, and then the missing stickers simply turn by the cube. – hmakholm left over Monica Jul 21 '19 at 12:24

1 Answers1

9

On a 4×4×4 or larger cube you can reach a configuration where the only visible difference from "solved" is that two of the stickers are out of place. (There will also be at least one center piece that has been replaced by another center of the same color, but that is not visible). See this animation for a sequence of moves exhibiting this. It permutes three center pieces in a 3-cycle, two of them on the same face so the visual net effect is one of two stickers trading places.

enter image description here

This is not possible on a 3×3×3 cube, because there are no identical center pieces to permute. The best you can do is three stickers out of place relative to solved, as @CooperCape points out in a comment. In the animation below the three cyclically permuted stickers are on the edge pieces of the top layer. The white faces of those cubes stay on the top surface, hence the appearance is that of three cyclically moved stickers. The cube in the animation has blue and green at opposite faces so the 3-cycle goes (green, blue, red).

enter image description here

For a 2×2x2 the best you can do is 4 stickers out of place.

So if your adversary decides which stickers you get to see, you might need to see all but $3, 2, 1, 1, 1, \ldots$ stickers before you know what the rest of the cube looks like.


If you decide which stickers to inspect, you can be a bit smarter than that. The pieces of the cube fall into different orbits that cannot be interchanged with each other -- for example, you cannot move an edge piece to a corner position -- so you could omit all the stickers on one of the pieces in each orbit and reconstruct its identity and orientation.

And you can be even more clever than that. I'm not sure offhand exactly how far down you can go (especially if you're allowed to let the stickers you inspect depend on what you've already seen), but here is one plan to start with, for a cube of side length $2k+1$ (where $k\ge1$):

  1. You need to inspect two middle centers to find the orientation of all the centers in space. But you can leave the other $4$ middle centers out.

  2. There is one orbit for the corners. We can ignore one sticker on each corner -- seeing two sides of a corner piece is enough to know for certain which one it is and how it is oriented. On the last corner we can omit all of the stickers: Which corner it is follows by elimination, and its orientation is determined by the other corners. All in all, you're leaving out $10$ corner stickers.

  3. There is one orbit for the middle edges; it works just as the edge orbit in a 3×3×3. You can leave out $3$ stickers, two of which on the same piece. When you have identified all of the other pieces, which of the last two is which follows by the common parity or corner+edge permutations, and their orientations can then be deduced by looking at only one sticker.

  4. The center pieces that are not in the middle fall in $k(k-1)$ orbits of $24$ pieces each. Each orbit can only be permuted with the same parity as the corners were, but there are enough indistinguishable pieces that each impossible permutation looks exactly like one of the possible ones anyway. So you can leave out only $1$ sticker in each orbit.

  5. The non-middle edge pieces have $k-1$ orbits, each of which can be permuted freely. But their orientation cannot vary, so we can at least omit $2$ stickers in each orbit.

All in all this strategy lets us omit at least $$ 4 + 10 + 3 + k(k-1) + 2(k-1) = k^2+k+15 $$ of the $ 6(2k+1)^2 = 24(k^2+k)+6 $ stickers of the cube.


An even-sided cube of side length $2k$ is simpler, because there are no middle pieces. At first it can feel disorienting that we can't use the middle centers as a fixed frame to reference everything else to (it certainly did for me), but in fact this turns out not to be a problem for this task at all:

  1. For the corners we can omit $11$ stickers as before.

  2. The edge pieces fall into $k-1$ orbits, each of which can be permuted freely. As before we can omit the $2$ stickers on the last piece.

  3. The center pieces fall into $(k-1)^2$ orbits, each with four pieces of each color. As before, we can only omit $1$ sticker in each orbit.

All in all we can omit $11+2(k-1)+(k-1)^2 = k^2+10$ stickers for the $2k$-sided cube. And this holds even for $k=1$.

  • Nice! My animations have relatively little mathematical relevance, and are kind of useless on their own. Would you object to me editing them into your answer? – Jyrki Lahtonen Jul 19 '19 at 14:02
  • @JyrkiLahtonen: Sure, feel free. – hmakholm left over Monica Jul 19 '19 at 14:36
  • Thank you, such a great answer and very well explained! If I'll have enough time I will try to write a program that will calculate missing colors based on this - unless I find existing code in the meantime. ;) – Cold_Class Jul 19 '19 at 20:43
  • @HenningMakholm regarding the very last paragraph: aren't there 6 * ( k ^ 2 ) stickers on a cube in total? Where do the "+1" and "2*" come from? – Cold_Class Jul 20 '19 at 22:23
  • @Cold_Class: The side length is $2k+1$. I wasn't quite sure what will work for an even-sided cube, since it doesn't have any middle centers of fixed orientation. – hmakholm left over Monica Jul 21 '19 at 04:21
  • @HenningMakholm Ah, I think for a second I got confused because I though "k" was the dimension. But I guess for a 3x3x3 cube "k" would be 1 and for a 5x5x5 cube "k" would be 2, and so on - did I get it this time? :D – Cold_Class Jul 21 '19 at 09:28
  • 1
    @Cold_Class: Correct. – hmakholm left over Monica Jul 21 '19 at 12:08
  • @hmakholmleftoverMonica beautiful answer , but i wonder one thing the first animation you gave has a method to get the two plaves switch colours .but can we have a different set of moves which does the same effect ? And how does these algorithms are found by computer or is that humans only find it computer just used those moves to solve it ? – ProblemDestroyer Sep 19 '22 at 04:11