3.1. Examples of Optimal and CPCW Codes
We present in
Table 1 and
Table 2 all the previously known existence and nonexistence results regarding optimal
and
CPCW codes with
and 151, respectively. Normal font is used for the
v with theoretical results from [
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
26,
29] and italics for the results from the computer classifications in [
25,
27,
28,
30,
31]. A normal or an italic
v is struck through if the corresponding result (theoretic or computer-aided) shows nonexistence of optimal
or
CPCW codes. A question mark means that nothing is known about the existence of optimal codes with this length.
Table 3 and
Table 4 are organized in a similar way to
Table 1 and
Table 2, but in them the existence results from the present paper are implemented too, and bold font is used for them. The question marks mean that we could not find optimal codes for these values of
v and the question of the existence of such codes remains open. In particular, we have not found examples of optimal
CPCW codes for
, and 167, and of optimal
CPCW codes for
, and 126. These are
CPCW codes with relatively small
c. The latter is also small for the optimal codes for which there are no theoretical nonexistence results, but they have been proved not to exist with the help of a computer [
31], namely an optimal
CPCW code and optimal
CPCW codes for
, and 92. This motivated our study of the properties of optimal
CPCW codes.
Table A1 and
Table A2 in
Appendix A contain all the examples of new optimal
and
CPCW codes. Each codeword contains the element
, and therefore this element is not presented.
3.2. Properties of Optimal CPCW Codes
The optimal CPCW codes of length correspond to 2- designs. They are perfect because their codewords cover all differences. Optimal CPCW codes of length , however, have remarkable combinatorial properties too because they do not cover only one difference. We derive here some necessary conditions for the existence of such codes.
Lemma 1. The element cannot be covered by the differences of the codewords of a CPCW code of even length. For even v, the element can be obtained as the difference of different pairs .
Proof. Let C be a codeword of a CPCW code of even length. Let . Then, and must be two different differences from . Suppose , and then , and appears twice in , but this is impossible for a CPCW code. Since , the element can be obtained as the difference of the different pairs , . □
Lemma 2. The codewords of an optimal CPCW code leave uncovered only the difference .
Proof. Since
is even, by Lemma 1, the possible differences are
. The size of such a code is
and each codeword covers
differences. Then, all the codewords cover
differences; that is, only one difference remains uncovered. □
An optimal CPCW code corresponds to an optimal partial cyclic 2- design. The translates of each codeword correspond to v blocks of this partial design and to a circulant submatrix of the incidence matrix of the partial design. We next consider some properties of this partial design.
Lemma 3. The pairs of points are not contained in the blocks of an optimal partial cyclic 2- design corresponding to an optimal CPCW code. Each of the remaining pairs of points is in exactly one block of this partial design.
Proof. The pairs of points that are not contained in the blocks of the design correspond to the different pairs from Lemma 1. □
Lemma 4. Denote the rows/columns of a circulant M of an even order v by the numbers . Let φ be a permutation that rearranges the rows and the columns of M in such a way that they follow each other as . Then, the resulting matrix is composed of 4 circulants A, B, C, and D of order . Denote by , , , and the number of ones in a row/column of the matrices A, B, C, and D, respectively. Then, and = .
Proof. Cutting off the even rows and even columns of M leads to a matrix A of dimension . Let be the element in row i and column j of M and be the element in row i and column j of A. Then, .
We want to show that A is a circulant matrix. Addition of the indices of A is modulo , and of M modulo v. Since , the addition of the even indices of M can be considered modulo too. Then, . M is a circulant, and therefore . It follows that ; that is, A is a circulant matrix.
Similarly, the circulants B, C, and D are obtained by cutting off the even rows and odd columns, the odd rows and even columns, and the odd rows and odd columns, respectively.
The number of ones in each row and column of is the same, and therefore and = . □
Example 1. We illustrate the action of φ on two arbitrary circulants of even orders 10 and 8.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | | 3 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | | 4 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | | 5 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | | 7 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | | 8 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | | 9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partial cyclic 2- design D corresponding to an optimal CPCW code. If the permutation φ from Lemma 4 is applied to the rows of M and to the columns of each of its t circulant submatrices, a matrix with circulant submatrices of order is obtained. If , the columns of each of the two rows of submatrices cover all possible pairs of points, and the missing pairs of points in the partial design have one point from the first and one from the second row of submatrices. If , there are pairs of points that are not covered by the columns of each row of submatrices, and all possible pairs of points having one point from the first and one from the second row of submatrices are covered.
Proof. By Lemma 4, the permutation transforms each of the t circulants of order v to 4 circulants of order . That is why the incidence matrix of the partial design has circulant submatrices of order . If , then is odd. That is why, if a is odd, is even and vice versa. Since the first row of submatrices of contains the even rows of M and the second the odd rows, the missing pairs of points (Lemma 3) have one point from the first row of submatrices and one from the second. If , then is even, a and are both even or both odd, and the missing pairs of points consist of two points from one and the same row of submatrices. □
With respect to the number of ones in the four submatrices, can transform a circulant of order v to types of matrices such that has two circulant submatrices with i ones in each row/column and two with ones in each row/column.
Example 2. Types of matrices for and 6
For , the types of matrices are
| | |
| 0 5 | 1 4 | 2 3 |
| 5 0 | 4 1 | 3 2 |
For , the types of matrices are
| | | |
| 0 6 | 1 5 | 2 4 | 3 3 |
| 6 0 | 5 1 | 4 2 | 3 3 |
Theorem 1. For an optimal CPCW code with and , the following equations hold: Proof. We obtain the equations by counting in different ways the pairs of points in
. Denote by
the number of
matrices of type
that are contained in
. Their number is
, and this is Equation (
3). Equation (
4) counts the pairs of points from one and the same row of submatrices. By Lemma 5, their number is
. On the other hand, each
submatrix of a matrix of type
covers
pairs of points. Equation (
5) counts the pairs in which the two points are from different rows of submatrices. By Lemma 5, all but the missing
pairs are covered; that is, all such pairs are
. On the other hand, each
submatrix of type
covers
such pairs of points. □
Theorem 2. For an optimal CPCW code with and , the following equations hold: Proof. The proof is similar to that of Theorem 1, but, by Lemma 5, the pairs of points from one and the same row of submatrices are . All the pairs in which the two points are from different rows of submatrices are covered. That is why their number is . □
Corollary 1. An optimal CPCW code can only exist if t is even.
Proof. In this case,
, and Equation (
5) gives
That is why
should be divisible by 8. □
Corollary 1 is not a new result. It is part of the nonexistence results presented in [
7], Theorem 4.6. The next example shows the application of Theorem 1 on an optimal
CPCW code with even
t.
Example 3. For an optimal CPCW code by Theorem 1: There exists a unique integer solution: , and the optimal CPCW codes comply with it.