The Magic Encyclopedia ™

Perfect hypercubes of prime order
{note: investigative article}
(by Aale de Winkel)

The article "Pan diagonal hypercubes of prime order" generalizes the "panmagic square investigation" I did more or less at that same time, the article didn't go beyond investigating the diagonals of the hypercubes planes. Recent discussions with <Bogdan Golunski> lead me to investigate what conditions might be imposable to ensure magic lines along r-agonals for all r = 2..n. This article intents to do just that, and on some future date might hold counting arguments for this type of perfect hypercubes. Perfect add-onns might be provided to obtain perfect hypercubes of irregular variety (as suggested by the square investigation)


prime order perfect hypercubes
basic ingredients of pandiagonal hypercubes
Latin hypercube
generating formula
LH(aj)
Latin hypercubes obtained by formula
LH(aj): LH[ji] = (j=0naj ji) % m ; j ε [0,..,n-1]; i ε [0,..,m-1];
aj < aj+1; a0 = 1; aj = 2 .. (m - 1)/2
The latin hypercubes obtained by the above formula are in normalized position due to the
condition aj < aj+1 (can't be equal because that spoils pandiagonality).
a0 = 1 because because of digit changing, thus parameters define the LH's structure
the range of aj avoids pan-flip variants introduces by parameter range (m+1)/2 .. m-1.
pan r-agonal hypercubes
r-agonal pathfinder Pr = <ji; j = 0..n-1; ji ε {-1,0,1}; j=0n-1|ji| = r>
The formula merely captures all r-agonal direction the r-dimensional
subhypercube posesses
pan r-agonal condition
Cr
Cr : j=0n-1 Prj aj relatively prime to m.
since m is prime it means that the sum is no integral multiple of m
this condition posed on the latin hypercubes parameter ensures that also on the
r-agonal lines all digits are present
perfect condition
Pn
Pn : Cr for all r = 1 .. n
In order for the hypercube to be perfect all r-agonal conditions must be satisfied


Experimentation with my latest program confirms the above noted conditions, ie iff the construction parameters for the pandiagonal latin hypercube all the conditions above marked Pn the latin hypercube turns out to be perfect. n of these combine into a perfect n-dimensional hypercube for the cube this means that the first parameter combination (1,2,3) fails against the triagonal pathfinder <1,1,-1> (1+2-3=0!), since this is the only possibility for order 7 there is no order 7 perfect hypercube (as expected). Since all perfect hypercubes of any dimension > 2 the pathfinder <1,1,-1> needs to be satisfied the combinations (1,2,3,..) won't give a perfect latin hypercube for any order. The paramers for order 11 (1,3,4) and (1,4,5) also fails against the same pathfinder. The remaining three (1,2,4), (1,2,5) and (1,3,5) survive this scruteny, and combination of these three latin cube will give perfect cubes for any prime order >= 11. The table below present the amount of parameter combinations which survive the condition Pn (cube and tesseract values I tested since the treshshold 2n I did not test but merely postulated the values for the dimensions 5 and higher)

prime order perfect hypercubes
basic ingredients of perfect hypercubes
Latin hypercube
generating formula
LH(aj)

factor:
Counting argument unknown
F
Latin hypercubes obtained by formula
LH(aj): LH[ji] = (j=0naj ji) % m ; j ε [0,..,n-1]; i ε [0,..,m-1];
aj < aj+1; a0 = 1; aj = 2 .. (m - 1)/2
(j=0naj Pfp[j]) % m != 0; p ε [0,..,3n-1]; Pfp[j] ε {-1,0,1};
The latin hypercubes obtained by the above formula are in normalized position due to the
condition aj < aj+1 (can't be equal because that spoils pandiagonality).
a0 = 1 because because of digit changing, thus parameters define the LH's structure
the range of aj avoids pan-flip variants introduces by parameter range (m+1)/2 .. m-1.
Unknown counting argument (numbers manually obtained)
m \ n 2 3 4 5 6 7
5
7
11
13
17
19
1
2
4
5
7
8
0
0
3
6
15
21
0
0
0
0
1
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
As with the pandiagonal hypercube the same arguments give numbers of possible {perfect}
hypercubes, so we have G = F (F 2(n-1) - 1 n-1) (n-1)! basic {perfect} hypercubes
and thus eventually G((m-1)!/2)n {perfect} hypercubes.
(stated numbers preliminairy)
{perfect} hypercubes
basic
{perfect} hypercubes

factor:
G = F (F 2(n-1) - 1 n-1) (n-1)!
the basic {perfect} hypercubes
H(aj,i) = i=0n-1 mn-i-1 LH(aj,i)
In order to retain the normalized position the highest component (denoted with i=0) need to
remain in normalized position, the other component are added in posible panflip and
transpositional variants, leaving the x-axis as is there are 2n-1 panflips, resulting
in 2n-1 F posibilities of which 1 is already chosen, and n-1 LH's need be randomly
selected, this explains the listed factor. The factor of (n-1)! is due to reordering
of the lower components
F (F 2(n-1) - 1 n-1) (n-1)!
m \ n 2 3 4 5 6 7
5
7
11
13
17
19
1
6
28
45
91
120
0
0
330
3,036
51,330
142,926
0
0
0
0
1,632
22,230
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
{perfect} hypercubes

factor:
m!nG/(2m)n=
G((m-1)!/2)n
the {perfect} hypercubes
{perfect}
H(aj,i) = i=0n-1 mn-i-1 LH(aj,i)=[perm(i)]
Applying independently digits changers to the various components generate all(?) possible
pandiagonal hypercubes, which introduces a factor (m!)n (if not mistaken).
This however also introduces all panvariants which gives a deviding factor of (2m)n with:
2n (reflection) ; mn (panrelocation)


For the order 17 tesseract only (1,2,4,8) survived the condition, combining these into tesseract is possible because one can pan-flip these quadruplet for the lower components (a --> 17-a) (as discuseed in the pan-diagonal article). The order 19 introduces (1,2,4,9), (1,2,5,9) and (1,5,7,9) into the mixture of possibilities. This investigation suggest that once a prime order allows a certain n-plet, that n-plet remains valid for any higher order. Which means that a production <LH(...),...,LH(...)> generate a perfect hypercube for order m (m prime) it does so also for any prime order > m.

Note: the counting arguments in the pan-diagonal hypercube article did not taken into account that in case used parameters are lineair dependent in all the used latin hypercubes in a directional pair, doubly numbers appear. So the actual number are a bit lower then the Ca's result, by what factor I currrently don't know but will be investigated some future date.