Abstract
The Rubik’s Cube is perhaps the world’s most famous and iconic puzzle, well-known to have a rich underlying mathematical structure (group theory). In this paper, we show that the Rubik’s Cube also has a rich underlying algorithmic structure. Specifically, we show that the n ×n ×n Rubik’s Cube, as well as the n ×n ×1 variant, has a “God’s Number” (diameter of the configuration space) of Θ(n 2/logn). The upper bound comes from effectively parallelizing standard Θ(n 2) solution algorithms, while the lower bound follows from a counting argument. The upper bound gives an asymptotically optimal algorithm for solving a general Rubik’s Cube in the worst case. Given a specific starting state, we show how to find the shortest solution in an n ×O(1) ×O(1) Rubik’s Cube. Finally, we show that finding this optimal solution becomes NP-hard in an n ×n ×1 Rubik’s Cube when the positions and colors of some cubies are ignored (not used in determining whether the cube is solved).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
World Cube Association. Official results (2010), http://www.worldcubeassociation.org/results/
Cook, S.A.: Can computers routinely discover mathematical proofs? Proceedings of the American Philosophical Society 128(1), 40–43 (1984)
Driscoll, J.R., Furst, M.L.: On the diameter of permutation groups. In: Proceedings of the 15th Annual ACM Symposium on Theory of computing, pp. 152–160 (1983)
Drucker, A., Erickson, J.: Is optimally solving the n ×n ×n Rubik’s Cube NP-hard? Theoretical Computer Science — Stack Exchange post (August-September 2010), http://cstheory.stackexchange.com/questions/783/isoptimally-solving-the-nnn-rubiks-cube-np-hard
Even, S., Goldreich, O.: The minimum-length generator sequence problem is NP-hard. Journal of Algorithms 2(3), 311–313 (1981)
Fox, F.: Spherical 3x3x3. U.K. Patent 1,344,259 (January 1974)
Furst, M., Hopcroft, J., Luks, E.: Polynomial-time algorithms for permutation groups. In: Proceedings of the 21st Annual Symposium on Foundations of Computer Science, pp. 36–41 (1980)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness, 1st edn. Series of Books in the Mathematical Sciences. W. H. Freeman & Co Ltd., New York (1979)
Gustafson, W.O.: Manipulatable toy. U.S. Patent 3,081,089 (March 1963)
Ishige, T.: Japan Patent 55-8192 (1976)
Jerrum, M.R.: The complexity of finding minimum-length generator sequences. Theoretical Computer Science 36(2-3), 265–289 (1985)
Kendall, G., Parkes, A., Spoerer, K.: A survey of NP-complete puzzles. International Computer Games Association Journal 31(1), 13–34 (2008)
Krell, U.: Three dimensional puzzle. U.S. Patent 4,600,199 (July 1986)
Le., L.: The world’s first 12x12x12 cube. twistypuzzles.com forum post (November 2009), http://www.twistypuzzles.com/forum/viewtopic.php?f=15&t=15424
Seven Towns Ltd. 30 years on…and the Rubik’s Cube is as popular as ever. Press brief (May 2010), http://www.rubiks.com/i/company/medialibrary/pdf/Rubiks%20Cube%20to%20celebrate%2030th%20Anniversary%20in%20May%202010.pdf
McKenzie, P.: Permutations of bounded degree generate groups of polynomial diameter. Information Processing Letters 19(5), 253–254 (1984)
Nichols, L.D.: Pattern forming puzzle and method with pieces rotatable in groups. U.S. Patent 3,655,201 (April 1972)
Museum of Modern Art. Rubik’s cube, http://www.moma.org/collection/browse_results.php?object_id=2908
Opatrny, J.: Total ordering problem. SIAM Journal on Computing 8(1), 111–114 (1979)
Parberry, I.: A real-time algorithm for the (n 2 − 1)-puzzle. Information Processing Letters 56(1), 23–28 (1995)
Ratner, D., Warmuth, M.: The (n 2 − 1)-puzzle and related relocation problems. Journal of Symbolic Computation 10, 111–137 (1990)
Rokicki, T., Kociemba, H., Davidson, M., Dethridge, J.: God’s number is 20 (2010), http://cube20.org
Schaefer, T.J.: The complexity of satisfiability problems. In: Proceedings of the 10th Annual ACM Symposium on Theory of Computing, San Diego, CA, pp. 216–226 (1978)
Schütze, I.: V-cubes Solutions, http://solutions.v-cubes.com/solutions2/
Sebesteny, P.: Puzzle-cube. U.S. Patent 4,421,311 (December 1983)
Slocum, J.: The Cube: The Ultimate Guide to the World’s Bestselling Puzzle — Secrets, Stories, Solutions. Black Dog & Leventhal Publishers (March 2009)
V-CUBE. V-cube: the 21st century cube, http://www.v-cubes.com/
van Deventer, O.: Overlap cube 2x2x23. shapeways design, http://www.shapeways.com/model/96696/overlap_cube_2x2x23.html
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Demaine, E.D., Demaine, M.L., Eisenstat, S., Lubiw, A., Winslow, A. (2011). Algorithms for Solving Rubik’s Cubes. In: Demetrescu, C., Halldórsson, M.M. (eds) Algorithms – ESA 2011. ESA 2011. Lecture Notes in Computer Science, vol 6942. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-23719-5_58
Download citation
DOI: https://doi.org/10.1007/978-3-642-23719-5_58
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-23718-8
Online ISBN: 978-3-642-23719-5
eBook Packages: Computer ScienceComputer Science (R0)