>>13905453I assume that all black cubes are interchangeable and any rotation of a figure counts as one figure.
(1) Black Plane and White Plane
(2) Same as above, one cube gets exchanged (same position)
(3) Same as 2, but rotate the exchanged cubes on each plane 90 degrees clockwise
(4) Same as 3, one more 90 degrees rotation (clockwise)
(5) Same as 4, one more 90 degrees rotation (clockwise)
(6) Two Black/White/Black white planes, each cube with the cube of the same color below
(7) Same as 6, but one 90 degree rotation (looks like a checkers board)
***
I think for a generalization, you could somehow look at each plane and avoid rotations.
But a better approach might be to count all possibilities and then substract all the rotations. That is what this anon tried:
>>13906108***
In order to form a formula, here is the second approach for the example above:
(1) All possible positions (with rotations):
We can just map the cube figure to a bitstring, so that the cube position (1,1) is position 1, (1,2) is position (1,2) and so on. White gets mapped to 1, black to 0 (because this is 4chan after all).
So the cube problem is now:
How many ways to arrange four ones and four zeros in one bitstring of the length n^3?
00001111
0001110
(…)
This what we call "Gray code", numbers with a hamming distance of one which can be arranged in a Hamilton circle.
But we can make it easy for us:
Statistically speaking this is 8 choose 4, because for each "1" we draw one number from 1-8 without dublicates (pic related).
So if we count each rotations in our n x n x n cube separately we have n^3 chose (n^3 / 2) options
= (n^3)! / ((n^3 / 2)! * (n^3 / 2)!)
For the example it would be:
8*7*6*5 / (1*2*3*4)
= 70
Now we simply have to substract all rotations R from that (exercise left for the reader) and we have the formula.