Skip to content

Solving Large Rubik's Cubes within a Factor of 2.37+o(1)2.37+o(1) of Optimal

Jeremy Mrzyglocki, Tomas Rokicki, Maxine Perroni-Scharf, Erik D. Demaine

cs.DS

Abstract

We design optimized algorithms to solve the n×n×nn \times n \times n Rubik's Cube within 30.5n2/lg⁡n+o(n2/lg⁡n)30.5 n^2 / \lg n + o(n^2 / \lg n) moves. This upper bound is asymptotically within a factor of 2.372.37 of the known lower bound, which applies to almost all instances. The constant 30.530.5 is also the first explicit constant factor for the known upper bound of O(n2/lg⁡n)O(n^2 / \lg n), where the implicit constant of the previous algorithm was 1.01⋅10401.01 \cdot 10^{40} (ten duodecillion). Thus we improve the upper-bound constant by a factor of more than 3.30⋅10383.30 \cdot 10^{38} (330 undecillion). Our algorithm runs in time linear in the input size N=Θ(n2)N = Θ(n^2), and uses O(Nlg⁡N)O(\sqrt{N} \lg N) extra space (beyond the state of the cube). Our implementation is the first practical cube solver to generate solutions of length O(n2/lg⁡n)O(n^2/\lg n). Our latest solver outperforms existing solvers for nn as small as 840840.

Create a lesson