MATT PARKER: See, most people forgot about the Rubik's Cube
back in the '80s, so it had its heyday and then
disappeared.
But mathematicians remain obsessed with it.
KATIE STECKLES: I mean, people probably are aware that there
is some math involved in Rubik's Cube.
JAMES GRIME: The reason I not interested in the Rubik's Cube
was I wanted to use as a teaching tool.
In my day job I study something called group theory.
KATIE STECKLES: If you go to any kind of Wikipedia page
about anything to do with group theory, there will be,
in the top corner, a picture of a Rubik's Cube.
And the reason for that is that it has got quite a nice
example of a group associated with it.
And the group is the number of different combinations that
there are on the Rubik's Cube.
It's all the different ways that you can
scramble up a cube.
JAMES GRIME: So for example, if you had a square, and I
turn it a quarter turn, you still get a square, don't you?
And even if I take a square, and I flip it over, you still
get square, right?
So it has that symmetry.
Now, this is what I study.
So I started to learn how the Rubik's Cube worked, because
the mathematics is the same.
So if I turn this here, the right hand side a quarter
turn, I can do that.
I do it twice, you get a half turn. you do it get three
times, that's equal to a quarter turn in
the opposite direction.
If you do it four times, you get back to where you started.
LUCAS GARRON: Hey, Numberphile.
My name is Lucas, and I'm a speed cuber.
That was about 9.6 seconds, although I got
a little bit lucky.
MATT PARKER: Other things do have permutations and
symmetry, but there's just something nice and tactile,
and you can grab it, and you can see
everything as it happens.
So there are a lot of other things with symmetric, but
nothing quite as tangible as a Rubik's Cube.
JAMES GRIME: The mathematics of the Rubik's Cube is rock
hard, but we'll try and do a few things about it.
We'll talk about the combinations, first of all.
How many ways can you mix up the Rubik's Cube?
Let's do that.
ANKUR SADHOO: This is my Rubik's Cube [INAUDIBLE] for
Numberphile.
Here goes.
MATT PARKER: I'm adequate at the Rubik's cube, so I solve
it on average, about a minute and a half.
On a good day, if you give me a mixed a Rubik's Cube, I can
do it in a minute.
I will almost always get it done in two minutes.
Personally, my goal, I like to be able to solve it talking to
other people.
So it's my goal to solve the Rubik's Cube while having a
conversation, and I can do that between two and three
minutes, give or take.
BRADY HARAN: You've set yourself up, you know?
You know what I'm going to do.
Give it here.
I'm going to mix it up.
JAMES GRIME: So imagine I can take these cubes off, these
little sub cubes here.
These, what are they called?
Cubelettes?
Cubits?
We can take those off, and just arrange them all on the
table, and we'll put it back together again.
And we'll do the corners first, let's say, for the
first corner I'll eight choices of corner cubes.
I'll have eight corner cubes to put there.
For the second corner, I'll have seven corner cubes left.
For the next one, I'll have six corner cubes left.
Then five, then four, then three, then two, then one.
Now, you multiply that together.
8 times 7 times 6 times 5 times 4 times 3
times 2 times 1.
That's called 8 factorial, which is an 8 with an
exclamation mark after it.
BRADY HARAN: So I've mixed up this cube for Matt.
He told me that he can solve it while talking, so I'm going
to give it to him while I talk to him about the Rubik's Cube.
There you go.
MATT PARKER: Right.
So I mean, me and my big mouth.
I did admit that I can solve it while
talking to someone else.
So I believe, Brady, you're going to attempt to engage me
in conversation.
JAMES GRIME: We can do the edges in the same way.
There are 12 edges.
We're going to put the edges in, and there are 12 factorial
ways to arrange the edges.
So we've got 8 factorial and 12 factorial.
Now for each corner, there are three ways to orientate it.
So there are three colors there on each corner, and you
can, you know, if you have free choice, you
can move them around.
There are three ways to do that for each one.
Three choices for that, three choices for that, three
choices for that, three choices for that, three
choices for that, three choices for that, and you
times them.
What I've done is that's 3 to the power 8.
Times 3 times 3 times 3 times--
MATT PARKER: When you are mixing this up, there's a
number of different ways you could have mixed this up
before you give it to me when I start solving it.
So there's only one arrangement of all these
pieces which counts as a solved Rubik's Cube.
JAMES GRIME: And now finally, let's look at the edges.
And each one has two ways to arrange it.
And so there's two ways, and two ways, and two
ways, and two ways.
And you times them together.
And because there's 12 edges altogether, there are 2
to the power 12.
ADAM HADASH: 3, 2, 1.
MATT PARKER: These two corners are where I want them, but
these two are the wrong way around.
And so I know if I do that, that, that, that, that, that,
and then double twist, that will have
swapped those two pieces.
This is the total number of ways if I could take the
pieces off and then put them back on again.
Now, how many ways is that all together?
It's a very large number, so we work it out.
3 to the power 5.
Well, 5.2 times 10 to the 20.
It has 20 zeroes after it.
But this is not the right answer yet.
BRADY HARAN: Matt, are you doing maths here, or are you
just kind of, like a monkey having learned
something by rote?
MATT PARKER: A combination of the two.
I've memorized, oh, yes, it's solved, by the way.
I've memorized a lot of combinations of twists.
That's pure rote.
And then what I'm doing is I've just got to spot what I
need to do, and then do it at the same time.
And so my method is very lazy.
I'm spotting one bit I want to do at a time and doing it.
The more advanced people will spot two different things they
want to do the same time and then do those together.
ED BANKS: I love Numberphile, it's great.
And I saw the post about you're making a video on
Rubik's Cubes, so I'm just going to mess this up
and then solve it.
JAMES GRIME: Not all permutations are possible.
I can't reach every combination by these twists.
In fact, if I take one of those edges off and turn it
around, and then start twisting it, I get a whole new
set of combinations that you won't usually get to on a
Rubik's Cube.
It's called an orbit.
A whole new orbit.
A whole new universe of combinations.
So if I do that with one of the edges, you get
this whole new set.
If I do that with the corner, there are three ways to turn
the corner.
And again, for each one of those, you get a whole new
universe of combinations.
And finally, if I take two pieces, like two
edges or two corners.
If I took them off and swapped them over, you again get a
whole new universe that you can't really reach on a
standard Rubik's Cube.
Now, because of these universes,
there's 12 of these universes.
12 of these orbits.
So I'm going to divide that number by 12.
4.3 times 10 to the 19.
Some people call that 43 quintillion, but I don't like
things like that.
4.3 times 10 to the 19.
It's a massive number, though.
It's a massive number of combinations.
MATT PARKER: If you want the exact number of different ways
you can mix up a cube, it's 43,252,003,274,489,856,000.
The number of possible ways.
And to get a sense of how big that number is, there's not
enough raw material in the UK to make 43.25
billion billion cubes.
So you couldn't make enough to put one in every single
possible arrangement.
In fact, there's not enough of the UK to make enough Rubik's
Cubes to have one in every single arrangement.
If you started just breaking off anything around you, so
just grab anything and break it off into a 57 millimeter
cube, the exact size of a Rubik's Cube.
And then if you panted those, all the different possible
combinations, by the time you had made all 43.25 billion
billion, you would have a UK-shaped hole
over 20 miles deep.
It's just, it's a mind numbing number of possible
arrangements.
LEONARD KOCH: And there we go.
Brady, this is your solved Rubik's Cube.
JAMES GRIME: So this was a big crazy in the 1980s.
Big craze.
In the 1880s, exactly 100 years earlier, there was a
similar puzzle that was also a big craze.
It was this.
This is called the 15 puzzle.
It's got the numbers 1-15, and it's like the
Rubik's Cube, though.
You just move the pieces around.
The Rubik's Cube is essentially a
3D version of this.
Now, there was an American puzzle expert called Sam Loyd.
He would sell this puzzle.
But he would set it very meanly.
He would set it with the 14 and the 15 swapped over.
This was how he would sell it.
And he would say, can you solve it?
And he offered a price of $1,000 to anyone who could
solve this puzzle.
What he knew, though, was that it was like the Rubik's Cube.
If you take one of those pieces off and turn it around,
you get a whole new universe.
You can't get back to the solved Rubik's
Cube if you do that.
And that's what Sam Loyd was doing.
But that is essentially a simpler version of this craze
100 years later.
BRADY HARAN: Can I just say, for the record, Matt actually
wrote the number on the board there.
But you do that without--
MATT PARKER: I did it without, yeah, yeah, yeah.
BRADY HARAN: Let the record show, he did
that without looking.
MATT PARKER: Just knowing it was on the board
was enough for me.
KATIE STECKLES: I guess it comes in the
official Rubik's packaging.
And you know, this is the original design that they had
when they invented it in--