THE GEOMETRIC STRUCTURE OF RELATIVE ONE-WEIGHT CODES

. The geometric structure of any relative one-weight code is determined, and by using this geometric structure, the support weight distribution of subcodes of any relative one-weight code is presented. An application of relative one-weight codes to the wire-tap channel of type II with multiple users is given, and certain kinds of relative one-weight codes all of whose nonzero codewords are minimal are determined.


Introduction
A relative one-weight code was first introduced in [3] in order to study the relative generalized Hamming weight [6]. Let C be a linear q-ary code, and C 1 be a linear subcode of C. If all the codewords in C\C 1 have the same weight, where C\C 1 = {c : c ∈ C and c / ∈ C 1 }, then call C a relative one-weight code with respect to the subcode C 1 .
It is obvious that if C 1 = {0}, then a relative one-weight code C becomes a linear constant-weight code. Thus, a relative one-weight code is a generalization of a constant-weight code.
The other two special classes of relative one-weight codes are two-weight codes and three-weight codes introduced in [4] and [5], and these two classes of codes are useful in the wire-tap channel of type II with multiple users [6] and secret sharing scheme based on a linear code [10]. A code C is called two-weight with respect to a subcode C 1 if both C 1 \{0} and C\C 1 are constant-weight codes, respectively, and C is called three-weight with respect to two subcodes C 1 ⊂ C 2 if C 1 \{0} and C 2 \C 1 and C\C 2 are constant-weight codes, respectively.
Recently, Wood [9] has generalized relative one-weight codes over the finite field GF (q) to that over finite Frobenius rings by using the homogeneous weight over rings. Based on a property of the homogeneous weight over rings, Wood also gave a sufficient condition for a code to be relative one-weight.
Motivated by the result in [9], we first give in this paper a necessary and sufficient condition for a q-ary code to be relative one-weight. Such a necessary and sufficient condition is also called the geometric structure of a relative one-weight code. Any relative one-weight code can be constructed by using this geometric structure, and vice versa. We will also see that the geometric structure of a relative one-weight code is a generalization of that of a relative two-weight and three-weight code described in [5]. In addition, we will address the support weight distribution of subcodes of a relative one-weight code and give applications to the wire-tap channel of type II with multiple users and to secret sharing scheme.

Preliminaries
For any subcode D of C, the support χ(D) of D is defined as the set of positions where not all the codewords of D have zero coordinates. Particularly, the support of any nonzero codeword is the set of its nonzero coordinate positions.
For any subcode D of C, w(D) := |χ(D)| is called the support weight or effective length of D. In particular, w(C) is the effective length of C, and w(c) is exactly the Hamming weight of a codeword c ∈ C.
Let C always be a k-dimensional linear code with effective length n and let C 1 be a k 1 -dimensional subcode of C throughout this paper unless otherwise stated.
The value assignment (also called the value function) introduced in [2] is our key tool to study relative one-weight codes.

Definition 2.
A value assignment is a correspondence m(·) : P G(k − 1, q) → N, where N represents the set of nonnegative integers and P G(k − 1, q) represents a (k − 1)-dimensional projective space over the finite field GF (q). For any point p ∈ P G(k − 1, q), call m(p) the value of p.
Define the value of S ⊂ P G(k − 1, q) by m(S) = p∈S m(p). Consider the columns of G, a generator matrix of a k-dimensional q-ary linear code C, as projective points in P G(k − 1, q). For a point p ∈ P G(k − 1, q), let m(p) be the number of the times the point p occurs in the columns of G. We thus obtain a value assignment m(·) : P G(k − 1, q) → N such that m(·) ≥ 0. Obviously, such a value assignment defines a generator matrix and a code (up to equivalence).
For each subset L ⊂ {1, 2 , · · · k} and p = ( Obviously, if S is a projective subspace, so is P L (S) (except the zero vector if any).
stands for a point whose first k 1 coordinate positions are all 0, and all such points constitute the relative projective subspace P −1 k−k1−1 . Throughout this paper, let C be an [n, k] code with a fixed k 1 -dimensional subcode C 1 , and assume G is a fixed generator matrix of C with the first k 1 rows generating the subcode C 1 , and m(·) is determined by G. Then, for any relative (r, r 1 ) subcode D, a generator matrix G D of D, with the first r 1 rows generating D ∩ C 1 , can be written as G D = Y G, where Y is an r × k matrix. Denote Y ⊥ the set of all vectors v ∈ GF (q) k perpendicular to each row of Y . Then, it can be checked (see [3] for the details) that Y ⊥ , as a projective subspace, is a relative (k − r − 1, k 1 − r 1 − 1) subspace and is determined uniquely by the subcode D, and the value of m(·) on this relative subspace is equal to n − w(D) since w(D) is exactly the number of nonzero columns of the matrix G D . Summing up the text, we thus have There is a one-to-one correspondence between the relative (r, r 1 ) subcodes and the (k − r − 1, k 1 − r 1 − 1) relative projective subspaces such that if D corresponds to a P k1−r1−1 k−r−1 , we will have n − w(D) = m(P k1−r1−1 k−r−1 ). The following well known Gaussian binomial coefficient [7 denoted by X(α, β) in our paper, is the number of β-dimensional projective subspaces contained in some α-dimensional subspace of P G(k − 1, q). By using (1), the number of the β-dimensional projective subspaces contained in some α-dimensional subspace of P G(k − 1, q) and passing through a fixed point, denoted by X1(α, β), is [7, Theorem 4 in Appendix B] The following Lemmas are from [4].

Main result
In this section, we will first give the geometric structure of a relative one-weight code by using the value assignment and then determine the support weight distribution of subcodes of a relative one-weight code by using its geometric structure.
First, by using similar counting arguments as given in the proof of Lemma 2 (see [4]), one gets Lemma 4. For any two fixed subspaces P −1 s−1 and P 1 s+1 such that P 1 Recall that the notation P 0 k−k1 stands for a (k − k 1 )-dimensional projective subspace P such that dim P L (P ) = 0, where L denotes the set {1, 2, · · · , k 1 }.
It can be checked that the number of the relative subspaces P 0 k−k1 is respectively. Using above notations, we may present the geometric structure of a relative oneweight code.
Theorem 1. C is a relative one-weight code with respect to C 1 if and only if m(·) satisfies the property: every point in P −1 k−k1−1 has the same value, and for every i Proof. The sufficient condition.
Assume the weight of the codewords of C\C 1 is d and the effective length of C is n. Then for any P k1−1 k−2 , we have m(P k1−1 k−2 ) = n − d = constant by Lemma 1, and thus m(P −1 k−k1−2 ) = constant, ∀ P −1 k−k1−2 , by Lemma 3. Similarly to (2), the number of β-dimensional projective subspaces contained in some α-dimensional subspace of P G(k − 1, q) and passing through two fixed points, denoted by X2(α, β), may be written as [7,Theorem 4 To prove m(·) takes the same value at each point of During the above summing process, on the one hand, p 0 will occur X1(k − k 1 − 1, k − k 1 − 2) times, i.e., the number of subspaces (2)), on the other hand, each point p ∈ (P −1 (5)). We thus have Since m(P −1 k−k1−2 ) = constant and (6) always holds for any other point It follows from (7) (2) and (5).
In [9, Theorem 18], Wood gave a judging criterion for a relative one-weight code of a module with respect to one of its submodules over rings, whereas the result of Theorem 1 gives an equivalent condition for a relative one-weight code over finite fields. The annihilators of the submodule in [9, Theorem 18] amount to the relative subspace P −1 k−k1−1 in our paper, and those cosets of the annihilators of the submodule therein amount to the relative subspaces P 0 k−k1 (i), 1 ≤ i ≤ q k1 − 1 q − 1 , in our paper. Motivated by the result of [9, Theorem 18], we obtain Theorem 1.
If C is a relative one-weight code with the value assignment m(·), then according to Theorem 1, one may assume that m(p) Using such a value assignment, we may obtain w(c), c ∈ (C\C 1 ), as follows. Corollary 1. If C is a relative one-weight code with respect to C 1 , then Proof. It follows from Lemma 1 that Remark 1. Let the notations be as before. Then, the geometric structures of a relative two-weight code and a relative three-weight code [5] can be considered as special cases of the result of Theorem 1. In fact, if there exists some 1 ≤ θ ≤ k 1 and a subspace P k1−θ k−θ such that all v i are equal whenever P 0 , then the result of Theorem 1 is exactly the geometric structure of a relative three-weight code. Particularly, when θ = 1, such a relative three-weight code becomes a relative two-weight code. When θ = 1 and v 0 = v 1 , namely, all the points in P G(k − 1, q) have the same value, such a relative three-weight code becomes a linear constant-weight code.
Using the geometric structure of a relative one-weight code, one may determine the support weight distribution of its subcodes.
Theorem 2. Assume C is a relative one-weight code with respect to C 1 . Then, i) any two (r, r 1 ) subcodes E and E have the same support weight if and only if w(E ∩ C 1 ) = w(E ∩ C 1 ); ii) any two (r, r 1 ) subcodes E and E satisfy w(E) > w(E ) if and only if w(E ∩ C 1 ) > w(E ∩ C 1 ); iii) the number of all (r, r 1 ) subcodes E such that w(E ∩ C 1 ) = t is where A r1 t represents the number of the r 1 -dimensional subcodes of C 1 with support weight t.
iii) Let D be any fixed r 1 -dimensional subcode of C 1 . To get the result of iii), it suffices to compute the number of the (r, r 1 ) relative subcodes containing D. We count the number of independent r − r 1 codewords of C\C 1 such that the subcode generated by these r − r 1 codewords and D is a relative (r, r 1 ) subcode. The first chosen codeword can be any codeword of the set C\C 1 . Thus, the ways to choose the first codeword are q k − q k1 . the second codeword should not be a linear combination of the elements of C 1 and the first chosen codeword, so, the number of ways of choosing the second codeword is q k − q k1+1 . Similarly, the number of ways of choosing the third codeword are q k − q k1+2 , . . . , and the number of ways of choosing the (r − r 1 )th codeword is q k − q k1+r−r1−1 . To get a relative (r, r 1 ) subcode containing D in the above way, the repeated times of the first codeword is q r − q r1 , and the repeated times of the second codeword is q r − q r1+1 , similarly, the repeated times of the (r − r 1 )th codeword is q r − q r−1 . So, the number of relative (r, r 1 ) subcodes containing D is and thus iii) holds.
4. An application of relative one-weight codes in the wire-tap channel of type II The aim of this section is to present a property of relative subcodes of a relative one-weight code, and then to give an application of the property in the wire-tap channel of type II with multiple users introduced in [6]. Let C J be the shortened subcode of C supported by J, that is, C J = {c = (c 1 , · · · , c n ) ∈ C : c i = 0 when i / ∈ J}, where, J is a subset of the coordinate positions. Then, a property of relative subcodes is Theorem 3. If C is a relative one-weight code with length n and D is any (r, r 1 ) subcode with w(D) < n, then C χ(D) is a relative (r , r 1 ) subcode with r − r 1 = r − r 1 .
Remark 2. The concept of relative subcodes is useful in the wire-tap channel of type II with two parties (or users) and an adversary introduced in [6]. When a linear code C and one of its subcodes C 1 are used in such a channel, one may explain an (r, r 1 ) relative subcode D as follows: whenever the adversary taps the symbols given by χ(D), he will retrieve at least r data symbols, and in these data symbols, the adversary may get at least r − r 1 data symbols which are from the legitimate party, and the remaining data symbols are from the nonlegitimate party (i.e., the party's data symbols are leaked to the adversary). Thus, C and C 1 should be encoded such that the adversary can get as few of the legitimate party's data symbols as possible. Whenever a relative one-weight code is used in the wire-tap channel of type II with two parties, the above theorem yields that, for any relative (r, r 1 ) subcode D (w(D) < n), the adversary can get no more data symbols than r − r 1 from the legitimate party when he taps the symbols given by χ(D), even if the adversary may retrieve more data symbols r than r (recall r ≥ r). Based on this fact, relative one-weight codes are optimal when used in the wire-tap channel of type II with two parties.

Secret sharing scheme and relative one-weight codes
In the secret sharing scheme based on a linear code, the problem of determining the minimal access sets can be reduced to the problem of finding the set of the minimal codewords of the dual code [10]. Thus, to determine all the minimal codewords of a linear code is a basic work. It is well-known, however, that determining all the minimal codewords is a hard problem for an arbitrary linear code [1].

Definition 4.
A codeword c covers a codeword c , if the support of c contains that of c . If a nonzero codeword c covers only its nonzero scalar multiples, but no other nonzero codewords, then c is called minimal.
All the minimal codewords of a relative two-weight code and a relative threeweight code are determined in [5]. For an arbitrary relative one-weight code, it is difficult to determine all the minimal codewords. But it is possible to determine all the minimal codewords for some special classes of relative one-weight codes.
Assume A is a subset of P G(k−1, q). Use A to represent the subspace generated by the points in A and use A ⊥ to represent the subspace perpendicular to A according to the usual inner product. In addition, let C be a relative one-weight code (with respect to a k 1 -dimensional subcode C 1 ) with the value assignment m(·), and let L = {1, · · · , k 1 } and v j , 1 ≤ j ≤ q k1 − 1 q − 1 be defined as in Section 3. Then, the result is Theorem 4. All the nonzero codewords of a relative one-weight code C are minimal if one of the following conditions holds i) |{j : v j = 0, 1 ≤ j ≤ q k1 − 1 q − 1 }| ≤ q k1−2 − 1; ii) There exists a group of basis points p j , 1 ≤ j ≤ k 1 , of P L (P G(k − 1, q)), such that m(p) > 0 for any p ∈ {p j1 , p j2 } for 1 ≤ j 1 < j 2 ≤ k 1 .
Proof. The arguments for i) and ii) are similar. We only give the proof of ii) in detail. Let G be the generator matrix of C determined by m(·) and let c and c be any two nonzero codewords. Then, one may write c = xG, c = x G.
for some x, x ∈ GF (q) k . If c covers c , then Since both {x} ⊥ and {x } ⊥ are (k−2)-dimensional projective subspace, it follows from (17) that {x} ⊥ = {x } ⊥ if one can prove that any (k − 2)-dimensional subspace P is generated by the points p ∈ P such that m(p) > 0. Then, the fact {x} ⊥ = {x } ⊥ yields that c and c differ only by a nonzero multiple, or equivalently, c is minimal. Thus, it suffices to prove that any (k − 2)-dimensional subspace P is generated by the points p ∈ P such that m(p) > 0. Note that a (k − 2)-dimensional subspace P is either P k1−2 k−2 or P k1−1 k−2 .