|
Conway's LUX method for magic squares is an algorithm by John Horton Conway for creating magic squares of order 4n+2, where n is a positive natural number. In mathematics, computing, linguistics and related disciplines, an algorithm is a procedure (a finite set of well-defined instructions) for accomplishing some task which, given an initial state, will terminate in a defined end-state. ...
John Horton Conway (born December 26, 1937, Liverpool, England) is a prolific mathematician active in the theory of finite groups, knot theory, number theory, combinatorial game theory and coding theory. ...
In recreational mathematics, a magic square of order n is an arrangement of n² numbers, usually distinct integers, in a square, such that the n numbers in all rows, all columns, and both diagonals sum to the same constant. ...
In mathematics, a natural number can mean either an element of the set {1, 2, 3, ...} (i. ...
Algorithm: Start creating an array consisting of * n+1 rows of Ls * 1 row of Us and * n-1 rows of Xs all of them with length 2n+1 (square). Now exchange the U in the middle with the L below it.
Using the Siamese method generate a magic square of order 2n+1 overlaying to the array of letters, start doing this beginning from the center square of the top row. Now fill each square according to the order prescribed by the letter. Example (Imagine if you would write the letter, the numbers go the way the pencil goes). L = 4 1 2 3 U = 1 4 2 3 X = 1 4 3 2 An example square, of order 10, follows: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 68 65 96 93 4 1 32 29 60 57 [2,] 66 67 94 95 2 3 30 31 58 59 [3,] 92 89 20 17 28 25 56 53 64 61 [4,] 90 91 18 19 26 27 54 55 62 63 [5,] 16 13 24 21 49 52 80 77 88 85 [6,] 14 15 22 23 50 51 78 79 86 87 [7,] 37 40 45 48 76 73 81 84 9 12 [8,] 38 39 46 47 74 75 82 83 10 11 [9,] 41 44 69 72 97 100 5 8 33 36 [10,] 43 42 71 70 99 98 7 6 35 34 See also |