Qm
BrainteasersJane Street

How many positions does a Rubik's cube have?

A Rubik's cube has 8 corner pieces (each of which can sit in any corner in 3 orientations) and 12 edge pieces (each in any edge slot in 2 orientations). The 6 centre pieces never move relative to each other.

  1. Count the arrangements that could be assembled by taking the cube apart and rebuilding it.
  2. Only some of those can be reached by turning faces. Which fraction, and why? Give the final number.
Show a hint

Corners: 8! placements times 3 to the 8 orientations. Edges: 12! times 2 to the 12. Then three constraints, each cutting the count by a factor, come from the fact that a face turn is a particular kind of permutation.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Can 21 people each shake exactly three hands?The fifteen puzzle with two tiles swappedEveryone shouts the number of red hats, one must be rightThe number of odd-handshakers is always evenSeating six people around a round table
All questions →