Counting Codes over Rings Steven T. Dougherty Department of Mathematics, University of Scranton Scranton, PA 18510, USA Email: [email protected] and Eseng¨ ul Salt¨ urk Department of Mathematics, Yildiz Technical University 34210 Istanbul, Turkey Email: [email protected] September 3, 2012 Abstract We extend the definition of free codes to codes over local rings and arbitrary Frobenius rings. The number of free codes over finite Frobenius rings is determined by calculating the number for local rings and applying the Chinese Remainder Theorem. A formula for the number of codes of arbitrary type over a finite chain ring is given and this is applied to determine the number of linear codes over a finite principal ideal ring.

Key words: Linear codes, free codes, finite chain rings, finite principal ideal rings. MSC: 94B05

1

Introduction

For codes over finite fields there is a well known formula to determine the number of subcodes of dimension r in a dimension k space. Namely, over a field of order q we have " # (q k − 1)(q k − q) . . . (q k − q r−1 ) k = r . (q − 1)(q r − q) . . . (q r − q r−1 ) r q

1

For codes over rings, this formula does not apply. In fact, there are several obstacles to overcome in generalizing this result. First, for codes over rings, it is not true that all linear codes have a linearly independent generating set. In fact, not even for codes over chain rings is there necessarily a linearly independent generating set. In [4] and [5], it was determined what conditions a minimal generating set for a code over a ring must have. Moreover, free codes are generally defined as codes for which the free rank and the rank are equal. This is another obstacle in the generalization since the notion of rank requires the ring to be a principal ideal ring. In this paper, we overcome these obstacles by making a general definition for free codes over arbitrary Frobenius rings. Using this generalized definition, we determine the number of free codes over local rings and then over arbitrary Frobenius rings. For codes over finite chain rings we use the standard definition of type which applies to all linear codes and determine the number of linear codes of any type over chain rings and use this to determine the number of linear codes over principal ideal rings.

1.1

Rings

We begin with some ring theoretic definitions. By ring we shall mean a ring with identity 1 6= 0. All rings in this paper are assumed to be finite commutative rings. A ring R is a local ring if it has a unique maximal ideal m. This maximal ideal contains all non-units of the ring. A principal ideal ring is a ring such that every ideal is generated by a single element. A principal ideal ring where the ideals are linearly ordered is called a chain ring. A chain ring is necessarily a local ring. In a chain ring the ideals of the ring are given by {0} = hγ e i ⊆ hγ e−1 i ⊆ · · · ⊆ hγ 2 i ⊆ hγi ⊆ R, for some element γ and some natural number e. We say that the nilpotency index of γ is e. We note that for any local ring R, we have that R/m is a field since m is a maximal ideal. It follows immediately that for chain rings, R/hγi is a field of order q and |R| = q e . Let R be a finite ring with ideals a1 , · · · , as which are relatively prime in pairs with Ts i=1 ai = {0}. Define the map Ψ : R → R/a1 × · · · × R/as

(1)

as the canonical R-module isomorphism. That is Ψ(x) = (x (mod a1 ), x (mod a2 ), . . . , x

(mod as )).

The inverse of this map is denoted by CRT = Ψ−1 : R/a1 × · · · × R/as → R. 2

It follows that the ring R is isomorphic to R/a1 × · · · × R/as . This map is an isomorphism by the Chinese Remainder Theorem. We refer to this isomorphism as the Chinese product. The following lemma is well known, see [3] for example. Lemma 1.1. Any finite commutative ring is the Chinese product of local rings. Any finite commutative principal ideal ring is the Chinese product of finite chain rings.

1.2

Codes

We continue with some coding theoretic definitions. Over any ring R, a code of length n is a subset of Rn . If that subset is an R-submodule then we say that the code is linear. We shall assume that all codes are linear unless specified otherwise. We can extend the map Ψ coordinatewise to Ψ : Rn → (R/a1 )n × · · · × (R/as )n .

(2)

Then, if Cj is a code over R/aj define C = CRT(C1 , · · · , Cs ) = Ψ−1 (C1 , · · · , Cs ) = {Ψ−1 (v1 , · · · , vs ) | vj ∈ Cj }, to be the Chinese product of codes C1 , · · · , Cs . We attach to the ambient space Rn the usual inner product, namely for x, y ∈ Rn , [x, y] = x1 y1 + · · · + xn yn . For any code C over R, we define the orthogonal to be C ⊥ = {x ∈ Rn [x, c] = 0, ∀ c ∈ C}. Throughout the paper we assume that the rings are all Frobenius, see [8] for a definition of this class of rings and a characterization of codes over these rings. Principally, in this setting, we need the fact that for a code over a Frobenius ring there are MacWilliams relations. It follows immediately that for a linear code C over a Frobenius ring R we have that |C| · |C ⊥ | = |R|n , see [8]. It is well known that the generator matrix for a code C over a finite chain ring is permutation equivalent to a matrix of the following form:   Ik0 A0,1 A0,2 A0,3 A0,e     γIk1 γA1,2 γA1,3 γA1,e   2 2 2   γ I γ A γ A k 2,3 2,e 2   G= (3) , ... ...     .. ..   . .   e−1 e−1 γ Ike−1 γ Ae−1,e where the Ai,j are matrices with elements in the ring R and e is the nilpotency index of γ. 3

A code with this generator matrix is said to have type (k0 , k1 , . . . , ke−1 ). The cardinality of the code generated by this matrix is Pe−1

|R/hγi|

i=0 (e−i)ki

=q

Pe−1

i=0 (e−i)ki

.

P ⊥ If a code C has type (k0 , k1 , . . . , ke−1 ), set ke = n − e−1 has type i=0 ki , then the code C (ke , ke−1 , ke−2 , . . . , k1 ). We define the rank of a code C over a principal ideal ring R, denoted by rank(C), to be the minimum number of generators of C. The free rank of C, denoted by f-rank(C) is the maximum of the ranks of free R-submodules of C. The standard definition for a code to be free is that the rank and the free rank of the code are equal (we shall generalize this definition). In this case the code is isomorphic as a module to Rk where k is the rank. When the code is over a chain ring, the code is free if and only if it has type (k, 0, . . . , 0) for some k. Consider the code over Z6 generated by the vector (2, 3). This code consists of the following vectors {(0, 0), (2, 3), (4, 0), (0, 3), (2, 0), (4, 3)}. This code is CRT (C1 , C2 ) where C1 is the binary code generated by (0, 1) and C2 is the ternary code generated by (1, 0). Notice that both C1 and C2 are free codes. The code C is also a free code (the rank and free rank are both 1), but it does not have a generator of the form (Ik | A) for some k. This shows that a free code over a ring that is not a chain ring need not have a generator matrix of the form (Ik | A). In [4] the following definitions are made. Definition 1. Let R be a local ring with unique maximal ideal m, and let w1 , · · · , ws be P vectors in Rn . Then w1 , · · · , ws are modular independent if and only if αj wj = 0 implies that αj ∈ m for all j. For arbitrary rings this is extended as follows. Definition 2. Let R be a finite ring with R = CRT (R1 , R2 , . . . , Rs ), where each Ri is a local ring. The vectors v1 , · · · , vk in Rn are modular independent if Φi (v1 ), · · · , Φi (vk ) are modular independent for some i. Note that it only requires the condition for some i and not for all i. Definition 3. Let R be a ring. Let v1 , · · · , vk be vectors in Rn . Then v1 , · · · , vk are P independent if αj vj = 0 implies that αj vj = 0 for all j. It is shown in [4] that a basis, meaning a generating set for a code with a minimum number of vectors, consists of a set of vectors that is both modular independent and independent. When R is a field the definitions reduce to the standard notion of linear independence. In [4], it is also shown that for principal ideal rings that are not chain rings that modular independence does not imply independence and independence does not imply modular independence. 4

2

Counting code with linearly independent generating sets

In [3], the number of free codes in Rn of rank s when R is a chain ring were counted. See also [1] and [2] for results concerning subcodes of codes over rings. In the proof, it was used that R was also a principal ideal ring as well as numerous facts about chain rings. In this section we shall generalize the definitions and change the proofs significantly to get a result for codes over local rings. Notice unlike chain rings we do not have a notion of rank since the codes are not principal ideal rings, nor do we know that the maximal ideal is generated by a single element. This means that we have to change the definition of a free code since rank and free rank are not defined for codes over rings that are not principal ideal rings. Hence, we need to generalize several definitions to avoid using these ideas. The results in this section are far more general, since they will apply in the end to all finite Frobenius rings rather than to the much smaller class of principal ideal rings. Let R be a local ring with maximal ideal m. We begin by generalizing some definitions. Definition 4. Let R be a local ring. We say that vectors v1 , v2 , . . . , vt are linearly indepenP dent if αi vi = 0 implies that αi = 0 for all i. Notice that for a local ring, linearly independence implies both independence and modular independence. Of course, it is not always possible that a code over R has a generating set that is linearly independent. For example, any non-trivial ideal is a code of length 1 that does not have a generating set which is linearly independent. Definition 5. A code over a ring R is a free code if it has s linearly independent generating vectors. It follows immediately that a free code C with s linearly independent generating vectors has |C| = |R|s . Let m be the maximal ideal of a local ring R, with mRn = {w ∈ Rn | |hwi| < |R|}. We note that |mRn | = |m|n . Denote the cardinality of the ring and maximal ideal respectively by |R| = r and |m| = m. Since m is a maximal ideal we know that R/m is a field. Set q = |R/m|. Lemma 2.1. Let v1 , v2 , . . . , vt be linearly independent vectors of length n over a local Frobenius ring R. If vt+1 6∈ hv1 , v2 , . . . , vt , mRn i then v1 , v2 , . . . , vt , vt+1 are linearly independent. Proof. Assume v1 , v2 , . . . , vt+1 are linearly dependent, then t+1 X

αi v i = 0

i=1

5

P with at least one αi 6= 0. If αt+1 6∈ m then ti=1 αi vi = −αt+1 vt+1 . Then αt+1 is invertible, since it is not in m, which gives that vt+1 ∈ hv1 , . . . , vt i which is a contradiction. Hence we have that αt+1 ∈ m. Since m is a code of length 1 and the ring is Frobenius we have that m⊥ is a non-trivial code of length 1, so we can let γ ∈ m⊥ , γ 6= 0. Then γα1 v1 + γα2 v2 + · · · + γαt vt + γαt+1 vt = 0 γα1 v1 + γα2 v2 + · · · + γαt vt = 0.

Then γαi = 0 for all i since v1 , . . . , vt are linearly independent. Then γ(α1 v1 + α2 v2 + · · · + αt vt ) = 0 and α1 v1 + α2 v2 + · · · + αt vt ∈ mRn which is a contradiction. This gives that the vectors v1 , . . . , vt , vt+1 are linearly independent. Lemma 2.2. Let v1 , v2 , . . . , vt be t linearly independent vectors over a local Frobenius ring R, with |R/hγi| = q. Then the number of vectors in hv1 , v2 , . . . , vt , mRn i is q t mn . Proof. Assume α1 v1 + α2 v2 + · · · + αt vt + w1 = β1 v1 + β2 v2 + · · · + βt vt + w2 ,

(4)

where w1 , w2 are in mRn . Simple algebraic manipulation of Equation 4 gives (α1 − β1 )v1 + (α2 − β2 )v2 + · · · + (αt − βt )vt = w2 − w1 .

(5)

The ideal m is a linear code of length 1 with |m| < |R|. Hence we know that m⊥ is a non-trivial code of length 1 in R. Let γ ∈ m⊥ , γ 6= 0. Multiplying both sides of Equation 5 by γ gives γ(α1 − β1 )v1 + γ(α2 − β2 )v2 + · · · + γ(αt − βt )vt = 0. (6) The vectors v1 , v2 , . . . , vt are linearly independent. This gives that γ(αi − βi ) = 0 for all i. Hence (αi − βi ) ∈ m which gives αi ∈ βi + m. Hence it suffices to chose representatives of R/m as the coefficients of the vi . This gives that there are q t elements. Then, we note that |mRn | = mn and the result follows. Lemma 2.3. Let R be a local ring with maximal ideal m where |R| = r, |m| = m, |R/m| = q. Then the number of ways of choosing s linearly independent vectors in Rn is (mn )s (q n − 1)(q n − q) . . . (q n − q s−1 ).

6

(7)

Proof. To find a single linearly independent vector, the vector must be in Rn − mRn . Note that non-zero vectors in mRn are not linearly independent although they are modular independent. Hence there are rn − mn choices for the first vector. Assume we have chosen t linearly independent vectors v1 , v2 , . . . , vt . By Lemma 2.2 we have that there are q t mn vectors in hv1 , v2 , . . . , vt , mRn i. Then to chose the (t+1)-st vector we can chose from rn −q t mn . By the above we have that the number of ways of choosing the elements is (rn − mn )(rn − qmn )(rn − q 2 mn ) . . . (rn − q s−1 mn ) = (q n mn − mn )(q n mn − qmn ) . . . (q n mn − q s−1 mn ) = (mn )s (q n − 1)(q n − q) . . . (q n − q s−1 ), since r = qm. Lemma 2.4. Let R be a local ring with maximal ideal m where |R| = r, |m| = m, |R/m| = q. Then the number of ways of finding a set of s linearly independent generating vectors of a 2 code generated by s linearly independent vectors is ms (q s − 1)(q s − q) . . . (q s − q s−1 ). Proof. Using the same counting technique from Lemma 2.3 we have that the number of ways of choosing the elements is (rs − ms )(rs − qms )(rs − q 2 ms ) . . . (rs − q s−1 ms ) = (q s ms − ms )(q s m2 − qms ) . . . (q s ms − q s−1 ms ) = (ms )s (q s − 1)(q s − q) . . . (q s − q s−1 ).

These lemmas lead us to the following. Theorem 2.5. Let R be a local ring with maximal ideal m with |m| = m, |R/m| = q. Then the number of distinct codes generated by s linearly independent vectors in Rn , that is the number of free codes with s generators in Rn , is 2

(mns−s )(q n − 1)(q n − q) . . . (q n − q s−1 ) . (q s − 1)(q s − q) . . . (q s − q s−1 ) Proof. By applying the two previous lemma we have that the number is (mn )s (q n − 1)(q n − q) . . . (q n − q s−1 ) . (ms )s (q s − 1)(q s − q) . . . (q s − q s−1 ) Then simple algebraic manipulation gives the result.

7

(8)

Denote the of free codes over a local ring R with maximal ideal m, |R/m| = q, ( number ) n |m| = m by . s q,m In Table 1, we give some examples of the numbers obtained from Theorem 2.5. Table 1: Some values of the sequences for some n and some s (q = 2 and m = 2) s

1

n 1 2 3 4 5 6 7 8

Number 1 6 28 120 496 2016 8128 32640

s

2

n 2 3 4 5 6 7 8 9

Number 1 28 560 9920 166656 2731008 44216320 214 · 43435

s

n 3 4 5 3 6 7 8 9 10

Number 1 120 9920 714240 48377856 215 · 97155 218 · 788035 221 · 6347715

s

n Number s n Number s n Number 4 1 5 1 6 1 5 496 6 2016 7 8128 6 166656 7 2731008 8 44216320 15 18 4 7 48377856 5 8 2 · 97155 6 9 2 · 788035 16 20 8 2 · 200787 9 2 · 3309747 10 224 · 53743987 9 220 · 3309747 10 225 · 109221651 11 230 · 3548836819 10 224 · 53743987 11 230 · 3548836819 12 236 · 220027882778 11 228 · 866251507 12 235 · 114429029715 13 242 · 14877590196755 Notice that this does not count the number of codes with s modular independent vectors but rather only those which are generated by s linearly independent vectors. Lemma 2.6. Let v be a linearly independent vector in Rn , R a local Frobenius ring, then v contains a unit in at least one coordinate. Proof. Assume v does not have a unit in any coordionate, then vi ∈ m for all i. The ideal m is a non-trivial code of length 1 and hence there exists an α ∈ m⊥ , α 6= 0. Then we have that αv = 0 contradicting that v is linearly independent. Therefore, there must be at least one coordinate i with vi a unit. Notice that this lemma is not true for vectors over a principal ideal ring. For example, consider the vector (2, 3) in Z26 . This vector is linearly independent but neither 2 nor 3 is

8

a unit. We have also used heavily that the ring is Frobenius. If it were not we could not guarantee that the orthogonal is non-trivial. Theorem 2.7. Let v1 , v2 , . . . , vs be linearly independent vectors over a local Frobenius ring R. Then the code generated by these vectors is permutation equivalent to a code that has a generator matrix of the form (Is | A). Proof. By the previous lemma, we have that v1 has a coordinate with a unit. Use its inverse to put a one in that coordinate and use it to make all vectors 0 in that coordinate. Recalling that these vectors are linearly independent, we see that taking linear combinations for the vectors still results in linearly independent vectors. Then the usual row reduction transforms the vectors into a matrix of the desired form after permuting the coordinates. Again this is not true for principal ideal rings. We can use the previous theorem to prove the following. Theorem 2.8. Let C be a free code in Rn , where R is a local Frobenius ring, generated by s linearly independent vectors. Then C ⊥ is a free code generated by n − s linearly independent vectors. Proof. By using Theorem 2.7 we make the generating matrix of the form (Is | A), where A has n − s coordinates. Then consider the matrix (B | In−s ). The element Bi,j is chosen so that the i-th row of this matrix is orthogonal to vj in the standard way. The matrix (B | In−s ) generates a code of cardinality |R|n−s . Then since the ring is Frobenius we know that |C||C ⊥ | = |R|n and so this matrix generates the entire orthogonal code. This gives the following corollary. Corollary 2.9. The number of free codes with s linearly independent generators in Rn where R is a local Frobenius ring is equal to the number of free codes with n−s linearly independent generators in Rn . That is ( ) ( ) n n = . s n−s q,m

q,m

Proof. The map sending C to C ⊥ where C is a linear code is a bijection. Hence by Theorem 2.8 the numbers are equal. Theorem 2.10. We have the following recursion for the number of free codes over a local ring R with |R| = r, |m| = m, |R/m| = q: ( ) ( ) ( ) n+1 n n . (9) = q s ms + mn−s+1 s s s−1 q,m

q,m

9

q,m

Proof. We add the right side of the equation: ( ) ( ) n n q s ms + mn−s+1 s s−1 q,m

= q s ms

(m

q,m

ns−s2

)(q n − 1)(q n − q) . . . (q n − q s−1 ) (q s − 1)(q s − q) . . . (q s − q s−1 ) n(s−1)−(s−1)2

)(q n − 1)(q n − q) . . . (q n − q s−2 ) (q s−1 − 1)(q s−1 − q) . . . (q s−1 − q s−2 )  s n  (q n − 1)(q n − q) . . . (q n − q s−2 ) q (q − q s−1 ) (n+1)s−s2 m +1 (q s−1 − 1)(q s−1 − q) . . . (q s−1 − q s−2 ) (q s − 1)q s−1  n  (q n − 1)(q n − q) . . . (q n − q s−2 ) q(q − q s−1 ) + q s − 1 (n+1)s−s2 m (q s−1 − 1)(q s−1 − q) . . . (q s−1 − q s−2 ) (q s − 1)   (q n − 1)(q n − q) . . . (q n − q s−2 ) (q n+1 − 1) (n+1)s−s2 m (q s−1 − 1)(q s−1 − q) . . . (q s−1 − q s−2 ) (q s − 1) ( ) n+1 . s n−s+1 (m

+ m = = = =

q,m

Similarly to the case for finite fields we have another recursion as given in the following theorem. Theorem 2.11. We have the following recursion for the number of free codes over a local ring R with |R| = r, |m| = m, |R/m| = q:       n+1 n n s n−s+1 =m + (qm) s s q,m s − 1 q,m q,m Proof. We add the right side of the equation:     n n s n−s+1 m + (qm) s q,m s − 1 q,m = = = = =

 n  (q − q s−1 ) (q n − 1)(q n − q) . . . (q n − q s−2 ) n−s+1 +q m (q s−1 − 1)(q s−1 − q) . . . (q s−1 − q s−2 ) q s−1 (q s − 1)  n−s+1  (q n − 1)(q n − q) . . . (q n − q s−2 ) q − 1 + q n−s+1 (q s − 1) (n+1)s−s2 m (q s−1 − 1)(q s−1 − q) . . . (q s−1 − q s−2 ) (q s − 1)   (q n − 1)(q n − q) . . . (q n − q s−2 ) q n+1 − 1 2 m(n+1)s−s s−1 (q − 1)(q s−1 − q) . . . (q s−1 − q s−2 ) (q s − 1) n+1 − 1)(q n+1 − q) . . . (q n+1 − q s−1 ) 2 (q m(n+1)s−s (q s − 1)(q s − q) . . . (q s − q s−1 )   n+1 . s q,m (n+1)s−s2

10

Example 1. The ring R = F2 + uF2 + u2 F2 , with u3 = 0, is a finite chain ring and therefore it is a local ring. The maximal ideal is generated by the element u. Namely, m =< u > and |m| = 4 = m, |R/m| = 2 = q. Let n = 3 and s = 1. Then by the formula the number of free codes with s linearly independent generators is 43·1−1 (23 − 1) = 112. (21 − 1) Applying the formula to the number of free codes with n−s linearly independent generators gives 43·2−4 (23 − 1)(23 − 2) = 112. (22 − 1)(22 − 2) Hence the number of free codes with 1 linearly independent generators is equal to the number of free codes with 2 linearly independent generators as guaranteed in Corollary 2.9. We can specify the generators of the codes with s = 1. Namely, they are generated by the following matrices: h i h i h i , , 1 a1 a2 b1 1 b2 c1 c2 1 where a1 , a2 and b2 can take values from R and b1 , c1 , c2 can take values from m. Hence a1 , a2 and b2 can take 8 values and b1 , c1 , c2 can take 4 values. The number of generators gives the number 8 · 8 + 8 · 4 + 4 · 4 = 112. Example 2. The ring R = F4 + uF4 , u2 = 0, is a finite chain ring where F4 is the field of order 4. Hence, it is a local ring. The maximal ideal is generated by the element u. Namely, m =< u >, |m| = 4 = m and |R/m| = 4. Let n = 2, s = 1. Then the number of free codes with s linearly independent generators 42·1−1 (42 −1) is (41 −1) = 20. These codes are given by the following generator matrices: h i h i 1 a and b 1 where a can take all the elements of the ring R and b can take all the elements of the maximal ideal. Hence there are 16 choices for a and 4 choices for b. The number of free codes with 2·1−1 (42 −1) n − s = 2 − 1 = 1 = s linearly independent generators is 4 (41 −1) = 20, as guaranteed by Corollary 2.9. Continuing this example let n = 3 and s = 2. Then the number of free codes with 2 3·2−4 (43 −1)(43 −4) linearly independent generators is 4 (42 −1)(4 = 336, and the number with 1 linearly 2 −4) 3·1−1

3

(4 −1) independent generator is 4 (41 −1) = 336. The generators of the codes where s = 1 are of the form h i h i h i 1 a1 a2 , b 1 1 b 2 , c 1 c 2 1

where a1 , a2 and b2 can take values from R and b1 , c1 , c2 can take values from m. Hence the number is obtained. 11

We shall give an example that is not a chain ring. Example 3. The ring R = Z4 [x]/(x2 − 1) is a local ring but not a principal ideal ring since the maximal ideal m is generated by the elements x + 1 and 2. We have that |R| = 16, |m| = 8 = m, and |R/m| = 2 = q. Let n = 4 and s = 3. Then the number of free codes with 3 linearly independent vectors 84·3−9 (24 −1)(24 −2)(24 −22 ) = 7680 and the number of free codes with 1 linearly independent is (23 −1)(23 −2)(23 −22 ) vector is

84·1−1 (24 −1) (21 −1)

h

= 7680. For n = 2 and s = 1, we may write the generator matrices as:

1 a1 a2

i h i h i h i a3 , b 1 1 b 2 b 3 , c 1 c 2 1 c 3 , d 1 d 2 d 3 1

where a1 , a2 , a3 , b2 , b3 , c3 can take values from R and b1 , c1 , c2 , d1 , d2 , d3 can take values from m. Hence the number of generators: 163 + 162 · 8 + 16 · 82 + 83 = 7680. We will now use these results to get results for arbitrary Frobenius rings. Lemma 2.12. Let R be a finite Frobenius ring that is isomorphic via the Chinese Remainder Theorem to R1 × R2 × . . . Rh , where each Ri is a local ring. Let C be a code over R where C = CRT (C1 , C2 , . . . , Ch ). The code C is generated by s linearly independent vectors if and only if each Ci is generated by s linearly independent vectors. Proof. Assume that C is generated by s linearly independent vectors, v1 , v2 , . . . , vs . Let Ψj be the natural homomorphism from R to R/aj , i.e the component map of Ψ = CRT −1 . We need to show that Ψj (v1 ), Ψj (v2 ), . . . , Ψj (vs ) are linearly independent vectors over P P Rj . Assume that Ψj (αi )Ψ(vi ) = 0. This gives that Ψj (αi vi ) = 0 and then that P P P ⊥ n Ψj ( αi vi ) = 0. Then we have that αi vi ∈ aj . Let γ ∈ a , γ 6= 0. Then γ αi vi = 0 which gives that γai = 0 for all i. This implies that ai ∈ aj for all i and then that Ψj (αi ) = 0 for all i. Hence Ψj (v1 ), Ψj (v2 ), . . . , Ψj (vs ) are linearly independent vectors over Rj . Now assume that each Ci has s linearly independent vectors wi1 , wi2 , . . . , wis . Let vj = CRT (w1j , w2j , . . . , whj ). P Assume the vi are linearly dependent, that is αi vi = 0 with not all αi = 0, say αb 6= 0. Then for some j, Ψj (αb ) 6= 0, since CRT is an isomorphism and 0 = CRT (0, 0, . . . , 0). Hence the image under Ψj are linearly dependent which is a contradiction. Note that it is not true that the Chinese product of any two free codes is free. If C and C have a different number of generators then their Chinese product will not even have the correct cardinality to be free. Consider the binary code C generated by (1, 0) and (0, 1) and the ternary code C 0 generated by (1, 0). Both codes are free but their Chinese product has cardinality 12 which is not a power of 6. Hence the product is not free over Z6 . We can use this lemma to get the following result. 0

12

Theorem 2.13. Let R be a finite Frobenius ring that is isomorphic via the Chinese Remainder Theorem to R1 × R2 × . . . Rh where each Ri is a local ring. Let mi be the maximal ideal of Ri with |mi | = mi and |Ri /mi | = qi . Then the number of codes in Rn generated by s linearly independent vectors is 2 h Y (mns−s )(q n − 1)(q n − qi ) . . . (q n − q s−1 )

i

i=1

i

i

i

(qis − 1)(qis − qi ) . . . (qis − qis−1 )

i

.

(10)

Proof. By Lemma 1.1 we know that the ring can be decomposed via the Chinese Remainder Theorem into a product of local rings. By Lemma 2.12, we know that the code is generated by s linearly independent vectors if and only if its component codes are generated by s linearly independent vectors. Hence, we can invoke Theorem 2.5. Then the count follows simply by noting that each code C is isomorphic to C1 × C2 × · · · × Ch where Ci is a code over the local ring Ri that is generated by s linearly independent vectors. Note that we needed the code R to be Frobenius since we used that the component codes were Frobenius in Lemma 2.1 and Lemma 2.2 which are used throughout. Example 4. Consider the principal ideal ring Z12 which is isomorphic to Z3 × Z4 via the Chinese Remainder Theorem. Then, from Lemma 2.12, the number of codes of length 2 generated by 1 linearly independent vector is the product of the number of the codes in Z3 generated by 1 linearly independent vector and the number of the codes in Z4 generated by 1 linearly independent vector. Hence by Theorem 2.13, the number of codes in R2 generated 1 2 −1) 2 −1) · 2 (2 = 4 · 6 = 24. by 1 linearly independent vector is 1(33−1 2−1 These codes are given by the following generator matrices: h i h i 1 a and b 1 where a can take all the elements of the ring R and b can take all the elements of the maximal ideals of Z12 , namely, b takes all the values of the set {0, 2, 3, 4, 6, 8, 9, 10}. Hence there are 12 choices for a and 8 choices for b. The remaining four codes are generated by h i h i h i h i 2 3 , 3 2 , 3 4 , 4 3 .

This gives 24 codes in total. Corollary 2.14. Let R be a finite Frobenius ring that is isomorphic via the Chinese Remainder Theorem to R1 × R2 × . . . × Rs where each Ri is a local ring. The number of free codes with s linearly independent generators in Rn is equal to the number of free codes with n − s linearly independent generators in Rn . Proof. The result follows immediately from Corollary 2.9 and Theorem 2.13. 13

3

Counting Codes over Chain Rings and Principal Ideal Rings

In this section, we shall count the number of codes of arbitrary type over chain rings. We shall prove two lemmas first which we use to prove this result. Lemma 3.1. Let R be a chain ring with maximal ideal hγi, where γ has nilpotency e. Then the number of ways of choosing vectors to generate a code of type (k0 , k1 , . . . , ke−1 ) is (q)

Pe−2 j=0

nkj (e−(j+1))

e−1 kY a −1 Y Pa−1 (q n − q b=0 kb q i ). a=0 i=0

Proof. We begin by counting the number of elements that have order q e . There are q e vectors in Rn , (q e−1 )n of them have no unit, that is |γR| = q e−1 . Then we see that k vectors generate q k vectors. Hence we have that there are ((q e )n − (q e−1 )n )((q e )n − (q e−1 )n q)((q e )n − (q e−1 )n q 2 ) · · · ((q e )n − (q e−1 )n q k0 −1 ) = ((q e−1 )n )k0 (q n − 1)(q n − q) · · · (q n − q k0 −1 ) ways of finding k0 modular independent vectors of order q e . Now assume we have chosen ki vectors of order q e−i for i = 0, . . . , j − 1. Next we need to choose kj vectors of order q e−j that are modular independent with the first k0 +k1 +· · ·+kj−1 vectors. So we want to eliminate the vectors in the code that have order greater than q e−j and all vectors in the ambient space with orders less than q e−(j+1) leaving vectors of order q e−j to pick from. We also need to remove the vectors of order q e−j that are already in the code. We apply the same reasoning above as was done in Lemma 2.3 except that we think of the ring as having q e−j elements and the maximal ideal of this ring as having q e−j+1 elements. This gives us ((q e−j )n − (q e−(j+1) )n q k0 +k1 +···+kj−1 )((q e−j )n − (q e−(j+1) )n q k0 +k1 +···+kj−1 +1 ) · · · ((q e−j )n − (q e−(j+1) )n q k0 +k1 +···+kj−1 +kj −1 ) =

((q e−(j+1) )n )kj (q n − q k0 +k1 +···+kj−1 ) · · · (q n − q k0 +k1 +···+kj−1 +kj −1 ).

This gives that the number of ways of choosing vectors to generate a code of type (k0 , k1 , . . . , ke−1 ) is the product of these, i.e. ((q e−1 )n )k0 (q n − 1)(q n − q) · · · (q n − q k0 −1 )((q e−2 )n )k1 (q n − q k0 )(q n − q k0 +1 ) · · · (q n − q k0 +k1 −1 ) · · · ((q)n )ke−1 (q n − q k0 +k1 +···+ke−2 )(q n − q k0 +k1 +···+ke−2 +1 ) · · · (q n − q k0 +k1 +···+ke−2 +ke−1 −1 ) e−1 kY a −1 Y Pe−2 Pa−1 nkj (e−(j+1)) j=0 = (q) (q n − q b=0 kb q i ). a=0 i=0

14

Lemma 3.2. Let R be a chain ring with maximal ideal < γ > and |R/ < γ > | = q. Then the number of ways of writing a modular independent generating set of a code with type (k0 , k1 , . . . , ke−1 ) is q

Pe−2 j=0

e−1 Y Pa Pe−2 Pe−1 P (e−(j+1))kj2 + e−2 t=0 kt }+ r=0 ( l=r+1 (e−l)kr kl ) a=0 {(e−(a+1))ka+1

(q ki − 1)(q ki − q) . . . (q ki − q ki −1 ).

i=0

Proof. Recall that the number of elements of a code over a finite chain ring R of type (k0 , k1 , . . . , ke−1 ) is c0 = (q e )k0 (q e−1 )k1 . . . (q 2 )ke−2 q ke−1 . We begin by choosing k0 elements of order q e . To do so we subtract the number of elements of order less than q e from the elements of order q e . The number of elements of order less than q e is c1 = (q e−1 )k0 (q e−1 )k1 (q e−2 )k2 . . . (q 2 )ke−2 q ke−1 . Notice that c0 = c1 q k0 . To choose the first vector of order q e , there are (c0 − c1 ) choices. To choose the second there are (c0 − c1 q) choices. To choose the i-th, there are (c0 − c1 q i−1 ) choices. Multiplying these together gives the number of ways of choosing k0 elements of order q e . The product is (c0 − c1 )(c0 − c1 q)(c0 − c1 q 2 ) . . . (c0 − c1 q k0 −1 ) = (c1 q k0 − c1 )(c1 q k0 − c1 q)(c1 q k0 − c1 q 2 ) . . . (c1 q k0 − c1 q k0 −1 ) = ck10 (q k0 − 1)(q k0 − q) . . . (q k0 − q k0 −1 ). Our next step is to choose k1 vectors of orders q e−1 . We shall choose elements from the set of elements whose orders are smaller or equal to q e−1 . Namely, we consider the elements whose orders are not q e . The cardinality of this set is c1 = (q e−1 )k0 (q e−1 )k1 (q e−2 )k2 . . . (q 2 )ke−2 q ke−1 . We shall remove the elements whose orders not q e−1 from c1 . The number of elements to remove is c2 = (q e−1 )k0 (q e−2 )k1 (q e−2 )k2 . . . (q 2 )ke−2 q ke−1 . Notice c1 = q k1 c2 . As before the number of ways of choosing the k1 elements of order q e−1 is (c1 − c2 )(c1 − c2 q)(c1 − c2 q 2 ) . . . (c1 − c2 q k1 −1 ) = (c2 q k1 − c2 )(c2 q k1 − c2 q)(c2 q k1 − c2 q 2 ) . . . (c2 q k1 − c2 q k1 −1 ) = ck21 (q k1 − 1)(q k1 − q) . . . (q k1 − q k1 −1 ). Continuing, we have that ci = q ki ci+1 and the number of ways of choosing ki elements of order q e−i is (ci − ci+1 )(ci − ci+1 q)(ci − ci+1 q 2 ) . . . (ci − ci+1 q ki −1 ) = (ci+1 q ki − ci+1 )(ci+1 q ki − ci+1 q)(c2 q ki − ci+1 q 2 ) . . . (ci+1 q ki − ci+1 q ki −1 ) i = cki+1 (q ki − 1)(q ki − q) . . . (q ki − q ki −1 ).

15

To find the number of ways of writing the modular independent generating set we take the product of all of these and we have the following: e−1 Y

kj cj+1

j=0

e−1 Y

(q ki − 1)(q ki − q) . . . (q ki − q ki −1 ).

i=0

Simplifying this results gives the product of q {(e−1)k0 +(e−2)k1 +(e−3)k2 ...+ke−1 }k0 +{(e−1)k0 +(e−2)k1 +(e−2)k2 +...+ke−1 }k1 +{k0 +k1 +...+ke−2 }ke−1 and

e−1 Y

(q ki − 1)(q ki − q) . . . (q ki − q ki −1 ).

i=0

This gives the result. Theorem 3.3. Let R be a chain ring with maximal ideal hγi, where γ has nilpotency e. Then the number distinct codes of type (k0 , k1 , . . . , ke−1 ) is Pe−2

Pa−1 n b=0 kb q i ) a=0 i=0 (q − q Pe−2 Pe−2 Pa Pe−2 Pe−1 Qe−1 k 2 ki t=0 kt }+ r=0 ( l=r+1 (e−l)kr kl ) j=0 (e−(j+1))kj + a=0 {(e−(a+1))ka+1 i i=0 (q − 1)(q

(q)

j=0

nkj (e−(j+1))

Qe−1 Qka −1

− q) . . . (q ki − q ki −1 )

Proof. Lemma 3.1 gives the numerator and Lemma 3.2 gives the denominator. For the specific case of Zpe this gives the results given in [6] and for specific Galois rings in [7]. Example 5. As an example, let q = 4, n = 2, e = 2. The number of codes over R where 2·1 2 −40 )(42 −41 ) γ generates the maximal ideal and |R/hγi| = q = 4 of type (k0 , k1 ) is 4(42(4 = 5. ·4−4·4)(4·4−4) They all have generator matrices of the following forms: ! ! Ik1 a 0 1 and . 0 γ γ 0 There are 4 possibilities for the element a from the set F4 . So the number of codes is 5. " # n Denote the number in the previous theorem as where q is a prime k0 , k1 , . . . , ke−1 q,e power and e is the nilpotency of the generator of the maximal ideal. Corollary 3.4. The number of codes of type (k0 , k1 , . . . , ke−1 ) over a chain ring R is equal P to the number of codes of type (n − k−1 i=0 ki , ke−1 , ke−2 , . . . , k1 ).

16

.

Proof. If a code has type (k0 , k1 , . . . , ke−1 ) then its orthogonal has type (n −

k−1 X

ki , ke−1 , ke−2 , . . . , k1 ).

i=0

The map that sends C to C ⊥ is a bijection from codes of the first type to codes of the second type. Example 6. Let q = 4, n = 3, e = 3. The number of codes over R of type (1, 1, 1) is " # ((43 )3 − (42 )3 )((42 )3 − (41 )3 4)(43 − 42 ) 3 = 3 2 = 420. (4 · 4 · 4 − 42 · 42 · 4)(42 · 42 · 4 − 42 · 4 · 4)(4 · 4 · 4 − 4 · 4) 1, 1, 1 4,3

This is equal to the number of codes over R of type (0, 1, 1) which is " # ((43 )3 − 43 )(43 − 41 ) 3 = 2 = 420. (4 · 4 − 41 · 4)(4 · 4 − 44 ) 0, 1, 1 4,3

Theorem 3.5. Let R be a principal ideal ring such that R = CRT (R1 , R2 , . . . , Rh ) where the Ri are chain rings with maximal ideal hγi i where γi has nilpotency ei . Then the number of codes C over R where Ψi (C) has type ki,0 , ki,1 , . . . , ki,ei −1 is # " h Y n . (11) ki,0 , ki,1 , . . . , ki,ei −1 i=1 qi ,ei

Proof. We simply multiply the numbers we obtain from Theorem 3.3. As an example, it is easy to compute that the number of all linear codes over Z6 of length 2 is 30. Simply take the product of the number of codes over Z2 and Z3 . These types of results cannot be extended to codes that are local rings without being chain rings. For example, consider the following two rings: R1 = Z4 [x]/(x2 − 1) and R2 = F2 + uF2 + u2 F2 + u3 F2 , with u4 = 0. Then we have that |R1 | = |R2 | = 16 and |m1 | = | < 1 + x, 2 > | = 8 = |m2 | = |u|. There are 5 ideals in R2 , namely R2 , < u >, < u2 >, < u3 >, < 0 > . Hence there are 5 linear codes of length 1. The ring R1 has 6 principal ideals R1 , < 2 >, < 3 + x >, < 3 + 3x >, < 2 + 2x >, < 0 >. Additionally, there are ideals that are not principal, for example, < 1 + x, 2 >. This gives that there are more than 5 linear codes of length 1 over R1 . Even though R1 and R2 have the same cardinality and same size of the maximal ideal they do not have the same number of codes of length 1.

17

References [1] Dougherty, S.T., Han, S.: Higher weights and generalized MDS codes, J. Korean Math. Soc., vol. 47, no. 6, pp. 1167-1182 (2010). [2] Dougherty, S.T., Han, S., Liu, H.: Higher weights for codes over rings, Appl. Algebra Engrg. Comm. Comput. vol. 22, no. 2, pp. 113-135 (2011). [3] Dougherty, S.T., Kim, J.-L., Kulosman, H.: MDS codes over finite principal ideal rings, Designs, Codes, Cryptogr., vol. 50, no. 1, pp. 77-92 (2008). [4] Dougherty, S.T., Liu, H.: Independence of vectors in codes over rings, Designs, Codes, Cryptogr., vol. 51, no. 1, pp. 55-68 (2009). [5] Park, Y. H.: Modular independence and generator matrices for codes over Zm , Des. Codes Cryptogr. vol. 50, no. 2, pp. 147-162 (2009). [6] Salt¨ urk, E., Siap, I.: On the number of linear codes over Zpm , in submission. [7] Salt¨ urk, E., Siap, I.: Generalized Gaussian numbers related to linear codes over Galois rings, Eur. J. of Pure Appl. Math., vol. 5, no. 2, pp. 250-259 (2012). [8] Wood, J.: Duality for modules over finite rings and applications to coding theory, Amer. J. Math., vol. 121, no. 3, pp. 555-575 (1999).

18

Counting Codes over Rings

Sep 3, 2012 - [x,y] = x1y1 + ททท + xnyn. For any code C over R, we define the orthogonal to be. C⊥ = {x ∈ Rn ∣. ∣[x,c]=0, ∀c ∈ C}. Throughout the paper we assume that the rings are all Frobenius, see [8] for a definition of this class of rings and a characterization of codes over these rings. Principally, in this setting ...

248KB Sizes 2 Downloads 339 Views

Recommend Documents

On Codes over Local Frobenius Rings: Generator ...
Jul 30, 2014 - of order 16 for illustration. ... It is well known, see [7], that the class of finite rings for which it makes ... codes is the class of finite Frobenius rings.

Cyclic Codes over Formal Power Series Rings
Jun 22, 2011 - Let i be an arbitrary positive integer. The rings Ri are defined as follows: Ri = {a0 + a1γ + ··· + ai−1γi−1 |ai ∈ F} where γi−1 = 0, but γi = 0 in Ri.

Generalized Shadows of Codes over Rings
Jun 22, 2011 - Let R be finite commutative ring. A code over R is a subset of Rn and a linear code is a submodule of this space. To the ambient space Rn ...

Type IV Self-Dual Codes over Rings
Jun 22, 2011 - If C is self-dual then C(1) is doubly-even and C(2) = C(1)⊥ [9]. Lemma 2.2 If C is a Type IV code over Z4 then the residue code C(1) contains ...

Symmetric Designs and Self-Dual Codes over Rings
Jun 22, 2011 - and the minimum Hamming weight of a code is the smallest of all non-zero weights in the code. The Hamming weight enumerator of a code C is defined by WC(x, y) = ∑ c∈C ywt(c) where wt(c) is the Hamming weight of the vector c. 2 Cons

Constructions of Self-dual Codes over Chain Rings
Jun 22, 2011 - i ,j = −γi+i Ai,i ,. (13) where AT denotes the transpose of the matrix A. Proof. The result follows from the fact that the code is self-orthogonal which ...

Type II codes over finite rings
Jun 23, 2011 - II codes over Galois rings GR(2m,r) = Zpm [x]/(g(x)), where r is the degree of the basic irreducible polynomial g(x) in Zpm [x], see [3]. They also discussed interesting connections to unimodular lattices. In this paper, we shall first

Self-Dual Codes over Non-Commutative Frobenius Rings
25 Jun 2014 - For commutative rings, self-dual codes are constructed via the Chinese Remainder The- orem. Namely, any Frobenius ring is the product of local rings and any principal ideal ring is the product of chain rings. Then self-dual codes are co

Shadows of codes over rings of order 4
Steven T. Dougherty. Department of Mathematics. University of Scranton. Scranton, PA 18510. USA. Email: [email protected]. June 22, 2011. Abstract. We describe different ways of defining shadows for self-dual codes over rings of order 4. We

Maximum Distance Codes over Rings of Order 4
Maximum Distance Codes over Rings of. Order 4. Steven T. Dougherty. Department of Mathematics. University of Scranton. Scranton, PA 18510. USA. Email: ...

Self-Dual Codes over Commutative Frobenius Rings
Jun 22, 2011 - Email: [email protected]. Hongwei Liu. Department of Mathematics. Huazhong Normal University. Wuhan, Hubei 430079, P. R. China.

Higher Weights for Codes over Rings
Jun 22, 2011 - number of basis elements for a code over this class of rings is just the rank of this code. 1.3 Higher Weights. Let R be a finite ...... (c1,ททท ,cg)∈C1ืทททืCg. ∏ a∈Rg j. Xna(c1,ททท ,cg) a. , where cl = (cl1

Lifted Codes over Finite Chain Rings
Jun 22, 2011 - (ii) If i = 1 then R1 = F, and the result follows directly. Now suppose i > 1, let a = a0 + a1γ + ททท + ai−1γi−1 ∈ Ri. We define ρ to be a map from ...

MDS Codes over Finite Principal Ideal Rings
A finite family (ai)n i=1 of ideals of R, such that the canonical homomorphism of R to. ∏n i=1. (R/ai) is an isomorphism is called a direct decomposition of R.

Codes over Rings and Hermitian Lattices
Apr 14, 2014 - where the Ai,j are matrices with elements in the ring. The code C is said to have type. (k0,k1,k2,...,ke−1). A code C with type (k0,k1,k2,...,ke−1) ...

Independence of Vectors in Codes over Rings
Jun 22, 2011 - to that of codes over finite local Frobenius rings. Remark 1. The following is an example of a ring that is a local Frobenius ring but not a chain ring. We shall use this ring to exhibit several of the results of the paper. Example 1.

Self-Dual Codes over Rings and the Chinese ...
where Ai,j are binary matrices for i > 1. Notice 2 is a unit in Z3 hence this code generates a ternary code of dimension k1 + k2 = n. 2 . We now consider self-dual ...

Codes over Rings, Complex Lattices and Hermitian ...
Email: [email protected]. June 22, 2011 ... Key Words: Self-dual codes, unimodular lattices, Hermitian modular forms. ∗This work was partially ...

Counting Additive Z2Z4 Codes
Jan 2, 2013 - dimension of (Cb)X. The code Cb is a binary linear code. When α = 0, we will write κ = 0. For a Z2Z4 code we say that C is of type (α, β;γ,δ;κ), where γ, δ and κ are defined as above. In [4], it is shown that a Z2Z4-additive c

Codes Over a Family of Local Frobenius Rings, Gray ...
Sep 10, 2016 - If a code C satisfies WC(x, y) = WC⊥ (x, y) then we say that the code is formally self-dual with respect to that weight enumerator. For binary codes, there is only the Hamming weight, so a binary formally self-dual code is formally s

Self-Dual Codes over a Family of Local Rings
Jul 22, 2016 - (v0,...,vn−1) → v0+v1x+···+vn−1xn−1. By using this operation, as in any commutative ring we can identify cyclic codes with ideals in Rq,∆[x]/〈xn−1〉. Notice that if gcd(q, n) = 1 then the factorization of xn − 1 is

Type II Self-Dual Codes over Finite Rings and Even ...
Jun 22, 2011 - Zk for all lengths n ≡ 0 (mod 4). Proof. If there exists γ ∈ Zk with γ2 = −1 then (1,γ) generates a code with k vectors which is self-orthogonal. Hence there exist self-dual codes of all even lengths over Zk. Since k is not a

Cyclic Codes over Local Frobenius Rings of Order 16
Then there exist non-negative integers s0 = 0,s1,s2 ...,st+1 with s0 + s1 + ··· + st+1 = r and a permutation. {f1,f2,...,fr} of ...... E-mail address: [email protected].

Optimal Linear Codes over Zm
Jun 22, 2011 - where Ai,j are matrices in Zpe−i+1 . Note that this has appeared in incorrect forms often in the literature. Here the rank is simply the number of ...