2. Optimal CPCW Codes with
We shall briefly describe the most important properties of these codes and the way in which existence requirements are formulated in [
2], where more details and proofs can be found. A similar approach and the presented examples are used in the next section, in which additional necessary conditions for the existence of such codes are formulated in the case when
v is divisible by 4 or higher powers of 2. The example in
Figure 1 illustrates the method by which the existence conditions are obtained. It presents the smallest example of a
CPCW code with
v divisible by
, where
.
A strictly cyclic 2-
partial design corresponding to a
CPCW code of size
s has an incidence matrix of
v rows (corresponding to its
v points) and
columns (corresponding to its
blocks). This incidence matrix contains
s submatrices which are circulant matrices of order
v. The
v columns of each such circulant matrix correspond to the translates of one of the codewords of the optimal
CPCW code. This is illustrated in
Figure 1a,b.
The set of differences of the codewords of an optimal CPCW code of length
does not contain the difference
, and contains all the other possible differences. For example, the set of differences of the optimal
CPCW code from
Figure 1a contains all possible differences, but not the difference 4. For the corresponding optimal partial cyclic 2-
design this means that the
pairs of points
are not contained in its blocks, while each of the remaining
pairs of points is in exactly one block of this partial design.
Denote the rows/columns of a circulant
M of an even order
v by the numbers
, and let
be a pair
of two permutations of the rows and columns of
M respectively, where
and
permute row (column)
b as
if
and
if
. After applying
the rows/columns follow each other as
. Our further considerations substantially use the fact that the application of
to
M results in a matrix made of 4 circulants of order
[
2]. We can apply
to all the
s circulants of order
v of the incidence matrix of an optimal partial cyclic 2-
design (
Figure 1c).
Consider the two rows of circulants of order of the permuted by incidence matrix of the partial cyclic 2- design. If is even the two points of the pair are either both odd, or both even. If is odd one of the two points of the pair is odd, and the other even. The even points are in the first row of circulants, and the odd ones in the second. That is why if is even both points of the pair are in the same circulant (of order ) row, and if is odd the two points of the pair are in different circulant rows.
Consider a circulant matrix M of order v which has i ones in a row/column, and is transformed by to the 4 circulants C, D, E, and F of order , namely . The weight matrix of M is an integer square matrix of dimension , the elements of which are the number of ones c, d, e and f in a row/column of C, D, E, and F respectively. Note that , and . We further denote the weight matrix by , where . The matrices for and 5 follow.
Example 1. for | |
| | | |
| | | |
| 0 3 | 1 2 |
| 0 4 | 1 3 | 2 2 |
| 0 5 | 1 4 | 2 3 |
| 3 0 | 2 1 |
| 4 0 | 3 1 | 2 2 |
| 5 0 | 4 1 | 3 2 |
Consider the
s circulants of order
v in the incidence matrix of an optimal partial cyclic 2-
design. We denote by
the number of circulants with weight matrices
. In
Figure 1c
and the weight matrix of the circulant is
. That is why
and
.
The necessary conditions which we use further are obtained by counting in different ways the pairs of points in which the two points are from different rows of circulants of order
. A circulant of order
v with weight matrix
adds
such pairs of points. On the other hand the whole number of these pairs is
if
is even, and
if
is odd, because in that case the non-covered
pairs are among them. Therefore we obtain that
if
is odd, and
if
is even. Taking into account that there are
s circulants of order
k,
if
is even, and if
is odd
, we obtain
This result was derived in [
2], Theorems 1 and 2, by the above illustrated approach. It did not directly lead to new nonexistence results, however, because it turns out that Equations (
3) and (
4) can be derived from Theorem 4.3 of [
1]. That is why additional restrictions were used in [
2] to prove the nonexistence of an optimal
CPCW code. In the next section we generalize them in order to consider codes with
v divisible by
, where
.
3. Optimal CPCW Codes with and Divisible by , Where
If
v is divisible by 4, after
we can apply the permutation
on the circulants of order
, and this way a matrix made of 4 rows of circulants of order
will be obtained. An example is presented in
Figure 1d. We denote by
the weight matrices of circulants of order
.
Consider the first row of circulants of order , which was formed by the application of (the second row is isomorphic to it, so we do not deal with it). We denote by the number of circulants of order with weight matrices .
You can see from
Figure 1d that the weight matrices of the first row of circulants of order 4 (
Figure 1c) are
and
, and respectively
and
.
Theorem 1. For an optimal CPCW code with and v divisible by 4
the following equations hold: Proof. The first two equations are Equations (
3) and (
4) from the previous section. They follow from [
1], Theorem 4.3, or from [
2], Theorem 2.
Let there be at least one solution of the system of linear equations, Equations (
5) and (
6). By such a solution we know the values of
for
. According to one of the solutions the first row of circulants of order
obtained by
contains
circulants with
i ones in a row/column, and
circulants with
ones in a row/column,
. That is why if
the number of circulants of order
with
i ones in a row/column is
(the first equation in (7)), and if
, it is
(the second equation in (7)). If
k is even and
, then
too and the third equation in (7) follows.
This is illustrated in
Figure 1c where
and
, and the first row of circulants of order
has one circulant with 1 one in a row/column, and one circulant with 2 ones in a row/column. That is why it must hold that
and
.
Consider the first row of circulants of order . It contains the points of the partial cyclic design with numbers divisible by 2. When is applied, it is transformed into two rows of circulants of order . The first of these rows contains points with numbers divisible by 4, and the second points with even numbers not divisible by 4. That is why if is divisible by 4, the pairs of points are in the same row of circulants of order , and if is not divisible by 4, the points a and are in different rows of circulants of order .
Let us now count in different ways the pairs of points in which the two points are from different rows of circulants of order . A circulant of order with weight matrix adds such pairs of points. The whole number of these pairs is if is even, and if is odd, because in that case the non-covered pairs are among them. This way Equation (8) is obtained. □
We next generalize this result in order to consider codes with v divisible by , where . If v is divisible by after on the circulants of order v and on the circulants of order , we can go on applying on the circulants of order , then on the circulants of order , …, and finally on the circulants of order .
In this case we will use more complex notations. We denote by the weight matrix of a circulant of order . When we consider a row of circulants of order we denote by the number of circulants with weight matrices in the row. Then the next theorem follows.
Theorem 2. The following equations hold for an optimal CPCW code with and v divisible by : Proof. The incidence matrix of the considered partial cyclic design consists of
s circulants of order
v with
k ones in a row/column. This fact is presented by Equation (
9).
Consider . It does not make sense to consider solutions for if there are no solutions for . If there are solutions for , then each solution for depends on one of the solutions for , because from the solutions for we know the number of ones in the circulants from one row of circulants of order , namely the application of to the circulants of order which have h ones in a row/column leads to circulants of order with i ones in a row/column, and circulants of order with ones in a row/column, . The number h of the ones in a row/column might be different for the different circulants of order from which circulants of order with i ones in a row/column are obtained by . That is why we need a sum over all possible h. There are two cases. By definition, for and therefore should not be considered if . We obtain that (Equation (10) for ), where the range of values of h follows from the requirement that . For both and have to be considered because both and are possible. If then too. That is why is included in the range of values of h for both sums in the right part of Equation (10) for .
Equation (11) refers to the requirements for the first row of circulants of order . It contains the points of the partial cyclic design with numbers divisible by . When is applied, it is transformed into two rows of circulants of order . The first of these rows contains points with numbers divisible by , and the second points with even numbers not divisible by . That is why if is divisible by , the pairs of points are in the same row of circulants of order , and if is not divisible by , the points a and are in different rows of circulants of order . Note that the latter might only happen when . If there are exactly missing pairs of points in a row of circulants of order .
We count the pairs of points from different rows of circulants of order . A circulant of order with weight matrix adds such pairs of points. The whole number of these pairs is if is even, and if is odd, because in that case the non-covered pairs are among them. This way Equation (11) is obtained. The requirement comes from the right side of this equation and affects only cases in which is not considered because . In that case if we consider two rows of circulants of order . The application of to a circulant of order 2 preserves the circulant and does not lead to additional requirements. That is why is not possible. If , then is possible, because the application of to a circulant of order results in rows of circulants of order g. An example for is presented in the next section. □
The power of Theorem 2 comes from the fact that by Equation (10) the restrictions for depend on the solution for .
4. Computer-Aided Results
To see if the requirements of Theorem 2 hold for definite parameters
s and
k we first have to find a solution for
, and then for
,
, etc. We do this using our own software written in
which checks if the theorem holds for optimal
CPCW codes with relatively small parameters. The recursive function
bool TotalSolution(int v, int m, int ) is an important part of this software. Its work is briefly illustrated in
Figure 2.
The function TotalSolution has three parameters: v is the order of the circulants, m is as formulated in Theorem 2, and A is an integer array such that is the number of circulants of order with i ones in a row/column. Using these parameters and Theorem 2, the program constructs the equations for , and calls the function NextSolution to look for integer solutions of this system of linear equations. Successive calls to NextSolution(m) will save the next found solution in an array, or it will return false if there are no more solutions. If there are no more solutions TotalSolution returns false. Otherwise if , TotalSolution(v, m+1, B) is recursively called with each solution for and its corresponding array B, and if it returns true, the requirements of Theorem 2 hold. If or is odd, the requirement (11) (Theorem 2) does not hold for and TotalSolution returns true instead of calling TotalSolution(v, m+1, B).
The main program calls TotalSolution(v, 0, A) where and for . If the function returns true, the requirements of Theorem 2 hold. If it returns false, an optimal CPCW code with these parameters cannot exist.
We shall illustrate this by the next two examples. Note that we do not consider because they do not take part in (11).
Example 2. Consider an optimal CPCW code with and . We call TotalSolution(32, 0, A). It starts with making the equations for ; namely,
From the array A: ;
From (11): .
NextSolution(0)
finds the first solution of this system: . From (10): . We use this to assign values to the elements of array B, namely . Then
TotalSolution(32, 1, B)
is called. It starts with making the equations for ; namely,
From B:
From (11): .
NextSolution(1)
finds the first solution of this system with nonzero elements: . In a similar way solutions are next found for and 3. When
NextSolution(3)
finds a solution the condition is false because . That is why
TotalSolution(32, 3, B)
returns true, and so do
TotalSolution(32, 2, B),
TotalSolution(32, 1, B)
and
TotalSolution(32, 0, A). This means that the requirements of Theorem 2 hold for these parameters.
Example 3. Consider an optimal CPCW code with and . We call
TotalSolution(1388, 0, A). It starts with making the equations for ; namely,
From the array A: .
From (11): .
NextSolution(0)
finds the first solution of this system. Its nonzero elements are and . Then the nonzero elements of the array B are , , and .
TotalSolution(1388, 1, B)
is called and it starts with making the equations for :
From B: ,
,
.
From (11): .
This linear system of equations has no integer solutions.
NextSolution(1)
returns false and so does
TotalSolution(1388, 1, B), which was called from
TotalSolution(1388, 0, B). The latter calls
NextSolution(0), which returns false because there are no more solutions for and thus
TotalSolution(1388, 0, B)
returns false. This means that the necessary conditions from Theorem 2 do not hold for these parameters, and therefore an optimal CPCW code does not exist.
The function NextSolution is the main part of the computation. It finds a solution of the linear system for a fixed m. We have to find only integer solutions for , . That is why we do not use the standard approach to solving linear systems by considering the equations as the rows of a matrix, and finding a triangular form of this matrix. Instead of that we first assign 0 to all unknowns and then start the backtrack search for giving non-negative integer values to them.
We begin with . After choosing a value for we check if the left side of Equations (10) and (11) is smaller than the right side. If this is true, we set a value for , or for if . If the left side of one of Equations (10) and (11) is greater than the right side, we assign 0 to and increment by 1 the value of , or if . We next compute the left side of Equations (10) and (11) and repeat the same procedure.
If the left side of Equations (10) and (11) is equal to the right side, a solution has been found. If a next solution is needed and the function is called again, it works in the same way, but instead of starting from it starts from the last solution that was found by incrementing by 1 the last nonzero which was chosen.
To avoid errors the algorithm was independently implemented in C++ by the second and third authors. We obtain the same results (
Table 1) by both implementations. Note that the above description only concerns the basic structure of our software and its most important functions
TotalSolution and
NextSolution. Each of the two implementations uses a lot of additional variables and function parameters. One of the implementations organizes the communication between
TotalSolution and
NextSolution in a slightly different way, namely after finding a solution
NextSolution calls the function
MakeLevelArrays which assigns values to the array
B and other necessary variables, and when this has been done,
MakeLevelArrays calls
TotalSolution to look for a solution at the next level. We attach the C++ source of this implementation as
Supplementary Material.
By this software we check if Theorem 2 holds for optimal
CPCW codes with
and
. We obtain plenty of nonexistence results, but most of them are not new, because they follow from Equations (
3) and (
4) and have been described in [
1].
The computer-aided results are presented in
Table 1. It contains only the results for values of
v which are divisible by 4, namely
. This means that
is not divisible by 4. Since
is divisible by 2, it follows that
s is odd, and not all values of
are considered. We are interested in the nonexistence results for which there is at least one solution for
, but no solution exists for
. In the table they are denoted by
1 no. As
Supplementary Material we attach a file with the solutions for the considered parameters.
CPCW codes with one codeword are separately considered in [
1] and restrictions which hold only for them are presented. By [
1], Corollary 3.4, a
CPCW code with
exists if
is a perfect square and
k is the sum of two squares. Since 66 cannot be written as a sum of two squares, the nonexistence for
and
is not a new result. The other cases in which there are solutions for
but no solution exists for
are for
and
, namely for
, and 198. Example 3 presents one of these cases. Note that there are three values of
for which there is no solution for
. These are
, and 166. Their nonexistence follows from [
1], Theorem 4.13.
The complexity of a backtrack search algorithm is usually not discussed, because it is always exponential, namely the worst possible. In our case the possible values for
are
and thus the search for a solution at level
m is
, and the worst-case time complexity of the whole search is
. Despite its awful time complexity, backtrack search is often used in combinatorial constructions for relatively small parameters when the mathematical properties of the constructed objects allow the rejection of some of the partial solutions [
31]. The time which an exponential algorithm needs to complete a definite job grows exponentially with the growth of the considered amount of data, or parameters, but in our case we do not always need to obtain all solutions for a definite level
m, since obtaining one of them is enough when this solution is extendable to a solution for level
,
, etc. That is why the program sometimes needs a totally different amount of time for very similar parameters. For instance, on a 64.0 GB 3.2 GHz Intel-i9 PC several days are needed to find a solution for
and
, and less than a minute is enough for
and
and for most of the other cases from
Table 1. It can be seen from the file which we give as
Supplementary Material that there are solutions for
or 7. They have been obtained very quickly too.
There are certainly possible ways to make the programs faster for some of the parameter ranges, but we have not done it, because we do not expect to obtain new nonexistence results which are not for
and
. Greater values of
s and
k lead to a big number of unknowns, and to more possible solutions. This makes new nonexistence results almost impossible. The known infinite families [
1] for which no optimal CPCW codes exist have been obtained by the consideration of divisibility arguments for odd
k, because in that case
is always even. To use a similar method in the next section is only possible because in that case all the considered circulants of order
have an odd number of ones. We implemented the algorithm twice because we expected to find several isolated new nonexistence results for small
s and
k. For that purpose, not the speed but the correctness of the programs was important. The infinite class is far beyond our expectations. In the next section we prove that optimal
CPCW codes with
do not exist.
5. Nonexistence of Optimal CPCW Codes with and
The proof of the nonexistence of these codes uses divisibility considerations. That is why we need the following lemma.
Lemma 1. The length v of an optimal CPCW code with is divisible by 4 and not divisible by 8; namely, .
Proof. We will prove this by direct substitution:
□
In Example 3, and .
The nonexistence of optimal CPCW codes with follows from the fact that all circulants of order , which are obtained by applying to the circulants of the partial design, have an odd number of ones in a row/column. This is the subject of the next lemma.
Lemma 2. If Equations (5) and (6) (Theorem 1) hold for an optimal CPCW code with , and the nonzero elements of the solution are , , and (b, c and d are not necessarily different), then b, c and d are odd integers. Proof. Since the right side of this equation is divisible by 4, we can write
The left side should be divisible by 4 too. That is why is odd. Then either b, c and d are odd integers (what has to be proved), or two of them are even.
Suppose
b and
c are even. Then
and
are divisible by 4 and we can write
With respect to divisibility by 4 there are two possibilities for the odd number
d:
This equation is impossible because its left side is not divisible by 4, while the right side is.
This is impossible too. The only possibility for b, c and d is that they are all odd. □
In Example 3, and ; namely, , and are odd numbers.
Now we are ready to prove the main nonexistence result in the paper.
Proposition 1. An optimal CPCW code with does not exist.
Proof. It follows from (7) (Theorem 1) and Lemma 2 that for these parameters the elements can be nonzero if i is odd. This means that all the elements of the sum on the left side of Equation (8) (Theorem 1) are even, because is even if i is odd. The right side is . We know from Lemma 1 that
.
Then
.
This means that is an odd integer. Therefore, for the considered parameters the left side of Equation (8) is even, and the right one odd. That is why a solution is not possible in this case. The requirements of Theorem 1 do not hold, and therefore an optimal CPCW code with does not exist. □
In Example 3 the left side of (8) or (11) is even, while the right side is odd:
6. Discussion
In Theorem 2 of the present paper we derive new necessary conditions for the existence of optimal CPCW codes of length divisible by , where . We apply a computer-aided search to establish if the requirements of Theorem 2 hold for some relatively small parameters, and this way we find several parameter sets for which CPCW codes do not exist. Using the derived necessary conditions we also prove the nonexistence of optimal CPCW codes with .
The obtained results might be useful in several aspects:
The CPCW codes have multiple applications in communications, cryptography, etc. The knowledge that a code with certain parameters does not exist can sometimes save serious unnecessary efforts to construct it.
The solutions of the equations from Theorems 1 and 2 can be helpful in further theoretical or computer-aided research on optimal CPCW codes whose existence remains undecided. In our opinion the probability of finding new computer-aided nonexistence results by covering greater values of s and k is small, but not impossible.
The existence of solutions for , does not prove the existence of codes with the considered parameters, but the solutions give a better knowledge of the cyclic structure of the partial designs. This knowledge can be used to restrict the search space when algorithms for the construction of such partial designs are considered for relatively small parameters.
The general approach for proving Theorems 1 and 2 might be applicable to other partial cyclic designs whose number of points is divisible by four, and for which it is possible to follow where the points of the uncovered pairs are after the application of .