Kokkala 2014
Kokkala 2014
Abstract: A q-ary code of length n, size M, and minimum distance d is called an (n, M, d)q
code. An (n, q k , d)q code with d = n − k + 1 is said to be maximum distance separable (MDS).
Here one-error-correcting (d = 3) MDS codes are classified for small alphabets. In particular,
it is shown that there are unique (5, 53 , 3)5 and (5, 73 , 3)7 codes and 12,484 equivalence classes
of (5, 83 , 3)8 codes. The (5, q 3 , 3)q codes are equivalent to certain pairs of mutually orthogonal
Latin cubes of order q, called Graeco-Latin cubes. © 2014 Wiley Periodicals, Inc. J. Combin.
Designs 23: 509–521, 2015
1. INTRODUCTION
A q-ary code of length n consists of a set of codewords that form a subset of the words
in Znq . The Hamming distance between two words is the number of coordinates in which
they differ. The minimum distance of a code is the smallest mutual distance between any
two distinct codewords. A q-ary code of length n, size M, and minimum distance d is
called an (n, M, d)q code. A code with the largest possible value of M for given values
of n, d, and q is said to be optimal. An (n, M, d)q code is able to detect errors in up to
d − 1 coordinates and correct errors in up to (d − 1)/2 coordinates.
A general upper bound for the size of an (n, M, d)q code is the Singleton bound,
M ≤ q n−d+1 ; see [34] and [18, Sect. 17.4]. The Singleton bound is easily proved by
the facts that M ≤ q for (d, M, d)q codes and that the existence of an (n, M, d)q code
implies the existence of an (n − 1, M/q, d)q code. Codes meeting the Singleton bound
are called maximum distance separable (MDS) [18, Chapter 11].
Contract grant sponsor: Academy of Finland; contract grant number: 132122; contract grant sponsor: Aalto ELEC
Doctoral School.
Contract grant sponsor: Academy of Finland; contract grant number: 132122.
The Hamming bound states for one-error-correcting codes, that is, codes with d = 3,
that
qn
M≤ .
1 + n(q − 1)
m
−1)/(q−1)−m
((q m − 1)/(q − 1), q (q , 3)q , m≥2
codes, called Hamming codes, are perfect and exist for every prime power q. For m = 2,
we get (q + 1, q q−1 , 3)q MDS codes, which can further be shortened to get optimal
(n, q n−2 , 3)q codes for 3 ≤ n ≤ q + 1.
Two codes are said to be equivalent if there is a permutation of the coordinates
and permutations of the coordinate values, separately for each coordinate, that map the
codewords of one code onto the codewords of the other. We use the notation C ∼ = C to
denote that two codes, C and C , are equivalent.
A common question in coding theory is whether codes with given parameters exist.
Whenever that question can be answered in the positive, one may further classify the
corresponding codes up to equivalence. The (15, 211 , 3)2 perfect codes were classified
in [30]. After that work was completed, it was natural to think about the classification
of perfect codes over larger alphabets, in particular, (q + 1, q q−1 , 3)q MDS codes. The
current work is one step in that direction, along the ideas of [15], which presents an
alternative approach for classifying the (15, 211 , 3)2 codes.
The following is known about short optimal (n, q n−2 , 3)q MDS codes, which have
the parameters of subcodes of (q + 1, q q−1 , 3)q perfect codes. The (3, q, 3)q codes are
unique, and the (4, q 2 , 3)q codes correspond to pairs of mutually orthogonal Latin squares
of order q, which have been classified for q ≤ 8 (these will be further discussed in
Section 2.1). In this work, we focus on the classification of (5, q 3 , 3)q codes, which
furthermore correspond to a class of combinatorial structures termed Graeco-Latin cubes
by Silverman [33].
The Hamming bound implies that (5, q 3 , 3)q codes do not exist for q < 4. The perfect
(5, 43 , 3)4 code is unique, which was proved by Alderson [2] via the more general result
that the (6, 43 , 4)4 code is unique. The nonexistence of (5, 63 , 3)6 codes follows from the
nonexistence of (4, 62 , 3)6 codes, proved already in 1900 by Tarry [36]. The cases q = 5,
q = 7, and q = 8 are settled here: there are 1, 1, and 12,484 equivalence classes of such
codes, respectively.
The paper is organized as follows. In Section 2, we first discuss the equivalence of
MDS codes and various types of combinatorial designs and the terminology of Latin
hypercubes and then consider basic properties of MDS codes that are needed later.
Indeed, the results obtained in this paper could also be stated in terms of various other
types of combinatorial structures. The main reason for using codes is the convenience
of dealing with equivalence in that framework. In Section 3, we present an approach for
classifying MDS codes. This approach is applied to the case of (5, q 3 , 3)q MDS codes
with q = 5, q = 7, and q = 8, the results for which are presented in Section 4. Validation
of these computational results is also discussed.
2. PRELIMINARIES
There exist also other generalizations of Latin squares and orthogonality to higher
dimensions, and consequently different definitions of Graeco-Latin (hyper)cubes.
Kishen [14] defines a q-sided n-fold Latin hypercube of rth order to be a q × q × · · · × q
(n times) array with elements from an alphabet of size q r such that each element occurs
exactly q n−r−1 times when any single coordinate is fixed. Kishen calls two such Latin
hypercubes Graeco-Latin if they are orthogonal in the sense that every pair of elements
occurs exactly q n−2r times when the hypercubes are superimposed. Other definitions of
hypercubes and orthogonality are given, for example, in [10, 11, 17, 19, 26, 32, 38].
Definition 2.1. When puncturing a code C, let p(C, i) denote the code obtained by
deleting the coordinate i. When shortening C, let s(C, i, v) denote the code obtained
by deleting coordinate i and retaining the words with value v in that coordinate. When
extending C, let e(C, i, v) denote the code obtained by adding a coordinate i with value
v in each word, such that s(e(C, i, v), i, v) = C.
The general approach of the current work is to fix q and, starting from the (3, q 2 , 2)q
codes, first classify the (4, q 2 , 3) codes and then the (5, q 3 , 3)q codes. In design-theoretic
terms, starting from the Latin squares of order q, first the Graeco-Latin squares of order
q are classified and finally the Graeco-Latin cubes.
lemma, however, shows that this is not the case as no other value occurs q 2 times in a
coordinate.
Lemma 3.7. Let C be a seed. If q ≥ 5, then |s(C, i, v)| < q 2 for all i and v > 0.
Proof. Let C = e(C1 , 1, 0) ∪ e(C2 , 2, 0) ∪ · · · ∪ e(C5 , 5, 0). Now
5
|s(C, i, v)| = |{w ∈ C : wi = v}| ≤ |{w ∈ e(Cj , j, 0) : wi = v}|
j =1
5
5
= |{w ∈ e(Cj , j, 0) : wi = v}| = q = 4q < q 2 .
j =1 j =1
j = i j = i
For each k, our aim is now to obtain a set of representatives Sk from all equiva-
lence classes of k-seeds. To this aim, we first generate, for i = 2, 3, 4, 5, the sets S1,i k
and C that have 0s in coordinates 2 and i, that is, the q words in B ∩ 2 ∩ i and
C ∩ 2 ∩ i . If possible, we permute the first coordinate of B to get a code B such that
B ∩ 2 ∩ i = C ∩ 2 ∩ i and add B ∪ C into SC,1,2,i k
if its minimum distance is at
k
least 3. Once the sets SC,1,2,i for that C have been generated, we go through every pair
(A, B) ∈ SC,1,2,3
k
× SC,1,2,4
k
and add A ∪ B into the set SC,1,2,3,4
k
if its minimum distance
is at least 3. Last, we go through every pair (A, B) ∈ SC,1,2,3,4 × SC,1,2,5
k k
and add A ∪ B
into a set S̃k if its minimum distance is at least 3. Finally, isomorph rejection on S˜k is
carried out using nauty to get Sk .
We define S = k Sk .
the coordinate–value pair (j0 , v0 ) to (j1 , v1 ). Therefore, it is enough to consider only the
sets (π0 , π1 , π2 ) of permutations for which the coordinate–value pair (π0−1 (1), π1−1 (0)) is
the (arbitrarily chosen) representative of its orbit in the automorphism group of Ĉl . For
further speedup, the codes Ĉ1 , Ĉ2 , . . . , ĈN are initially sorted in the order of increasing
size of the automorphism group.
In addition, it turns out that for some values of k, |SC,1,2,3,4
k
| = 0 for all C. Therefore
k k
the search can be made faster by delaying the generation of S1,5 and SC,1,2,5 until all
k
sets SC,1,2,3,4 for that k have been generated and skipping the generation completely if
|SC,1,2,3,4
k
| = 0 for all C.
The number of steps in the last phases could be reduced by removing equivalent codes
k
from S1,2 but it turns out that in our implementation for q = 8, the time used for canonical
labeling with nauty would be longer than the speedup obtained by having fewer steps.
4. CLASSIFICATION RESULTS
The computations were carried out in a cluster consisting of 16 nodes of two 8-core Intel
Xeon E5-2665 CPUs each. The reported CPU times concern a core of such a processor.
The isomorph rejections using nauty took only a few hours at most and do not form
1 434 12 7 84 1
2 852 16 109 96 1
3 18 24 10 192 4
4 419 32 31 256 1
6 34 48 2 5,376 1
8 229 64 12
a significant part of the running time of the algorithms. Further, we believe that major
optimizations to the algorithm for isomorph rejection could be made if required, so the
exact running times are not of interest and thus are not reported here.
2 521 96 5 1,024 36
4 2,892 128 637 1,536 7
8 3,108 160 1 2,048 14
16 2,098 192 13 3,072 1
24 4 256 266 6,144 2
32 1,572 384 6 30,720 1
48 5 512 107 43,008 1
64 1,177 768 10
For q = 8, the search started from the 2,165 (4, 82 , 3)8 codes and 51,054 inequivalent
seeds were obtained. This classification required 28,966 core-hours (approximately 3.3
core-years). Using the cluster, the search could be finished in less than 5 days with a
memory requirement of up to 3.9 GB for some processes.
The augmentation of the seeds finished in 383 core-minutes. For 33,913 of the seeds,
exactly one code was obtained in the augmentation, and for the 17,141 other seeds, no
codes were obtained. No seed could be augmented to two or more different codes. The
number of equivalence classes of (5, 83 , 3)8 codes is 12,484. The number of codes are
tabulated in Table II according to the order of the automorphism group.
Finally, we observe that two of the seven (4, 72 , 3)7 codes can be obtained by shortening
a (5, 73 , 3)7 code. Similarly, 630 of the 2,165 (4, 82 , 3)8 codes can be obtained by
shortening a (5, 83 , 3)8 code.
It is not feasible to classify the (5, q 3 , 3)q codes for q = 9 (or even larger) with the
current approach. For q > 8, not even the (4, q 2 , 3)q codes have been classified.
3!(q!)3 N(C )
,
|Aut(C )|
where 3!(q!)3 /|Aut(C )| is the number of (3, q 2 , 2)q codes equivalent to C and N(C ) is
the number of ways C can be extended to a (4, q 2 , 3)q code by inserting a coordinate
at the end. For each equivalence class representative C , N(C ) is q! times the number
of (4, q 2 , 3)q codes found in the search described in Section 3.1, because the search
considers only one permutation of values in the added coordinate. The total number of
(4, q 2 , 3)q codes becomes
N(C )3!(q!)3
,
C
|Aut(C )|
where the sum is taken over the equivalence class representatives of (3, q 2 , 2)q codes.
On the other hand, the number of (4, q 2 , 3)q codes equivalent to Ĉk is simply
4!(q!)4 /|Aut(Ĉk )|, which gives the count
N
4!(q!)4
k=1
|Aut(Ĉk )|
N(X)5!(q!)5
,
|Aut(X)|
where N(X) is the total number of (5, q 3 , 3)q codes found in the search starting from the
seed X. This value can be calculated directly after N(X) is obtained during the search.
On the other hand, the same count can be obtained by
S(C, X)5!(q!)5
,
C∈C
|Aut(C)|
ACKNOWLEDGMENTS
The authors are grateful to Denis Krotov and Brendan McKay for valuable comments.
REFERENCES
[1] R. J. R. Abel, C. J. Colbourn, and J. H. Dinitz, “Mutually orthogonal Latin squares (MOLS),”
Handbook of Combinatorial Designs, 2nd ed., C. J. Colbourn and J. H. Dinitz (Editors),
Chapman & Hall/CRC, Boca Raton, FL, 2007, pp. 160–193.
[2] T. L. Alderson, (6, 3)-MDS codes over an alphabet of size 4, Des Codes Cryptogr 38 (2006),
31–40.
[3] W. W. R. Ball, Mathematical Recreations & Essays, 11th ed., revised by H. S. M. Coxeter,
MacMillan, London, 1939.
[4] K. A. Brownlee and P. K. Loraine, The relationship between finite groups and completely
orthogonal squares, cubes, and hyper-cubes, Biometrika 35 (1948), 277–282.
[5] C. J. Colbourn, J. H. Dinitz, and I. M. Wanless, “Latin squares,” Handbook of Combinatorial
Designs, 2nd ed., C. J. Colbourn and J. H. Dinitz (Editors), Chapman & Hall/CRC, Boca Raton,
FL, 2007, pp. 135–152.
[6] A. B. Cruse, On the finite completion of partial Latin cubes, J Combin Theory Ser A 17 (1974),
112–119.
[7] J. Dénes and A. D. Keedwell, Latin Squares and Their Applications, Academic Press, New
York, 1974.
[8] S. T. Dougherty and T. A. Szczepanski, Latin k-hypercubes, Australas J Combin 40 (2008),
145–160.
[9] J. T. Ethier and G. L. Mullen, Strong forms of orthogonality for sets of hypercubes, Discrete
Math 312 (2012), 2050–2061.
[10] A. Heppes and P. Révész, A latin négyzet és az ortogonális latin négyzet-pár fogalmának egy új
általánosı́tása és ennek felhasználása kı́sérletek tervezésére (A new generalization of the method
of latin squares and orthogonal latin squares and its application to the design of experiments),
Magyar Tud Akad Mat Int Közl 1 (1956), 379–390.
[11] P. Höhler, Eine Verallgemeinerung von orthogonalen lateinischen Quadraten auf höhere Di-
mensionen, Ph.D. Thesis, ETH Zürich, 1970.
[12] P. Kaski and O. Pottonen, libexact user’s guide, Version 1.0, Helsinki Institute for Information
Technology HIIT, Helsinki, 2008.
[13] P. Kaski and P. R. J. Östergård, Classification Algorithms for Codes and Designs, Springer,
Berlin, 2006.
[14] K. Kishen, On Latin and hyper-Graeco-Latin cubes and hyper-cubes, Current Sci 11 (1942),
98–99.