# ``How many times should I move the sides of a Rubik's cube to completely shuffle them?'' is a very difficult question in mathematics.

**The Rubik's Cube**, which is popular all over the world, is a three-dimensional puzzle that is so difficult that even beginners cannot match it. However, the world record for the fastest time to match all six sides is

**about 4 seconds**, and it is difficult for experienced players to match it. Research is being conducted every day. However, according to Associate Professor Tim Garoni of Monash University 's Department of Mathematics, it is actually more difficult in the world of mathematics to completely shuffle the sides of a Rubik's cube than to align them.

**How hard is it to scramble Rubik's Cube?**

https://theconversation.com/how-hard-is-it-to-scramble-rubiks-cube-129916

https://theconversation.com/how-hard-is-it-to-scramble-rubiks-cube-129916

Many mathematicians have conducted research on 'creating randomness by shuffling'. Professor Perci Diaconis, a mathematician at Stanford University, and Professor Dave Bayer, a mathematician at Columbia University,

**published**a research paper on ``riffle shuffle'' in 1990. Riffle shuffle is a method of shuffling cards as shown in the movie below, and Professor Diaconis and Professor Beyer say, ``In order to make the order of the cards completely random, it is necessary to repeat the riffle shuffle seven times.'' I proved it.

**Cardistry for Beginners: Shuffles - Riffle Shuffle Tutorial - YouTube**

Also, you can find out what happens when you stir the cards on the desk by reading the article below.

**There is a mathematician who challenges the question ``If you stir the cards on a desk, how many seconds does it take to mix them perfectly?'' - GIGAZINE**

There **are** 4,325,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000. Ta. This number '20 moves' is called 'God's number' in the world of Rubik's cube. On the other hand, ``How many steps does it take to randomly move a Rubik's cube to make it completely shuffled?'' is a very difficult question, says Associate Professor Garoni.

A Rubik's Cube can rotate one of the three rows by 90 degrees, 180 degrees, or 270 degrees in any of the X, Y, or Z axes. In order to shuffle the sides of a Rubik's cube, you need to repeat the act of ``randomly performing one of 15 operations (18 operations the first time)'' over and over again. According to Associate Professor Garoni, ``completely shuffling the Rubik's Cube'' means that, mathematically, ``the probability of appearance of all patterns approaches 1/4325 trillion 2003 trillion 274 489,856 millionth.'' This state is called ``the probability distribution is uniform.''

According to Associate Professor Garoni, the operation of the Rubik's cube can be explained using a probabilistic statistical model called a ``

**Markov chain**''. And,

**``How much manipulation is necessary to make the probability distribution infinitely uniform in the Rubik's Cube?**'' can be confirmed using the ``

**Markov chain Monte Carlo method,**'' which samples the probability distribution using an algorithm. However, performing the Markov chain Monte Carlo method on a typical Rubik's cube of 3 blocks x 3 blocks x 3 blocks requires too much calculation, so at the time of writing the article, it was an unsolved problem, according to Garoni. says the professor.

Therefore, Associate Professor Garoni performs calculations using a 2 block x 2 block x 2 block Rubik's cube called a 'pocket cube'. The total number of pocket cube patterns is 3,674,160, and the 'divine number' is 11 moves.

by Abdulla Al Muhairi

The graph below represents the probability distribution of pocket cubes based on simulation. t on the horizontal axis is the number of moves, and d(t) on the vertical axis means 'how far away from a uniform probability distribution', and the smaller d(t) is, the 'more shuffled' it is. Indicates that According to Associate Professor Garoni, a line that can generally be said to be 'well shuffled' is when d(t) is less than 0.25, and in the case of pocket cubes, when t is 19. In other words, unless you operate it at least 19 times, you cannot mathematically say that you have 'shuffled the pocket cube properly.'

Also, as the number of moves increases, the probability distribution becomes more uniform. If the operation is performed 25 times, d(t) will be 0.092, if the operation is performed 50 times, d(t) will be 0.0012, and if the operation is performed 100 times, d(t) will be 0.00000017.

The Markov Chain Monte Carlo algorithm for PocketCube is published on **GitHub** .

**Related Posts:**