Magic hyperbeam

Last updated

A magic hyperbeam (n-dimensional magic rectangle) is a variation on a magic hypercube where the orders along each direction may be different. As such a magic hyperbeam generalises the two dimensional magic rectangle and the three dimensional magic beam, a series that mimics the series magic square, magic cube and magic hypercube. This article will mimic the magic hypercubes article in close detail, and just as that article serves merely as an introduction to the topic.



It is customary to denote the dimension with the letter 'n' and the orders of a hyperbeam with the letter 'm' (appended with the subscripted number of the direction it applies to).

Further: In this article the analytical number range [0..k=0Πn-1mk-1] is being used.


in order to keep things in hand a special notation was developed:

Note: The notation for position can also be used for the value on that position. There where it is appropriate dimension and orders can be added to it thus forming: n[ki]m0,..,mn-1



Description of more general methods might be put here, I don't often create hyperbeams, so I don't know whether Knightjump or Latin Prescription work here. Other more adhoc methods suffice on occasion I need a hyperbeam.


Amongst the various ways of compounding, the multiplication [1] can be considered as the most basic of these methods. The basic multiplication is given by:

nB(m..)1 * nB(m..)2 : n[ki](m..)1(m..)2 = n[ [[<sub>k</sub>i \ m<sub>k2</sub>]](m..)1k=0Πn-1mk1](m..)2 + [ki % mk2](m..)2](m..)1(m..)2

(m..) abbreviates: m0,..,mn-1.
(m..)1(m..)2 abbreviates: m01m02,..,mn-11mn-12.


all orders are either even or odd

A fact that can be easily seen since the magic sums are:

Sk = mk (j=0Πn-1mj - 1) / 2

When any of the orders mk is even, the product is even and thus the only way Sk turns out integer is when all mk are even.
Thus suffices: all mk are either even or odd.

This is with the exception of mk=1 of course, which allows for general identities like:

Which goes beyond the scope of this introductory article

Only one direction with order = 2

since any number has but one complement only one of the directions can have mk = 2.


A hyperbeam knows 2n Aspectial variants, which are obtained by coördinate reflection ([ki] --> [k(-i)]) effectively giving the Aspectial variant:

nB( ; R = k=0Σn-1 ((reflect(k)) ? 2k : 0) ;

Where reflect(k) true iff coördinate k is being reflected, only then 2k is added to R.

In case one views different orientations of the beam as equal one could view the number of aspects n! 2n just as with the magic hypercubes, directions with equal orders contribute factors depending on the hyperbeam's orders. This goes beyond the scope of this article.

Basic manipulations

Besides more specific manipulations, the following are of more general nature

Note: '^' and '_' are essential part of the notation and used as manipulation selectors.

Coördinate permutation

The exchange of coördinaat [ki] into [perm(k)i], because of n coördinates a permutation over these n directions is required.
The term transpose (usually denoted by t) is used with two dimensional matrices, in general though perhaps "coördinaatpermutation" might be preferable.

Monagonal permutation

Defined as the change of [ki] into [kperm(i)] alongside the given "axial"-direction. Equal permutation along various axes with equal orders can be combined by adding the factors 2axis. Thus defining all kinds of r-agonal permutations for any r. Easy to see that all possibilities are given by the corresponding permutation of m numbers.

normal position

In case no restrictions are considered on the n-agonals a magic hyperbeam can be represented shown in "normal position" by:

[ki] < [k(i+1)] ; i = (by monagonal permutation)


Qualifying the hyperbeam is less developed then it is on the magic hypercubes in fact only the k'th monagonal direction need to sum to:

Sk = mk (j=0Πn-1mj - 1) / 2

for all k = 0..n-1 for the hyperbeam to be qualified {magic}

When the orders are not relatively prime the n-agonal sum can be restricted to:

S = lcm(mi ; i = 0..n-1) (j=0Πn-1mj - 1) / 2

with all orders relatively prime this reaches its maximum:

Smax = j=0Πn-1mj (j=0Πn-1mj - 1) / 2

Special hyperbeams

The following hyperbeams serve special purposes:

The "normal hyperbeam"

nNm0,..,mn-1 : [ki] = k=0Σn-1ki mkk

This hyperbeam can be seen as the source of all numbers. A procedure called "Dynamic numbering" makes use of the isomorphism of every hyperbeam with this normal, changing the source, changes the hyperbeam. Basic multiplications of normal hyperbeams play a special role with the "Dynamic numbering" of magic hypercubes of order k=0Πn-1 mk.

The "constant 1"

n1m0,..,mn-1 : [ki] = 1

The hyperbeam that is usually added to change the here used "analytic" numberrange into the "regular" numberrange. Other constant hyperbeams are of course multiples of this one.

See also

Related Research Articles

Simplex Multi-dimensional generalization of triangle

In geometry, a simplex is a generalization of the notion of a triangle or tetrahedron to arbitrary dimensions. The simplex is so-named because it represents the simplest possible polytope in any given space.

In mathematics, the octonions are a normed division algebra over the real numbers, a kind of hypercomplex number system. The octonions are usually represented by the capital letter O, using boldface O or blackboard bold . Octonions have eight dimensions; twice the number of dimensions of the quaternions, of which they are an extension. They are noncommutative and nonassociative, but satisfy a weaker form of associativity; namely, they are alternative. They are also power associative.

Packing problems

Packing problems are a class of optimization problems in mathematics that involve attempting to pack objects together into containers. The goal is to either pack a single container as densely as possible or pack all objects using as few containers as possible. Many of these problems can be related to real life packaging, storage and transportation issues. Each packing problem has a dual covering problem, which asks how many of the same objects are required to completely cover every region of the container, where objects are allowed to overlap.

In linear algebra, the permanent of a square matrix is a function of the matrix similar to the determinant. The permanent, as well as the determinant, is a polynomial in the entries of the matrix. Both are special cases of a more general function of a matrix called the immanant.

Module (mathematics) Generalization of vector space, with scalars in a ring instead of a field

In mathematics, a module is one of the fundamental algebraic structures used in abstract algebra. A module over a ring is a generalization of the notion of vector space over a field, wherein the corresponding scalars are the elements of an arbitrary given ring and a multiplication is defined between elements of the ring and elements of the module. A module taking its scalars from a ring R is called an R-module.

Magic cube

In mathematics, a magic cube is the 3-dimensional equivalent of a magic square, that is, a number of integers arranged in a n × n × n pattern such that the sums of the numbers on each row, on each column, on each pillar and on each of the four main space diagonals are equal to the same number, the so-called magic constant of the cube, denoted M3(n). It can be shown that if a magic cube consists of the numbers 1, 2, ..., n3, then it has magic constant

In mathematics, a perfect magic cube is a magic cube in which not only the columns, rows, pillars, and main space diagonals, but also the cross section diagonals sum up to the cube's magic constant.

In mathematics, a magic hypercube is the k-dimensional generalization of magic squares and magic cubes, that is, an n × n × n × ... × n array of integers such that the sums of the numbers on each pillar as well as on the main space diagonals are all the same. The common sum is called the magic constant of the hypercube, and is sometimes denoted Mk(n). If a magic hypercube consists of the numbers 1, 2, ..., nk, then it has magic number

Cross-polytope Regular polytope dual to the hypercube in any number of dimensions

In geometry, a cross-polytope, hyperoctahedron, orthoplex, or cocube is a regular, convex polytope that exists in n-dimensions. A 2-dimensional cross-polytope is a square, a 3-dimensional cross-polytope is a regular octahedron, and a 4-dimensional cross-polytope is a 16-cell. Its facets are simplexes of the previous dimension, while the cross-polytope's vertex figure is another cross-polytope from the previous dimension.

Homotopy groups of spheres

In the mathematical field of algebraic topology, the homotopy groups of spheres describe how spheres of various dimensions can wrap around each other. They are examples of topological invariants, which reflect, in algebraic terms, the structure of spheres viewed as topological spaces, forgetting about their precise geometry. Unlike homology groups, which are also topological invariants, the homotopy groups are surprisingly complex and difficult to compute.

Every magic cube may be assigned to one of six magic cube classes, based on the cube characteristics.

A pantriagonal magic cube is a magic cube where all 4m2 pantriagonals sum correctly. There are 4 one-segment, 12(m − 1) two-segment, and 4(m − 2)(m − 1) three-segment pantriagonals. This class of magic cubes may contain some simple magic squares and/or pandiagonal magic squares, but not enough to satisfy any other classifications.

Real coordinate space Space formed by the n-tuples of real numbers

In mathematics, a real coordinate space of dimension n, written Rn or , is a coordinate space over the real numbers. This means that it is the set of the n-tuples of real numbers. With component-wise addition and scalar multiplication, it is a real vector space.

Row- and column-major order

In computing, row-major order and column-major order are methods for storing multidimensional arrays in linear storage such as random access memory.

In mathematics, a Gelfand pair is a pair (G,K) consisting of a group G and a subgroup K that satisfies a certain property on restricted representations. The theory of Gelfand pairs is closely related to the topic of spherical functions in the classical theory of special functions, and to the theory of Riemannian symmetric spaces in differential geometry. Broadly speaking, the theory exists to abstract from these theories their content in terms of harmonic analysis and representation theory.

Simplex noise is a method for constructing an n-dimensional noise function comparable to Perlin noise but with fewer directional artifacts and, in higher dimensions, a lower computational overhead. Ken Perlin designed the algorithm in 2001 to address the limitations of his classic noise function, especially in higher dimensions.

Hypercube graph

In graph theory, the hypercube graphQn is the graph formed from the vertices and edges of an n-dimensional hypercube. For instance, the cubical graph Q3 is the graph formed by the 8 vertices and 12 edges of a three-dimensional cube. Qn has 2n vertices, 2n−1n edges, and is a regular graph with n edges touching each vertex.

A Nasik magic hypercube is a magic hypercube with the added restriction that all possible lines through each cell sum correctly to where S = the magic constant, m = the order and n = the dimension, of the hypercube.

In mathematics, an orthogonal array is a "table" (array) whose entries come from a fixed finite set of symbols, arranged in such a way that there is an integer t so that for every selection of t columns of the table, all ordered t-tuples of the symbols, formed by taking the entries in each row restricted to these columns, appear the same number of times. The number t is called the strength of the orthogonal array. Here is a simple example of an orthogonal array with symbol set {1,2} and strength 2:

In combinatorial mathematics, a Latin rectangle is an r × n matrix, using n symbols, usually the numbers 1, 2, 3, ..., n or 0, 1, ..., n − 1 as its entries, with no number occurring more than once in any row or column.


  1. this is a hyperbeam version of (pe.): Alan Adler magic square multiplication

Further reading