Can you randomly solve a Rubik’s cube?

It’s my first post of December and so I wish everyone a Merry Advent (or a happy whichever-holiday-you-celebrate:))!

I also finished my Cambridge interview…! I’m not sure how it went, but I’m just going to go with it’s all in God’s hands:) I am glad to be able to go back to more recreational maths, too. I’ve had a completely chill weekend full of Chinese TV and Christmas movies and decided to bypass homework for this blog for now (don’t worry; I’ll still do it).

Cubes!

As you may know, I do love a good Rubik’s cube. I have my own collection, which I’ve had great fun with:

So, some simple observations about the 3x3x3 cube will help us to work out our possible permutations.

The centre pieces of the cube, with one colour, are fixed. No matter which way you twist, they’ll be in the same position relative to each other.

There are twelve edge pieces. Therefore, you could arrange twelve pieces 12! ways. Since each has two colours, you could turn them over if you wished, this means we must multiply by 2^12. However, it is not possible to flip only one edge piece and no other piece. Thus, we divide by two. The cube also has something called an even permutation parity, meaning it is not possible to swap only two edges, with the rest of the cube otherwise solved. Thus we divide by two again.

There are eight corners. Thus there are 8! ways of ordering them. Each has three colours, so there are 3^8 ways of flipping them, but you again can’t flip only one at a time, so divide by three.

05806E9C-2309-4791-9F7F-C8A86B33A9BF
Illegal moves on a 3x3x3 cube, courtesy of Sai Teja P on Quora

Therefore, we now have 12! x 2^10 x 8! x 3^7 = 43252003274489856000, which is about 43 quintillion. One Quora user pointed out that if you had this many standard Rubik’s cubes, each with a different combination, you could cover the whole Earth’s surface with cubes about 257 times. So, if you’re one of those people who sits and twists a cube in the hope of random success, it might take you a while. Probably more than your lifetime, in fact.

Yeah. It might be time to have a crack at logic instead.

Also, if we ignored illegal moves on the cube and consider pulling pieces out and randomly rearranging as we pleased (as I’m sure many have done), then we amplify our problem. Now we get 12 times the above number as we don’t have to do any of the divisions mentioned above.

A finite set of cubes

Knowing the number of permutations on our Rubik’s cube means that we have a finite set of possible cubes, and we could therefore try to work out the state of every single possible cube. Google supercomputer exploited this and grouped the different cube permutations based on the minimum number of moves needed to solve them, and then found out what that minimum number of moves was. The overall minimum happens to be 20, which means every cube can be solved considerably fast. This also helps in cube solving competitions as we can make sure every cube being solved requires the maximum (or simply the same) number of moves, to make the competition fair.

Different cube sizes

Not every Rubik’s cube is a 3x3x3. In fact, there are a whole range of sizes.

The Rubik Zone has also done a post about how many permutations there are for a variety of different cubes. Turns out, by the time you get to the 6x6x6, the number of permutations has far passed the number of atoms in our visible universe. It’s a lot.

Credits

Many thanks to:

  • Quora and its range of users, for helping me out. When I tried to calculate permutations myself, I didn’t factor the even parity in, so I missed out there:)
  • therubikzone.com
  • The Daily Mail‘s article on the Google supercomputer’s work

See you soon!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s