Algorithms for Solving Rubik’s Cubes

  • Conference paper
Algorithms – ESA 2011 (ESA 2011)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6942))

Included in the following conference series:

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).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. World Cube Association. Official results (2010), http://www.worldcubeassociation.org/results/

  2. Cook, S.A.: Can computers routinely discover mathematical proofs? Proceedings of the American Philosophical Society 128(1), 40–43 (1984)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. 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

  5. Even, S., Goldreich, O.: The minimum-length generator sequence problem is NP-hard. Journal of Algorithms 2(3), 311–313 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  6. Fox, F.: Spherical 3x3x3. U.K. Patent 1,344,259 (January 1974)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. 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)

    MATH  Google Scholar 

  9. Gustafson, W.O.: Manipulatable toy. U.S. Patent 3,081,089 (March 1963)

    Google Scholar 

  10. Ishige, T.: Japan Patent 55-8192 (1976)

    Google Scholar 

  11. Jerrum, M.R.: The complexity of finding minimum-length generator sequences. Theoretical Computer Science 36(2-3), 265–289 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  12. Kendall, G., Parkes, A., Spoerer, K.: A survey of NP-complete puzzles. International Computer Games Association Journal 31(1), 13–34 (2008)

    Google Scholar 

  13. Krell, U.: Three dimensional puzzle. U.S. Patent 4,600,199 (July 1986)

    Google Scholar 

  14. 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

  15. 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

  16. McKenzie, P.: Permutations of bounded degree generate groups of polynomial diameter. Information Processing Letters 19(5), 253–254 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  17. Nichols, L.D.: Pattern forming puzzle and method with pieces rotatable in groups. U.S. Patent 3,655,201 (April 1972)

    Google Scholar 

  18. Museum of Modern Art. Rubik’s cube, http://www.moma.org/collection/browse_results.php?object_id=2908

  19. Opatrny, J.: Total ordering problem. SIAM Journal on Computing 8(1), 111–114 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  20. Parberry, I.: A real-time algorithm for the (n 2 − 1)-puzzle. Information Processing Letters 56(1), 23–28 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  21. Ratner, D., Warmuth, M.: The (n 2 − 1)-puzzle and related relocation problems. Journal of Symbolic Computation 10, 111–137 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  22. Rokicki, T., Kociemba, H., Davidson, M., Dethridge, J.: God’s number is 20 (2010), http://cube20.org

  23. 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)

    Google Scholar 

  24. Schütze, I.: V-cubes Solutions, http://solutions.v-cubes.com/solutions2/

  25. Sebesteny, P.: Puzzle-cube. U.S. Patent 4,421,311 (December 1983)

    Google Scholar 

  26. Slocum, J.: The Cube: The Ultimate Guide to the World’s Bestselling Puzzle — Secrets, Stories, Solutions. Black Dog & Leventhal Publishers (March 2009)

    Google Scholar 

  27. V-CUBE. V-cube: the 21st century cube, http://www.v-cubes.com/

  28. van Deventer, O.: Overlap cube 2x2x23. shapeways design, http://www.shapeways.com/model/96696/overlap_cube_2x2x23.html

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics

Navigation