# On the weight distribution of some minimal codes

Minimal codes are a class of linear codes which gained interest in the last years, thanks to their connections to secret sharing schemes. In this paper we provide the weight distribution and the parameters of families of minimal codes recently introduced by C. Tang, Y. Qiu, Q. Liao, Z. Zhou, answering some open questions.

## Authors

• 12 publications
• 9 publications
• 3 publications
• ### Weight hierarchies and weight distributions of two families of p-ary linear codes

By choosing proper defining sets from inhomogeneous quadratic functions ...
03/06/2020 ∙ by Fei Li, et al. ∙ 0

• ### Weight distributions of six families of 3-weight binary linear codes

First, we correct a previous erroneous result about the exponential sum ...
02/04/2020 ∙ by Fei Li, et al. ∙ 0

• ### Minimal Linear Codes From Weakly Regular Plateaued Balanced Functions

Linear codes have diverse applications in secret sharing schemes, secure...
05/10/2020 ∙ by Ahmet Sınak, et al. ∙ 0

• ### An inductive construction of minimal codes

We provide new families of minimal codes in any characteristic. Also, an...
11/19/2019 ∙ by Daniele Bartoli, et al. ∙ 0

• ### Distribution of the minimal distance of random linear codes

We study the distribution of the minimal distance (in the Hamming metric...
12/30/2019 ∙ by Jing Hao, et al. ∙ 0

• ### On codes decoding a constant fraction of errors on the BSC

Using techniques and results from Kudekar et al. we strengthen the bound...
08/17/2020 ∙ by Alex Samorodnitsky, et al. ∙ 0

• ### Two Constructions for Minimal Ternary Linear Codes

Recently, minimal linear codes have been extensively studied due to thei...
07/11/2021 ∙ by Haibo Liu, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1. Introduction

A codeword in a linear code is called minimal if its support (i.e., the set of nonzero coordinates of ) does not contain the support of any other independent codeword. A minimal code is a linear code whose nonzero codewords are minimal. Minimal codewords and minimal codes in general have interesting connections to linear code-based secret sharing schemes (SSS); see [20, 21].

A secret sharing scheme is a method to distribute shares of a secret to each of the participants in such a way that only the authorized subsets of could reconstruct the secret; see [22, 4].

In [20, 21] Massey considered the use of linear codes for realizing a perfect (i.e. all authorized sets of participants can recover the secret while unauthorized sets of participants cannot determine any shares of the secret) and ideal (i.e. the shares of all participants are of the same size as that of the secret) SSS. It turns out that the access structure of the secret-sharing scheme corresponding to an -code is specified by the support of minimal codewords in the dual code having as the first component.

In general, it is quite hard to find the whole set of minimal codewords of a given linear code; see [3, 8]. For this reason, minimal codes have been widely investigated in the last years; see for instance [10, 23]. Most of the known families of minimal codes are in characteristic two.

A sufficient criterion for a linear code to be minimal is given by Ashikhmin and Barg in [2].

###### Lemma 1.1.

A linear code over is minimal if

 (1.1) wminwmax>q−1q,

where and denote the minimum and maximum nonzero Hamming weights in , respectively.

Families of minimal linear codes satisfying Condition (1.1) have been considered in several papers; e.g. see [12, 13, 15, 25]. However, Condition (1.1) is not necessary and examples of minimal codes not satisfying Condition (1.1) have been constructed in i.e. [11, 9, 18, 14, 5, 6, 24, 7, 1].

In this paper we provide the weight distribution and the parameters of families of minimal codes recently introduced in [24], answering to some open questions.

The constructions of minimal codes presented in [24] can be described in a geometrical way. Consider the affine space of dimension over the finite field , a prime power.

Let be a multiset of points in corresponding to the columns of a generator matrix of an linear code

. For a hyperplane

through the origin of and a point , denotes .

With this notation,

 CD:={(H(P1),…,H(Pn)):H is an hyperplane of AG(k,q) through the origin}.

The authors of [24], following [16, 17], call the defining set of . They also present an interesting machinery which provides new minimal codes from old ones; see [24, Theorem 43], where they make use of the concept of vectorial cutting blocking set [6].

###### Theorem 1.2.

Let . Let and be two vectorial cutting blocking sets in such that for any . Consider the following subset of

 ˜[D1,D2]:={(x,1)∈AG(k+1,q):x∈D1}⋃{(x,0)∈AG(k+1,q):x∈D2}.

Then, is a vectorial cutting blocking set in . In particular, is a minimal code of length and dimension .

In [24] the authors construct several families of minimal codes not satisfying Condition (1.1

). They leave the determination of the weight distribution of some of them as open problems. In general, the computation of the weight distribution or of the weight spectrum (i.e. the set of its nonzero weights) of codes could be a challenging task. On the other hand, this computation provides important information, since for instance the weight distribution of a code allows the computation of the probability of error detection and correction with respect to some error detection and error correction algorithms; see

[19] for more details.

Therefore our aim is to provide the weight spectrum or the weight distribution of specific minimal codes constructed in [24]. In particular, we consider the following families of defining sets.

1. Family 1.

 D1={(x1,…,xk)∈AG(k,q)∖{¯¯¯0}:(h∑i=1xi)h∏i=1xi=0},

where ; see [24, Open Problem 37].

2. Family 2.

 D2=⎧⎨⎩(x1,…,xk)∈AG(k,q)∖{¯¯¯0}:h∏1≤i

where ; see [24, Open Problem 38].

3. Family 3.

 D3=⎧⎨⎩(x1,…,xk)∈AG(k,q)∖{¯¯¯0}:h∏i=1xih∏1≤i

where ; see [24, Open Problem 39].

4. Family 4.

 D4={(x1,…,xk)∈AG(k,q)∖{¯¯¯0}:h∏i=1xi=0},

where ; see [24, Open Problem 48].

We determine the weight distribution of , , and , and the parameters of the codes and .

## 2. Family 1

By [24, Theorem 23] it is readily seen that the dimension of is . By [24, Lemma 32] and [24, Theorem 33], is a minimal code of length

 n=qk−h−1(qh+1−(q−1)h+1+(−1)h(q−1))−1.

In order to compute the weight distribution of it is useful to consider the following integers

 ψs := #{(x1,…,xs)∈AG(s,q):s∑i=1xi=0 and xi≠0 for any i=1,…,s}, φs := #{(x1,…,xs)∈AG(s,q):s∑i=1xi=1 and xi≠0 for any i=1,…,s}.

As generalization of [24, Lemma 31], we have

 ψs=(q−1)s+(−1)s(q−1)q,φs=(q−1)s−ψsq−1.

In particular note that and .

Consider now . It is readily seen that

 ψs = #{(x1,…,xs)∈AG(s,q):s∑i=1aixi=0 and xi≠0 for any i=1,…,s}, φs = #{(x1,…,xs)∈AG(s,q):s∑i=1aixi=1 and xi≠0 for any i=1,…,s}.

Let be the hyperplane of through the origin with affine equation

 (2.1) ai1xi1+…+aisxis+bj1xj1+…+bjrxjr=0,

where , , , and .

For the weight distribution of , we need to investigate the number of solutions of the system

 (2.2) {\parai1xi1+…+aisxis+bj1xj1+…+bjrxjr=0(x1+…+xh)x1⋅…⋅xh=0\par.

Indeed, the weight of the codeword induced by is .

###### Proposition 2.1.

Let . Then

 Λ=qk−1−qk−h−1(q−1)h+ψhqk−h−1=qk−h−1(qh+ψh−(q−1)h).
###### Proof.

An easy computation shows that the number of solutions of the system

 {\parai1xi1+…+aisxis+bj1xj1+…+bjrxjr=0x1⋅…⋅xh=0\par

is . Therefore it remains to compute the number of solutions of

 (2.3) ⎧⎨⎩\parai1xi1+…+aisxis+bj1xj1+…+bjrxjr=0x1+…+xh=0x1⋅…⋅xh≠0.\par

Rearranging, the above system (2.3) is equivalent to

 (2.4) ⎧⎨⎩\parxj1=−αi1xi1−…−αisxis−βj2xj2−…−βjrxjrx1+…+xh=0x1⋅…⋅xh≠0,\par

with and . Since the number of solutions of (2.4) is , we obtain . ∎

###### Proposition 2.2.

Let , , and consider pairwise distinct nonzero elements of . The number of solutions of the system

 (2.5) Sr1,…,rl(γ):⎧⎪ ⎪ ⎪⎨⎪ ⎪ ⎪⎩x(1)1+…+x(1)r1+x(2)1+…+x(2)r2+⋯+x(l)1+…+x(l)rl=γα1(x(1)1+…+x(1)r1)+α2(x(2)1+…+x(2)r2)+⋯+αl(x(l)1+…+x(l)rl)=0∏i,jx(i)j≠0,

is, for , if and otherwise, and for

 (2.6) {Ar1,…,rl=ψr1+⋯+rl−1φrl+(−1)rlAr1,…,rl−1, if γ=0;(ψr1+⋯+rl−Ar1,…,rl)/(q−1), if γ≠0.
###### Proof.

We proceed by induction on and we also show that the number of solutions does not depend on the values . If , it is clear that if then the number of solutions is . Also, if , this number is precisely . Clearly, this does not depend on the value .

Suppose that Formula (2.6) holds for and that the number of solutions does not depend on the values . Consider . We first deal with . The system can be written as

 S′r1,…,rl,rl+1(0):⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩x(1)1+…+x(1)r1+x(2)1+…+x(2)r2+⋯+x(l+1)1+…+x(l+1)rl+1=0(α1−αl+1)(x(1)1+…+x(1)r1)+(α2−αl+1)(x(2)1+…+x(2)r2)+⋯+(αl−αl+1)(x(l)1+…+x(l)rl)=0∏i,jx(i)j≠0.

Each solution of is a solution of precisely one of the following systems

 S′′r1,…,rl,rl+1(γ):⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩x(1)1+…+x(1)r1+x(2)1+…+x(2)r2+⋯+x(l)1+…+x(l)rl=γx(l+1)1+…+x(l+1)rl+1=−γ(α1−αl+1)(x(1)1+…+x(1)r1)+(α2−αl+1)(x(2)1+…+x(2)r2)+⋯+(αl−αl+1)(x(l)1+…+x(l)rl)=0∏i,jx(i)j≠0.

Viceversa, each solution of a particular is a solution of .

The number of solutions of is if , and

 ψr1+⋯+rl−Ar1,…,rlq−1φrl+1

otherwise. By hypothesis these numbers do not depend on the choice of . Summing up, the number of solutions of is

 Ar1,…,rlψrl+1+(q−1)(ψr1+⋯+rl−Ar1,…,rl)q−1φrl+1 = ψr1+⋯+rlφrl+1+Ar1,…,rl(ψrl+1−φrl+1) = ψr1+⋯+rlφrl+1+(−1)rl+1Ar1,…,rl.

It is readily seen that the number of solutions of for any non-zero . The claim follows. ∎

###### Remark 2.3.

From Proposition (2.2) it follows that

 Ar1,…,rl=ψr1+⋯+rl−1φrl+(−1)r2+⋯+rlψr1+l−2∑i=1(−1)rl−i+1+⋯+rlψr1+⋯+rl−i−1φrl−i.

As a notation, for all distinct from , we denote by the integer .

###### Proposition 2.4.

Let . Then the number of solutions of (2.2) is

 Λ=qk−1−(q−1)h−sqk−hψs+qk−hAr1,…,rl,h−s.
###### Proof.

Without loss of generality we can assume . As in Proposition 2.1 we count the number of solutions of two different systems, namely

 (2.7) {\para1x1+…+asxs=0x1⋅…⋅xh=0\par

and

 (2.8) ⎧⎨⎩x1+…+xh=0a1x1+…+asxs=0x1⋅…⋅xh≠0.

In order to count the number of solutions of (2.7), we consider

 {\para1x1+…+asxs=0x1⋅…⋅xh≠0.\par

Here, we have choices for , while for the remaining coordinates we have possibilities: in total solutions.

This shows that System (2.7) has solutions.

We now deal with System (2.8).

We write (2.8) (up to a permutation of ) in blocks of proportionality as

 (2.9) ⎧⎨⎩x1+…+xs+xs+1+…+xh=0α1(x1+…+xr1)+…+αl(xs−rl+1+…+xs)=0x1⋅…⋅xs⋅xs+1…⋅xh≠0,

for some , such that , pairwise distinct and nonzero.

Note that if then the number of solutions of (2.9) is .

Suppose now . Each solution of (2.9) is a solution of a certain

 (2.10) Sγ:⎧⎪ ⎪ ⎪⎨⎪ ⎪ ⎪⎩x1+…+xs=γxs+1+…+xh=−γα1(x1+…+xr1)+…+αl(xs−rl+1+…+xs)=0x1⋅…⋅xs⋅xs+1…⋅xh≠0.

By Proposition 2.2, for System (2.10) has solutions, whereas for , the number of solutions is . Summing up, the number of solutions of (2.8) is

 qk−hψh−sAr1,…,rl+qk−hφh−s(ψr1+⋯+rl−Ar1,…,rl) = qk−h(ψr1+⋯+rlφh−s+(−1)h−sAr1,…,rl) = qk−hAr1,…,rl,h−s

The claim follows. ∎

Finally, we provide the weight spectrum and the weight distribution of the code answering to [24, Open Problem 37].

For an -tuple , we say that it is of type if there are distinct values among and they are repeated times.

###### Theorem 2.5.

The weight spectrum of the minimal code is

 {n−qk−h−1(qh+ψh−(q−1)h)+1,n−qk−1−(q−1)h−sqk−hψs+qk−hAr1,…,rl,h−s+1},

where ranges in and . Moreover, the number of codewords of weight is

• , if ;

• , if and is of type .

###### Proof.

The claim on the weight spectrum follows from Propositions 2.1 and 2.4.

Let . By Proposition 2.1, every hyperplane with induces a codeword of weight , whence .

Assume now for a partition of , , , of type . We count the number of -tuples of such that the last entries are zero and that admit, among the first entries, distinct nonzero values and zeros.

The zero entries can be chosen in ways among the first entries. The possible -tuples of nonzero elements of are . Finally for any chosen -tuple , counts the number -uples where appear exactly times.

Each hyperplane corresponding to such a -tuple induces, by Proposition 2.4, a codeword of weight .

###### Remark 2.6.

The weights in Theorem 2.5 (ii) are not all distinct. For instance, let and . Then the weights corresponding to the choices , , and , , are equal.

## 3. Family 2

By [24, Theorem 23] it is readily seen that the dimension of is .

###### Proposition 3.1.

Let

 Γ(h,q):=min(h,(q−1)/2)∑s=1(q−1)(q−3)⋯(q−2s+1)s!S(h,s),

where is the number of surjective functions from a set of size to a set of size .

The code has length

###### Proof.

First, we count the number of -tuples for which

 (3.1) no pairs of entries (xi,xj),1≤i

Assume . In this case the number of -tuples for which at least one pair of entries , , satisfies is (in particular it is if ).

From now on, let us consider the case . We distinguish two cases.

• All entries are nonzero. Suppose that the entries assume exactly distinct values of . Since for any , can be at most . For a given chosen number , there are possible choices for the set . In fact can be chosen in ways, , and so on. Now, when the set is fixed, the entries can assume only values . The number of possible -tuples equals the number of surjective functions from to . The number of -tuples satisfying (3.1) is .

• One entry is . In this case, any other entry is nonzero. To the other entries we can apply the same argument as above. Since the unique entry can appear in different positions, in this case the number of -tuples satisfying (3.1) is .

Summing up, there are in total -tuples satisfying (3.1): the number of -tuples for which at least one pair of entries , , satisfies is . The length of the code is given by the number of -tuples in for which the first entries can be chosen in ways.

###### Proposition 3.2.

Let and . Then the minimum weight in is realized by the hyperplanes , .

###### Proof.

It is readily seen that all the hyperplanes , , contain points of and therefore they correspond to minimum weight codewords. Let be an hyperplane different from , .

• If for some and then the point

 (1,…,1,−αi,1,…,1)∈H∖(D2∪{0})

and therefore , where is the length of .

• Suppose now that , with , , . Let . Then the point

 (1,…,1,λl,1,…,1,λβ+∑j∈Jαji,1,…,1)∈H∖(D2∪{0})

therefore .

• Consider now the case , with . Let , . Then the point

 (1,…,1,λl,1,…,1,μs,1,…,1,−λ−μ−#Ji,1,…,1)∈H∖(D2∪{0})

therefore .

## 4. Family 3

By [24, Theorem 23] it is readily seen that the dimension of is .

###### Proposition 4.1.

Let be defined as in Proposition 3.1. The code has length