# Welcome to Cubing

After the critical feedback on the previous question, here is the new question...

It so happened that one day, your nephew came to you and said that he wanted you to play a board game with you. You were getting bored so you agreed.
The only problem was that you had no dice to play with and neither did he; so you wrote numbers from $[1,6]$ on each central piece of your solved 3x3x3 Rubik's cube.

When you were done playing with him, you thought of writing more numbers on it. You wondered on how many possible combinations are there with the following constraints:

Constraints:

1. The original numbering on the cube follows the standard of a regular dice, i.e. the sum of the numbers on opposite faces is seven.
2. Each piece surrounding the central piece, with number $N$ is to be numbered in range $[0,N]$.
3. No two sides of an edge piece, or a corner piece should have the same number.

How many such combinations are possible (if any)?

• Do the edge and corner pieces also have to sum to 7? – 2012rcampion Jul 15 '16 at 16:16
• No, there is no such restriction. But I do feel that a computer program can be made to calculate if that were the case :) – ABcDexter Jul 15 '16 at 16:25
• No computer program necessary---in that case the only valid solutions would be each face composed entirely of the same number, and there would only be two solutions (modulo rotation). – 2012rcampion Jul 15 '16 at 16:27
• The sum constraint is only because of the nature of a dice, so only central pieces are fixed (as in the sum on the opposite central pieces sums up to 7). – ABcDexter Jul 15 '16 at 16:28
• @2012rcampion That is a brilliantly simple, and correct, solution for that case :D – ABcDexter Jul 15 '16 at 16:33

I think the total number of such configurations is

$240\,734\,712\,102\,912\,000\,000\,000\,000$ (240 septillion)

Reasoning:

Each corner piece will be between three center pieces, none of which oppose each other (i.e. sum to 7), thus there will always be a corner which is between centers 1,2 and 3, another corner between 1,2 and 4, a third one between 1,3 and 5, and so on.

But how many different ways are there to write valid numbers for the individual corners?
The corner between centers 1,2,3 can take the following numbers: 0,1,2; 0,1,3; 0,2,1; 0,2,3; 1,0,2; 1,0,3; 1,2,0; 1,2,3 - that's 8 different numberings, but how to generalize?

The side of the corner towards the center with the smallest number (let's call that number $N_1$) can take any value from $0$ to $N_1$, that's $N_1+1$ choices.
The side towards the second smallest center (which is $N_2$) can take any value from $0$ to $N_2$, except the one which was written to the previous side. That's $N_2+1-1=N_2$ choices.
The third side, towards the center with the largest value ($N_3$) can take values between $0$ and $N_3$, but neither of the previous two different values, so there are $N_3+1-2=N_3-1$ choices.
So a corner piece between centers $N_1 < N_2 < N_3$ can have $(N_1+1) \times N_2 \times (N_3-1)$ valid numberings.
So the different numberings of the different corners are the following:
(neighbouring centers : number of numberings)
1 2 3 : 8
1 2 4 : 12
1 3 5 : 24
1 4 5 : 32
2 3 6 : 45
2 4 6 : 60
3 5 6 : 100
4 5 6 : 125

A very similar reasoning holds for the edge pieces, which only have two sides (towards centers $N_1 < N_2$, when $N_1+N_2 \ne 7$), so the expression also changes to $(N_1+1) \times N_2$:
1 2 : 4
1 3 : 6
1 4 : 8
1 5 : 10
2 3 : 9
2 4 : 12
2 6 : 18
3 5 : 20
3 6 : 24
4 5 : 25
4 6 : 30
5 6 : 36

All these pieces can be numbered independently from each other, so to get the correct solution we just have to multiply all these numbers together. Also there is a factor of 2 (which I first forgot about) from the center pieces being a right-1,2,3 or a left-1,2,3 rotation.