• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 30,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Formula for Calculating Positions of a NxNxN Cube?

Joined
Jan 11, 2014
Messages
836
Likes
10
Location
NY
WCA
2014CAVA01
YouTube
Goodatthis123
Thread starter #1
Is there any sort of finite formula that you can simply plug in for N, with an being the order of a cube? I looked online and found something like that, but it had things that had to do with computer programming and modulus, which I can't really say I understand. Is there a more simple approach, like (and I'm completely utterly making this up, and it probably wouldn't even make sense)
((3LogBASE(N)(8!))*(LogBASE(N)(12!))*((N-1)^2))/(64N^3)

And if there's a good website that I just haven't found yet, link to that would be great.
 
Joined
Nov 13, 2011
Messages
231
Likes
13
Location
Germany
WCA
2012MEIL01
YouTube
channel/UCRWx1WYMjiSW88QAyu7_mxA
#2
There is one somewhere on this forum.
I'll go look for it.
BRB

edit: here's the thread (I'll get more specific soon):
http://www.speedsolving.com/forum/s...alculating-Permutations-on-nxnxn-Rubik-s-cube

edit2: this post helped me a few weeks/months ago (page 2):
Yeah, you've got to know the syntax.

Here is Chris' formula which takes into account orientations as well.
Here is his adjusted formula that ignores orientations (that is, if I understood the changes he said to be made).

So, from the first formula (which I think Sharkretriver was really after):
2X2X2, 3X3X3, 4X4X4, 5X5X5, 6X6X6, 7X7X7, 10X10X10, 100X100X100, 1000X1000X1000, etc.
 
Last edited:
Joined
Nov 13, 2011
Messages
231
Likes
13
Location
Germany
WCA
2012MEIL01
YouTube
channel/UCRWx1WYMjiSW88QAyu7_mxA
#4
clicky

erase the 1000s and enter your number of choice :D

edit: or copy and past this and replace the #####s with your number

((24*2^10*12!)^Mod[#####, 2] 7!3^6 24!^Floor[(#####^2 - 2 #####)/4])/4!^(6 Floor[(##### - 2)^2/4])

example (for 7x7x7):
((24*2^10*12!)^Mod[7, 2] 7!3^6 24!^Floor[(7^2 - 2 7)/4])/4!^(6 Floor[(7 - 2)^2/4])
 
Last edited:

cmhardw

Premium Member
Joined
Apr 5, 2006
Messages
4,105
Likes
126
Location
Atlanta, Georgia
WCA
2003HARD01
#5
Is there any sort of finite formula that you can simply plug in for N, with an being the order of a cube? I looked online and found something like that, but it had things that had to do with computer programming and modulus, which I can't really say I understand. Is there a more simple approach, like ...
The formula I listed on my site uses the floor function and the mod function to combine the following two formulas into one:

Number of combinations to the N x N x N cube when N is even and N>0:
\( \frac{7!*3^6*(24!)^{\frac{n^2-2n}{4}}}{(4!)^{6\left(\frac{(n-2)^2}{4}\right)}} \)

and

Number of combinations to the N x N x N cube when N is odd and N>1:
\( \frac{(8!*3^7*12!*2^{10})*(24!)^{\frac{n^2-2n-3}{4}}}{(4!)^{6\left(\frac{n^2-4n+3}{4}\right)}} \)

--edit--
If you're familiar with the floor and ceiling functions, then for n an integer you can replace n (mod 2) with:
\( \lceil\frac{n}{2}-\lfloor\frac{n}{2}\rfloor\rceil \)
 
Last edited:

cmhardw

Premium Member
Joined
Apr 5, 2006
Messages
4,105
Likes
126
Location
Atlanta, Georgia
WCA
2003HARD01
#7
There's always this which only has integers and n and works for both odd and even n (n>1).:)



(I bet Chris can guess how I found this!)
I can guess how you derived that :) Very cool! I like how you handled the even and odd cube sizes with the (-1)^n terms to adjust the exponents when necessary. Without having looked into this much I am surprised that the 3 factor does not have a (-1)^n term in its exponent. I'm not doubting your formula, I'm just pleasantly surprised at how the cubie-verse works out sometimes ;)

EDIT:
The number of K4 OLLs formula is more complicated, obviously, but it looks kind of "similar" to the above (when in this form):

Again, I really like how you handled the odd/even issue using only (-1)^n. Neat!
 
Joined
Sep 17, 2009
Messages
848
Likes
18
Location
New Orleans, LA
YouTube
4EverTrying
#8
I was surprised that the 3 factor didn't have (-1)^n too!

I made this number of positions formula from my trig function one, here. (For those who haven't seen, the derivative to that function is in the next post). I ran it through Mathematica as Factor[Simplify[my trig formula]], and it gave me:



Of course, \( \cos \left( n\pi \right)=\left( -1 \right)^{n} \) and \( \text{cos}^{2}\left( \frac{n\pi }{2} \right)=\frac{1+\left( -1 \right)^{n}}{2} \) for integers n. I just made those substitutions and rearranged everything algebraically.



I took a similar approach to achieve the number of OLLs formula from the one in the link in my signature, as it's equivalent (for the integers) to:
 
Joined
Sep 17, 2009
Messages
848
Likes
18
Location
New Orleans, LA
YouTube
4EverTrying
#10
that 96577 seems pretty out of place there, weird.
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.
 
Last edited:

cmhardw

Premium Member
Joined
Apr 5, 2006
Messages
4,105
Likes
126
Location
Atlanta, Georgia
WCA
2003HARD01
#12
Boy, I thought that my measly Algbera 2/Trig class was complicated, I feel like such a nub now haha.
When I read cmowla's posts I feel like a nub too :)

I first tried to understand Richard Carr's formula for the number of combinations to the N x N x N cube in my sophomore year in college. Once I figured out what he was doing I then spent about a month or two, also in sophomore year college, to derive the formulas for the supercube as well as the super-supercube. It helps to have studied some combinatorics, as well as Proof by Induction. Combinatorics helps to derive a formula, and Proof by Induction helps you see if the formula you wrote actually does what you think it should do.
 

cmhardw

Premium Member
Joined
Apr 5, 2006
Messages
4,105
Likes
126
Location
Atlanta, Georgia
WCA
2003HARD01
#14
Is their a more simple formula for 2x2?
Number of combinations to the N x N x N cube when N is even and N>0:
\( \frac{7!*3^6*(24!)^{\frac{n^2-2n}{4}}}{(4!)^{6\left(\frac{(n-2)^2}{4}\right)}} \)
Let n=2
\( \frac{7!*3^6*(24!)^{\frac{2^2-2*2}{4}}}{(4!)^{6\left(\frac{(2-2)^2}{4}\right)}} \)

\( \frac{7!*3^6*(24!)^{0}}{(4!)^{6\left(0\right)}} \)

\( 7!*3^6 \)
 
Joined
Feb 9, 2009
Messages
1,910
Likes
10
WCA
2008ANDE02
YouTube
Minxer2011
#18
Bump?
Suddenly I got interested in combinations, and I wanted to know if my logic is right:

Combinations of the [R, U] group:
Corners: 6!/2 permutations and 3^5 orientations
Edges: 7!/2 permutations and 1^6 orientations
(6!/2*3^5)*(7!/2)=220449600

Is that correct?
That is not correct. (The corner permutation needs to be 6!/(2*3) )

EDIT: Stefan just ninjaed me like a ninja..
 
Joined
Jul 8, 2014
Messages
822
Likes
203
Location
Either in the underground or doing BLD somewhere
WCA
2013DIPI01
YouTube
channel/UCVWEqtJwJ0GFd0pYLCeQSRA
#20
Well, at least he didn't explain it, so I'll have to try to understand 6!/(2*3)
If I don't get it, could someone explain it?

The /2 is because permutation parity, right?
And the /3 is because... I don't get it. I know that an A perm is not possible, but that's just a J (perm parity) and a U perm... I thinked for some minutes but I can't get it... Why two thirds of the permutations aren't possible? Because... no idea. I'll think some more

Well, I wrote that above while I was thinking for a reason, but after 20 minutes I give up.
 
Top