BARNARD'S CATEGORY OF BASE CUBE

Example Square of Barnard Category Base Cube
00111100
00001111
11000011
11110000
00111100
00001111
11000011
11110000

When Barnard's and similar literature cubes are broken down into base cubes, a simple pattern is easily discernable. In one direction, all lines alternate between 0 and 1. This is the same as for the base line cubes that all have an A0 in one dimensional direction. In a second direction can be seen one of the B type lines described in Basic Construction or their inverse. In the third direction, which I designate the primary direction, is one of the C type lines. The C lines are either all of the type 00001111 and all possible shifts or all of the type 01101001 and all possible shifts. Included in the above are the C codes starting with one, thus in the former type are C0, C1, C3, C7, C8, C12, C14, and C15 and in the latter C2, C4, C5, C6, C9, C10, C11, and C13.

Going from top to bottom the square at right could be designated just C3 C0 for the two top rows. The next two lines going down are inverses of the first two and the last four repetitions of the first four. So, the square and also the entire base cube can be described based on only two lines of the square. This will be true for all the base cubes in this section. For the Barnard category, if the top line is C3 the next line down can be any of the other shifted lines of the same type except itself and its inverse. This gives six possibilities for the second line for each of the eight possible C lines starting with 0 that can be placed on the first line. There are thus 48 possible base squares of the kind at right. These can be seen in the Excel spreadsheet BaseCubes available from the Downloads page.

The squares are converted to cubes by repeatedly inverting the numbers in the A0 or pillar direction. This gives a base cube in one of its six possible dimensional orientations. All six dimensional arrangements of each base cube are possible in a magic cube, so in addition to the two codes above a convention must be adopted to account for the dimensional orientation. The convention I have chosen is to designate the primary axis as the direction of the C codes, the secondary as that of the B codes, and the tertiary as that of the A codes. Thus the square at right would be ps (for primary secondary) for the xy axes, with the remaining 7 squares alternating between the inverse of the square and square in the z direction, so the cube dimensional orientation would be designated pst. (It could also be CBA but this designation would have less meaning for some of the other types of cubes.) There are 48x6 = 288 possible base cubes of this type. Examples are shown in BaseCubes.

A More General Inclusive Line Code Description

There are nine distinct categories of base cubes. The first six of these alternate between a square and its inverse in one direction, the A0 direction. These base cubes can all be described using one square and a dimensional orientation. The common method I have chosen is to consider all eight rows of the square to be binary numbers and to convert those numbers to base 10. The square above is thus pst 60, 15, 195, 240, 60, 15, 195, 240 in the primary direction. (If the square were turned 90° the square could be described as pst 51, 51, 153, 153, 204, 204, 102, 102 by naming the B codes as the primary direction. Describing the cube this way would work equally well as long as the convention was consistently used, but it is not the convention I have chosen.) The base cubes of the first six categories are listed in the Unique Squares worksheet of BaseCubes. This gives only one of the six orientations of each base cube that can be used to make a magic square. The other six can be obtained using the Aspects worksheet in the same spreadsheet.

The last three categories of base cubes do not alternate between a square and its inverse in any direction. In order to describe these cubes, all eight of the squares must be enumerated as above, and each dimensional orientation must be described separately. This creates an 8 x 8 matrix of numbers for each possible base cube. The base cubes of all nine categories are listed this way in BaseCubes2. This spreadsheet lists all the possible order-8 pan-2,3-agonal base cubes including the different orientations when they are unique.

The Literature Cubes

Having arrived at a convention to describe the literature cubes based on the base cube method, it is informative to look at these cubes using that convention. The literature cubes were first changed to the range 0-511 by subtracting one from all numbers. When necessary the cubes were then translated so that the zero appears in the upper left corner of the first square of the cube prior to deconstruction into base cubes. After doing this it is apparent that the cube attributed to Benson5 is a translated version of that made by Planck. It is thus not shown. In the tables below, the columns represent the base cubes and the rows represent the individual rows of each base cube. The three letter code in the first row of each table shows the relative orientation of the primary, secondary, and tertiary axes relative to the xyz axes.

Planck's cube
ptsptsptstsptsptspsptsptspt
105240601052406010524060
165195240165195240165195240
150151951501519515015195
906015906015906015
105240601052406010524060
165195240165195240165195240
150151951501519515015195
906015906015906015
Barnard's cube
ptsptsptssptsptspttsptsptsp
1501519575135303021075
165195240210225135135180210
1052406018012022522545180
90601545301201207545
1501519575135303021075
165195240210225135135180210
1052406018012022522545180
90601545301201207545
Nakamura's cube
tsptsptsptpstpstpsstpstpstp
1501519518012022510524060
165195240210225135165195240
10524060751353015015195
9060154530120906015
1501519518012022510524060
165195240210225135165195240
10524060751353015015195
9060154530120906015
Hendricks' cube
stpstpstptpstpstpstsptsptsp
1052406018012022515015195
165195240210225135165195240
15015195751353010524060
9060154530120906015
1052406018012022515015195
165195240210225135165195240
15015195751353010524060
9060154530120906015

To generate the cubes from these tables, convert the numbers in a column to their 8-bit binary equivalents to make an 8x8 square of zeros and ones. To complete the base cube alternate between this square and its inverse in the z direction. Rotate the base cubes to the correct orientation. Multiply the individual base cubes by 256, 128, ... , 1 in order. Add the base cubes together. Add 1 to all the values to obtain the traditional cube. It may be necessary to shift all the numbers by a vector in order to duplicate the literature cube.

All four of the literature cubes shown have a 3, 3, 3 pattern for their dimensional orientations. This is a consequence of the method used to create them. As discussed in Magic Cube Basics a cube made using base cubes can have its base cubes shuffled in 9! different orders to create 9! new magic cubes with all the same properties. The 3, 3, 3 pattern will only generate 1296 of these or 0.36% of the cubes it is possible to make with the nine base cubes used. Notice also that several of the patterns of 3 base cubes appear in more than one of the displayed cubes. Planck uses the same three base cubes in three different orientations. This approach appears very limited in scope but the early cube makers did not have the number crunching power of computers. Barnard1 and Planck2 were able to find an elegant way to make their cubes. If they had found the base line approach as Abe4 and I6 had, they would have found a much richer set of magic cubes to exploit using paper and pencil.

Random Assembly from Base Cubes

As stated above there are 288 possible base cubes of the category used by Barnard, et al. There are 2889, 1.36E22, possible combinations of these that result in potential magic cubes. As with the base line magic cubes, most combinations of nine base cubes do not produce valid magic cubes. Most lack uniform integral distribution, but all add properly in all appropriate directions. A program was written to randomly combine nine base cubes and test for uniform integral distribution. It was found that only eight in a million of the randomly generated cubes had uniform integral distribution and were thus nasik magic cubes. This is in contrast to those generated from the base line base cubes where about 0.93% of randomly generated cubes are nasik magic cubes.

A different picture appears when the total number of nasik magic cubes is determined. There are 2889 or 1.36E22 possible combinations. About 8 ppm are valid and there are 48 redundant aspects for each cube counted in the randomly generated cubes. There are thus (1.36E22 x 0.000008)/48 = ~2.3E15 valid magic cubes that can be made from Barnard category of base cubes. This contrasts with ~1.6E12 made using base line base cubes. This is a consequence of there being far fewer possible combinations of base line base cubes even though they are far richer in solutions.

Hybrids

Since both the base line type and Barnard's categories of magic cube are made from base cubes the question naturally arises as to whether hybrids of the two types are possible. All combinations are possible. A table with some statistics on the combinations is in the BaseCubes Excel spreadsheet on the Downloads page. The table shows that the hybrids make more magic cubes than a linear interpolation from the two parents would suggest. There is synergy in making hybrids. There are ~ 1.7E16 total hybrids that can be made based on random generation of each of the eight hybrids possible. This was confirmed using a random generation of possible magic cubes from all possible base cubes of the two types.

BASE LINE CATEGORY OF BASE CUBE REVISITED

In the discussion of Barnard's category of base cubes, it was noted that the first line of the first square in the primary direction could be described as one of the C type lines. The second line had to be one of six translations of that C line excluding the inverse or a repetition of the first line. These two exceptions are base line base cubes. The base line base cubes could be described as a subset of the Barnard category of base cubes. They can be described using the same numbering system as above. The pattern is very repetitive befitting its appearance. The base line category is included in the BaseCubes Download. On that spreadsheet, they are described using the above numbering format. In Magic Cube, they are discussed in more detail as the special category that they are.

When magic cubes are generated randomly from the set of 96 possible base cubes as done for the Barnard category above, it is found that ~0.93% are valid. This is in very good agreement with the value found by Keith's exhaustive search.

ALTERNATING LINE CATEGORY OF BASE CUBE

Example Square of Alternating Line Category Base Cube
00111100
01101001
11000011
10010110
00111100
01101001
11000011
10010110

Both categories of base cube discussed above use only one type of C line type throughout the base cube. There is a category of base cube that alternates between the two C line types in one direction. I do not believe that this category has been used in any previously known magic cubes. It is included with the Barnard category of base cubes because of its obvious similarities.

Description of Base Cubes Containing Alternating C Base Line Types

As with the other base squares in this section the first line of this category of square is one of the C type lines starting with zero. For this category, if the first line is, for instance, C3 then the second line is one of the eight codes of the other type, either C2, C4, C5, C6, C9, C10, C11, or C13. As with the other two categories in this subsection, the third and fourth lines are inverses of the first two and the last four lines are repetitions of the first four. With the addition of this category of base square, all possible combinations of two C lines have been accounted for.

Since there are eight possible codes for the first line and eight possible codes for the second line for each possible first code, there are 64 squares in this set. When converted to base cubes in the six possible dimensional directions there are 384 base cubes in this category.

Random Assembly from Base Cubes

As with Barnard's category of base cubes it is possible to randomly combine base cubes in this category to estimate the number of magic cubes that can be created. There are 3849, 1.82E23, possible combinations. Analysis of randomly generated cubes indicates a little less than 4 in a million are actually magic cubes. This means that about 1.5E16 (1.82E23 x 0.000004)/48) different magic cubes can be made using just the base cubes of this category. Even though a smaller percentage of the potential cubes of this category are actually magic cubes there are still more actual magic cubes than those obtained from the Barnard category of base cubes because there were more base cubes in the initial pool.

Hybrids

All hybrids between this category and the base line category and/or Barnard's category are possible. As stated above there appears to be synergy in making hybrids. Details of each hybrid type are available on the BaseCubes Excel spreadsheet on the Downloads page. There are ~1.4E17 hybrids between the alternating line and base line categories and ~9.9E17 between the alternating line and Barnard's categories. In addition there are ~2.1E18 hybrids containing all three of the above types in all possible combinations. Altogether for the above three categories of base cubes ~3.2E18 magic cubes can be made.