Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Magic hypercube

From Wikipedia, the free encyclopedia
Generalization of a magic square
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Magic hypercube" – news ·newspapers ·books ·scholar ·JSTOR
(October 2010) (Learn how and when to remove this message)
This article mayrequirecleanup to meet Wikipedia'squality standards. The specific problem is:the mathematical expressionsneed to be rewritten in AMS-LaTeX markup. Please helpimprove this article if you can.(March 2014) (Learn how and when to remove this message)
This articleis written like apersonal reflection, personal essay, or argumentative essay that states a Wikipedia editor's personal feelings or presents an original argument about a topic. Pleasehelp improve it by rewriting it in anencyclopedic style.(October 2017) (Learn how and when to remove this message)
(Learn how and when to remove this message)

Inmathematics, amagic hypercube is thek-dimensional generalization ofmagic squares andmagic cubes, that is, ann ×n ×n × ... ×n array ofintegers such that the sums of the numbers on each pillar (along any axis) as well as on the mainspace diagonals are all the same. The common sum is called themagic constant of the hypercube, and is sometimes denotedMk(n). If a magic hypercube consists of the numbers 1, 2, ...,nk, then it has magic number

Mk(n)=n(nk+1)2{\displaystyle M_{k}(n)={\frac {n(n^{k}+1)}{2}}}.

Fork = 4, a magic hypercube may be called amagic tesseract, with sequence of magic numbers given byOEISA021003.

The side-lengthn of the magic hypercube is called itsorder. Four-, five-, six-, seven- and eight-dimensional magic hypercubes of order three have been constructed byJ. R. Hendricks.

Marian Trenkler proved the following theorem:Ap-dimensional magic hypercube of ordern exists if and only ifp > 1 andn is different from 2 orp = 1. A construction of a magic hypercube follows from the proof.

TheR programming language includes a module,library(magic), that will create magic hypercubes of any dimension withn a multiple of 4.

Perfect magic hypercubes

[edit]
See also:Magic Cube Classes

If, in addition, the numbers on everycross section diagonal also sum up to the hypercube's magic number, the hypercube is called aperfect magic hypercube; otherwise, it is called asemiperfect magic hypercube. The numbern is called the order of the magic hypercube.

This definition of "perfect" assumes that one of the older definitions for perfect magic cubes is used. TheUniversal Classification System for Hypercubes (John R. Hendricks) requires that for any dimension hypercube,all possible lines sum correctly for the hypercube to be consideredperfect magic. Because of the confusion with the termperfect,nasik is now the preferred term forany magic hypercube whereall possible lines sum toS. Nasik was defined in this manner by C. Planck in 1905. A nasik magic hypercube has1/2(3n − 1) lines ofm numbers passing through each of themn cells.

Nasik magic hypercubes

[edit]

ANasik magic hypercube is a magic hypercube with the added restriction that all possible lines through each cell sum correctly toS =m(mn+1)/2 whereS is the magic constant,m the order andn the dimension of the hypercube.

Or, to put it more concisely, all pan-r-agonals sum correctly forr = 1...n. This definition is the same as the Hendricks definition ofperfect, but different from the Boyer/Trump definition.

The termnasik would apply to all dimensions of magic hypercubes in which the number of correctly summing paths (lines) through any cell of the hypercube isP =3n − 1/2.

Apandiagonal magic square then would be anasik square because 4 magic line pass through each of them2 cells. This was A.H. Frost’s original definition of nasik. Anasik magic cube would have 13 magic lines passing through each of itsm3 cells. (This cube also contains 9m pandiagonal magic squares of orderm.) Anasik magic tesseract would have 40 lines passing through each of itsm4 cells, and so on.

History

[edit]

In 1866 and 1878, Rev. A. H. Frost coined the termNasik for the type of magic square we commonly callpandiagonal and often callperfect. He then demonstrated the concept with an order-7 cube we now class aspandiagonal, and an order-8 cube we class aspantriagonal.[1][2] In another 1878 paper he showed anotherpandiagonal magic cube and a cube where all 13m lines sum correctly[3] i.e. Hendricksperfect.[4]He referred to all of these cubes asnasik as a respect to the great Indian MathematicianD R Kaprekar who hails fromDeolali inNasik District inMaharashtra,India.In 1905 Dr. Planck expanded on the nasik idea in his Theory of Paths Nasik. In the introductory to his paper, he wrote;

Analogy suggest that in the higher dimensions we ought to employ the term nasik as implying the existence of magic summations parallel to any diagonal, and not restrict it to diagonals in sections parallel to the plane faces. The term is used in this wider sense throughout the present paper.

— C. Planck, M.A., M.R.C.S., The Theory of Paths Nasik, 1905[5]

In 1917, Dr. Planck wrote again on this subject.

It is not difficult to perceive that if we push the Nasik analogy to higher dimensions the number of magic directions through any cell of a k-fold must be ½(3k-1).

— W. S. Andrews, Magic Squares and Cubes, Dover Publ., 1917, page 366[6]

In 1939, B. Rosser and R. J. Walker published a series of papers on diabolic (perfect) magic squares and cubes. They specifically mentioned that these cubes contained 13m2 correctly summing lines. They also had 3m pandiagonal magic squares parallel to the faces of the cube, and 6m pandiagonal magic squares parallel to thespace-diagonal planes.[7]

Notations

[edit]

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. Then, where it is appropriate, dimension and order can be added to it, thus forming:n[ki]m

As is indicatedk runs through the dimensions, while the coordinatei runs through all possible values, when valuesi are outside the range it is simply moved back into the range by adding or subtracting appropriate multiples ofm, as the magic hypercube resides in n-dimensional modular space.

There can be multiplek between brackets, these cannot have the same value, though in undetermined order, which explains the equality of:

[1i,kj]=[kj,1i]{\displaystyle \left[{}_{1}i,{}_{k}j\right]=\left[{}_{k}j,{}_{1}i\right]}

Of course givenk also one valuei is referred to.

When a specific coordinate value is mentioned the other values can be taken as 0, which is especially the case when the amount of 'k's are limited using pe. #k = 1 as in:

[k1; #k=1]=[k1  j0 ; #k=1; #j=n1]{\displaystyle \left[{}_{k}1;\ \#k=1\right]=\left[{}_{k}1\ \ {}_{j}0\ ;\ \#k=1;\ \#j=n-1\right]}("axial"-neighbor of[k0]{\displaystyle \left[{}_{k}0\right]} )

(#j=n-1 can be left unspecified) j now runs through all the values in [0..k-1,k+1..n-1].

Further: without restrictions specified 'k' as well as 'i' run through all possible values, in combinations same letters assume same values. Thus makes it possible to specify a particular line within the hypercube (see r-agonal in pathfinder section)

Note: as far as I know this notation is not in general use yet(?), Hypercubes are not generally analyzed in this particular manner.

Further: "perm(0..n-1)" specifies apermutation of the n numbers 0..n-1.

Construction

[edit]

Besides more specific constructions two more general construction method are noticeable:

KnightJump construction

[edit]

This construction generalizes the movement of the chessboard horses (vectors1,2,1,2,1,2,1,2{\displaystyle \langle 1,2\rangle ,\langle 1,-2\rangle ,\langle -1,2\rangle ,\langle -1,-2\rangle }) to more general movements (vectorski{\displaystyle \langle {}_{k}i\rangle }). The method starts at the position P0 and further numbers are sequentially placed at positionsV0{\displaystyle V_{0}} further until (after m steps) a position is reached that is already occupied, a further vector is needed to find the next free position. Thus the method is specified by the n by n+1 matrix:

[P0,V0Vn1]{\displaystyle [P_{0},V_{0}\dots V_{n-1}]}

This positions the number 'k' at position:

Pk=P0+l=0n1((kml) % m)Vl;k=0mn1.{\displaystyle P_{k}=P_{0}+\sum _{l=0}^{n-1}((k\backslash m^{l})\ \%\ m)V_{l};\quad k=0\dots m^{n}-1.}

C. Planck gives in his 1905 article"The theory of Path Nasiks" conditions to create with this method "Path Nasik" (or modern {perfect}) hypercubes.

Latin prescription construction

[edit]

(modular equations).This method is also specified by an n by n+1 matrix. However this time it multiplies the n+1 vector [x0,..,xn-1,1], After this multiplication the result is taken modulus m to achieve the n (Latin) hypercubes:

LPk = (l=0Σn-1 LPk,l xl + LPk,n ) % m

of radix m numbers (also called "digits"). On these LPk's "digit changing" (?i.e. Basic manipulation) are generally applied before these LPk's are combined into the hypercube:

nHm =k=0Σn-1 LPk mk

J.R.Hendricks often uses modular equation, conditions to make hypercubes of various quality can be found onhttp://www.magichypercubes.com/Encyclopedia at several places (especially p-section)

Both methods fill the hypercube with numbers, the knight-jump guarantees (given appropriate vectors) that every number is present. The Latin prescription only if the components are orthogonal (no two digits occupying the same position)

Multiplication

[edit]

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

nHm1 *nHm2 :n[ki]m1m2 =n[ [[ki \ m2]m1m1n]m2 + [ki % m2]m2]m1m2

Most compounding methods can be viewed as variations of the above, As most qualifiers are invariant under multiplication one can for example place any aspectual variant ofnHm2 in the above equation, besides that on the result one can apply a manipulation to improve quality. Thus one can specify pe the J. R. Hendricks / M. Trenklar doubling. These things go beyond the scope of this article.

Aspects

[edit]

A hypercube knowsn! 2n Aspectial variants, which are obtained by coordinate reflection ([ki] --> [k(-i)]) and coordinate permutations ([ki] --> [perm[k]i]) effectively giving the Aspectial variant:

nHm~R perm(0..n-1); R =k=0Σn-1 ((reflect(k)) ? 2k : 0) ; perm(0..n-1) a permutation of 0..n-1

Where reflect(k) true iff coordinate k is being reflected, only then 2k is added to R.As is easy to see, only n coordinates can be reflected explaining 2n, the n! permutation of n coordinates explains the other factor to the total amount of "Aspectial variants"!

Aspectial variants are generally seen as being equal. Thus any hypercube can be represented shown in"normal position" by:

[k0] = min([kθ ; θ ε {-1,0}]) (by reflection)[k1 ; #k=1] < [k+11 ; #k=1] ; k = 0..n-2 (by coordinate permutation)

(explicitly stated here: [k0] the minimum of all corner points. The axial neighbour sequentially based on axial number)

Basic manipulations

[edit]

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

  • #[perm(0..n-1)] : component permutation
  • ^[perm(0..n-1)] : coordinate permutation (n == 2: transpose)
  • _2axis[perm(0..m-1)] : monagonal permutation (axis ε [0..n-1])
  • =[perm(0..m-1)] : digit change

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

Component permutation

[edit]

Defined as the exchange of components, thus varying the factor mk in mperm(k), because there are n component hypercubes the permutation is over these n components

Coordinate permutation

[edit]

The exchange of coordinate [ki] into [perm(k)i], because of n coordinates a permutation over these n directions is required. The termtranspose (usually denoted byt) is used with two dimensional matrices, in general though perhaps "coordinate permutation" might be preferable.

Monagonal permutation

[edit]

Defined as the change of [ki] into [kperm(i)] alongside the given "axial"-direction. Equal permutation along various axes 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.

Noted be thatreflection is the special case:

~R = _R[n-1,..,0]

Further when all the axes undergo the same permutation (R = 2n-1) ann-agonal permutation is achieved, In this special case the 'R' is usually omitted so:

_[perm(0..n-1)] = _(2n-1)[perm(0..n-1)]

Digitchanging

[edit]

Usually being applied at component level and can be seen as given by[ki] inperm([ki]) since a component is filled with radix m digits, a permutation over m numbers is an appropriate manner to denote these.

Pathfinders

[edit]

J. R. Hendricks called the directions within a hypercubes "pathfinders", these directions are simplest denoted in a ternary number system as:

Pfp where: p =k=0Σn-1 (ki + 1) 3k <==> <ki> ; i ε {-1,0,1}

This gives 3n directions. since every direction is traversed both ways one can limit to the upper half [(3n-1)/2,..,3n-1)] of the full range.

With these pathfinders any line to be summed over (or r-agonal) can be specified:

[j0kplq ; #j=1 #k=r-1 ; k > j ] <j1kθl0 ; θ ε {-1,1} >  ; p,q ε [0,..,m-1]

which specifies all (broken) r-agonals, p and q ranges could be omitted from this description. The main (unbroken) r-agonals are thus given by the slight modification of the above:

[j0k0l-1sp ; #j=1 #k+#l=r-1 ; k,l > j ] <j1k1l-1s0 >

Qualifications

[edit]

A hypercubenHm with numbers in the analytical numberrange [0..mn-1] has the magic sum:

nSm = m (mn - 1) / 2.

Besides more specific qualifications the following are the most important, "summing" of course stands for "summing correctly to the magic sum"

  • {r-agonal} : all main (unbroken) r-agonals are summing.
  • {pan r-agonal} : all (unbroken and broken) r-agonals are summing.
  • {magic} : {1-agonal n-agonal}
  • {perfect} : {pan r-agonal; r = 1..n}

Note: This series doesn't start with 0 since a nill-agonal doesn't exist, the numbers correspond with the usual name-calling: 1-agonal = monagonal, 2-agonal = diagonal, 3-agonal = triagonal etc.. Aside from this the number correspond to the amount of "-1" and "1" in the corresponding pathfinder.

In case the hypercube also sum when all the numbers are raised to the power p one gets p-multimagic hypercubes. The above qualifiers are simply prepended onto the p-multimagic qualifier. This defines qualifications as {r-agonal 2-magic}. Here also "2-" is usually replaced by "bi", "3-" by "tri" etc. ("1-magic" would be "monomagic" but "mono" is usually omitted). The sum for p-Multimagic hypercubes can be found by usingFaulhaber's formula and divide it by mn-1.

Also "magic" (i.e. {1-agonal n-agonal}) is usually assumed, theTrump/Boyer {diagonal} cube is technically seen {1-agonal 2-agonal 3-agonal}.

Nasik magic hypercube gives arguments for using {nasik} as synonymous to {perfect}. The strange generalization of square 'perfect' to using it synonymous to {diagonal} in cubes is however also resolve by putting curly brackets around qualifiers, so {perfect} means {pan r-agonal; r = 1..n} (as mentioned above).

some minor qualifications are:

  • {ncompact} : {all order 2 subhyper cubes sum to 2nnSm / m}
  • {ncomplete} : {all pairs halve an n-agonal apart sum equal (to (mn - 1)}

{ncompact} might be put in notation as :(k)Σ [ji +k1] = 2nnSm / m. {ncomplete} can simply be written as:[ji] + [ji +k(m/2) ; #k=n ] = mn - 1 where:

(k)Σ is symbolic for summing all possible k's, there are 2n possibilities fork1.
[ji +k1] expresses [ji] and all its r-agonal neighbors.

for {complete} the complement of [ji] is at position [ji +k(m/2) ; #k=n ].

for squares: {2compact2complete} is the "modern/alternative qualification" of what DameKathleen Ollerenshaw calledmost-perfect magic square, {ncompactncomplete} is the qualifier for the feature in more than 2 dimensions.

Caution: some people seems to equate {compact} with {2compact} instead of {ncompact}. Since this introductory article is not the place to discuss these kind of issues I put in the dimensional pre-superscriptn to both these qualifiers (which are defined as shown) consequences of {ncompact} is that several figures also sum since they can be formed by adding/subtracting order 2 sub-hyper cubes. Issues like these go beyond this articles scope.

Magic hyperbeam

[edit]

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

Conventions

[edit]

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

  • (n) Dimension : the amount of directions within a hyperbeam.
  • (mk) Order : the amount of numbers alongkth monagonalk = 0, ...,n − 1.

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

Notations

[edit]

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

  • [ki; k=[0..n-1]; i=[0..mk-1] ]: positions within the hyperbeam
  • ⟨⟩: vectors through the hyperbeam

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

Construction

[edit]

Basic

[edit]

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.

Multiplication

[edit]

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

nB(m..)1 *nB(m..)2 :n[ki](m..)1(m..)2 =n[ [[ki \ mk2]](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.

Curiosities

[edit]

all orders are either even or odd

[edit]

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:

  • Nmt = Nm,1 * N1,m
  • Nm = N1,m * Nm,1

Which goes beyond the scope of this introductory article

Only one direction with order = 2

[edit]

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

Aspects

[edit]

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

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

Where reflect(k) true if and only if coordinate 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 aspectsn! 2n just as with themagic hypercubes, directions with equal orders contribute factors depending on the hyperbeam's orders. This goes beyond the scope of this article.

Basic manipulations

[edit]

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

  • ^[perm(0..n-1)] : coördinate permutation (n == 2: transpose)
  • _2axis[perm(0..m-1)] : monagonal permutation (axis ε [0..n-1])

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

Coördinate permutation

[edit]

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

Monagonal permutation

[edit]

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

[edit]

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 = 0..mk-2 (by monagonal permutation)

Qualification

[edit]

Qualifying the hyperbeam is less developed then it is on themagic 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

[edit]

The following hyperbeams serve special purposes:

The "normal hyperbeam"

[edit]
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 theisomorphism 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" ofmagic hypercubes of orderk=0Πn-1 mk.

The "constant 1"

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

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

See also

[edit]

References

[edit]
  1. ^Frost, A. H., Invention of Magic Cubes,Quarterly Journal of Mathematics, 7,1866, pp92-102
  2. ^Frost, A. H.,On the General Properties of Nasik Squares, QJM, 15, 1878, pp 34-49
  3. ^Frost, A. H.On the General Properties of Nasik Cubes, QJM, 15, 1878, pp 93-123
  4. ^Heinz, H.D., and Hendricks, J.R.,Magic Square Lexicon: Illustrated, 2000, 0-9687985-0-0 pp 119-122
  5. ^Planck, C., M.A., M.R.C.S.,The Theory of Paths Nasik, 1905, printed for private circulation. Introductory letter to the paper.
  6. ^Andrews, W. S., Magic Squares and Cubes, Dover Publ. 1917. Essay pages 363-375 written by C. Planck
  7. ^Rosser, B. and Walker, R. J.,Magic Squares: Published papers and Supplement, 1939. A bound volume at Cornell University, catalogued as QA 165 R82+pt.1-4
  8. ^this is a n-dimensional version of (pe.):Alan Adler magic square multiplication
  9. ^this is a hyperbeam version of (pe.):Alan Adler magic square multiplication

Further reading

[edit]
  • Thomas R. Hagedorn, On the existence of magic n-dimensional rectangles, Discrete Mathematics 207 (1999), 53-63.
  • Thomas R. Hagedorn, Magic rectangles revisited,Discrete Mathematics 207 (1999), 65-72.
  • Harvey D. Heinz & John R. Hendricks, Magic Square Lexicon: Illustrated, self-published, 2000,ISBN 0-9687985-0-0.
  • J.R.Hendricks: Magic Squares to Tesseract by Computer, Self-published, 1998, 0-9684700-0-9
  • Planck, C., M.A., M.R.C.S., The Theory of Paths Nasik, 1905, printed for private circulation. Introductory letter to the paper
  • Marián Trenkler, Magic rectangles, The Mathematical Gazette 83(1999), 102-105.

External links

[edit]
Types
Related shapes
Higher dimensional shapes
Classification
Related concepts
Retrieved from "https://en.wikipedia.org/w/index.php?title=Magic_hypercube&oldid=1308103597"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp