Number of canonical move sequences for nxnxn Rubik's cube in h-w metric
With
m[n_]:=Table[If[i>j,9,6],{i,1,n-1},{j,1,n-1}]
v[n_]:=Table[9,{i,1,n-1}]
the number of canonical sequences is given by
count[n_, k_] := Total[MatrixPower[m[n], k - 1].v[n]]
If we know the n-1 eigenvalues v_0, v_1... v_(n-2) of this matrix we can write count[n,k] as
count[n,k] = c_0*v_0^k + c_1*v_1^k + ....c_(n-2)*v_(n-2)^k with some constants c_0,....c_(n-2)
Fortunately the characteristic polynomial can be solved in a closed form and we get
ev[n_,k_]:=3/((3/2)^(1/(n-1))Exp[2*I*Pi*k/(n-1)]-1) with k= 0..n-2
ev[n,0] = 3/((3/2)^(1/(n-1))-1) has the biggest absolute value and an analysis shows that for n>2
Abs[ev[n,k]]< 0.08*Abs[ev[n,0]] for all k=1..n-2
So if we define countApprox[n,k]=c_0*ev[n,0]^k the relative error converges quickly to 0.
Determining the constants c_k is not obvious. I explicitly computed the values only up to n=6 solving some linear equation systems, the expressions get very complicated but at least for c_0 a very simple pattern emerged and we get a very simple and nice formula for countApprox[n,k]:
With the branching factor b:= ev[n,0] = 3/((3/2)^(1/(n-1))-1) we get
countApprox[n,k]= (3+b)/(6(n-1))b^k
Here some examples to show the quality of the approximation (values rounded):
n=3 k count countApprox 1 18 18 2 243 243 3 3240 3240 4 43254 43254 5 577368 577369 6 7706988 7706987 7 102876480 102876481 8 1373243544 1373243542 9 18330699168 18330699170 10 244686773808 244686773805 11 3266193870720 3266193870724 12 43598688377184 43598688377179 13 581975750199168 581975750199175 14 7768485393179328 7768485393179319 15 103697388221736960 103697388221736972 16 1384201395738071424 1384201395738071408 17 18476969736848122368 18476969736848122390 18 246639261965462754048 246639261965462754018 19 3292256598848819251200 3292256598848819251240 20 43946585901564160587264 43946585901564160587210
n=4 k count countApprox 1 27 27 2 567 567 3 11745 11745 4 243486 243486 5 5047596 5047594 6 104639202 104639206 7 2169224064 2169224058 8 44969120244 44969120250 9 932232780756 932232780754 10 19325660646240 19325660646230 11 400630794286320 400630794286353 12 8305280542211544 8305280542211480 13 172172698326166032 172172698326166120 14 3569227782041873232 3569227782041873157 15 73991910935646107280 73991910935646107253 16 1533890022781504051296 1533890022781504051563 17 31798321900822223870976 31798321900822223870315 18 659195418635526138240672 659195418635526138241779 19 13665456979314071796134784 13665456979314071796133482 20 283291887616616103884455104 283291887616616103884455776
n=100 k count countApprox 1 891 903 2 660231 660286 3 482682321 482664646 4 352824725286 352824551095 5 257912294551956 257912330788002 6 188532147183012666 188532147681012452 7 137815709007224518776 137815708929526538671 8 100742339498179233419136 100742339496834952355085 9 73641960311376889071476496 73641960311544422584163191 10 53831768704330235876123007636 53831768704333732711768810851
The relative error for n=3, 4, 100 and k=10 is 1*10^-11, 5*10^-13 and 6*10^-14. With this approximation it is possible to find good lower bounds for God's algorithm in h-w metric. I will work this out later.