There are several ways in which we can generalize the construction we have demonstrated for the Golay code.
We first consider using different polyhedra. For example, the cube. A cube has 6 faces so we will get a code of length 12 and dimension 6. What is a reasonable mask to use? The stabilizer of a face in the group of the cube is a cyclic 4-group; it is easy to determine the orbits of the faces under this group. This face stabilizer is the right thing to consider in general; since there should be no choices made in applying the mask, we want the mask to be invariant under this group -- hence a union of orbits. In the case of a cube, there are 3 orbits under a face stabilizer: {that face itself}, {the 4 adjacent faces}, {the opposite face}. Hence there are just 23 possible masks to consider. It is easy to generate all 8 codes and check their minimum weights. We find that one of them is a [12,6,4] code which is optimal.
If instead we use an icosahedron (20 faces) in our construction it is possible to find masks that yield [40,20,8] codes. This is sub-optimal since there is a linear [40,20,9] code, but these codes are nevertheless interesting.
There are a total of 12 codes which can be constructed from the icosahedron that have minimum weight 8. There are 4 doubly-even self-dual codes having the weight distribution:
[ 1, 0, 0, 0, 0, 0, 0, 0, 285, 0, 0, 0, 21280, 0, 0, 0, 239970, 0, 0, 0, 525504, ... 1]
these 4 codes are all equivalent.
There are also 4 singly-even codes having the weight distribution:
[ 1, 0, 0, 0, 0, 0, 0, 0, 285, 0, 1024, 0, 11040, 0, 46080, 0, 117090, 0, 215040, 0, 267456, ... 1]
these 4 codes are also equivalent to one another.
Finally, there are 4 formally self-dual codes (A code is formally self-dual of f.s.d if it has the same weight distribution as its dual). There are only two weight distributions:
[ 1, 0, 0, 0, 0, 0, 0, 0, 285, 0, 1024, 0, 11040, 0, 46080, 0, 117090, 0, 215040, 0, 267456, ... 1 ]
and
[ 1, 0, 0, 0, 0, 0, 0, 0, 285, 0, 960, 0, 11680, 0, 43200, 0, 124770, 0, 201600, 0, 283584, ... 1 ]
each pair of codes that have the same weight distribution are equivalent, and each is equivalent to its dual.
So far we have not really taken advantage of the fact that the structures we have been working with are CW complexes (i.e. that they have features of various dimensions -- 2-dimensional faces, 1-dimensional edges, and 0-dimensional vertices. Indeed, we could have phrased all of the foregoing in the language of graphs. Our next step in generalizing this type of construction will justify this choice.
Consider a solid tetrahedron, it has 1 three-dimensional cell, 4 two-dimensional cells, 6 one-dimensional cells and 4 zero-dimensional cells. We can construct many different codes by using these cells for parity and information positions. As a small example, consider the code where the information symbols are written on the vertices, and all other cells (edges, faces and the body) correspond to parity checks. We will need to have a mask for each type of parity check. These checks can be described easily by geometry: The parity symbol on each cell is the parity of the sum of the information symbols contained in that cell.
A generator matrix for this code is:
1 1 1 1 2 2 1 1 1 2 2 3 2 2 3 3 3 1 2 3 4 2 3 4 3 4 4 3 4 4 4 4 [ 1,0,0,0, 1,1,1,0,0,0, 1,1,1,0, 1 ] [ 0,1,0,0, 1,0,0,1,1,0, 1,1,0,1, 1 ] [ 0,0,1,0, 0,1,0,1,0,1, 1,0,1,1, 1 ] [ 0,0,0,1, 0,0,1,0,1,1, 0,1,1,1, 1 ]where the columns have been labelled corresponding to the various cells.
This code is a [15,4,8] code which is optimal, having weight distribution
[ 1, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0 ].
Its dual is a [15,11,3] code that is also optimal. It can be obtained by a similar construction. The dual's weight distribution is
[ 1, 0, 0, 35, 105, 168, 280, 435, 435, 280, 168, 105, 35, 0, 0, 1 ].
The concept of a mask is really only appropriate in GF(2), since a mask either obscures what is under it (0) or does not (1). If we are working with codes over other fields (or rings), the mask is replaced by a filter: a set of coefficients taken from the appropriate ring that are constant on the orbits of the stabilizer of a cell.
Using the faces of a dodecahedron (as we did for the Golay code) but considering codes over GF(4), we can consider all 44 possible filters. It isn't unreasonable to realize these 256 codes on a computer and we find that there are many of minimum Hamming weight 8.
There are 4 weight distributions that occur among these codes:
60 codes: [ 1, 0, 0, 0, 0, 0, 0, 0, 477, 720, 8640, 25200, 86616, 227664, 586944, 1085040, 1899387, 2659824, 3140928, 2894544, 2242440, 1240560, 535104, 123984, 19143 ] 30 codes: [ 1, 0, 0, 0, 0, 0, 0, 0, 765, 432, 7200, 26640, 84600, 248112, 544032, 1109520, 1925595, 2596752, 3208032, 2864304, 2217960, 1283472, 512352, 128304, 19143 ] 12 codes: [ 1, 0, 0, 0, 0, 0, 0, 0, 1125, 1152, 0, 40320, 55128, 360576, 250560, 1668480, 974475, 4012416, 1540224, 4387968, 1110600, 1917312, 250560, 194688, 11631 ] 6 codes: [ 1, 0, 0, 0, 0, 0, 0, 0, 2277, 0, 0, 0, 220248, 0, 1020096, 0, 3895947, 0, 6120576, 0, 4462920, 0, 1020096, 0, 35055 ]
It would, in general, be difficult to distinguish if the codes having the same weight distributions are equivalent, however from the manner in which they were constructed we can easily decide that many are.
Consider the 6 codes that have the last distribution. (They seem interesting since they contain only even weight vectors and weight 10 is missing.) The filter coefficients for these codes are
(1,0,1,1), (1,1,0,1), (w,0,w,w), (w,w,0,w), (w2,0,w2,w2), and (w2,w2,0,w2).
There are 2 patterns of non-zero entries in the filters -- these codes are equivalent via the permutation induced on the coordinates by the antipodal map of the dodecahedron. The remaining equivalences are clearly monomial.
Suppose we have a polyhedron with an intransitive group.
For example, consider a pentagonal pyramid. No symmetry of this object can possibly interchange its pentagonal base with one of its triangular faces.
In such a situation we will need to have several filters -- one for each orbit of the faces under the symmetry group of the object.
The base of the pyramid is distance 1 from every other face, whereas the triangular faces have distances 1 to two adjacent triangular faces, distance 1 to the base, and distance 2 to two other triangular faces.
If we use these distances (interpreted as elements of GF(3)) as our filter coefficients, we get the ternary Golay code.