Formula for Calculating Positions of a NxNxN Cube?

G2013

Member
Those are really clear explanations!
Basically, you have to check how many types of pieces are in what you are calculating, determine parities, check permutations and orientations, and do the math.
So megaminx:
Edges: 30
Corners: 20

Corners can be permutated in 20!/2 ways, because you can't switch 2 of them; it must be 3, and orientated in 3^19
Edges can be permutated in 30!/2 ways, for the same reason as corners, and orientated in 2^29

The parity thing can be:
All even => even+even=even, OK
All odd => odd+odd=even, OK

So:

Edges: (30!/2)*2^29
Corners: (20!/2)*3^19

Total: (30!/2)*2^29*(20!*3^19)/2

I hope it is right

cmhardw

The parity thing can be:
All even => even+even=even, OK
All odd => odd+odd=even, OK

So:

Edges: (30!/2)*2^29
Corners: (20!/2)*3^19

Total: (30!/2)*2^29*(20!*3^19)/2

I hope it is right
G2013, your calculation is correct but your parity analysis is not (sort of).

You correctly observed that you cannot swap just two corners or just two edges on minx, but then you say:

The parity thing can be:
All even => even+even=even, OK
All odd => odd+odd=even, OK
Here you say that the corners and edges can have odd parity, as long as they both have odd parity.

Which one is the correct one (they say contradictory things)?

Before you answer, remember that your numerical calculation is correct Good job on these calculations, by the way! This kind of cube math is fun, isn't it? cmhardw

The all even is the only correct, because you can switch: 0 corners, 3 corners, 5 corners, etc. So that is 0 swaps, 2 swaps, 4 swaps, respectively.

And thanks for all!
Yep Carrot

Member
And if I wanted [M,U], I can think of:

Edges: 6!
Corners: 4/2, actually 2, and *3^5
Centers: Have 4 positions but 2 are not possible in some cases, so 2.
Resulting: 6!*2*3^5*2=699840

Am I right?
No.

Herbert Kociemba

Member
The closed formulas for the number of positions of the nxnxn are quite nasty and not very intuitive. The following recursive formulas are short and elegant (in my opinion) and give more insight in the construction process.

usual nxnxn:
a(1)=1;
a(2)=7!*3^6 //2x2x2
a(3)=8!*3^7*12!*2^11/2 //3x3x3
a(n)=a(n-2)*24!*(24!/24^6)^(n-3), n>3

subercube nxnxn:
a(1)=1;
a(2)=7!*3^6 //2x2x2
a(3)=8!*3^7*12!*2^11/2*4^6/2 //3x3x3
a(n)=a(n-2)*24!*(24!/2)^(n-3), n>3

a(1), a(2) and a(3) are just the number of positions for the 1x1x1, 2x2x2 and 3x3x3 and need no explanation except eventually the factor 4^6/2 which gives the number of possible orientations of the centers of the supercube 3x3x3.
The following picture demonstrates for example the case n=9.
We take the 7x7x7 cube which has a(n-2)=a(7) positions. When we insert six slices as depicted we get a 9x9x9 and the additional pieces form exactly 7 orbits: one edge orbit (24! positions) and n-3 = 6 center orbits (each with 24!/4!^6 positions for the usual nxnxn and with 24!/2 positions for the supercube). Multiplying all together gives the formula for a(n). That's all.

Edit: Typo in a(2) for the usual case corrected.

Last edited:

goodatthis

Member
It may seem so, but 96577 = (13)(17)(19)(23).

So the number of positions formula can be written as a product of exponents of all prime numbers between 1 and 23 (inclusive).

That is, the number of positions formula can be written as:    In addition, I just got that the derivative can be written as: So we simply multiply the number of positions formula by this factor to get the rate of change.

EDIT:
Chris, now I know you're being modest! You have taken on some impressive feats yourself.
I'm curious as to the applications of doing calculus with these formulas, are there any particular reasons why one would want to compute the derivative of these formulas?