5
$\begingroup$

Is there a universally working (I mean, regardless of n) algorithm for Rubik's cube n×n×n ?

It is acceptable to divide n according to whether n is odd or even. (or it is of a form 4k+1,.., etc)

It's okay if it takes a long time, as long as it's not a format like Brute Force.

The core concept is... the principle on which the algorithm is applied must be the same regardless of the value of n.

For example, if there is a way to change just two elements while leaving other elements the same, we could use it repeatedly to get the final form.

$\endgroup$

1 Answer 1

7
$\begingroup$

For a cube of edge n:

  • n=1 is trivial.

  • n=3 can be solved with known algorithms, such as the CFOP method.

  • n=2 has faster algorithms but can also be solved as just the corners of the n=3 case.

  • For n>3, the usual approach is to "reduce n to 3":

  1. solve each face (without edges and corners) independently first
  2. then solve each edge (without corners) independently
  3. finally apply the 3x3x3 solve method.

There are some parity issues which will arise because the first two steps have alternate, incorrect solutions that look the same as the correct ones, but there won't be any new parity problem types after n=5, which makes this approach generally applicable to any n.

EDIT: Just ran across this video where you can see the method in action for a very large n.


For a more theoretically minded approach that requires group theory savviness more than Rubik's cube expertise, you can take a look at this maths.se post.

$\endgroup$
3
  • $\begingroup$ I am trying 4*4*4 cube now, thank you! $\endgroup$
    – imida k
    Apr 7, 2023 at 1:43
  • $\begingroup$ I see that step 1 can be solved recursively, because the faces behave like a (n-2) cube. But how do you complete step 2 without messing up the faces? $\endgroup$ Apr 12, 2023 at 15:08
  • $\begingroup$ @MikeEarnest You can use face turns (won't mess up any existing face or completed edge) to position your target edge pieces just so. Then do your favourite edge piece swap algo. (Which almost certainly starts with an inner slice turn, and quite likely ends by reversing that same move, with some cleverness happening in between.) Also, the faces are way easier than a n-2 cube: there are no corners or edges among the pieces to be solved in this phase, so there are very few dependencies between the faces. $\endgroup$
    – Bass
    Apr 12, 2023 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.