Quasi-perfect codes in the \ell_{p} metric 1footnote 11footnote 1This work was partially supported by FAPESP, grants 2014/20602-8, 2013/25977-7 and CNPq, grant 312926/2013-8.

# Quasi-perfect codes in the ℓp metric 111This work was partially supported by FAPESP, grants 2014/20602-8, 2013/25977-7 and CNPq, grant 312926/2013-8.

João E. Strapasson, Grasiele C. Jorge,
Antonio Campello and Sueli I. R. Costa 222address: [Strapasson] UNICAMP - University of Campinas, 13484-350, Limeira, SP, Brazil, [Jorge] UNIFESP - Federal University of São Paulo, 12231-280, São José dos Campos, SP, Brazil and [Campello-Costa] UNICAMP - University of Campinas, 13083-859, Campinas, SP, Brazil 333email: joao.strapasson@fca.unicamp.br, grasiele.jorge@unifesp.br, campello@ime.unicamp.br and sueli@ime.unicamp.br
###### Abstract

We consider quasi-perfect codes in over the metric, . Through a computational approach, we determine all radii for which there are linear quasi-perfect codes for and . Moreover, we study codes with a certain degree of imperfection, a notion that generalizes the quasi-perfect codes. Numerical results concerning the codes with the smallest degree of imperfection are presented.

———————————————————————-

———————————————————————-

keywords:Tilings, Lattices, Quasi-perfect Codes, metric

## 1 Introduction

A collection of disjoint translates of a set is called a tiling of if the union of its elements is equal to . We consider here as the ball in with radius in the metric for . The set associated to the translations of such a tiling is also called a perfect code in the metric, . If, in addition, this set is an additive subgroup of , we call the corresponding tiling a lattice tiling, and the corresponding code a linear perfect code.

For , the existence of tilings by balls in the metric was investigated by Golomb and Welch in their seminal paper [Golomb]. The so-called Golomb-Welch conjecture states that there are no tilings of by for and radius . Although there have been many advances and partial results towards a proof of this conjecture it still remains open (see [Horak] for further references).

The existence of perfect codes in the metric, , with parameters , where is the dimension and is the packing radius, was investigated in [CNMAC2014, PerfectpLee]. It was shown that for and there are linear perfect codes only for the parameters and and and [PerfectpLee, Theorem 6.2 and 6.4]. It was also shown that for and integer there are no perfect (linear and nonlinear) codes in the metric if and [PerfectpLee, Theorem 7.2].

In view of the rarity of perfect codes in the metric, , we relax the condition of being perfect by considering quasi-perfect codes in the metric for and by introducing the notion of degree of imperfection of a code. Quasi-perfect codes in the Lee metric () have already been investigated in some papers. In [AIBdaiwi-Bose] it was presented quasi-perfect codes in the Lee metric for dimension . In [Horak] the authors presented quasi-perfect codes for and a few radii. Later, in [Camarero-Martinez] the authors constructed a family of quasi-perfect codes in the Lee metric of radius and arbitrarily large dimension.

When dealing with quasi-perfect codes a natural question to be considered is the existane such codes for different and , , for a given radius. In this paper we give partial answers for this question in some dimensions. Some preliminary results of this work were presented in [CNMAC2014].

### 1.1 Organization

The paper is organized as follows. In Section 2 we establish our notation and present some preliminary results concerning codes and lattices. In Section 3 a polyomino associated to a ball in the metric is considered. In Section 4 the notion of degree of imperfection of a code in the metric is introduced. In Section 5 some families of lattices whose degree of imperfection is greater than are presented. Finally, in Section 6 an algorithm that searches for quasi-perfect codes in dimensions and is presented and all quasi-perfect codes in dimension and for are listed.

### 1.2 Relation to codes over finite alphabets

In the classical literature, codes are considered over finite alphabets, for instance as subgroups of , where is a field with elements, or as subgroups of , where is the ring of integers modulo .

Codes in can be “lifted” to codes in via the -ary Construction A [SloaneLivro]. If the alphabet size is large enough, then perfect linear codes in in the -Lee metric [PerfectpLee] induce perfect linear codes in in the metric, as shown in [PerfectpLee, Corollary 3.5]. Conversely, proofs of non-existence of perfect codes in automatically imply the non-existence of codes in under certain conditions (for more precise definitions see [PerfectpLee, Corollary 3.5]). This relation, that dates back to Golomb and Welch [Golomb] for the metric, motivates the study of codes over the alphabet . It also justifies the terminology “perfect” and “quasi-perfect” codes (which, nonetheless, follows the terminology of [Horak, AIBdaiwi-Bose], etc.).

## 2 Codes in the ℓp metric

A linear code, to our purposes, is an additive subgroup of (or a lattice). We consider here full rank lattices in , that is, full rank additive subgroups of . A lattice always has a generator matrix , i.e., a full rank matrix such that . The determinant of a lattice is defined as for any generator matrix.

Recall that the distance between two points is defined as

 dp(x,y):=(n∑i=1|xi−yi|p)1/p if 1≤p<∞ (1)

and

The minimum distance of a code in is defined as

 dp(C)=minx,y∈Cdp(x,y).

The minimum distance of a lattice in the metric, , is the shortest nonzero vector in the metric.

Two lattices and in are congruence in the metric if can be obtained from by permutation of coordinates composed with sign changes.

## 3 Balls in the ℓp metric and associated polyominoes

In what follows will be used for the closed ball in centered at with radius , i.e., for and When we will denote for and

Let be the cardinality of the set . There is no closed form for when and .

By considering the union of unit cubes in centered at the points of , , a shape called a polyomino is produced. A tiling of by translates of corresponds to a tiling of by the associated polyominoes. We use the notation

 Tnp(r):=⋃x∈Bnp(r)(x+[−12,12]n),1≤p≤∞, (2)

for the polyomino in the metric associated to . Some polyominoes are depicted in Figure 1.

When , and vary, the polyomino changes its shape. For we have squared polyominoes . In Proposition 3.1 we consider other special values for and (illustrated in Figure 2) and obtain the shape of the polyominoes associated to .

From now on let be the vector that has in the -th entry and in the others, for .

###### Proposition 3.1.

For fixed radius and dimension , we can assert:

1. If is integer and , then

 Tnp(r)=Tn∞(r−1)⋃(±ei+[−12,12]n)

and .

2. If is integer, and , then

 Tnp(r)=(Tn∞(r−1)⋃(±ei+[−12,12]n))∖⋃x∈A(x+[−12,12]n),

where and .

3. If is not integer, and , then

 Tnp(r)=Tn∞(⌊r⌋)∖⋃x∈B(x+[−12,12]n),

where and

4. If is not integer, and , then

 Tnp(r)=Tn∞(⌊r⌋)∖⋃x∈D(x+[−12,12]n),

where and

###### Proof.

For the proof of (i) note that if is integer and , then . Hence, since if , then . The proof of Items (ii), (iii) and (iv) is very similar. ∎

## 4 Perfect and quasi-perfect codes

It is well known that the packing radius of a code in the metric depends only on the minimum distance of the code and it is given by the formula In this case a code is called perfect if (or ) and for all with . A code is called quasi-perfect if (or ) and .

For the metric, , two codes with same minimum distance may have different packing radii and thus the packing radius is not uniquely determined by the minimum distance (see [PerfectpLee, Remark 5.1]). Moreover, the packing radius in the metric for is not necessarily an integer number (as it can be seen next in Example 4.1).

In order to define the packing and the covering radii of in the metric for we first define the distance set of the metric in as

 Dp,n={d∈R, such that there are z∈Zn and c∈C with dp(z,c)=d}.

It follows that.

###### Example 4.1.

Consider the lattice generated by . The first elements of are , , , and . In this case, is the largest value of such that the balls centered at the points of with radius do not intercept each other and is the smallest value of such that the union of the balls centered at the points of with radius covers .

The packing radius of a code in the metric is the greatest such that holds for all . The packing radius of a code in the metric will be denoted by .

The covering radius of a code in the metric is the smallest such that . The covering radius of a code in the metric will be denoted by .

We denote by and , respectively, the real packing and covering radii of a lattice in (for the packing radius the balls centered at with radius do not intercept each other in and for the covering radius the union of the balls centered at the points of with radius covers ).

###### Example 4.2.

Consider the lattice generated by . We have that , , and .

We define the distance of two elements with as , where denotes the closed interval in and . We say that a lattice is -imperfect if . When , that is , the lattice is called perfect. When the lattice is called quasi-perfect.

In [PerfectpLee, Corollary 5.5] it was shown that if and , then the radius packing of a linear perfect code in the metric satisfies

 rp≤n1/p2(1+(¯¯¯¯¯¯¯Δnp)1/n)(1−(¯¯¯¯¯¯¯Δnp)1/n). (3)

where denotes the supremum of the packing densities over all -dimensional lattices in the metric.

We recall that the covering density of a lattice in the metric is given by , where is the Euclidean volume of the -dimensional unitary sphere centered at the origin in the metric [VolumBall, p.321]. denotes the infimum of the covering densities over all -dimensional lattices in the metric.

Proposition 4.3 give us some relations among packing and covering radii of a quasi-perfect lattice and covering density for the lattice in .

###### Proposition 4.3.

Let and . The covering radius and the packing radius of a linear quasi-perfect code in the metric satisfies

 ¯¯¯¯¯¯¯Θnp≤Vnp(Rp+12p√n)n|Bnp(rp)| (4)

and

 ¯¯¯¯¯¯¯Θnp≤Vnp(rp+p√n)n|Bnp(rp)|. (5)
###### Proof.

The real and integer covering and packing radii satisfy where . Therefore, it follows that

 ¯¯¯¯¯¯¯Θnp≤Vnp¯¯¯¯¯¯Rpnvol(Λ)≤Vnp(Rp+12p√n)nvol(Λ)≤Vn,p(Rp+12p√n)n|Bnp(rp)|

Since the linear code is quasi-perfect by hypothesis, it follows that and then

 ¯¯¯¯¯¯¯Θnp≤Vnp¯¯¯¯Rnpvol(Λ)≤Vnp(rp+p√n)nvol(Λ)≤Vnp(rp+p√n)n|Bnp(rp)|

Since neither the packing and covering density of any lattice cannot exceed the best possible density in dimension , these inequalities give a limitation on the packing radius of a quasi-perfect code. A numerical comparison among these limitations, provided by (3), (4) and (5) is presented in Table 1. On the left table, the third and fourth columns represent bounds for the packing and covering densities of the perfect lattices with packing radius obtained from Inequalities (3) and (4), respectively. According to Inequality (4) we must test lattices with packing radius upper bounded by while inequality (3) shows the packing radius must be upper bounded by , otherwise we had packing and covering densities greatest and smallest that the maximum and minimum possible values ( e , e.g., [SloaneLivro]) in this dimension, respectively. On the right table, the third, fourth and fifth columns represent bounds for the packing and covering densities of the quasi-perfect lattices with packing radius obtained from Inequalities (3), (4) and (5), respectively. From Inequality (4) the packing radius must be upper bounded by while Inequality (5) it must be upper bounded by . In this case Inequality (4) is more appropriated.

The discrete packing density of a lattice in in the metric is given by . The discrete covering density of a lattice in is given by

###### Example 4.4.

Table 2 shows some parameters of all integer lattices with volume in the metric. Here , , and denote discrete packing density, packing density, discrete covering density and covering density of the lattice , respectively. In this case we have only one quasi-perfect lattice up to congruence.

## 5 Families of t-imperfect lattices in the ℓp metric

In this section we present some families of lattices in the metric and calculate their imperfection degrees and discrete packing densities. In some cases the imperfection degree ranges with the packing radius.

###### Proposition 5.1.

Let an integer and an integer such that . The lattice with basis is quasi-perfect for and and -imperfect for . It has discrete packing density .

###### Proof.

is not perfect because . If , then , and if and only if . If , then The last inequality follows from the fact implies and that is a concave upward function when and . Indeed, a convex combination of the image of and is greather than the image of , that is,

 12(r−1)p+12(r+1)p≥rp⇒(r+1)p≥2rp−(r−1)p=rp+rp−(r−1)p≥rp+2(r−1)p−(r−1)p=rp+(r−1)p≥rp+(r−2)p.

From Proposition 3.1, and since , the discrete packing density is . ∎

###### Example 5.2.

The lattice with basis described in Proposition 5.1 is quasi-perfect in the -metric for . is congruent to the lattice with basis described in the set in Section 6. The lattice with basis described in Proposition 5.1 is -imperfect in the -metric for .

###### Proposition 5.3.

Let be an integer, and . The lattice with basis is -imperfect. It has discrete packing density .

###### Proof.

By hypothesis Then . We also have since the ball is convex. Moreover, for has no integer solution. Hence, the radius covers the point . The formula for the packing density follows from Proposition 3.1 since . ∎

###### Proposition 5.4.

If is not integer, , and , then the lattice with basis is quasi-perfect. It has discrete packing density .

###### Proof.

The proof follows from the fact that the corners have -norm smaller or equal to the -norm of the points . The formula for the packing density follows from Proposition 3.1 since . ∎

###### Proposition 5.5.

If is not integer, , and , then the lattice with basis is -imperfect. It has discrete packing density .

###### Proof.

The proof follows from the fact that the points have -norm smaller or equal to the -norm of and these points have -norm smaller or equal to the -norm of the point . The formula for the packing density follows from Proposition 3.1 since . ∎

###### Example 5.6.

The lattice with basis is -imperfect in the metric for . The lattice with basis is associated to the same format of the polyominoes of Proposition 5.4 but it is quasi-perfect in the -metric for .

The lattices obtained in Propositions 5.1, 5.3, 5.4 and 5.5 satisfy .

## 6 Computational Algorithm

In this section we present a pseudo code of an algorithm (Algorithm LABEL:algo_quasiperfect) that lists all perfect and quasi-perfect linear codes in considering the metric, , until a certain given packing radius up to congruence.

In the cases that the minimum covering density is known we use Proposition 4.3 to bounding our search.

The algorithm is based on two tests where the first test is a variation of the next theorem.

###### Theorem 6.1.

[Diameter, Thm. 6] Let , such that . There is a lattice tiling of by translates of if and only if there is an Abelian group of order and a homomorphism such that the restriction of to is a bijection.

The first test, called here Injetivity Test, ensures that the balls of a certain radius centered at points of a lattice are disjoint. More precisely, the lattice is viewed as the kernel of an application (where is an abelian group with ). Suppose that the lattice is generated by a matrix and consider the adjoint matrix of . Up to group isomorphisms, we may assume that is the composition of two applications and , where and as the following diagram: