Message #585

From: David Smith <djs314djs314@yahoo.com>
Subject: Re: [MC4D] Re: Permutation formula updates
Date: Tue, 23 Sep 2008 05:39:14 -0700

Hi Remi,
 
I have written two functions for GAP (It’s the main computer algebra system I use)
for you which compute the number of permutations of an n^4 cube and supercube, n>=2. 
Here is the code:
 
CubePerms := function(n)
   local t1, t2, t3, t4, t5, t6, t7, t8, t9, answer;
   t1 := Factorial(15)*(12^15)/6;
   t2 := (Factorial(24)*Factorial(32)*(2^26)*(6^33))^(n mod 2);
   t3 := ((Factorial(64)/2)*(3^63))^Int((n-2)/2);
   t4 := ((Factorial(96)/(24^24))*(2^95))^(Int((n-2)/2)+((n mod 2)*((n-3)/2)));
   t5 := (Factorial(192)/(Factorial(8)^24))^(Int((n-4)/2)*Int((n-2)/2)/2);
   t6 := (Factorial(64)/(Factorial(8)^8))^Int((n-2)/2);
   t7 := (Factorial(96)/(Factorial(12)^8))^((n mod 2)*((n-3)/2));
   t8 := (Factorial(48)/(Factorial(6)^8))^((n mod 2)*((n-3)/2));
   t9 := (Factorial(192)/(Factorial(24)^8))^((Int((n-4)/2)*Int((n-2)/2)/2)+ <br>          ((n mod 2)*(n-5)*(n-3)*(n-1)/24)+(AbsInt((n mod 2)-1)*Binomial((n-2), 3)/4));
   answer := t1*t2*t3*t4*t5*t6*t7*t8*t9;
   Print("The number of reachable positions of a/an ", n, "^4 Rubik’s Cube is:\n\n", <br>         answer, "\n\n");
end;

SupercubePerms := function(n)
   local t1, t2, t3, t4, t5, t6, answer;
   t1 := Factorial(15)*(12^15)/6;
   t2 := (Factorial(24)*Factorial(32)*(2^(88+(((n-1)/2)*(n mod 2))))*(6^41))^(n mod 2);
   t3 := ((Factorial(64)/2)*(3^63))^(2*Int((n-2)/2));
   t4 := (Factorial(48)*(2^94))^((n mod 2)*((n-3)/2));
   t5 := (Factorial(96)*(2^94))^(Int((n-2)/2)+((n mod 2)*(n-3)));
   t6 := (Factorial(192)/2)^(Int((n-4)/2)*Int((n-2)/2)+((n mod 2)*(n-5)*(n-3)*(n-1)/24)+ <br>          (AbsInt((n mod 2)-1)*Binomial((n-2), 3)/4));
   answer := t1*t2*t3*t4*t5*t6;
   Print("The number of reachable positions of a/an ", n, "^4 Rubik’s Supercube is:\n\n", <br>         answer, "\n\n");
end;
 
I just directly calculated using the formulas without applying any optimizations.
Just paste that code into GAP, then call the functions CubePerms and
SupercubePerms with the number of pieces per edge.  For example:
 
CubePerms(2);
 
3357894533384932272635904000
 
SupercubePerms(2);
 
3357894533384932272635904000
 
Here are some other values you might want to see to get an idea of how large
the numbers are growing:
 
3^4 Cube:
 
175677288070913584316852607908102505961448463014955765147715602173323679897016
8550600274887650082354207129600000000000000
 
3^4 Supercube:
 
272154392758755169157651595668086058026841310135841068330272398741290036305006
98572708726567964082586413869060610535871487975148748800000000000000
 
4^4 Cube:
 
130465639524605309368634620044528122859025488438611959323482221544701493566589
669139598204956926940147059366252849247482898636104705417194760866897307590845
202461293100468293214262958591194739437727430945469384490361714647847550801897
750293894453665815572829257758907425128919808862616259604997210112000000000000
000000000000000000000000000000000
 
4^4 Supercube:
 
347783674784900076039975249530220895745267494305831129377635803150853746080779
631613138147012112076632233454646509420850772280870666768565130431745728268508
820427635577678401755188889705331290492937179478403032808299493111420309439603
484671820901697396379240893289333878251487859164582598040387598499062151597053
117666450824722982276117790547655745143236242357840301007419365467248662256025
600000000000000000000000000000000000000000000000000000
 
5^4 Cube:
 
123657056923899002698227805778387808933769666084597331170345244675638825481620
700008237306084142730598637705860008300844182287747674018136874315751080178664
887107264876848935590538625767958284656419396560246923935065962447405384165866
873326263467921778683862961389770831926039889601733193275112578283448018613526
925847925558456540351327099176534335451141045209002537535755031468961150691008
214712492137716092251416854303972448469954444917129644451683375275906483623456
408625743663232956462751569098735992247230927473597130714467427915529825001467
413803400014037257220682520596555932663885324005539599667276944926310400000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
 
5^4 Supercube:
 
534806097867370355955896859745926111824568490798187151448671737300017546888236
962419447366749869914396272538448554628115984945469937995207060824539184606030
344941882173917858745052310958793453143196915063885190917110526661296898466020
063065475712399188459039928010260504091145181990103104018422862260172712594783
680772842762701672142120339221039519670177203978346728848603865747090746340462
990515359117074216952485040697902819408338442844439951370979561681029910062415
686457326593170733332965094091779247623728001430246372307354704035886228731931
825703592873950960771920067910327881653771805665812946584222788211168472864510
452780810967904849430643477505282319525950786759505444742855554229791730077455
821509608641211622181398614168239112068823229691415570666941886855641299114305
746081673476249786346848787216071666913745932132272791263221643809754230518948
668493044779388142838450655068160000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
 
6^4 Cube:
 
534806097867370355955896859745926111824568490798187151448671737300017546888236
962419447366749869914396272538448554628115984945469937995207060824539184606030
344941882173917858745052310958793453143196915063885190917110526661296898466020
063065475712399188459039928010260504091145181990103104018422862260172712594783
680772842762701672142120339221039519670177203978346728848603865747090746340462
990515359117074216952485040697902819408338442844439951370979561681029910062415
686457326593170733332965094091779247623728001430246372307354704035886228731931
825703592873950960771920067910327881653771805665812946584222788211168472864510
452780810967904849430643477505282319525950786759505444742855554229791730077455
821509608641211622181398614168239112068823229691415570666941886855641299114305
746081673476249786346848787216071666913745932132272791263221643809754230518948
668493044779388142838450655068160000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
 
6^4 Supercube:
 
201434861981958132716297965091360047901083155904899348292246974302715859780851
786850859684051885802325683483857549522295342366238005881187865970466430934849
527307970318019023240553775197858871118522590078923053809162893214283387816626
422129415956943104065768008554801387346817063789282581895420229174015906167704
869584428629227962738617646685827507372285400382176240562887506089963404524486
541756698243285405410269663473991896917768048309665305049603649851089537045810
693821179927362746769398814008125478565288046925522141658102442976558016200517
353794363179921242838927448675050061087917039578789624103393807751590633903222
917885489357491654182318024721516285862532543108235528995035443194554987183736
107075419876115747630998450635259751713695530921188576569779633352889503175086
049523856354582792233297479233285934249856060741128331990910893332725310670953
516845370044026051951644482601813726224253090254916569329273360295159083450839
633452178352480237177849567899114197462062589865219957368982859651241921432191
323751551991608476423538560865693351247424446148832479623927121980746601429988
528375951401927691129712199630315878987636663498219302557163912547129227057357
160904347123552620141142548044171713303578531972657243680753561330410687080191
778774911311658295764173923369961816876747182116856560219936825047659585821358
278297438625018453696279007954287933839077622019039752856850785049504360685767
553656750290455643620455554670031061169247739346141130418638358001220988765488
283906613579527411846168394748263959568188180362091999653054990244483753473704
342919122494794873781325414571566016077536004628597690859254694468779819793135
000376265431305395659609644069040954187986952519680000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000
 
Roice suggested to me that if I ever get the formulas for n^d cubes, I might want
to write a program that takes as input a dimension and side length and displays
the number of permutations.  I would definitely do that, probably using C with
an arbitrary-precision library.
 
All the Best,
David

— On Tue, 9/23/08, Remigiusz Durka <thesamer@interia.pl> wrote:

From: Remigiusz Durka <thesamer@interia.pl>
Subject: Re: [MC4D] Re: Permutation formula updates
To: 4D_Cubing@yahoogroups.com
Date: Tuesday, September 23, 2008, 4:49 AM

Can I ask about formula as the input for program Mathematica (or Maxima, etc)… Or just see actual numbers for any hypercube we have?
 
all teh best,
RemiQ
 

—– Original Message —–
From: David Smith
To: 4D_Cubing@yahoogrou ps.com
Sent: Tuesday, September 23, 2008 2:50 AM
Subject: Re: [MC4D] Re: Permutation formula updates


Hi Thibaut,
 
Thanks for your comments and suggestions!  I put a lot of thought into what
you recommended to me about the formulas, but I have decided to keep them the
same.  While I value your opinion, and almost did decide to modify the formulas,
I think that it is more concise and elegant to represent the answers with only one
formula.  While simplicity can be elegant, to me the formula is already so
(although this is of course my biased opinion as its discoverer).  I actually
never seperated the formulas into even/odd cases, and while many may not,
I like the use of the "n mod 2" terms and how I applied them.  If anyone on the
group is interested in a basic explanation as to the derivation of these formulas,
I would be glad to email them one.  I’m looking forward to using more advanced
reasoning for proving these formulas exact, and for trying my hand at the n^5
and n^d cases.  I’ll let the group know when I get the super-supercube formula.
 
All the Best,
David

— On Mon, 9/22/08, thibaut.kirchner <thibaut.kirchner@ yahoo.fr> wrote:

From: thibaut.kirchner <thibaut.kirchner@ yahoo.fr>
Subject: [MC4D] Re: Permutation formula updates
To: 4D_Cubing@yahoogrou ps.com
Date: Monday, September 22, 2008, 10:53 AM


— In 4D_Cubing@yahoogrou ps.com, David Smith <djs314djs314@ …> wrote:
> I’ve updated my formula for the upper bound for the number of
> reachable positions of an n^4 Rubik’s cube (it contained
> some errors), and also finished a similar formula for the
> supercube. Until now, I’ve only been using combinatorial arguments
> and concepts of higher dimensions in my work.

I’m amazed by the complexity of the formula. I suggest you to split it
into two formulas, one for the odd-sized hypercubes, and on for the
even-sized hypercubes. I’m sure the two formulas would be easier to
read than this one, and I’m not sure it’s interesting to group the two
formulas into a single one.
Also, if you put the factors associated with a single type of piece by
row, it could help the reader (and group somewhere the constraints
which link several type of piece).

Thibaut.


———— ——— ——— ——— ——— ——— ——— —-
Kredyt Hipoteczny w Banku Millennium - zdobywca Zlotego Lauru Klienta!
Sprawdz >> http://link. interia.pl/ f1f15