The Magic Encyclopedia ™

Hypercube Mathematics

This article deals with the hypercube nHm in general, each n-Point [ki] contains a number however no magic condition is imposed on the hypercube
Recent investigations made me implement a lot of useful operators onto my program, with this article I intent to describe these new operators as well as already known operations. It thus serves as future reference to the known operations performed of hypercubes, the reader is invited to join this effort by sending their operations on hypercubes to me
note that hypercubes mathematics barely resemble matrix (aka holor) mathematics
descriptions given assume %m components, but uses in more irregular situations is possible (compound orders etc)
operations are also defined on hyperbeams, current description is on hypercubes in analitic numberrange for simplicity

Hypercube Mathematics
The hypercube consists of squares of numbers, the amount of numbers
along any monagonal is the same in all directions. This is called
the order and denoted by 'm', while the dimension is denoted by 'n'.
nHm : n[ki]m ε [0..mn-1] ; k ε [0..n-1] ; i ε [0..m-1]

also '==' means equality and '!=' means inequality (as is usual in c-type programming languages)
(condition) ? if true : if false (as also in use with c-type programming languages)
Hypercube modifiers
Basic operations on a given hypercube defined elsewhere in this encyclopedia, mentioned here to have
mathematical descriptions here are preliminary at best and need careful verification
panrelocation
notation: @[kj]
{n[ki]m}@[kj] : n[ki]m = [k(i + j) % m]
This moves [k0] to [kj] in modular space.
correspondence with circular monagonal permutation:
@[kj] = _2k[(kj + i)%m ; i=0..m-1] ; k=0..n-1
digit changing permutation
notation: =R[perm(0..m-1)]
{n[ki]m}=R[perm(0..m-1)] : n[ki]m = k=0n-1 [{ ((R&2k)==2k) ? perm[[ki]\mk % m] : [[ki]\mk % m] } mk]
The component bitwise mentioned in R changes digit according to the given permutation, the others are left as is.
R = k digit changed component∑ 2k
monagonal permutation
notation: _R[perm(0..m-1)]

reflection ~R = _R[m-1,..,0]
{n[ki]m}_R[perm(0..m-1)] : n[ki]m = [ k ((R&2k)==2k) ? perm[i] : i ]
The axes bitwise mentioned in R are permuted according to the given permutation, the others are left as is.
Combining r axes in R is known as an r-agonal permutation, the axes are permuted independently of each other
R = k permuted axis∑ 2k
if R = 2n-1 R is ommitted: _[perm(0..m-1}] n-agonal permutation
monagonal reversal _R[m-1,..,0] (aka reflection ~R) means to describe up to factor 2n aspects.
"panrelocation" is expressable using monagonal permutation.
@[kj] = _2k[(kj + i)%m ; i=0..m-1] ; k=0..n-1
axial permutation
notation: ^[perm(0..n-1)]
{n[ki]m}^[perm(0..n-1)] : n[ki]m = [ perm[k]i ]
The axes are permuted acording to the given permutation.
means to describe up to factor n! aspects.
component permutation
notation: #[perm(0..n-1)]
{n[ki]m}#[perm(0..n-1)] : n[ki]m = k=0n-1 [[ki]\mk % m] mperm[k]]
The components are permuted acording to the given permutation.
NOTE: new operation
under investigation

monagonal shift
notation: >>R[perm?(0..m-1)]
notation: <<R[perm?(0..m-1)]
{n[ki]m}>>R[perm?(0..m-1)] : n[ki]m = [ ((R&2k)==2k) ? ((k+1)%n)i + perm?[ki] : ki ]
{n[ki]m}<<R[perm?(0..m-1)] : n[ki]m = [ ((R&2k)==2k) ? ((k-1)%n)i + perm?[ki] : ki ]
The shift operator defined on axis k lifts the numbers according to the permutation
The shifts are expressed on axis k to express how far the numbers need to be shifted parallel the (k+/-1) axis
(note: current experience for square (n=2) only, I suppose this works also for higher dimensions)
perm? indicates that mostly a permutation is formulated, though not necesairy, as pe [0,..,0] is the neutral in this operation
square "diagonal-row" (DR) and "diagonal-column" (DC) transformation for odd m:
DR = >>1[0..m-1]_2[2x%m ; x=0..m-1]<<2[0,m-1..1].
DC = <<2[0..m-1]_1[2x%m ; x=0..m-1]>>1[0,m-1..1].
which relates to DRt = DC_2[0,m-1..1] and
DR2 = It_1[ 2 x %m ; x=0..m-1] _2[(m-2) x %m ; x=0..m-1 ]
DC2 = It_1[ (m-2) x %m ; x=0..m-1] _2[2 x %m ; x=0..m-1 ]
more important DC4 = DR4 = _3[ (m-4) x % m ; x=0..m-1 ]
which tells the grouporder of DR to be:
m-1 for m = 5,13,17,29,37,53,61,73,89,97,...
4(m-1) for m = 7,11,19,23,47,59,67,71,79,83,...
40 for m = 31 ; 20 for m = 41 and 56 for m = 43
estimated up till m = 97

an implementation for a cube showed me the DR definition above holds for the hypercubes also
the possibilities of the shift operator are limitles DR<<1[0..m-1] maps the cubes triagonal onto the x-axis
whether this constitutes a usefull "triagonal-row" transform remains to be seen.
Basic operations
The defined below combines the n-dimensional hypercube 'H' with 1-dimensional number 'x' in a manner I haven't seen before
further for this purpose the hypercubes are fully decorated, without decoration indicate the numbers at the position
basic
note: H + x == x + H
nHm + x : n[ki]m = [ki] + x
x + nHm : n[ki]m = x + [ki]
The constant x is added to every number in the hypercube
since [ki] + x == x + [ki] so is H + x == x + H
basic
hypercube constant subtraction
note: H - x != x - H
nHm - x : n[ki]m = [ki] - x
x - nHm : n[ki]m = x - [ki]
The constant x is subtracted by/from every number in the hypercube
since [ki] - x != x - [ki] so is H - x != x - H
basic
hypercube constant multiplication
note: H * x == x * H
nHm * x : n[ki]m = [ki] * x
x * nHm : n[ki]m = x * [ki]
The constant x is multiplying every number in the hypercube
since [ki] * x == x * [ki] so is H * x == x * H
basic
hypercube constant division
note: H / x != x / H
nHm / x : n[ki]m = [ki] / x
x / nHm : n[ki]m = x / [ki]
The constant x is devided by/dividing every number in the hypercube
since [ki] / x != x / [ki] so is H / x != x / H
note: though this operator is defined, its use has yet to be verified (no experience with this one yet)
basic
hypercube constant modulation
note: H % x
nHm % x : n[ki]m = [ki] % x
every number in the hypercube is 'modulated' by te constant
Hypercube operations
operators defined in this section are defined for m1 * m2
current description are preliminary,
so check with me in case you plan some implementation
dynamic numbering
note: n[ { nNm } nHm ]m = nHm
n[ { nH1m } nH2m ]m <= [ j[ki]2\mj % m ]1
due to limits in C# operator symbols this is actually implemented as
nH1m & nH2m
the odd one out here as result, LHS and RHS are of the same order
dynamic induction
n[ nH1m | nH2m ]m <= [ j[{kki mk}]2\mj % m ]1
formulation not clear yet, [{k}] means locate the value k in the hypercube and place there the value at [ki]1
be aware this is prelimminary, having only an Excel square implementation at this moment
the odd one out here as result, LHS and RHS are of the same order
basic
note: nHm1m2 + nHm2 != nHm1 + nHm1m2
nHm1m2 + nHm2 : n[ki]m1m2 = n[ [ki]m1m2 + [ki % m2]m2 ]m1m2
nHm1 + nHm1m2 : n[ki]m1m2 = n[ [ki \ m2]m1 + [ki]m1m2 ]m1m2
RHS hypercube is added to LHS subblocks of order m2
RHS hypercube is added to LHS enlarged subblocks of order m1
the not yet tested implementation returns the LHS if the RHS order doesn't divide the LHS order
basic
hypercube subtraction
note: nHm1m2 - nHm2 != nHm1 - nHm1m2
nHm1m2 - nHm2 : n[ki]m1m2 = n[ [ki]m1m2 - [ki % m2]m2 ]m1m2
nHm1 - nHm1m2 : n[ki]m1m2 = n[ [ki \ m2]m1 - [ki]m1m2 ]m1m2
RHS hypercube is subtracted from LHS subblocks of order m2
RHS hypercube is subtracted from LHS enlarged subblocks of order m1
the not yet tested implementation returns the LHS if the RHS order doesn't divide the LHS order
basic
hypercube multiplication
note: nHm1 * nHm2 != nHm2 * nHm1
nHm1 * nHm2 : n[ki]m1m2 = n[ [[ki \ m2]m1m2n]m2 + [ki % m2]m2]m1m2
RHS hypercube is added to LHS multiplying an inplace constant [ mn ] hypercube
just as matrix-multiplication hypercube-multiplication is not cummutative
basic
hypercube division
note: nHm1m2 / nHm2 != nHm1 / nHm1m2
nHm1m2 / nHm2 : nHm1m2 = ( nHm1m2 / nHm2 ) * n[ki]m2
nHm1 / nHm1m2 : nHm1m2 = n[ki]m1 * ( nHm1 / nHm1m2 )
The reverse of hypercube multiplication, result is a hypercube of order m1/2 which statifies the multiplication
when not successfull result of order m1m2 holding the partial result for investigation.
The implementation gives result when the lower order divides the higher order operand,
result is to be checked by multiplication
Hypercube normalisation and ordering
putting hypercubes in a standard / normal position is helpfull in ordering lists of hypercubes
hypercube normalisation nHm1 N :
[k0] = min [j0,l(m-1) #j+l=n] (using reflection);
[j0,l1 #j=n-1;#l=1] < [j0,(l+1)1 #j=n-1;#l=1] (using axial permutation)
the means of normalisation depends on the quality of the hypercube, reflection / axialpermutation are possible on all
hypercube ordering nH1 == nH2 : n[ki]1 == n[ki]2 ; i=0..m-1 ; k=0..n-1
nH1 != nH2 : n[ki]1 != n[ki]2 ; i=0..m-1 ; k=0..n-1
nH1 < nH2 : n[ki]1 < n[ki]2 ; i=0..m-1 ; k=0..n-1
nH1 > nH2 : n[ki]1 > n[ki]2 ; i=0..m-1 ; k=0..n-1
this defines equality inequality and oordering as well, the first inequal element defines whether
the hypercube is ordered before '<' or after '>' the other hypercube.