arXiv:1707.01356v2 [math.CO] 8 Nov 2017

On the classification of Z4-codes
Makoto Araya∗, Masaaki Harada†, Hiroki Ito‡and Ken Saito§
November 9, 2017

Abstract
In this note, we study the classification of Z4 -codes. For some
special cases (k1 , k2 ), by hand, we give a classification of Z4 -codes of
length n and type 4k1 2k2 satisfying a certain condition. Our exhaustive
computer search completes the classification of Z4 -codes of lengths up
to 7.

1

Introduction

Let Z4 (= {0, 1, 2, 3}) denote the ring of integers modulo 4. A Z4 -code C of
length n is a Z4 -submodule of Zn4 . Over the past decade codes over finite
rings have gained in importance for both practical and theoretical reasons.
In particular, there has been interest in Z4 -codes. For example, a simple relationship between the best known nonlinear binary codes such as the Kerdock,
Preparata, Goethals codes, which contain more codewords than any known
linear codes with the same minimum distance and Z4 -codes was discovered
by Hammons, Kumar, Calderbank, Sloane and Solé [5].
∗

Department of Computer Science, Shizuoka University, Hamamatsu 432–8011, Japan.
email: araya@inf.shizuoka.ac.jp
†
Research Center for Pure and Applied Mathematics, Graduate School of Information
Sciences, Tohoku University, Sendai 980–8579, Japan. email: mharada@m.tohoku.ac.jp.
‡
Koki Consultant Inc., Kitakata 966–0902, Japan. This work was carried out at Graduate School of Information Sciences, Tohoku University.
§
Research Center for Pure and Applied Mathematics, Graduate School of Information Sciences, Tohoku University, Sendai 980–8579, Japan.
email: kensaito@ims.is.tohoku.ac.jp.

1

The Hamming weight wtH (x), Lee weight wtL (x) and Euclidean weight
wtE (x) of a codeword x of a Z4 -code C are defined as n1 (x) + n2 (x) + n3 (x),
n1 (x)+2n2 (x)+n3 (x) and n1 (x)+4n2 (x)+n3 (x), respectively, where ni (x) is
the number of components of x which are equal to i. The minimum Hamming
weight dH (C), minimum Lee weight dL (C) and minimum Euclidean weight
dE (C) of C is the smallest Hamming, Lee and Euclidean weight among all
non-zero codewords of C, respectively. A Z4 -code C of length n and type
4k1 2k2 is called Hamming-optimal, Lee-optimal and Euclidean-optimal if C
has the largest minimum Hamming weight, the largest minimum Lee weight
and the largest minimum Euclidean weight among all Z4 -codes of length n
and type 4k1 2k2 , respectively.
Two Z4 -codes C and C ′ are equivalent, denoted C ∼
= C ′ , if C can be
′
obtained from C by permuting the coordinates and (if necessary) changing
the signs of certain coordinates. It is a fundamental problem to classify Z4 codes for modest lengths, up to equivalence. Concerning self-dual Z4 -codes,
the classification is known for lengths up to 19 (see [6]). Beyond self-dual Z4 codes, only a few results on the classification of Z4 -codes are known [3] and [4]
(see also [7]). More precisely, a classification of optimal Z4 -codes C of length
n ≤ 8 with |C| = 2n was done in [4], noting that the definition of optimal
Z4 -codes is slightly different from the above definition. A classification of Z4 codes which are Hamming-optimal, Lee-optimal and Euclidean-optimal was
presented in [3] for lengths up to 7. In this note, we study the classification
of Z4 -codes.
This note is organized as follows. In Section 2, some preliminaries are
given. In Section 3, the notion of trivial extensions is introduced. We show
that it is sufficient to consider only inequivalent Z4 -codes of length n and
type 4k1 2k2 , none of which is equivalent to the trivial extension of a Z4 -code
of length n − 1, in order to complete the classification of Z4 -codes of length n
and type 4k1 2k2 (Proposition 3.2). In Section 4, for some special cases (k1 , k2 ),
by hand, we give a classification of Z4 -codes of length n and type 4k1 2k2 , none
of which is equivalent to the trivial extension of a Z4 -code of length n − 1. In
Section 5, we describe a computer-aided classification method of Z4 -codes.
In Section 6, our exhaustive computer search completes the classification of
Z4 -codes of lengths n ≤ 7, none of which is equivalent to the trivial extension
of a Z4 -code of length n − 1, by the method given in Section 5. Along with
Proposition 3.2, we complete the classification of all Z4 -codes of lengths up
to 7. All computer calculations in this note were done by Magma [1].

2

2

Preliminaries

Let C be a Z4 -code of length n. It is known that C is permutation-equivalent
to a Z4 -code with generator matrix of the form:


B
Ik 1 A
,
(1)
O 2Ik2 2D
where Ik denotes the identity matrix of order k, O denotes the zero matrix,
A and D are (1, 0)-matrices, and B is a Z4 -matrix of appropriate sizes. We
say that C has type 4k1 2k2 (see [2] and [5]).
The dual code C ⊥ of C is defined as C ⊥ = {x ∈ Zn4 | x · y = 0 for all
y ∈ C}, where x · y is the standard inner product. The dual code C ⊥ of the
Z4 -code C with generator matrix (1) has the following generator matrix:


−B T − D T AT D T In−k1 −k2
,
2AT
2Ik2
O
where AT denotes the transposed matrix of A [2]. This means that C ⊥ has
type 4n−k1 −k2 2k2 . Throughout this note, let N(n, k1 , k2 ) denote the number
of inequivalent Z4 -codes of length n and type 4k1 2k2 . Then it is trivial that
N(n, k1 , k2 ) = N(n, n − k1 − k2 , k2 ).

(2)

For an element a ∈ Z4 , we denote the binary element a (mod 2) by â.
The residue code C (1) of a Z4 -code C of length n is defined as the following
binary code:
C (1) = {(cˆ1 , cˆ2 , . . . , cˆn ) | (c1 , c2 , . . . , cn ) ∈ C}.
If C is a Z4 -code of length n and type 4k1 2k2 having generator matrix (1),
then C (1) is a binary [n, k1 ] code with the following generator matrix:

(3)
Ik1 A (bˆij ) ,

where B = (bij ) and A is regarded as a binary matrix. Note that equivalent
Z4 -codes have equivalent residue codes.

3

The Hamming, Lee and symmetrized weight enumerators of a Z4 -code C
of length n are defined as:
X
hweC (x, y) =
xn−wtH (c) y wtH (c) ,
c∈C

lweC (x, y) =

X

x2n−wtL (c) y wtL (c) ,

sweC (x, y, z) =

X

xn0 (c) y n1(c)+n3 (c) z n2 (c) ,

c∈C

c∈C

respectively. Note that equivalent Z4 -codes have identical Hamming, Lee,
symmetrized weight enumerators.

3

Trivial extensions

In this section, we introduce the notion of trivial extensions. Some basic
facts are given.
Let C be a Z4 -code of length n. Define the Z4 -code of length n + 1:
C = {(c, 0) | c ∈ C}.
We say that C is a trivial extension of C.
Lemma 3.1. Let C and C ′ be Z4 -codes of length n. Suppose that D and
D ′ are Z4 -codes of length n + 1 satisfying that C ∼
= D and C ′ ∼
= D ′ . Then
C∼
= D′.
= C ′ if and only if D ∼
Proof. Suppose that D ∼
= C ′ . Since the last coordinate of
= D ′ . Then C ∼
each codeword of C and C ′ is 0, there is a (1, −1, 0)-monomial matrix P of
order n + 1 such that C = C ′ P , where


0

.. 
′

P
. 
P =
.

0 
0 ··· 0 1
This gives that C = C ′ P ′ , thus C ∼
= C ′ . The converse is immediate.

4

Proposition 3.2. Let C(n, k1 , k2) be a set of all inequivalent Z4 -codes of
length n and type 4k1 2k2 . Then there are a set C(n − 1, k1, k2 ) of all inequivalent Z4 -codes of length n − 1 and type 4k1 2k2 , and a set D(n, k1, k2 ) of all
inequivalent Z4 -codes of length n and type 4k1 2k2 , none of which is equivalent
to the trivial extension of a Z4 -code of length n − 1, such that
C(n, k1 , k2 ) = D(n, k1 , k2 ) ∪ {C | C ∈ C(n − 1, k1 , k2 )},
D(n, k1 , k2) ∩ {C | C ∈ C(n − 1, k1, k2 )} = ∅.
Proof. It follows from the definition that C(n, k1 , k2 ) is the direct sum of
D(n, k1, k2 ) and the set E(n, k1 , k2) of inequivalent Z4 -codes of length n and
type 4k1 2k2 , which are equivalent to the trivial extensions of some Z4 -codes
of length n−1. By Lemma 3.1, there is a one-to-one correspondence between
E(n, k1, k2 ) and C(n − 1, k1, k2 ). The result follows.
Hence, it is sufficient to consider only inequivalent Z4 -codes of length n
and type 4k1 2k2 , none of which is equivalent to the trivial extension of a Z4 code of length n − 1, in order to complete the classification of Z4 -codes of
length n and type 4k1 2k2 .

4

Classification for special cases

In this section, for some special cases (k1 , k2 ), by hand, we give a classification
of Z4 -codes of length n and type 4k1 2k2 , none of which is equivalent to the
trivial extension of a Z4 -code of length n − 1.
Throughout this note, let N ′ (n, k1 , k2 ) denote the number of inequivalent
Z4 -codes of length n and type 4k1 2k2 , none of which is equivalent to the trivial
extension of a Z4 -code of length n − 1.
Proposition 4.1. N ′ (n, n, 0) = N ′ (n, 0, n) = N ′ (n, 0, 1) = 1.
Proof. Let Ck1 ,k2 be a Z4 -code of length n and type 4k1 2k2 , which is inequivalent to the trivial extension of a Z4 -code of length n − 1. Then Cn,0, C0,n
and C0,1 are equivalent to the Z4 -codes with generator matrices In , 2In and
(2 · · · 2), respectively.
Proposition 4.2. N ′ (n, n − 1, 1) = n.

5

Proof. Let C be a Z4 -code of length n and type 4n−1 21 , which is inequivalent
to the trivial extension of a Z4 -code of length n − 1. Then C has generator
matrix of the form:


a1

.. 

. 
In−1
G=
,

an−1 
0 ··· 0
2
where ai ∈ {0, 1} (i = 1, 2, . . . , n − 1). The generator matrix of the dual
code C ⊥ of the Z4 -code C with generator matrix G is given by G⊥ =
(2a1 · · · 2an−1 2). We may suppose without loss of generality that ai ≤ ai+1
(i = 1, 2, . . . , n − 2), where 0 < 1. Hence, N ′ (n, n − 1, 1) ≤ n. Let
⊥
Cm
be the Z4 -code with generator matrix G⊥ , where m is the number of
⊥
⊥
i ∈ {1, 2, . . . , n − 1} with ai = 1 in G⊥ . If m1 6= m2 , then Cm
and Cm
are
1
2
′
inequivalent. This yields that N (n, n − 1, 1) = n.
Proposition 4.3. N ′ (n, 1, n − 1) = n.
Proof. Let C be a Z4 -code of length n and type 41 2n−1 , which is inequivalent
to the trivial extension of a Z4 -code of length n − 1. Then C has generator
matrix of the form:


1 a1 · · · an−1

 0


G =  ..
,

 .
2In−1
0
where ai ∈ {0, 1} (i = 1, 2, . . . , n − 1). We may suppose without loss of
generality that ai ≤ ai+1 (i = 1, 2, . . . , n−2), where 0 < 1. Hence, N ′ (n, 1, n−
1) ≤ n.
Now we consider the residue code C (1) of the Z4 -code C. The residue code
(1)
C has generator matrix G(1) = (1 a1 · · · an−1 ) (see (3) for the generator
(1)
matrix of C (1) ). Let Cm be the residue code with generator matrix G(1) ,
where m is the number of i ∈ {1, 2, . . . , n−1} with ai = 1 in G(1) . If m1 6= m2 ,
(1)
(1)
then Cm1 and Cm2 are inequivalent. This yields that N ′ (n, 1, n − 1) = n.
Proposition 4.4. N ′ (n, 1, 0) = n.

6

Proof. Let C be a Z4 -code of length n and type 41 20 , which is inequivalent
to the trivial extension of a Z4 -code of length n − 1. Then C has generator
matrix of the form (1 a1 · · · an−1 ), where ai ∈ {1, 2, 3} (i = 1, 2, . . . , n − 1).
We may suppose without loss of generality that ai ∈ {1, 2} (i = 1, 2, . . . , n−1)
and ai ≤ ai+1 (i = 1, 2, . . . , n − 2), where 1 < 2. Hence, N ′ (n, 1, 0) ≤ n.
Now consider the residue code C (1) of C. By an argument similar to the
last part of the proof of the above proposition, N ′ (n, 1, 0) = n.
Proposition 4.5. N ′ (n, 0, n − 1) = n − 1.
Proof. Let C be a Z4 -code of length n and type 40 2n−1 , which is inequivalent
to the trivial extension of a Z4 -code of length n − 1. Then C has generator
matrix of the form:


2a1

..  ,
G =  2In−1
. 
2an−1

where ai ∈ {0, 1} (i = 1, 2, . . . , n−1) and aj = 1 for some j ∈ {1, 2, . . . , n−1}.
The generator matrix of the dual code C ⊥ of the Z4 -code C with generator
matrix G is given by:


a1 · · · an−1 1

0 



..  .

2In−1
. 
0

We may suppose without loss of generality that ai ≤ ai+1 (i = 1, 2, . . . , n−2),
where 0 < 1. Hence, N ′ (n, 0, n − 1) ≤ n − 1.
(1)
Now consider the residue code C ⊥ of the dual code C ⊥ . An argument
similar to the last part of the proof of Proposition 4.3 shows the existence of
n − 1 inequivalent dual codes C ⊥ . Hence, N ′ (n, 0, n − 1) = n − 1.
Proposition 4.6. N ′ (n, n − 1, 0) = n(n + 1)/2 − 1.
Proof. Let C be a Z4 -code of length n and type 4n−1 20 , which is inequivalent
to the trivial extension of a Z4 -code of length n − 1. Then C has generator
matrix of the form:


a1

..  ,
G =  In−1
. 
an−1
7

where ai ∈ {0, 1, 2, 3} (i = 1, 2, . . . , n − 1) and aj 6= 0 for some j ∈
{1, 2, . . . , n − 1}. Here we may suppose without loss of generality that
ai ∈ {0, 2, 3} (i = 1, 2, . . . , n − 1). The generator matrix of the dual code C ⊥
of the Z4 -code C with generator matrix G is given by (3a1 · · · 3an−1 1). We
may suppose without loss of generality that 3ai ≤ 3ai+1 (i = 1, 2, . . . , n − 2),
where 0 < 1 < 2. The vector x = (3a1 , 3a2 , . . . , 3an−1, 1) has the form
(0, . . . , 0, 1, . . . , 1, 2, . . . , 2, 1) and the vector is uniquely determined by the
numbers n0 (x) and n1 (x). Let Cm0 ,m1 be the Z4 -code generated by the vector x with m0 = n0 (x) and m1 = n1 (x). Then C ⊥ is equivalent to one of the
codes Cm0 ,m1 (m0 = 0, 1, . . . , n − 2, m1 = 0, 1, . . . , n − 1 − m0 ). Hence, we
have
′

N (n, n − 1, 0) ≤

n−2
X

m0 =0

(

n−1−m
X0
m1 =0

1) =

n(n + 1)
− 1.
2

Now we consider the symmetrized weight enumerator. The code Cm0 ,m1
has the following symmetrized weight enumerator:
sweCm0 ,m1 (x, y, z) = xn + 2xm0 y m1 z n−m0 −m1 + xn−m1 z m1 .
If (m0 , m1 ) 6= (m′0 , m′1 ), then sweCm0 ,m1 (x, y, z) 6= sweCm′ ,m′ (x, y, z). Hence,
1
0
Cm0 ,m1 and Cm′0 ,m′1 are inequivalent. This yields that N ′ (n, n − 1, 0) = n(n +
1)/2 − 1.

5

Classification method

In this section, we describe a computer-aided classification method of Z4 codes. We give some observations on generator matrices (1), in order to
reduce the number of generator matrices of Z4 -codes, which must be checked
further for equivalences.
Define a lexicographical order on the vectors of Zn4 as follows. For a =
(a1 , a2 , . . . , an ) and b = (b1 , b2 , . . . , bn ) ∈ Zn4 , we define an order a ≤ b if one
of the following holds:
(i) a1 < b1 ,
(ii) there is an integer k ∈ {2, 3, . . . , n} such that ak < bk and ai = bi for
all i ∈ {1, 2, . . . , k − 1},
8

(iii) a = b,
where 0 < 1 < 2 < 3. Let Mm×n (Z4 ) denote the set of all m × n Z4 -matrices.
For T ⊂ Mm×n (Z4 ), define the following:


 


a1


 .. 
Prow (T ) = A =  .  ∈ T | ai ≤ aj (i ≤ j) ,




am


Pcol (T ) = B = b1 · · · bn ∈ T | bTi ≤ bTj (i ≤ j) .

Let C be a Z4 -code of length n and type 4k1 2k2 , having generator matrix of
the form (1). We denote the matrix of the form (1) by G(A, B, D). Then we
consider the following sets of matrices:
S = {G(A, B, D) | A ∈ Mk1 ×k2 ({0, 1}), B ∈ Mk1 ×ℓ (Z4 ), D ∈ Mk2 ×ℓ ({0, 1})},
T = {G(A, B, D) ∈ S | A ∈ Prow (Mk1 ×k2 ({0, 1}))},
U = {G(A, B, D) ∈ T | B ∈ B},


 
B
∈ Pcol (M(k1 +k2 )×ℓ (Z4 )) ,
V = G(A, B, D) ∈ U |
2D
where ℓ = n − k1 − k2 and B is the set of all k1 × ℓ (0, 2)-matrices and all
k1 × ℓ Z4 -matrices B satisfying the condition that the i-th row of B contains
entries only 0, 1, 2 for the smallest i ∈ {1, 2, . . . , k1 } such that the i-th row of
B contains entries except 0, 2.
Lemma 5.1. If G ∈ S, then there is a matrix G′ ∈ T such that two Z4 -codes
with generator matrices G and G′ are equivalent.
Proof. By considering permutations of rows and columns, one can obtain
some generator matrix G(A′ , B ′ , D) ∈ S satisfying that A′ ∈ Prow (Mk1 ×k2 ({0, 1}))
and B ′ ∈ Mk1 ×ℓ (Z4 ) from a generator matrix G(A, B, D).

Lemma 5.2. If G ∈ T , then there is a matrix G′ ∈ U such that two Z4 -codes
with generator matrices G and G′ are equivalent.
Proof. By considering negations of some columns, one can obtain some generator matrix G(A, B ′ , D) ∈ T satisfying B ′ ∈ B from a generator matrix
G(A, B, D) ∈ T .
9

Lemma 5.3. If G ∈ U, then there is a matrix G′ ∈ V such that two Z4 -codes
with generator matrices G and G′ are equivalent.
 
B
, one can obtain
Proof. By considering permutations of columns of
2D
some generator matrix G(A, B ′ , D ′ ) ∈ U satisfying the following condition:
 ′
B
∈ Pcol (M(k1 +k2 )×ℓ (Z4 ))
2D ′
from a generator matrix G(A, B, D) ∈ U.
By Lemmas 5.1, 5.2 and 5.3, we have the following:
Proposition 5.4. Let C be a Z4 -code of length n and type 4k1 2k2 , which is
inequivalent to the trivial extension of a Z4 -code of length n − 1 and type
k1 k2
4k1 2k2 . Then there is a Z4 -code C ′ of length n and type 4
2 with C ∼
=
B
does not
C ′ , having generator matrix G(A, B, D) ∈ V satisfying that
2D
contain 0T , where 0 is the zero-vector.
Proposition 5.4 substantially reduces the number of generator matrices
of Z4 -codes which must be checked further for equivalences.

6

Z4-codes of lengths up to 7

A computer-aided classification method of Z4 -codes was given in the previous
section. By the method, in this section, we complete the classification of Z4 codes of lengths n ≤ 7, none of which is equivalent to the trivial extension
of a Z4 -code of length n − 1, along with the results in Section 4.
We consider Z4 -codes of length n and type 4k1 2k2 , none of which is equivalent to the trivial extension of a Z4 -code of length n − 1, except in the
case where the numbers N ′ (n, k1 , k2 ) were determined in Section 4. For a
given set (n, k1 , k2), by exhaustive search, we found all distinct Z4 -codes of
length n and type 4k1 2k2 , satisfying the condition given in Proposition 5.4.
Then the distinct codes can be divided into some classes by comparing the
Hamming weight enumerators and the Lee weight enumerators. Of course,
equivalent Z4 -codes have identical Hamming weight enumerators and identical Lee weight enumerators. To test equivalence of two Z4 -codes C and C ′
10

in each class, we determined whether there is a (1, −1, 0)-monomial matrix
P such that C ′ = CP or not. Then we completed the classification of Z4 codes of length n and type 4k1 2k2 , none of which is equivalent to the trivial
extension of a Z4 -code of length n − 1 for n ≤ 7. The time required for the
computer search of the above classification of Z4 -codes of lengths up to 7,
which corresponds to one core of an Intel Xeon W5590 3.33GHz processor,
is approximately 1954 hours. The parameter (n, k1 , k2 ) = (7, 4, 0) took the
longest time, which was approximately 733 hours.
To save space, we only list in Tables 1–7 the numbers N ′ (n, k1 , k2 ) for n =
1, 2, . . . , 7, respectively. Generator matrices can be obtained electronically
from “http://yuki.cs.inf.shizuoka.ac.jp/Z4codes/”.
Table 1: Length 1
|C|
2

k1
0

k2
1

N ′ (1, k1 , k2 )
1

|C|
22

k1
1

k2
0

N ′ (1, k1 , k2 )
1

k2
1
0

N ′ (2, k1 , k2 )
2
1

k2
2
0
1
0

N ′ (3, k1 , k2 )
3
5
3
1

Table 2: Length 2
|C|
2
22

k1
0
0
1

k2
1
2
0

N ′ (2, k1 , k2 )
1
1
2

|C|
23
24

k1
1
2

Table 3: Length 3
|C|
2
22
2

3

k1
0
0
1
0
1

k2
1
2
0
3
1

N ′ (3, k1 , k2 )
1
2
3
1
7

|C|
24
25
26

11

k1
1
2
2
3

Table 4: Length 4
|C|
2
22
2

3

2

4

k1
0
0
1
0
1
0
1
2

k2
1
2
0
3
1
4
2
0

N ′ (4, k1 , k2 )
1
3
4
3
17
1
16
18

|C|
25
26
27
28

k1
1
2
2
3
3
4

k2
3
1
2
0
1
0

N ′ (4, k1 , k2 )
4
23
6
9
4
1

k2
4
2
0
3
1
2
0
1
0

N ′ (5, k1 , k2 )
5
67
63
10
55
10
14
5
1

Table 5: Length 5
|C|
2
22
23
24

2

5

k1
0
0
1
0
1
0
1
2
0
1
2

k2
1
2
0
3
1
4
2
0
5
3
1

N ′ (5, k1 , k2 )
1
4
5
6
33
4
54
49
1
29
121

|C|
26

27
28
29
210

12

k1
1
2
3
2
3
3
4
4
5

Table 6: Length 6
|C|
2
22
23
24

25

2

6

k1
0
0
1
0
1
0
1
2
0
1
2
0
1
2
3

k2
1
2
0
3
1
4
2
0
5
3
1
6
4
2
0

N ′ (6, k1 , k2 )
1
6
6
12
58
11
149
121
5
134
499
1
47
500
381

|C|
27

28

29
210
211
212

k1
1
2
3
2
3
4
3
4
4
5
5
6

k2
5
3
1
4
2
0
3
1
2
0
1
0

N ′ (6, k1 , k2 )
6
157
587
16
212
179
22
112
16
20
6
1

k2
6
4
2
0
5
3
1
4
2
0
3
1
2
0
1
0

N ′ (7, k1 , k2 )
7
319
3247
2215
23
648
2257
43
565
429
43
204
23
27
7
1

Table 7: Length 7
|C|
2
22
23
2

4

2

5

2

6

2

7

k1
0
0
1
0
1
0
1
2
0
1
2
0
1
2
3
0
1
2
3

k2
1
2
0
3
1
4
2
0
5
3
1
6
4
2
0
7
5
3
1

N ′ (7, k1 , k2 )
1
7
7
21
93
27
359
256
17
503
1728
6
283
2896
1955
1
70
1582
5184

|C|
28

29

210

211
212
213
214

13

k1
1
2
3
4
2
3
4
3
4
5
4
5
5
6
6
7

As a summary, we list the numbers N ′ (n) of inequivalent Z4 -codes of
lengths n ≤ 7, none of which is equivalent to the trivial extension of a Z4 code of length n − 1.
Proposition 6.1. N ′ (1) = 2, N ′ (2) = 7, N ′ (3) = 26, N ′ (4) = 110, N ′ (5) =
537, N ′ (6) = 3265 and N ′ (7) = 25054.
The number N(n, k1 , k2 ) of inequivalent Z4 -codes of length n and type
4k1 2k2 can be obtained from N ′ (n, k1 , k2 ) and N(n − 1, k1, k2 ) by Proposition 3.2. As a check, we verified that the numbers N(n, k1 , k2 ) satisfy (2) for
n ≤ 7. As a summary, we list the numbers N(n) of inequivalent Z4 -codes of
lengths n ≤ 7.
Proposition 6.2. N(1) = 2, N(2) = 9, N(3) = 35, N(4) = 145, N(5) =
682, N(6) = 3947 and N(7) = 29001.
We end this note with a certain remark. There is another approach to
completing the classification of Z4 -codes of length n. If a classification of
Z4 -codes of length n and type 4k1 2k2 is done for only k1 ≤ n − k1 − k2 ,
then the remaining classification is obtained from the above classification by
considering their dual codes (see (2)). In this note, we employed the approach
given in Section 5, because (2) can be used as a check.
Acknowledgments. This work was supported by JSPS KAKENHI Grant
Numbers 26610032, 15H03633. The authors would like to thank Akihiro
Munemasa for helpful comments.

References
[1] W. Bosma, J. Cannon and C. Playoust, The Magma algebra system I:
The user language, J. Symbolic Comput. 24 (1997), 235–265.
[2] J.H. Conway and N.J.A. Sloane, Self-dual codes over the integers modulo
4, J. Combin. Theory Ser. A 62 (1993), 30–45.
[3] S.T. Dougherty, T.A. Gulliver, Y.H. Park and J.N.C. Wong, Optimal
linear codes over Zm , J. Korean Math. Soc. 44 (2007), 1139–1162.
[4] T.A. Gulliver and J.N.C. Wong, Classification of optimal linear Z4 rate
1/2 codes of length ≤ 8, Ars Combin. 85 (2007), 287–306.
14

[5] A.R. Hammons, Jr., P.V. Kumar, A.R. Calderbank, N.J.A. Sloane and
P. Solé, The Z4 -linearity of Kerdock, Preparata, Goethals and related
codes, IEEE Trans. Inform. Theory 40 (1994), 301–319.
[6] M. Harada and A. Munemasa, On the classification of self-dual Zk -codes,
Lecture Notes in Comput. Sci. 5921 (2009), 78–90.
[7] J.N.C. Wong, Classification of Small Optimal Linear Codes over Z4 ,
Master’s thesis, University of Victoria, 2002.

15

