On relative constant-weight codes

23
On relative constant-weight codes Zihui Liu 1 Xin-Wen Wu 2 1. Department of Mathematics, Beijing Institute of Technology, Beijing 100081, China 2. School of Information and Communication Technology, Griffith University, Gold Coast, QLD 4222, Australia. Abstract In this paper, relative two-weight and three-weight codes are studied, which are both called relative constant-weight codes. A geometric approach is introduced to con- struct and characterize relative constant-weight codes, using the finite projective geometry. A sufficient and necessary condition is derived for linear codes to be relative constant- weight codes, based on the geometric approach. A family of infinite number of relative constant-weight codes are constructed, which includes dual Hamming codes and subcodes of punctured Reed-Muller codes as special instances. It is well known that determining all the minimal codewords is a hard problem for an arbitrary linear code. For relative constant-weight codes, minimal codewords are completely determined in this paper. Based on the above-mentioned results, applications of relative constant-weight codes to wire-tap channel of type II and secret sharing are discussed. A comparative study shows that relative constant-weight codes form a new family. They are not covered by the previously well-known three-weight codes or linear codes for which minimal codewords can be determined. Keywords relative two-weight code; relative three-weight code; minimal codeword; finite projective geometry; wire-tap channel of type II; secret sharing. Mathematics Subject Classification 94B05 1 Introduction Motivated by the work in [10], where a geometric approach was used to study the relative generalized Hamming weights, and the results in [11], where a class of two-weight codes were investigated, we study relative two-weight and three-weight codes in this paper. We call This work was supported by The National Science Foundation of China( No. 11171366). The material of this paper was presented in part at the IEEE International Symposium on Information Theory, MIT, Cambridge, Boston, USA, July 2012. To whom correspondence should be addressed. E-mail: [email protected] 1

Transcript of On relative constant-weight codes

On relative constant-weight codes∗

Zihui Liu1†

Xin-Wen Wu2

1. Department of Mathematics, Beijing Institute of Technology, Beijing 100081, China

2. School of Information and Communication Technology, Griffith University,

Gold Coast, QLD 4222, Australia.

Abstract In this paper, relative two-weight and three-weight codes are studied, which

are both called relative constant-weight codes. A geometric approach is introduced to con-

struct and characterize relative constant-weight codes, using the finite projective geometry.

A sufficient and necessary condition is derived for linear codes to be relative constant-

weight codes, based on the geometric approach. A family of infinite number of relative

constant-weight codes are constructed, which includes dual Hamming codes and subcodes

of punctured Reed-Muller codes as special instances. It is well known that determining

all the minimal codewords is a hard problem for an arbitrary linear code. For relative

constant-weight codes, minimal codewords are completely determined in this paper. Based

on the above-mentioned results, applications of relative constant-weight codes to wire-tap

channel of type II and secret sharing are discussed. A comparative study shows that relative

constant-weight codes form a new family. They are not covered by the previously well-known

three-weight codes or linear codes for which minimal codewords can be determined.

Keywords relative two-weight code; relative three-weight code; minimal codeword;

finite projective geometry; wire-tap channel of type II; secret sharing.

Mathematics Subject Classification 94B05

1 Introduction

Motivated by the work in [10], where a geometric approach was used to study the relative

generalized Hamming weights, and the results in [11], where a class of two-weight codes were

investigated, we study relative two-weight and three-weight codes in this paper. We call

∗This work was supported by The National Science Foundation of China( No. 11171366). The material

of this paper was presented in part at the IEEE International Symposium on Information Theory, MIT,

Cambridge, Boston, USA, July 2012.†To whom correspondence should be addressed. E-mail: [email protected]

1

these codes relative constant-weight codes, as they can be partitioned into two or three

constant-weight subcodes.

A geometric approach is introduced first to study relative constant-weight codes, based

on the finite projective geometry. A sufficient and necessary condition is derived, which

fully characterizes the linear codes that are relative three-weight codes. This generalizes

the result on relative two-weight codes in [11]. Making use of the geometric approach, a

family of infinite number of relative constant-weight codes are constructed. It is showed

that the relative constant-weight codes include the well-known dual Hamming codes as well

as subcodes of punctured Reed-Muller codes as special instances.

It is well known that determining minimal codewords is a hard problem for an arbitrary

linear code (cf. [1, 15]). In this paper, the minimal codewords of relative two-weight and

three-weight codes are completely determined. Based on the code construction and complete

determination of minimal codewords, applications of relative constant-weight codes to wire-

tap channel of type II and secret sharing are discussed.

As it has been proved in [15], for a secret sharing scheme that is based on a linear code

C, the problem of determining the minimal access sets is reduced to the problem of finding

the minimal codewords of the dual code C⊥. An elegant sufficient condition was presented

in [1], which says that for a linear code if its minimum nonzero weight and maximum weight

satisfy the sufficient condition, then all the nonzero codes are minimal codewords (see the

detail given by (11) in Section 5). Also, a lot of research results have been published (see

[6, 7, 9, 18]) which attempted to construct linear codes for which minimal codewords can

be determined.

A comparative study shows that the relative constant-weight codes are a new family

of codes. For relative constant-weight codes, while the sufficient condition of [1] is not

satisfied, minimal codewords are completely determined. It is also showed that the relative

constant-weight codes are not covered by the previously well-known three-weight codes or

linear codes for which minimal codewords can be determined [1, 4, 6, 7, 9, 18, 19].

The rest of this paper is organized as follows. Section 2 defines relative two-weight and

three-weight codes, introduces a geometric approach making use of finite projective geom-

etry, as well as presents some preliminary results. A sufficient and necessary condition for

linear codes to be relative three-weight codes is derived in Section 3. In this section, we

also present a construction of relative constant-weight codes; and we prove that the rela-

tive constant-weight codes include the well-known dual Hamming codes as well as subcodes

of punctured Reed-Muller codes as special instances. An application of relative constant-

weight codes to wire-tap channel of type II is presented in Section 4. Section 5 completely

determines the minimal codewords of relative two-weight and three-weight codes; and appli-

2

cation of relative constant-weight codes to secret sharing is given in this section. In Section

6, a comparative study is given to compare relative constant-weight codes with well-known

linear codes for which minimal codewords can be determined as well as existing three-weight

codes. The conclusion will be given in Section 7.

2 Definitions and geometric approaches

Let GF (q) be a finite field with q elements. A k-dimensional linear code, C, of length

n is a k-dimensional linear subspace of GF (q)n. Let C1 be any subcode of C. Denote

C\C1 = {c | c ∈ C, c /∈ C1}. Note that C\C1 is a block code, but not necessarily a linear

code. In the following definitions, we call a block code C a constant-weight code, if all the

codewords of C (except the all-zero codeword, if the all-zero codeword is in the code) have

the same Hamming weight.

Definition 1([11]) C is called a relative two-weight code with respect to a subcode C1,

provided that C1 and C\C1 are both constant weight codes. If these two constant weight

codes have weights w1 and w, respectively, then the relative two-weight code C is denoted

by C(w1, w).

We may generalize relative two-weight codes as follows.

Definition 2 Let C1 be a k1-dimensional subcode of C, and C2 a k2-dimensional subcode,

satisfying C1 ⊂ C2 ⊂ C. Then C is called a relative three-weight code with respect to C1 and

C2, provided that C1, C2\C1 and C\C2 are all constant weight codes. If these three constant

weight codes have weights w1, w2 and w, respectively, then the relative three-weight code

C is denoted by C(w1, w2, w).

Remark 1 Obviously, if w1 = w2 = w, then C(w1, w2, w) becomes a constant weight code.

If w1 = w2, then C is a relative two-weight code with respect to C2. If w2 = w, then C is

a relative two-weight code with respect to C1. Thus, relative three-weight codes generalize

both constant weight codes and relative two-weight codes. As relative two-weight and three-

weight codes are partitioned into two and three constant-weight subcodes, respectively, we

use the term, relative constant-weight codes, to include both relative two-weight and three-

weight codes.

Finite projective geometry has been extensively applied to coding theory (see [2, 5, 17],

for example). In this paper, we study relative constant-weight codes making use of finite

projective geometry. Consider C, a k-dimensional linear code over GF (q). Let G be a gener-

ator matrix of C. Without loss of generality, we assume that G does not contain any all-zero

column. (Note that this assumption does not affect the weight of any codeword.) Making

3

use of finite projective geometry, we introduce a number of parameters to characterize C

and G as follows.

Denote by PG(k − 1, q) the (k − 1)-dimensional projective space over GF (q). Then

the columns of G can be viewed as points of PG(k − 1, q). We then define a map m

from PG(k − 1, q) to the set of nonnegative integers as follows (the map is called a value

assignment in [5]):

m : PG(k − 1, q) → Nwhere N = {0, 1, ...}, and for any point p ∈ PG(k − 1, q), m(p) is defined as the number

of occurrence of p as a column in the matrix G. m(p) is called the value or multiplicity of

p (with respect to G) [5]. This map can be extended to any subset W ⊂ PG(k − 1, q) by

defining

m(W ) =∑

p∈W

m(p).

m(W ) is called the value of W .

Let p = (u1, · · · uk) be a vector of GF (q)k or a projective point of PG(k − 1, q). For

any L ⊂ {1, 2 , · · · k}, we denote PL(p) = (v1, · · · vk), where vi = ui if i ∈ L, and vi = 0 if

i /∈ L. For a subset W ⊂ PG(k − 1, q), define PL(W ) = {PL(p) | p ∈ W}. It is easy to see

that if W is a projective subspace of PG(k − 1, q), so is PL(W ).

For a projective subspace V of PG(k − 1, q), and integers l = 1, . . . , k − 1, we define

V l = {p ∈ V | p = (0, ..., 0, pl+1, ..., pk)}

that is, V l is the set of points of V which are all 0 in the first l coordinates. Note that V l

may be an empty set. If V l 6= ∅, then it is a projective subspace of V .

For the purpose of further characterizing subcodes of C, we introduce the following

notations. Let C1 be a k1-dimensional subcode of C, and C2 a k2-dimensional subcode,

satisfying C1 ⊂ C2 ⊂ C. Without loss of generality, we assume that C1 and C2 are generated

by the first k1 and k2 rows of G, respectively. (Otherwise, we can simply choose another

generator matrix satisfying this condition.) Let L1 = {1, ..., k1} and L2 = {k1+1, ..., k2}. For

nonnegative integers ξ, η, and γ, we denote by P ξηγ a projective subspace V of PG(k−1, q),

satisfying dim(PL1(V )) = ξ − 1, dim(PL2

(V k1)) = η − 1 and dim(V k2) = γ − 1. Here, a

projective space of dimension 0 is a set consisting of a single point; and the empty set is

viewed as a projective space of dimension −1. It is easy to see that dim(P ξηγ) = ξ+η+γ−1.

Example 1 Three types of projective subspaces, namely, P 100, P

010, and P 0

01, will be useful

in the investigation of relative three-weight codes. By the above notation and discussion,

it is easy to see that any (single) point p of PG(k − 1, q) satisfying PL1(p) 6= 0 constitutes

4

P 100. Similarly, P 0

10 consists of any point p satisfying PL1(p) = 0 and PL2

(p) 6= 0; and P 001

represents any point p satisfying PL1(p) = 0 and PL2

(p) = 0.

As we will show later in Section 3, the values m(P 100), m(P 0

10), and m(P 001) play a key

role in the characterization and construction of relative three-weight codes.

We are now ready to give some preliminary results. We first recall some results in

[10, 11], i.e., Lemmas 1 and 2, which will be useful in the studies of applications of relative

constant-weight codes. In order to state these results, we require the following definition.

Definition 3 ([10]) Let C1 be k1-dimensional subcode of a k-dimensional linear code C.

Any subcode D of C is called a relative (r, t) subcode (with respect to C1), where r = dimD

and t = dim(D ∩ C1).

The support of a codeword c = (c1, c2, · · · , cn) of C is defined to be {i | 1 ≤ i ≤ n,

ci 6= 0}. For any subcode D of C, the support, χ(D), of D is defined as the union of the

supports of all the codewords in D. The support weight, w(D), of D is defined as the

cardinality of χ(D), that is, w(D) = |χ(D)|. In particular, the Hamming weight w(c) of a

codeword c is exactly the support weight of the 1-dimensional subcode generated by c. The

support weight w(C) of C itself is called the effective length of C.

Lemma 1 ([10]) There is a 1-1 correspondence between the relative (r, t) subcodes and the

(k − r − 1)-dimensional projective subspaces, such that if D corresponds to the projective

subspace Pk−r−1, we have dimPL(Pk−r−1) = k1 − t− 1 and n−w(D) = m(Pk−r−1), where

L = {1, 2, · · · , k1} is the set of the first k1 coordinate positions of the projective points in

PG(k − 1, q).

Lemma 2 ([11]) A code C is a relative two-weight code with respect to its k1-dimensional

subcode C1 if and only if the value assignment m(·) only has two distinct values. More

precisely, for all the points p of PG(k− 1, q) satisfying PL(p) = 0, m(p) are a constant; and

for all the points p satisfying PL(p) 6= 0, m(p) are a constant, where L = {1, 2, ..., k1}.

Lemma 2 will be generalized in Section 3 to fully characterize relative three-weight codes.

To this end, the following result will be useful.

Lemma 3 Let C1 be a k1-dimensional subcode of C, and C2 a k2-dimensional subcode, sat-

isfying C1 ⊂ C2 ⊂ C. There is a one-to-one correspondence between the nonzero codewords

c1 ∈ C1, c2 ∈ (C2\C1) and c ∈ (C\C2) and the subspaces P k1−1(k2−k1)(k−k2)

, P k1(k2−k1−1)(k−k2)

and

P k1(k2−k1)(k−k2−1), respectively. The one-to-one correspondence satisfies that if c1, c2 and c

5

correspond to P k1−1(k2−k1)(k−k2)

, P k1(k2−k1−1)(k−k2)

and P k1(k2−k1)(k−k2−1), respectively, then

m(PG(k − 1, q)) = n,

n− w(c1) = m(P k1−1(k2−k1)(k−k2)

),

n− w(c2) = m(P k1(k2−k1−1)(k−k2)

), and

n− w(c) = m(P k1(k2−k1)(k−k2−1)).

Proof: The first equation is obvious, as every column of G must be a point of PG(k− 1, q),

where m(·) is defined with respect to G. The last three equations in the lemma can be

proved similarly. Let us give a detailed proof for the third equation. Let c2 ∈ (C2\C1).

Then we may write

c2 = (x1, · · · , xk1 , xk1+1, · · · , xk2 , 0, · · · , 0)G,

where G is a generator matrix of C, and the first k1 rows of G generate the subcode C1, and

the next k2−k1 rows of G and the first k1 rows of G together generate the subcode C2. Since

c2 ∈ (C2\C1), there exists some i satisfying k1 + 1 ≤ i ≤ k2 such that xi 6= 0. Consider the

space U of GF (q)k which is orthogonal to the vector (x1, · · · , xk1 , xk1+1, · · · , xk2 , 0, · · · , 0).

Then U , being viewed as a projective subspace of PG(k − 1, q), satisfies dimPL1(U) =

k1 − 1, dimPL2(Uk1) = k2 − k1 − 2 and dim(Uk2) = k − k2 − 1. Therefore, U is ex-

actly P k1(k2−k1−1)(k−k2)

corresponding to the codeword c2. Then, the equation n − w(c2) =

m(P k1(k2−k1−1)(k−k2)

) is obvious. �

3 Three-weight codes and their geometric construction

In this section, we will establish a sufficient and necessary condition for a linear code to

be a relative three-weight code. We then present the geometric construction of relative three-

weight codes, which form a large family of linear codes. Before we conclude the section, we

show that the subcodes of punctured Reed-Muller codes are relative constant-weight codes.

3.1 Characterization of relative three-weight codes

We first present the sufficient and necessary condition for a linear code to be a relative

three-weight code.

Theorem 1 Let C be a linear code of effective length n, with a generator matrix G. Let

C1 and C2 be subcodes of C, generated by the first k1 and k2 rows of G, respectively. Then

C is a relative three-weight code with respect to C1 and C2 if and only if the following is

true: m(P 100) is a constant for all the points P 1

00; m(P 010) is a constant for all the points P 0

10;

and m(P 001) is a constant for all the points P 0

01.

6

Proof: We first prove the sufficient condition. Assume m(·) has same values on the points

P 100, P

010 and P 0

01, respectively. Then all the subspaces P k1−1(k2−k1)(k−k2)

will have the same value

since any P k1−1(k2−k1)(k−k2)

contains the same number of points being from the set of points

P 100, P

010 and P 0

01, respectively. It follows from Lemma 3 that all the nonzero codewords

of C1 have the same weight. Similarly, we know that all the codewords of C2\C1 have the

same weight, and all the codewords of C\C2 have the same weight. Therefore, C is a relative

three-weight code with respect to C1 and C2.

Next, we prove the necessary condition. Assume C is a relative three-weight code. In

order to show that the value assignment m(·) has same values on the points P 100, P

010 and

P 001, respectively, we will prove the following general result:

m(P ξηγ) = a constant, (1)

for any fixed triple (ξ, η, γ).

To show (1) is true, we denote ξ + η + γ = k − i and use the induction on i, for

i = 0, . . . , k − 1.

For i = 0, we have ξ+η+γ = k and P ξηγ = PG(k−1, q), so, m(P ξ

ηγ) = m(PG(k−1, q)) =

n.

For i = 1, we have ξ + η + γ = k − 1 and P ξηγ is equal to one of the three kinds of

subspaces P k1−1(k2−k1)(k−k2)

, P k1(k2−k1−1)(k−k2)

and P k1(k2−k1)(k−k2−1). It follows from Lemma 3

that m(P ξηγ) is a constant.

Now, assume (1) is true for any i satisfying i < i0, i.e., (1) is true for any fixed triple

(ξ, η, γ) satisfying ξ+η+γ > k− i0. We will show that (1) is true for i = i0 in the following.

For any P ξηγ satisfying ξ+η+γ = k−i0, there exists a P

ξ′

η′γ′ satisfying ξ′+η′+γ′ = k−(i0−2)

such that P ξηγ ⊂ P ξ′

η′γ′ . We may distinguish the parameters into the following cases.

(Case 1.) ξ′ = ξ+2. Then η′ = η and γ′ = γ. Sincem(P ξ′

η′γ′) = (q+1)m(P ξ+1ηγ )−qm(P ξ

ηγ),

m(P ξηγ) = q + 1

q m(P ξ+1ηγ ) − 1

qm(P ξ′

η′γ′). Thus, m(P ξηγ) is a constant, by the inductive hy-

pothesis.

(Case 2.) ξ′ = ξ+1, η′ = η+1. Then γ′ = γ. Since m(P ξ′

η′γ′) = qm(P ξ+1ηγ )+m(P ξ

(η+1)γ)−

qm(P ξηγ), m(P ξ

ηγ) = m(P ξ+1ηγ )+ 1

qm(P ξ(η+1)γ ) − 1

qm(P ξ′

η′γ′), which is a constant, by the

inductive hypothesis.

(Case 3.) ξ′ = ξ + 1, γ′ = γ + 1. Then η′ = η. Similar to Case 2, we obtain m(P ξηγ) =

m(P ξ+1ηγ ) +1

qm(P ξη(γ+1)) −

1qm(P ξ′

η′γ′), which is a constant.

(Case 4.) ξ′ = ξ, η′ = η + 2. Then γ′ = γ. Similar to Case 1, we obtain m(P ξηγ) =

q + 1q m(P ξ

(η+1)γ )−1qm(P ξ′

η′γ′), which is a constant.

7

(Case 5.) ξ′ = ξ, η′ = η + 1 and γ′ = γ + 1. Similar to Case 2, we obtain m(P ξηγ) =

m(P ξ(η+1)γ )+

1qm(P ξ

η(γ+1)) −1qm(P ξ′

η′γ′), which is a constant.

(Case 6.) ξ′ = ξ, η′ = η and γ′ = γ + 2. Similar to Case 1, we obtain m(P ξηγ) =

q + 1q m(P ξ

η(γ+1))−1qm(P ξ′

η′γ′), which is a constant.

Therefore, we have proved that (1) is true for i = i0. By mathematical induction, (1) is

true. �

3.2 Geometric construction of relative three-weight codes

From Theorem 1, to construct a relative three-weight code of dimension k over GF (q),

we can construct a generator matrix G for the code as follows: Choose appropriate k-

dimensional column vectors over GF (q) (or equivalently, points of PG(k − 1, q)), and use

them as the columns of G, such that m(P 100), m(P 0

10), and m(P 001) all are constants, respec-

tively. Then, the code C generated by G is a relative three-weight code. Please note that

we can take any order for the columns. Different column orders lead to different relative

three-weight codes, but these codes are equivalent.

More precisely, let k1 and k2 be any positive integers satisfying k1 < k2 ≤ k. Let

L1 = {1, ..., k1} and L2 = {k1 + 1, ..., k2}. By Example 1 in Section 2, P 100 represents

points p of PG(k − 1, q) satisfying PL1(p) 6= 0 (that is, points for which at least one of

the coordinates in the first k1 positions is not 0); P 010 represents any point p satisfying

PL1(p) = 0 and PL2

(p) 6= 0; and P 001 represents any point p satisfying PL1

(p) = 0 and

PL2(p) = 0. By simple calculation, we know that there are exactly

qk − qk−k1

q − 1 points P 100,

qk−k1 − qk−k2

q − 1 points P 010, and

qk−k2 − 1q − 1 points P 0

01.

For any nonnegative integers a1, a2, and a3, assign

m(p) =

a1, p is a point P 100

a2, p is a point P 010

a3, p is a point P 001.

(2)

Next, let G be the matrix consisting of P 100, P

010, and P 0

01 as columns in the following way:

Each of the points P 100 appears in G as columns for a1 times; each of the points P 0

10 appears

in G for a2 times; and each of the points P 001 appears in G for a3 times.

By Theorem 1, the code C generated by G is a relative three-weight code with respect

to C1 (which is generated by the first k1 rows of G) and C2 (which is generated by the first

k2 rows of G).

As an example, in the following we construct a binary 5-dimensional code, which is a

relative three-weight codes with respect to a 2-dimensional subcode C1 and a 4-dimensional

subcode C2.

8

Example 2 We first set

m(p) =

1, p is a point P 100

2, p is a point P 010

4, p is a point P 001.

As k1 = 2 and k2 = 4, we have L1 = {1, 2} and L2 = {3, 4}. Then, it is easy to find all

points P 100, P

010, and P 0

01 in PG(4, 2). By the procedure described above, a generator matrix

G is given as follows.

1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0

0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 1

.

Please note that each of the 24 points P 100 appears in G once; each of the 6 points P 0

10

appears in G twice; and there is only one point P 001 which appears in G for four times.

Now, it is easy to verify that all of the nonzero codewords of C1 have weight 16, and all

of the codewords of C2\C1 have weight 20, whereas the codewords of C\C2 all have weight

22. Thus, the code C generated by G is a relative three-weight code.

It is obvious that from the geometric construction, we can construct an infinite number

of relative three-weight codes over a given finite field. In the following, for any given k, k1,

and k2 satisfying k1 < k2 ≤ k, we compute the code length and the three weights for a

relative three-weight k-dimensional code C constructed through the geometric construction.

As we have seen earlier in this subsection, the subcodes C1 \ {0}, C2 \ C1, and C \ C2 are all

constant codes. We first compute the length of C; and then compute the weights of C1 \{0},

C2 \ C1, and C \ C2, which are denoted as before by w1, w2, and w, respectively.

Since the projective space PG(k − 1, q) containsqk − qk−k1

q − 1 points P 100,

qk−k1 − qk−k2

q − 1

points P 010, and

qk−k2 − 1q − 1 points P 0

01, from the geometric construction, the generator matrix

G has n columns, thus the length of C is n, where n is given by

n =qk − qk−k1

q − 1m(P 1

00) +qk−k1 − qk−k2

q − 1m(P 0

10) +qk−k2 − 1

q − 1m(P 0

01). (3)

From Lemma 3, we have

w(c1) = n−m(P k1−1(k2−k1)(k−k2)

), ∀c1 ∈ C1. (4)

It is easy to verify that the projective subspace P k1−1(k2−k1)(k−k2)

containsqk−1 − qk−k1

q − 1

points P 100,

qk−k1 − qk−k2

q − 1 points P 010, and

qk−k2 − 1q − 1 points P 0

01. Thus,

9

m(P k1−1(k2−k1)(k−k2)

) =qk−1 − qk−k1

q − 1m(P 1

00) +qk−k1 − qk−k2

q − 1m(P 0

10) +qk−k2 − 1

q − 1m(P 0

01).

By this equation and (4), one gets

w1 = w(c1) = qk−1m(P 100), ∀c1 ∈ C1. (5)

By similar procedures, we have

w2 = (qk−1 − qk−k1−1)m(P 100) + qk−k1−1m(P 0

10), (6)

and

w = (qk−1 − qk−k1−1)m(P 100) + (qk−k1−1 − qk−k2−1)m(P 0

10) + qk−k2−1m(P 001). (7)

From the geometric construction and the code parameters (length, dimension, and

weights) given above, by varying the values of k, k1, k2, m(P 100), m(P 0

10), and m(P 001),

we obtain an infinite number of relative three-weight codes.

3.3 Subcodes of punctured Reed-Muller codes

Reed-Muller (RM) codes are a well-known family of linear codes, which are applied in

many areas [14, 16]. In this subsection, we will show that subcodes of punctured RM codes

are special instances of the relative constant-weight codes. For simplicity, in the following

we take binary RM codes as examples; the results can be straightforwardly extended to

q-ary RM codes.

Let n = 2k. The vector space GF (2)k has n points. For any given ordering of these

points, denote GF (2)k = {P1, · · · , Pn}. The binary Reed-Muller code RM(r, k) of order r

in k variables is defined as

RM(r, k) = { (f(P1), . . . , f(Pn)) | f ∈ GF (q)[X1, . . . ,Xk], deg(f) ≤ r }

where GF (2)[X1, . . . ,Xk] is the set of polynomials over GF (2) in variables X1, ...,Xk.

Consider the first order Reed-Muller codes RM(1, k). As the set of polynomials of

degree at most 1 forms a linear space and has a basis 1,X1, . . . ,Xk, the code RM(1, k) is

a (k + 1)-dimensional linear code and has the following generator matrix

1 1 . . . 1

X1(P1) X1(P2) . . . X1(Pn)...

......

...

Xk(P1) Xk(P2) . . . Xk(Pn)

.

10

Assuming the first point of GF (2)k is the zero point, that is P1 = (0, 0, . . . , 0), then for

all i = 1, . . . , k, Xi(P1) = 0. Denote by RM(1, k)∗ the punctured RM codes obtained by

deleting the first coordinator for all codewords. Consider the k-dimensional subcode C of

RM(1, k)∗ generated by the following matrix

G =

X1(P2) X1(P3) . . . X1(Pn)

X2(P2) X2(P3) . . . X2(Pn)...

......

...

Xk(P2) Xk(P3) . . . Xk(Pn)

. (8)

Note that points P2, . . . , Pn constitute the (k − 1)-dimensional binary projective space

PG(k − 1, 2). Viewing these points as column vectors, the first column of G is exactly

P2, the second column is P3, ..., and the last column is Pn.

Now, for any k1 and k2 with 0 < k1 < k2 ≤ k, there are 2k − 2k−k1 points P 100,

2k−k1 − 2k−k2 points P 010, and 2k−k2 − 1 points P 0

01. In total, the number of all points

of these three types is 2k − 1 = n − 1. By the geometric construction presented in the

previous subsection, the above matrix G is exactly the same as the matrix by setting

m(p) =

1, p is a point P 100

1, p is a point P 010

1, p is a point P 001

and letting each of the points, P 100, P

010 and P 0

01, appear as a column of the matrix exactly

once. By Theorem 1, the code generated by G, namely, the subcode of the punctured RM

code RM(1, k)∗, is a relative three-weight code.

In this case, as m(P 100) = m(P 0

10) = m(P 001) = 1, by Equations (5), (6) and (7), we have

w1 = w2 = w = 2k−1. Thus, this code is a constant weight code, a special instance of

relative three-weight codes. Actually, by the construction of the generator matrix G, this

code is the dual code of a Hamming code, which is called simplex code in the literature, a

well-known constant weight code [16].

Next, consider the punctured RM code which is generated by the sub-matrix of G

consisting of the columns which are points of type P 010 or P 0

01 (that is, all the columns of G

which are points of type P 100 are deleted). Then, this punctured RM code is a code satisfying

m(p) =

1, p is a point P 100

0, p is a point P 010

1, p is a point P 001.

It is a relative three-weight code by Theorem 1.

11

Note that the above examples both satisfy that the multiplicity values m(p) ≤ 1 for all

points P 100, P

010 and P 0

01 (a very special case of Eq. (2)). This is actually not necessary for

subcodes of punctured RM codes to be relative constant-weight codes.

Consider the points of the binary projective space PG(k−1, 2), which are not all-zero in

the first k−1 coordinates. The number of such points that are equal to each other in the first

k−1 coordinates is 2. Similarly, for those that are not all-zero in the first k−2 coordinates,

the number of such points which are equal to each other in the first k − 2 coordinates is 4.

Therefore, if we delete the last row of G and then delete the all-zero column, the obtained

sub-matrix of G generates a relative constant-weight code satisfying m(p) ≤ 2 for all points

P 100, P

010 and P 0

01. If we delete the last two rows of G and then delete the all-zero columns,

the obtained sub-matrix generates a relative constant-weight code satisfying m(p) ≤ 4. This

way, we obtain more relative three-weight codes from punctured RM codes, which allow for

general multiplicity values.

Summarizing the above results we have the following proposition.

Proposition 1 There exists a large family of codes, consisting of dual Hamming codes

(that is, simplex codes) and subcodes of punctured Reed-Muller codes, which are special

instances of relative constant-weight codes.

4 Applications to wire-tap channel of type II

In this section, we study the applications of relative constant-weight codes to wire-tap

channel of type II. For simplicity of the presentation of the main idea and results, we will

focus on relative two-weight codes. The results can be generalized to relative three-weight

codes.

Let J be a subset of I = {1, . . . , n}. Define CJ := {(c1, . . . , cn) ∈ C | ct = 0 for t /∈ J}. By

definition CJ is a subcode of C. Subcodes CJ play an important role in the noiseless wire-tap

channel of type II with the coset coding. When C⊥ is used in the coset coding scheme, it is

shown that dim(CJ) is exactly the number of data symbols that the adversary can obtain

whenever he taps the transmission positions that J represents [8, 13]. With regard to this

number, we have the following lower bound for an arbitrary linear code C.

Proposition 2 Suppose D is a subcode of C. Then,

dim(Cχ(D)) ≥ dim(D) (9)

where χ(D) is the support of D.

The proof of the proposition is straightforward. By definition of support (see Section

2), it is easy to verify that Cχ(D) ⊇ D. This implies the lower bound.

12

Theorem 2 Suppose C is relative two-weight code with respect to C1. Then, for any

subcode D,

Cχ(D) = D.

Proof: It suffices to prove Cχ(D) ⊆ D, by Proposition 2 and Cχ(D) ⊇ D (as showed

above). Since any subcode of C is a relative subcode with respect to C1 by Definition

3, we may assume D is an (r, t) relative subcode and Cχ(D) an (r′, t′) relative subcode. Since

dim(Cχ(D)) − dim(D) ≥ dim(Cχ(D) ∩ C1) − dim(D ∩ C1), r′ − t′ ≥ r − t, or equivalently,

r′ − r ≥ t′ − t. It follows by Lemma 2 that m(Pk−r′−1) < m(Pk−r−1) if t′ − t > 0 or if

r′− r > 0 and t′ = t, where Pk−r−1 and Pk−r′−1 are the projective subspaces corresponding

to D and Cχ(D) by Lemma 1, respectively. So, w(D) = n−m(Pk−r−1) < n−m(Pk−r′−1) =

w(Cχ(D)) = w(D) by Lemma 1 again, which is a contradiction. Therefore, r′ = r and t′ = t,

i.e., Cχ(D) = D. �

From the theorem, for a relative two-weight code C, we have dim(Cχ(D)) = dim(D) for

any subcode D. This shows that when the dual code of a relative two-weight code is applied

to the noiseless wire-tap channel of type II, if the adversary taps a number of positions that

constitute the support of a subcode, then the number of data symbols that the adversary

can obtain is equal to the minimal value (the lower bound). Therefore, relative two-weight

codes are optimal codes in such an application.

5 Minimal codewords and applications to secret sharing

Another important application of relative constant-weight codes is to secret sharing

schemes. We first briefly introduce the basic concepts of secret sharing schemes based on

linear codes, which will be required in this section. For more details on secret sharing,

please see [4, 15, 18].

Let G = (g0, g1, · · · , gn−1) be a generator matrix (without any all-zero column) of an

[n, k] linear code C, where g0, g1, ..., gn−1 are the columns of G and none of them is the

all-zero vector. In the secret sharing scheme based on C, a secret is an element of GF (q).

Thus, GF (q) is called the secret space. The scheme can accommodate n − 1 participants,

say, P1, P2, · · · , Pn−1, and a dealer. The dealer is a trusted party.

In order to compute the shares with respect to a secret s, the dealer chooses randomly

a vector u = (u0, · · · , uk−1) ∈ GF (q)k such that s = ug0. There are altogether qk−1 such

vectors u ∈ GF (q)k. The dealer then treats u as an information vector and computes the

corresponding codeword

t = (t0, t1, · · · , tn−1) = uG

and gives ti to participant Pi as the share for each i ≥ 1.

13

Since t0 = ug0 = s, a set of shares {ti1 , ti2 , · · · , tim}, 1 ≤ ti1 < · · · < im ≤ n − 1 and

1 ≤ m ≤ n − 1, determines the secret if and only if g0 is a linear combination of gi1 , · · · ,

gim .

Massey [15] has discovered the following fact: In the secret sharing scheme based on C,

a set of shares {ti1 , ti2 , · · · , tim}, 1 ≤ i1 < · · · < im ≤ n− 1 and 1 ≤ m ≤ n− 1, determines

the secret if and only if there is a codeword

(1, 0, · · · , 0, ci1 , 0, · · · , 0, cim , 0, · · · , 0) (10)

in the dual code C⊥, where cij 6= 0 for at least one j.

If there is a codeword of (10) in C⊥, then the vecor g0 is a linear combination of gi1 , · · · ,

gim , that is, g0 =∑m

j=1 xjgij for certain coefficients x1, ..., xm ∈ GF (q). Then the secret s

is recovered by computing s =∑m

j=1 xjtij .

If a group of participants can recover the secret by combining their shares, then any

group of participants containing this group can also recover the secret. A group of partici-

pants is referred to as a minimal access set , if they can recover the secret with their shares,

while any of its proper subgroups cannot do so. Here, a proper subgroup has fewer members

than this group. For a secret sharing scheme, an important problem is to determine the set

of all minimal access sets.

Definition 4 Given a linear code, a codeword c′ covers a codeword c, if the support of c′

contains that of c. If a nonzero codeword c covers only its scalar multiples, but no other

nonzero codewords, then c is called a minimal codeword.

From the preceding discussions, it is clear that there is a one-to-one correspondence

between the set of minimal access sets and the set of minimal codewords of the dual code

C⊥ whose first coordinate is 1. To determine set of minimal access sets of the secret sharing

scheme, it is sufficient to determine the set of minimal codewords of C⊥ whose first coordi-

nate is 1, i.e., a subset of the set of all minimal codewords. In the literature, the problem

of determining the set of minimal codewords is called the covering problem. Unfortunately,

it is well known that the covering problem is a hard problem for an arbitrary linear code

(see [15, 1] for example).

Attempting to characterize minimal codewords for some special families of linear codes,

a useful sufficient condition has been given in [1]. Denote by ωmin and ωmax the minimum

nonzero weight and maximum weight of a linear code C over GF (q), respectively. Then, as

it has been proved in [1], all nonzero codewords of C are minimal codewords, provided that

ωmin

ωmax>

q − 1

q. (11)

We are now ready to present our results on relative constant-weight codes. In the

14

following theorems, all the minimal codewords of a relative two-weight code or a relative

three-weight code are determined.

Theorem 3 Assume C(w1, w) is a relative two-weight code with respect to C1. Then, all

the nonzero codewords of C are minimal ones except the following case: dim C1 = 1, and

C1 and C have the same effective length. In this case, all the codewords of C\C1 are minimal

codewords.

Proof: We prove the theorem by distinguishing the following cases.

(Case 1.) w1 = w.

In this case, C is a linear constant weight code and ωmin = ωmax. Thus, the theorem

holds by (11).

(Case 2.) w1 < w.

Since w1 < w, any codeword c′ ∈ C1 can not cover any codeword of C\C1. Furthermore,

c′ can not cover any other codeword of C1 since C1 is a linear constant weight subcode. It

follows that any codeword of C1 is a minimal one.

Next, we show that all the codewords of C\C1 are minimal ones. Let c = (c1, · · · , cn)

be a codeword of C\C1, and let c covers another codeword c′ ∈ C1, where c′ = (c′1, · · · , c′n).

Without loss of generality, assume that both c1 and c′1 are nonzero coordinates and that

c1 = θc′1. Then x = c − θc′ is a codeword whose weight is less than that of c. So, we get

x ∈ C1, which implies c = θc′ + x ∈ C1, a contradiction to the fact that c ∈ (C\C1). So, any

codeword c ∈ (C\C1) can not cover any nonzero codeword of C1.

On the other hand, if c ∈ (C\C1) covers another codeword c′ ∈ (C\C1), then since c and

c′ have the same weight w, it follows that c and c′ have the same support positions. So,

there exists nonzero θ such that the weight of the codeword x = c − θc′ is less than that

of c. It follows that x ∈ C1. If x is not the zero codeword, then c covers x ∈ C1, which is

a contradiction to the result stated in the above paragraph. Thus, x is the zero codeword

and c = θc′.

The above facts show that all the codewords of C\C1 are minimal.

(Case 3.) w1 > w.

Similarly as in Case 2, we get all the codewords of C\C1 are minimal ones.

It is necessary to show that the codewords of C1 are the minimal ones. Assume that c

is any codeword of C1, and c covers c′ ∈ C\C1, and that the effective length of C1 is n1. If

dim C1 > 1, then w(c) < n1. Without loss of generality, let the first coordinate of c be zero

and write c as

c = (x1, ...xk1 , 0, ..., 0)G,

where G is a generator matrix of C whose columns determine a value assignment. Represent

15

the first column of G by p1, and define a set

S = {p | p is a column of G, and PL1(p) = PL1

(p1)}.

Then (x1, ...xk1 , 0, ..., 0) is orthogonal to all the elements of S. Write c′ as

c′ = (y1, ...yk1 , yk1+1..., yk)G. (12)

If c covers c′, then (y1, ...yk1 , yk1+1..., yk) is also orthogonal to the elements of S, in particular,

(y1, ...yk1 , yk1+1..., yk) is orthogonal to the element p0 = PL1(p1) ∈ S, i.e., (y1, ...yk1 , 0, ....0)

is orthogonal to all the elements of S. It follows that (0, ...0, yk1+1, ..., yk) is orthogonal to

all the elements of S. So, we get yk1+1 = yk1+2 = · · · = yk = 0 since rank(S∗) = k − k1 by

Lemma 2, where

S∗ = {p | p = PL1(p), p ∈ S},

and L1 = {k1 + 1, k1 + 2, ...k}.

It follows that c′ ∈ C1, a contradiction to the fact c′ ∈ (C\C1). This shows that any

codeword c ∈ C1 doesn’t cover any codeword c′ ∈ (C\C1) if dimC1 > 1.

If dim C1 = 1 and w(c) = n1 for c ∈ C1, and n1 < n (n is the effective length of C), then

using Lemma 2, one get that the rank of the set

S2 = {p | p = PL1(p1), p1 ∈ S1}

is equal to k − k1 = k − 1, where

S1 = {p | p is a column of G,PL1(p) = 0}.

Note that the codeword c has zero in the coordinate positions S1 represents, whereas

any nonzero codeword c′ ∈ (C\C1) has nonzero in at least one of the coordinate positions

S1 represents according to (12) and the fact rank(S2) = k − k1. It follows that c doesn’t

cover any codeword c′ ∈ (C\C1) when dim C1 = 1 and w(c) = n1 < n.

So, any nonzero codeword of a relative two-weight code is a minimal one except the case

that k1 = 1 and the weight of the codewords of C1 being equal to the effective length of C,

in which the codewords of C\C1 are all the minimal ones. �

Remark 2 Theorem 3 generalizes the results of [11], where the minimal codewords have

been determined for relative two-weight codes in a special case where the condition (11) is

satisfied.

Theorem 4 Assume C(w1, w2, w) is a relative three-weight code with respect to C1 and

C2. Then, all the nonzero codewords of C are minimal codewords except the following two

cases:

(1) dimC1 = 1, and C1 and C2 have the same effective length.

16

(2) dimC1 = 1, and C1 and C have the same effective length.

In these two cases, all the codewords of C\C1 are minimal codewords.

Proof: We prove the theorem by generalizing the method used in the proof of Theorem 3.

Also, the proof is split into several cases.

(Case 1.) w1 = w2 or w2 = w. Then C(w1, w2, w) is a relative two-weight code. So, all

the minimal codewords of C can be determined using Theorem 3.

(Case 2.) w1 = w > w2.

We first show that any codeword c ∈ C\C2 is a minimal one. If c covers a codeword

c′ ∈ C1, then c and c′ have the same support positions since w(c) = w(c′) = w. So, there

exists a a ∈ GF (q) such that the codeword u = c−ac′ has zero coordinate in at least one of

the support positions of c, i.e., w(u) < w = w1. If u = 0, then c = ac′ ∈ C1, a contradiction

to c ∈ C\C2. It follows that w(u) = w2. So, u ∈ C2\C1. It follows c = ac′ + u ∈ C2, again a

contradiction to c ∈ C\C2. So, c doesn’t cover any codeword c′ ∈ C1.

We further show that c ∈ C\C2 doesn’t cover any codeword c′ ∈ C2\C1. Otherwise, we

similarly find a a ∈ GF (q) such that u = c − ac′ 6= 0 and w(u) = w2 < w(c) = w = w1. It

follows that u ∈ C2\C1. So, c = u+ ac′ ∈ C2, a contradiction to c ∈ C\C2.

We last show that c ∈ C\C2 doesn’t cover any other codeword c′ ∈ C\C2 unless c′ = ac

for some a ∈ GF (q). If c covers c′, then c and c′ have the same support positions since

w(c) = w(c′) = w. So, we similarly find a a ∈ GF (q) such that u = c′ − ac and w(u) <

w = w1. If u 6= 0, then w(u) = w2 and u ∈ C2\C1. It follows that c covers the codeword

u, a contradiction to the fact that c doesn’t cover any codeword of C2\C1. So, u = 0, i.e.,

c′ = ac.

From the above text, we get all the codewords of C\C2 are minimal ones.

Next, we show that all the codewords of C2\C1 are minimal ones. Assume c ∈ (C2\C1).

It is clear that c doesn’t cover the codeword c′ ∈ (C\C2) or c′′ ∈ C1 since w(c) = w2 <

w(c′) = w(c′′) = w = w1. If c covers another codeword c′ ∈ (C2\C1), then we similarly find

u = c′ − ac such that w(u) < w(c) = w2 since w(c) = w(c′) = w2. So, u = 0, i.e., c′ = ac

for some a ∈ GF (q).

Last, we show that all the codewords of the linear constant weight subcode C1 are

minimal ones. Assume c ∈ C1. Then c doesn’t cover c′ ∈ (C\C2). Otherwise, c′ also covers c

since w(c) = w(c′). It is necessary to show that c doesn’t cover any codeword c′ ∈ (C2\C1).

Assume the effective length of C1 is n1. If dim C1 > 1, then w(c) < n1. Without loss of

generality, let the first coordinate of c be zero and write c as

c = (x1, ...xk1 , 0, ..., 0)G,

where G is the generator matrix of C whose columns determine a value assignment. Repre-

17

sent the first column of G by p1, and define a set

S = {p | p is a column of G, and PL1(p) = PL1

(p1)}.

Then (x1, ...xk1 , 0, ..., 0) is orthogonal to all the elements of S. Write c′ ∈ (C2\C1) as

c′ = (y1, ...yk1 , yk1+1..., yk2 , 0, ..., 0)G.

If c covers c′, then (y1, ...yk1 , yk1+1..., yk2 , 0, ..., 0) is orthogonal to the element of S, in par-

ticular, (y1, ...yk1 , yk1+1..., yk2 , 0, ..., 0) is orthogonal to the element p0 = PL1(p1) ∈ S, i.e.,

(y1, ...yk1 , 0, ....0) is orthogonal to all the elements of S. It follows that (0, ...0, yk1+1, ..., yk2 , 0, ..., 0)

is orthogonal to all the elements of S∗, where

S∗ = {p | p = PL2(p), p ∈ S},

and L1 and L2 are defined as before. Since rank(S∗) = k2 − k1 according to Theorem 1,

we get yk1+1 = yk1+2 = · · · = yk2 = 0. It follows that c′ ∈ C1, a contradiction to the fact

c′ ∈ (C2\C1). This shows that any codeword c ∈ C1 doesn’t cover any codeword c′ ∈ (C2\C1)

if dim C1 > 1.

On the other hand, If dimC1 = 1 and w(c) = n1 < n2 (n2 is the effective length of C2),

then using Theorem 1 and similarly to the proof of (Case 3.) of Theorem 3, we get that

c ∈ C1 doesn’t cover any codeword c′ ∈ (C2\C1).

It follows that all the codewords are the minimal ones except that dim C1 = 1 and

w(c) = n1 = n2 for c ∈ C1, in which all the codewords in C\C1 are the minimal ones.

Using the techniques in the proof of (Case 2.), we may similarly show the results in

(Case 3.)-(Case 9), and we only list these results:

(Case 3.) w1 = w < w2. Then all the codewords of C are minimal ones.

(Case 4.) w1 < w2 < w. Then all the codewords of C are minimal ones.

(Case 5.) w1 < w < w2. Then all the codewords of C are minimal ones.

(Case 6.) w2 < w1 < w. Then all the codewords of C are minimal ones except the case

dim C1 = 1 and C1 and C2 have the same effective length. In such a case, all the codewords

of C\C1 are the minimal ones.

(Case 7.) w2 < w < w1. Then all the codewords of C are minimal ones except the case

dim C1 = 1 and C1 and C2 have the same effective length or the case dim C1 = 1 and C1 and

C have the same effective length. In these cases, all the codewords of C\C1 are the minimal

ones.

(Case 8.) w < w1 < w2. Then all the codewords of C are minimal ones except the case

dim C1 = 1 and C1 and C have the same effective length. In such a case, all the codewords

of C\C1 are the minimal ones.

(Case 9.) w < w2 < w1. The result is the same as in (Case 7.). �

18

6 Comparison and further discussions

In this section, we will compare relative constant-weight codes with the existing families

of codes for which minimal codewords can be determined [1, 6, 7, 9, 18], and with well-known

three-weight codes [4, 19].

In [9], certain binary cyclic codes for which all nonzero codewords are minimal have

been studied. It is easy to see that the relative constant-weight codes are in general not

cyclic. Therefore, relative constant-weight codes are not a sub-family of the known codes

in [9]. See the following example.

Example 3 Consider the code generated by

1 1 1 1 1 1 1 1 0 0 0 0

0 0 0 0 1 1 1 1 1 1 1 1

0 0 1 1 0 0 1 1 0 0 1 1

0 1 0 1 0 1 0 1 0 1 0 1

.

It is a relative two-weight code with respect to the 2-dimensional subcode generated by

the first two rows of the matrix. It is obvious that the code is not cyclic. For instance,

for the first row of the generator (which is a codeword), shifting the last bit to the first

position, we get (011111111000) which is not a codeword of this code.

According to Theorems 3 and 4, not all relative two-weight and three-weight codes have

their nonzero codewords as minimal codewords. See the following example.

Example 4 Consider the ternary code generated by

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 0

0 0 0 1 1 1 2 2 2 0 0 0 1 1 1 2 2 2 0 0 0 1 1 1 2 2 2 0

0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 1

.

The code is a relative three-weight code with respect to the subcode generated by the

first row of the matrix and the subcode generated by the first three rows of the matrix.

According to Theorem 4, only part of nonzero codewords of this code are minimal, that is,

all the nonzero codewords except those generated by the first row of the matrix are minimal.

On the other hand, it is well known that all the nonzero codewords are minimal for

intersecting binary codes [1, 6, 7]. Example 4 gives a relative three-weight code which

is nonbinary and does not satisfying the necessary condition of intersecting binary codes.

Although the code of Example 4 would be an intersecting code, if we extend the definition

of intersecting codes to nonbinary cases, it is certainly not a code defined and studied in

[1, 6, 7].

19

All of the codes studied in [9] and [18] satisfy the condition (11). On the other hand, a

relative constant-weight code does not necessarily satisfy (11).

Example 5 Consider a 4-dimensional relative three-weight ternary code C with respect to

a 2-dimensional subcode C1 and a 3-dimensional subcode C2 ⊃ C1. The value assignment of

the code is given as follows.

m(p) =

1, p is a point P 100

0, p is a point P 010

12, p is a point P 001.

It is easy to verify that the nonzero codewords of C1 have weight 27, the codewords of

C2\C1 have weight 24, and the codewords of C\C2 have weight 36. All the nonzero codewords

are minimal according to Theorem 4. However, for this code,

ωmin

ωmax=

24

36=

2

3=

q − 1

q,

Thus, C does not satisfy (11).

The codes studied in [18] may not be two-weight or three-weight codes (see the sec-

ond and third classes of codes in [18]). Even if the codes constructed in [18] are three-

weight codes (that is, they only have three distinct weights) for some low-dimensional

cases, they may not be relative three-weight codes. In the following example, the code C is

a 3-dimensional ternary linear code obtained by using the construction in [18].

Example 6 The generator matrix of the dual code C⊥ has been given in [18], and we can

write the generator matrix of C as follows.

2 1 2 1 1 0 0 2 1 0 0 0

0 0 2 2 1 1 2 0 0 1 1 0

2 1 1 1 2 2 0 1 0 1 0 1

.

C is indeed a three-weight code with weights 7, 9 and 10. However, C does not satisfy

Definition 2 no matter how we set up the parameters w1, w2 and w in Definition 2. Thus,

it is not a relative three-weight code.

In the following we compare relative three-weight codes with the well-known three-weight

codes in [4, 19].

Remark 3 It is easy to see that our relative three-weight codes are new codes which are

not covered by the classes of codes in [19, 4]. In [19] a class of three-weight cyclic codes over

GF (p), where p is an odd prime, are studied. On the other hand, our relative three-weight

codes are constructed over an arbitrary finite filed (including the binary field). The three-

weight codes in [19] are all cyclic codes; while the relative three-weight codes are general

linear codes.

20

Let us now compare the code parameters. The codes in [19] are either [pk2 − 1, k, p

k2 −

pk2−1 − p− 1

2 p(k/2+e−2)/2] codes or [pk2 − 1, k, p

k2 − p

k2−1 − (p− 1)p(k/2+e−2)/2] codes, where

the dimension k is an even number and e is a positive integer which divides k/2. Thus,

the dimension k of the codes in [19] has to be an even number, and the length is only

dependent on the dimension k and the parameter e (which is a divisor of k/2). On the

other hand, the dimension of relative three-weight codes can be any integer. Therefore,

the relative three-weight codes with odd dimension are certainly different from the codes in

[19]. Furthermore, the length of relative three-weight codes is dependent on not only k, but

also m(P 100), m(P 0

10), m(P 001), the dimension of the subcode C1, and the dimension of the

subcode C2 (which are all variables). Thus, for a given dimension k, the family of relative

three-weight codes may contain much more codes than the class of codes in [19].

The three-weight codes in [4] are [q2t − 1, 3t] codes. It is clear that when q is even (for

example, q = 2), the code length has to be odd. By (3) the length of relative three-weight

codes is given by

n = (2k − 2k−k1)m(P 100) + (2k−k1 − 2k−k2)m(P 0

10) + (2k−k2 − 1)m(P 001)

which can be any integer. For instance, setting m(P 001) = 2, the length is even. These

relative three-weight codes of even length are obviously different from the codes in [4].

Similarly, when q is odd, the length of the codes in [4] must be even number; but the length

of relative three-weight codes can be any integer (including odd number). According to the

the result on the weight distribution of the three-weight codes (please see Theorem 25 of

[4]), the three non-zero weights are distinct. On the other hand, the relative three-weight

codes contain two-weight codes (for example, those in [11]) as special instances.

7 Conclusion

We have investigated relative constant-weight codes, namely, relative two-weight and

three-weight codes. A geometric approach has been established to characterize relative

constant-weight codes, making use of the finite projective geometric. A sufficient and nec-

essary condition for linear codes to be relative three-weight codes has been derived, using the

geometric approach. A family of infinite number of relative constant-weight codes are con-

structed. It is showed that the relative constant-weight codes include the well-known dual

Hamming codes as well as subcodes of punctured Reed-Muller codes as special instances.

Furthermore, the minimal codewords of relative two-weight and three-weight codes were

completely determined. Applications of relative constant-weight codes to wire-tap channel

of type II and secret sharing have been discussed. A comparative study shows that the

21

relative two-weight and three-weight codes are a new family of codes; they are not covered

by previously well-known linear codes for which minimal codewords can be determined or

existing three-weight codes.

References

[1] Ashikhmin A., Barg A.: Minimal vectors in linear codes. IEEE Trans. Inform. Theory

44(5), 2010-2017 (1998).

[2] Bouyukliev I. G.: Classification of Griesmer codes and dual transform. Discr. Math.

309(12), 4049-4068 (2009).

[3] Calderbank A.R., Goethals J.M.: Three-weight codes and association schemes, Philips

J. Res. 39, 143152 (1984).

[4] Carlet C., Ding C., Yuan J.: Linear codes from perfect nonlinear mappings and their

secret sharing schemes. IEEE Tran. Inform. Theory 51(6), 2089-2102 (2005).

[5] Chen W. D., Kløve T.: The weight hierarchies of q-ary codes of dimension 4. IEEE

Trans. Inform. Theory 42(6), 2265-2272 (1996).

[6] Cohen G. D., Lempel A.: Linear intersecting codes. Discr. Math. 56(1), 35-43 (1984).

[7] Encheva S. B., Cohen G. D.: Constructions of intersecting codes. IEEE Trans. Inform.

Theory 45(4), 1234-1237 (1999).

[8] Forney G. D.: Dimension/length profiles and trellis complexity of linear block codes.

IEEE Trans. Inform. Theory 40(6), 1741-1752 (1994).

[9] Li Z. H., Xue T., Lai H.: Secret sharing schemes from binary linear codes. Inform. Sci.

180(22), 4412-4419 (2010).

[10] Liu Z. H., Chen W. D.: Notes on the value function. Designs, Codes and Cryptography

54(1), 11-19 (2010).

[11] Liu Z. H., Zeng X. Y.: On a kind of two-weight code. European Journal of Combina-

torics 33(6), 1265-1272 (2012).

[12] Liu Z. H., Wu X.-W.: On a class of three-weight codes with cryptographic applications.

In: IEEE International Symposium on Information Theory 2012 (ISIT 2012), 2561-2565

(2012).

22

[13] Luo Y., Mitrpant C., Han Vinck A. J., Chen K. F.: Some new characters on the

wire-tap channel of type II. IEEE Trans. Inform. Theory 51(3), 1222-1229 (2005).

[14] MacWilliams F.J., Sloane N.J.A.: The Theory of Error-Correcting Codes, North-

Holland, 1977.

[15] Massey J. L.: Minimal codewords and secret sharing. In: The 6th Joint Swedish-

Russian Workshop on Information Theory, Molle, Sweden, 276-279 (1993).

[16] Pellikaan R, Wu X.-W., Bulygin S., and Jurrius R.: Error-correcting codes and cryp-

tology, to be published by Cambridge University Press, Cambridge, UK.

[17] Tsfasman M.A., Vladuts S.: Geometric approach to higher weights. IEEE Trans. In-

form. Theory 41(6), 1564-1588 (1995).

[18] Yuan J., Ding C.: Secret sharing schemes from three classes of linear codes. IEEE

Trans. Inform. Theory 52(1), 206-212 (2006).

[19] Zhou Z. C., Ding C.: A class of three-weight cyclic codes. arXiv: 1302.0569vl [cs.IT],

(Feb 2013).

23