Complete weight enumerators of some irreducible cyclic codes

Complete weight enumerators of some irreducible cyclic codes

Discrete Applied Mathematics ( ) – Contents lists available at ScienceDirect Discrete Applied Mathematics journal homepage: www.elsevier.com/locat...

394KB Sizes 0 Downloads 118 Views

Discrete Applied Mathematics (

)



Contents lists available at ScienceDirect

Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam

Complete weight enumerators of some irreducible cyclic codes Zexia Shi ∗ , Fang-Wei Fu Chern Institute of Mathematics, Nankai University, Tianjin 300071, PR China

article

abstract

info

Article history: Received 27 March 2016 Received in revised form 30 October 2016 Accepted 6 November 2016 Available online xxxx

In this paper, we investigate the complete weight enumerators of two classes of irreducible cyclic codes. We present the explicit complete weight enumerator of the irreducible cyclic codes. Furthermore, we obtain a class of optimal constant composition codes from irreducible cyclic codes. © 2016 Elsevier B.V. All rights reserved.

Keywords: Complete weight enumerator Gaussian periods Combination Optimal constant composition code

1. Introduction Throughout this paper, let p be a prime, q = ps for a positive integer s. Let Fr be a finite field with r = qm elements and α be a generator of F∗r = Fr \{0}. An [n, k, d] linear code C over Fq is a k-dimensional subspace of Fnq with minimum distance d. An [n, k, d] linear code C over Fq is called cyclic if (c0 , c1 , . . . , cn−1 ) ∈ C implies (cn−1 , c0 , . . . , cn−2 ) ∈ C . Moreover a cyclic code C can be viewed as an ideal of the quotient ring Fq [x]/⟨xn − 1⟩. Note that every ideal of Fq [x]/⟨xn − 1⟩ is principal. Let C = ⟨g (x)⟩, where g (x) is the monic polynomial of the least degree and g (x) is a divisor of xn − 1. Then g (x) and h(x) = (xn − 1)/g (x) are called the generator polynomial and the check polynomial of C , respectively. If h(x) is irreducible over Fq , we call C an irreducible cyclic code. Let the elements of Fq be denoted by b0 = 0, b1 , b2 , . . . , bq−1 , in some fixed order. For a codeword c = (c0 , c1 , . . . , cn−1 ) ∈ C , the composition of c denoted by comp(c), is (ω0 , ω1 , . . . , ωq−1 ) where ωi = ωi (c) is the number of components cj (0 ≤ j ≤ n − 1) equals bi . Clearly, WC (z0 , z1 , . . . , zq−1 ) =



q−1 i=0

ωi = n. Then the complete weight enumerator of C is

ωq−1 (c) ω (c) ω (c) z0 0 z1 1 . . . zq−1 .

c∈C

The weight enumerators of cyclic codes have been extensively investigated for many years (see [8,10,9,17,19,23]). It is not difficult to see that the weight enumerators can be obtained from the complete weight enumerators. Blake and Kith [3,14] presented the complete weight enumerator of a special class of Reed–Solomon codes. The complete weight enumerators of generalized Kerdock code and related linear codes over Galois rings were studied by Kuzmin and Nechaev [15,16]. Recently, the complete weight enumerators of some cyclic codes have been established with exponential sums and Galois theory [1,12,18]. An (n, M , d, [ω0 , ω1 , . . . , ωq−1 ])q constant composition code (CCC in short) is a code over the abelian group {b0 , b1 , . . . , bq−1 }, with length n, size M, and minimum Hamming distance d such that in every codeword the element bi



Corresponding author.

http://dx.doi.org/10.1016/j.dam.2016.11.008 0166-218X/© 2016 Elsevier B.V. All rights reserved.

2

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



appears exactly ωi times for every i. Two constant composition codes are said to be equivalent if one can be obtained from the other by coordinate permutations. Let N > 1 be an integer dividing r − 1, n = (r − 1)/N, and θ = α N . Then

C = {c(a) = (Trr /q (a), Trr /q (aθ ), . . . , Trr /q (aθ n−1 )) : a ∈ Fr }

(1)

is called an irreducible cyclic [n, m0 ] code over Fq , where m0 is the multiplicative order of q modulo n, and Trr /q is the trace function from Fr onto Fq . By Delsarte’s Theorem [6], the check polynomial of C is the minimal polynomial of θ −1 over Fq . In this paper, we investigate the complete weight enumerators of irreducible cyclic codes in the following two cases: 1. q = p2t γ1 for some integer γ1 , where t is the least positive integer such that pt ≡ −1 mod N. 2. n = lv and m = lv1 , where l is a prime, q − 1 = lv2 b with gcd(l, b) = 1, v = v1 + v2 and v1 , v2 > 0. Moreover 4 | (q − 1) if l = 2. It should be remarked that the weight enumerator of C has been determined [24] for Case 2. Li et al. [18] used Gauss sums to determine the explicit complete weight enumerators of C in some cases. In this paper, we give the explicit complete weight enumerator of C for Case 1 by using Gaussian periods and obtain a class of optimal constant composition codes. Moreover we use a combinatorial method to present the explicit complete weight enumerator of C for Case 2. The rest of the paper is organized as follows. In Section 2, we introduce some basic definitions and properties about character and Gaussian periods. In Section 3, we present the explicit complete weight enumerator of C for Case 1 by using Gaussian periods and then obtain a class of optimal constant composition codes. In Section 4, we use a combinatorial method to give the explicit complete weight enumerator of C for Case 2. 2. Gaussian periods Let Fr be the finite field with r elements, where r is a power of prime p. An additive character of Fr is a nonzero function

χ from Fr to the set of complex numbers such that χ (x + y) = χ (x)χ (y) for any pair (x, y) ∈ Fr × Fr . For each a ∈ Fr , the function

χa (x) = e





−1Trr /p (ax) p

,

where Trr /p denotes the trace function from Fr onto Fp , defines an additive character of Fr . In particular, χ0 is called the trivial additive character of Fr and χ1 is called the canonical additive character of Fr . The orthogonal property of additive character which can be found in [20] is given by



χa (x) = 0 for a ̸= 0.

x∈Fr

(N ,r )

= α i ⟨α N ⟩ for i = 0, 1, . . . , N − 1, where ⟨α N ⟩ Let r − 1 = nN and let α be a fixed primitive element of Fr . Define Ci denotes the subgroup of F∗r generated by α N . The Gaussian periods are defined by ηi(N ,r ) =



χ (x),

i = 0, 1, . . . , N − 1,

(N ,r ) x∈Ci

where χ is the canonical additive character of Fr . The Gaussian periods in the semiprimitive case are known and are described in the following lemma. Lemma 1 ([2,22]). Assume that N ≥ 2 and there exists a least positive integer t such that pt ≡ −1 mod N. Let r = p2t γ for some integer γ . 1. If γ , p and (pt + 1)/N are all odd, then (N ,r )

ηN

=

√ (N − 1) r − 1 N

2

,



(N ,r )

ηk

=−

r +1 N

for k ̸=

N 2

.

2. In all other cases,

η0(N ,r ) =

√ (−1)γ +1 (N − 1) r − 1 N

,

ηk(N ,r ) =

(−1)γ



r −1

N

for k ̸= 0.

3. The first case In this section, we use Gaussian periods to give the explicit complete weight enumerator of the irreducible cyclic code C defined by (1) for Case 1, and obtain a class of optimal constant composition codes.

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



3

3.1. The complete weight enumerator of C For a codeword c(a) ∈ C and c ∈ Fq , let N (c ) denote the number of components Trr /q (aθ i ) of c(a) that are equal to c, i.e., N (c ) = |{0 ≤ i ≤ n − 1 : Trr /q (aθ i ) = c }|

= |{0 ≤ i ≤ n − 1 : Trr /q (aθ i ) − c = 0}|. Let φ be the canonical additive character of Fq . Note that χ = φ ◦ Trr /q is the canonical additive character of Fr . By the orthogonal property of additive characters, we have N (c ) =

n −1   1   φ y Trr /q (aθ i ) − c i =0

=

n −1   1  φ yTrr /q (aθ i ) φ(−yc ) i =0

=

=

q y∈F q

q y∈F q

n −1  1

q y∈F i =0 q n q

+

χ (yaθ i )φ(−yc )

n −1 1 

q

χ (yaθ i )φ(−yc ).

y∈F∗ q i=0

If a = 0, we can easily get N (0) = n,

N (c ) = 0

for c ̸= 0. (N ,r )

1 From now on, let δ = gcd( qr − , N ). It follows that Nδ | (q − 1). If a ̸= 0, suppose that a ∈ Cj −1

j = 0, 1, . . . , N − 1, l = 0, 1, . . . , δ − 1. Denote N = have N

N (c ) =

=

n q n q

+

+

1 q

y∈F∗ q

1 q

φ(−yc )

n−1 



r −1 . q −1

( N ,r )



Note that Fq ∩ C0

N′

N

( Nδ ,q)

, −c ∈ C l

= ⟨α ⟩ ∩ ⟨α ⟩ = ⟨α

N′N

δ

,

⟩, then we

χ (yaθ i )

i=0



φ(−yc )

χ (yaz )

(N ,r )

y∈F∗ q

z ∈C0

N

=

n q

+

1

δ −1 



q i =0 (N ′ N /δ,r ) y∈C ′ N i

φ(−yc )



χ (yaz )

(N ,r ) z ∈C0

N

=

n q

+

δ −1 1 



q i =0 (N ′ N /δ,r ) y∈C ′ N i

φ(−yc )



χ (az ′ )

(N ,r ) z ′ ∈C ′ N i mod N

N

δ −1 1  = + η(N′ ,r ) q q i =0 N i +j

n

N



φ(−yc )

(N ′ N /δ,r ) y∈C ′ N i

N δ −1 1  δ ,q = + ηN(N′ i,+r )j ηl+i , q q i =0

n

(N ,r )

(N ,r )



( N ,q )



(2) ( N ,q )

where ηN ′ i+j = η(N ′ i+j) mod N , ηl+δi = η δ . (l+i) mod Nδ In the following, we give the complete weight enumerator of the irreducible cyclic code C defined by (1) for Case 1 by using semiprimitive Gaussian periods. 1 Theorem 1. Let N be a positive integer, N ≥ 2 and δ = gcd( qr − , N ). Assume that there exists a least positive integer t such that −1

( Nδ ,q)

pt ≡ −1 mod N. Let q = p2t γ1 for some integer γ1 and γ2 = mγ1 . Suppose that Cl

= {−b δ(q−1) l+i : i = 1, 2, . . . , δ(qN−1) }, N

4

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



l = 0, 1, . . . , Nδ − 1. Then the complete weight enumerator of the irreducible cyclic code C defined by (1) is

(δ − 1)(r − 1) A0 A1 A1 r − 1 B0 B1 B1 A1 B B2 B z0 z1 z2 . . . zq− z0 z1 z2 . . . z δ(1q−1) z δ(2q−1) . . . zq− 1 + 1 +1 δ N N N r − 1 B0 B2 B B B2 B B + z0 z1 . . . z δ(2q−1) z δ(1q−1) . . . z 21δ(q−1) z 22δ(q−1) . . . zq− 1

r −1

z0 N +

N

N

+ ··· +

r −1 N

B B B z0 0 z1 2 z2 2

+1

N

...

N

+1

N

B B z (N2 −δ)(q−1) z (N1 −δ)(q−1) N

N

B

. . . zq−1 1 ,

+1

where A0 , A1 , B0 , B1 and B2 are given as follows. 1. If γ1 , p, (pt + 1)/N and δ are all odd, then



r − q − (q − 1) r

A0 =

qN

,

A1 =

r+



r

,

qN



r − q + (δ − 1)(q − 1) r

, qN √ √ r + (1 − δ) r + (N − δ) qr

B0 = B1 =

qN

√ √ r + (1 − δ) r − δ qr

B2 =

qN

,

.

2. In all other cases,



r − q + (−1)γ2 (q − 1) r

A0 =

qN

,

A1 =

√ r − q − (−1)γ2 (δ − 1)(q − 1) r

B0 =

qN

r − (−1)γ2 qN

√ √

,



qN

r + (−1)γ2 (δ − 1) r − (−1)γ1 +γ2 δ

B2 =

r

,

r + (−1)γ2 (δ − 1) r + (−1)γ1 +γ2 (N − δ) qr

B1 =



,



qr

qN

.

Proof. Note that pt ≡ −1 mod N, q = p2t γ1 and r = qm . It then follows that δ = gcd(m, N ) and r = p2t γ2 . Let k ∈ {0, 1, . . . , N − 1}, k′ ∈ {0, 1, . . . , Nδ − 1}. 1. If γ1 , p, (pt + 1)/N and δ are all odd, then according to Lemma 1 we have

η(NN ,q) =

√ (N − 1) q − 1 N

2



,

q+1

ηk(N ,q) = −

N

for k ̸=

N 2

.

Since both p and (pt + 1)/N are odd, then N is even. Note that δ is odd, thus both m and γ2 are odd. According to Lemma 1, we have (N ,r )

ηN

=

√ (N − 1) r − 1 (N ,r )

For simplicity, we let η∗ ( δ ,q )

Since ηi 

ηN

N

δ ,q

mod Nδ



δ ,q

r +1

=− (N ,r )

be the value of ηk i+

δ

2

N

ηk

N for k ̸=

for k ̸=

N 2

.

N . 2

q) = ηi(N ,q) + ηi(+N ,Nq) + · · · + η(N ,(δ− 1)N , it then follows that





ηk′

,

N

2

N



(N ,r )

=

=−

√ (N − 1) q − 1 √ δ q+δ

( N ,q )

And we let η∗ δ

N

N

,



N N

for k′ ̸=

2

( N ,q)

be the value of ηk′δ

N

mod

N

δ

=

√ (N − δ) q − δ N

,

.

for k′ ̸=

N 2

N

mod Nδ .

( ,q )

(N ,r ) δ ηmi +j ηl+i . − 1} and gcd(m, N ) = δ . For any fixed j, 0 ≤ j ≤ N − 1, we consider the following two

Now, we determine the value of Note that l ∈ {0, 1, . . . , Nδ cases:

δ

√ (δ − 1)( q + 1)

 δ −1 i=0

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



i. If δ - ( N2 − j), i.e., δ - j, we know that the linear congruence equation mi + j ≡ N

δ −1 



N

δ ,q

N



(N ,r ) ηmi +j ηl+i

= η∗(N ,r )

i =0

(N ,r )

According to (2), for a ∈ Cj N (c ) = It follows that N (0) =



n

r +1

+

q

qN

δ −1 



N

δ ,q

N 2

mod N admits no solution. Therefore





r +1

= −η∗(N ,r ) =

ηl+i

5

N

i=0

.

, c ∈ F∗q , we have r+

=



r

qN

.



r − q − (q − 1) r qN √

r −q−(q−1) r , qN

Then we set A0 =

. √

A1 =

r+ r . qN

ii. If δ | ( N2 − j), i.e., δ | j, let us consider the following system in the unknown i:

 N  mi + j ≡ mod N , 2

(3)

 l + i ≡ N mod N . 2 δ Since gcd( mδ , Nδ ) = 1, then solving (3) is equivalent to solving the system   −1  m −1 N m j N  i + ≡ mod , δ δ δ 2δ δ (4) N N  i + l ≡ mod , 2 δ where ( mδ )−1 is the multiplicative inverse of mδ modulo Nδ . Then by the Generalized Chinese Remainder Theorem, we know that the system of congruences (4) has solutions if and only if  m −1 j  m −1 N  N N l≡ + − mod . 2 δ δ δ 2δ δ  m −1 j  m −1 N  N For convenience, let l0 = 2 + δ − δ mod Nδ . Moreover, it is easy to see that the linear congruence δ 2δ N 2

equation mi + j ≡

mod N admits exactly one solution modulo Nδ . Note that (l + i) mod Nδ for 0 ≤ i ≤ Nδ − 1 are (N ,r )

pairwise distinct. Thus for a ∈ Cj N

δ −1 



N

δ ,q (N ,r ) ηmi +j ηl+i



i =0

( Nδ ,q)

, −c ∈ C l

   N  δ ,q (N ,r )   η η  N N

+

According to (2), we have √ √   r + (1 − δ) r + (N − δ) qr N (c ) =

 

qN



N

,

N (0) =

if l ̸= l0 .

if l = l0 ,

 r + (1 − δ) r − δ qr   ,

if l ̸= l0 .



r − q + (δ − 1)(q − 1) r qN

Then we set B0 =

√ r −q+(δ−1)(q−1) r qN

. √

, B1 =



r +(1−δ) r +(N −δ) qr , qN







 

r +(1−δ) r −δ qr . qN m −1 j 1 m −1 N δ δ δ 2δ

B2 =

Let 0 ≤ j1 , j2 ≤ N − 1, δ | j1 and δ | j2 . Note that ( N2 +

 m −1

if l = l0 ,



qN

It follows that

, we have

   N δ ,q (N ,r ) − 1 η η , ∗ ∗ mod Nδ δ 2 2       =   N N N  N  δ ,q δ ,q δ ,q (N ,r )  − 2 η∗(N ,r ) η∗ + η∗(N ,r ) η N mod N + , η N η ∗ δ δ 2 2



 

) mod

N

δ

and ( N2 +

 m −1 δ

j2

δ



) mod δ are distinct for j1 ̸= j2 . The complete weight enumerator of the code C then follows. δ 2. In all other cases, we divide the proof of the conclusion into two subcases. In the first subcase, we assume that δ is odd. By Lemma 1 we have N

N 2δ

η0(N ,q) =

√ (−1)γ1 +1 (N − 1) q − 1 N

,

ηk(N ,q) =

Note that γ2 = mγ1 , thus (N ,r )

η0

=

√ (−1)γ2 +1 (N − 1) r − 1 N

,

(N ,r )

ηk

=

√ (−1)γ1 q − 1 N

√ (−1)γ2 r − 1 N

for k ̸= 0.

for k ̸= 0.

6

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

(N ,r )

For simplicity, we let η∗ N

( δ ,q )

Since ηi 

η0

N

δ ,q

(N ,q)

= ηi



=

+

(N ,r )

be the value of ηk

ηi(+N ,Nq) δ

+ ··· + η

√ (−1)γ1 (δ − N ) q − δ N

( N ,q )

(δ−1)N δ



,

, it then follows that 

N

δ ,q

ηk′



for k ̸= 0.

( N ,q )

i+

)

=

√ δ(−1)γ1 q − δ N

for k′ ̸= 0.

( N ,q )

be the value of ηk′δ And we let η∗ δ for k′ ̸= 0. For any fixed j, 0 ≤ j ≤ N − 1, similarly as the case 1, we receive the following: (N ,r )

i. If δ - j, for a ∈ Cj N

δ −1 



we have

N

δ ,q (N ,r ) ηmi +j ηl+i

N



=

η∗(N ,r )

i=0

δ −1 





N

δ ,q

ηl+i

=

1 − (−1)γ2



r

N

i=0

.

According to (2), for c ∈ F∗q , we have N (c ) = It follows that N (0) =

r − (−1)γ2

r

qN

. √

r − q + (−1)γ2 (q − 1) r qN

√ r −q+(−1)γ2 (q−1) r , qN

And we set A0 =

(N ,r )

ii. If δ | j, then for a ∈ Cj N

δ −1 





N

δ ,q (N ,r ) ηmi +j ηl+i

i=0



A1 =

( Nδ ,q)

, −c ∈ Cl

. √ r −(−1)γ2 r . qN

, we have

       N N N  δ ,q δ ,q (N ,r ) (N ,r )   + , − 1 η η η η ∗  0 ∗ 0 δ       =   N N N  N  δ ,q δ ,q δ ,q (N ,r )  + η∗(N ,r ) η0 + , − 2 η∗(N ,r ) η∗ η0 η∗ δ

where l0 = ( mδ )−1 δ mod Nδ . According to (2), we have √ √  γ +γ γ  r + (−1) 2 (δ − 1) r + (−1) 1 2 (N − δ) qr

if l = l0 , if l ̸= l0 ,

j

N (c ) =

 

qN

,

√ √  r + (−1)γ2 (δ − 1) r − (−1)γ1 +γ2 δ qr   ,

if l ̸= l0 .

qN

It follows that N (0) =

if l = l0 ,



r − q − (−1)γ2 (δ − 1)(q − 1) r qN

.

And we set



B0 = B1 =

r − q − (−1)γ2 (δ − 1)(q − 1) r qN



r + (−1)γ2 (δ − 1) r + (−1)γ1 +γ2 (N − δ) qr



B2 =

,



qN

r + (−1)γ2 (δ − 1) r − (−1)γ1 +γ2 δ

,



qr

qN

.

Let 0 ≤ j1 , j2 ≤ N − 1, δ | j1 and δ | j2 . Since ( mδ )−1 δ1 mod Nδ and ( mδ )−1 δ2 mod Nδ are distinct for j1 ̸= j2 , the complete weight enumerator of the code C then follows. In the second subcase, we assume that δ is even. Note that γ2 = mγ1 is even, by Lemma 1 we have j

(N ,r )

η0

=

√ (−1)γ2 +1 (N − 1) r − 1 N (N ,r )

For simplicity, we let η∗ N

( δ ,q )

Since ηi 

η0

N

δ ,q



=

(N ,q)

= ηi

+

(N ,r )

,

ηk (N ,r )

be the value of ηk

ηi(+N ,Nq) δ

+ ··· + η

√ (−1)γ1 (δ − N ) q − δ N

( N ,q )

i+

,

ηk′

N

√ (−1)γ2 r − 1 N

for k ̸= 0.

for k ̸= 0.

(δ−1)N δ



=

j

, it then follows that 

δ ,q

=

√ δ(−1)γ1 q − δ N

for k′ ̸= 0.

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

( N ,q )

( N ,q )

be the value of ηk′δ

And for simplicity, we let η∗ δ subcase and is omitted here. This completes the proof.

)



7

for k′ ̸= 0. The remainder of the proof is similar to that of the first



Example 1. Let p = 2, s = 4, q = 16, m = 3, N = 5. Then δ = 1, t = 2, γ1 = 1, γ2 = 3. By Theorem 1 we have B0 = 51, B1 = 64, B2 = 48, then the complete weight enumerator of the irreducible cyclic code C defined by (1) is 48 48 z0819 + 819z051 z164 z264 z364 z448 . . . z15 + 819z051 z148 z248 z348 z464 z564 z664 z748 . . . z15 48 64 64 64 + · · · + 819z051 z148 . . . z12 z13 z14 z15 ,

which is confirmed by the MAGMA computational algebra system [4]. Example 2. Let p = 5, s = 2, q = 25, m = 2, N = 6. Then δ = 2, t = 1, γ1 = 1. By Theorem 1 we have A0 = 8, A1 = 4, B0 = 0, B1 = 1, B2 = 6, then the complete weight enumerator of the irreducible cyclic code C defined by (1) is 4 6 6 z0104 + 312z08 z14 z24 . . . z24 + 104z1 z2 . . . z8 z96 z10 . . . z24 6 6 6 + 104z16 z26 . . . z86 z9 . . . z16 z17 . . . z24 + 104z16 z26 . . . z16 z17 . . . z24 ,

which is confirmed by the MAGMA computational algebra system [4]. Remark 1. The complete weight enumerators of C defined by (1) in some other cases can also be obtained by using period polynomials and (2). For example, according to the Gaussian periods of order 3 and 4 presented in [22], we can easily get the complete weight enumerators of C when δ = N = 3, 4. In addition, since Gaussian periods of order 5, 6, 8 and 12 are computed in [11,13], then the complete weight enumerators of C when δ = N = 5, 6, 8, 12 can be obtained. 3.2. A construction of optimal CCCs from irreducible cyclic codes In the following, we construct a class of optimal constant composition codes which are subcodes of the irreducible cyclic code C defined by (1). Let Aq (n, d, [ω0 , ω1 , . . . , ωq−1 ]) denote the maximal size of a constant composition code (n, M , d, [ω0 , ω1 , . . . , ωq−1 ])q . The LFVC bound of constant composition codes is described in the following lemma. Lemma 2 ([21]). If nd − n2 + (ω02 + · · · + ωq2−1 ) > 0, then Aq (n, d, [ω0 , . . . , ωq−1 ]) ≤

nd nd − n2 + (ω02 + · · · + ωq2−1 )

.

Let the notations be as above. Define (N ,r )

Cj = {c(a) : c(a) ∈ C , a ∈ Cj

},

where j = 0, 1, . . . , N − 1. Clearly, Cj is a constant composition code. When δ = 1, the following theorem shows that Cj is an optimal constant composition code with respect to the LFVC bound. 1 , N ) = 1. Assume that there exists a least positive integer t such Theorem 2. Let N ≥ 2 be a positive integer and δ = gcd( qr − −1

that pt ≡ −1 mod N. Let q = p2t γ1 for some integer γ1 , and γ2 = mγ1 . Suppose that m−1 is the multiplicative inverse of m (N ,q) modulo N and Cl = {−b q−1 l+i : i = 1, 2, . . . , q−N 1 }, l = 0, 1, . . . , N − 1. Then Cj is an optimal constant composition code N

over Fq achieving the LFVC bound with parameters



qm − 1 qm − 1 qm − qm−1

,

N

N

,

N

, [ω0 , . . . , ωq−1 ]



,

q

where ωk , 0 ≤ k ≤ q − 1, are given as follows. 1. If γ1 , p and (pt + 1)/N are all odd, we have

ω0 =

qm−1 − 1 N

,

qm + (N − 1) qm+1



ω q−1 l N

0 +i

=

ω q−1 l+i =

qN qm −



qm+1

qN

N

where l0 = m−1 j +



N 2

− m−1 N2

, 

,

for i = 1, 2, . . . ,

for i = 1, 2, . . . , mod N.

q−1 N

q−1 N

,

, l ̸= l0 ,

8

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



2. In all other cases, we have qm−1 − 1

ω0 = ω q−1 l N

0 +i

N

,

qm + (−1)γ1 +γ2

=

qm+1 (N − 1)



qN qm − (−1)γ1 +γ2

ω q−1 l+i =

for i = 1, 2, . . . ,



qm+1

qN

N

,

,

for i = 1, 2, . . . ,

q−1 N

q−1 N

,

, l ̸= l0 ,

where l0 = m−1 j mod N. Proof. When δ = 1, from the proof of Theorem 1 we can get the values of ωk , k = 0, 1, . . . , q − 1. Therefore we only need to prove that Cj is an optimal constant composition code over Fq achieving the LFVC bound. 1. If γ1 , p and (pt + 1)/N are all odd, then we have

ω02 + · · · + ωq2−1 = B20 + = Since n =

q m −1 , N

q−1

B21 +

B22 N N q2 + (N − 1)qm+2 − (N + 1)qm+1 + q2m+1 q2 N 2

d = n − B0 =

qm −qm−1 , N

nd − n2 + (ω02 + · · · + ωq2−1 ) = Therefore M =

q m −1 N

=

(N − 1)(q − 1)

.

then we have

q − qm−1 m

N

= d.

nd . nd−n2 +(ω02 +···+ωq2−1 )

2. In all other cases, similarly as the case 1 we have nd − n2 + (ω02 + · · · + ωq2−1 ) = Therefore M =

q m −1 N

=

qm − qm−1 N

= d.

nd . nd−n2 +(ω02 +···+ωq2−1 )

This completes the proof.



Remark 2. Ding [7] presented a class of optimal constant composition codes using zero-difference balanced functions. We can see that when p is semiprimitive modulo N, i.e., −1 is a power of p modulo N, the class of optimal constant composition codes given in [7] is equivalent to C0 in Theorem 2. However, the values of ωk , 0 ≤ k ≤ q − 1, were not determined in [7] when N ≥ 3. 4. The second case In this section, with the symbols and notations above, we use a combinatorial method to present the complete weight enumerator of irreducible cyclic code C defined by (1) for Case 2. Lemma 3 ([5]). Let l be a prime divisor of q − 1, and further assume that 4 | (q − 1) if l = 2. Write q − 1 = lv2 b with gcd(l, b) = 1 and v2 a positive integer. Then there is an irreducible factorization over Fq : v

xl − 1 =

l v 2 −1



(x − ηk )

k=0

2 −1 v−v 2 lv

j

(xl − ηi ),

j =1

i=1, l-i

where η is a primitive lv2 th root of unity in Fq and v > v2 . v1 Theorem 3. Let n = lv and r = ql , where l is a prime, q − 1 = lv2 b with gcd(l, b) = 1, v = v1 + v2 and v1 , v2 > 0. Moreover

((q−1)/lv2 ,q)

4 | (q − 1) if l = 2. Suppose that lv1 Ci = {blv2 i+j : j = 1, 2, . . . , lv2 }, i = 0, 1, . . . , weight enumerator of the irreducible cyclic code C defined by (1) is lv 1 



≤t , t =0 0≤t0 ,t1 ,...,t q−1 −1 lv2 t0 +t1 +···+t q−1 =t −1 lv2

lv1 !lv2 t

v

(lv1 − t )!t0 ! · · · t q−1 −1 ! lv2

v2

t

t

t

t

t q−1 v2 −1

z0l −tl z10 . . . zlv02 zlv12 +1 . . . z2l1v2 . . . zq−l lv2

q −1 lv 2

− 1. Then the complete

t q−1 v −1

. . . zq−l 12

.

Z. Shi, F.-W. Fu / Discrete Applied Mathematics ( v1 q l −1 , lv

Proof. Note that N = lv 1

θ =α

q

lv1 lv

−1

)



9

v1

. Let η = θ l , it follows that η is a primitive lv2 th root of unity over Fq . According

to Lemma 3, x − η−1 is the minimal polynomial of θ −1 over Fq . Thus C defined by (1) is an [lv , lv1 ] irreducible cyclic code v1 with check polynomial xl − η−1 . Let φ be the canonical additive character of Fq . For a codeword c(a) ∈ C and c ∈ F∗q , we have N (c ) = |{0 ≤ i ≤ lv − 1 : Trr /q (aθ i ) = c }| v

=

l −1 1 

q i=0 y∈F q

   φ y Trr /q (aθ i ) − c

v

=

=

l −1 1 

q i=0 y∈F q lv q

+

  φ yTrr /q (aθ i ) φ(−yc )

1 q

l v −1

φ(−yc )

   φ yTrr /q (aθ i ) .

y∈F∗ q

i =0

v1 For 0 ≤ i ≤ lv − 1, we have i = u1 lv1 + u2 , where 0 ≤ u1 ≤ lv2 − 1, 0 ≤ u2 ≤ lv1 − 1. Note that η = θ l , then

N (c ) =

lv q

+

v

=

l

q

+

1 q

y∈F∗ q

1 q

lv2 −1 lv1 −1

 

φ(−yc )

  φ yTrr /q (aηu1 θ u2 )

u1 =0 u2 =0 lv2 −1 lv1 −1

 

φ(−yc )

y∈F∗ q

  φ yηu1 Trr /q (aθ u2 ) .

(5)

u1 =0 u2 =0

v1

v1

v1

Note that xl − η is the minimal polynomial of θ over Fq and r = ql . Hence Fr = Fq (θ ) and {η, θ , θ 2 , . . . , θ l −1 } is a v1 basis of the linear space Fr over Fq . Moreover, it is not hard to see that {θ , θ 2 , . . . , θ l −1 } is a basis of the linear subspace ker(Trr /q ) over Fq .

 qlv−21 −1 ((q−1)/lv2 ,q) v1 For any a ∈ Fr , a = a0 η + a1 θ + · · · + alv1 −1 θ l −1 , aj ∈ Fq , 0 ≤ j ≤ lv1 − 1. Note that F∗q = i= . For Ci 0 0 ≤ i ≤ (q − 1)/lv2 − 1, we denote ((q−1)/lv2 ,q) }. Na,i = {0 ≤ j ≤ lv1 − 1 : aj ∈ Ci

Suppose that there are t (0 ≤ t ≤ lv1 ) nonzero elements in a0 , a1 , . . . , alv1 −1 and |Na,i | = ti , 0 ≤ i ≤ (q − 1)/lv2 − 1,

 qv−21 −1

l ti = t. Without loss of generality, let a = a0 η + a1 θ + · · · + at −1 θ t −1 , aj ̸= 0, j = 0, 1, . . . , t − 1. 0 ≤ ti ≤ t. Clearly, i= 0 v Note that aj = aj (mod l 1 ) . We set S = {0, 1, . . . , lv1 − 1}, S1 = {0, lv1 − 1, . . . , lv1 − (t − 1)} and S2 = S \ S1 . Then by (5), we have

N (c ) =

=

=

lv q lv q lv q

+

+

+

1 q

1 q

tl

Note that F∗q =

q

Fq =



u2 ∈S1

+

u1 =0

u2 ∈S1

l v 2 −1

 

i=0

 

φ yη · 0 

u1

φ(yη Trr /q (alv1 −u2 η)) + |S2 | u1

φ(yηu1 lv1 alv1 −u2 η) −

lv2 v1 (l − t ) q

  φ y(lv1 ηu1 +1 alv1 −u2 − c ) .

(6)

u2 ∈S1 u1 =0 y∈F∗ q

((q−1)/lv2 ,q)

Ci

((q−1)/lv2 ,q)

lv1 Ci

 u2 ∈S2

u1 =0 u2 ∈S1

1    q

u2

 

φ(−yc )

φ(yη Trr /q (aθ )) + u1





φ(−yc )

y∈F∗ q

 qlv−21 −1

q−1 −1 lv2



u1 =0

lv2 −1

v2

=



l v 2 −1

y∈F∗ q





φ(−yc )

y∈F∗ q

1 q

l v 2 −1

and p - lv1 . It then follows that

,

i=0

((q−1)/lv2 ,q)

where lv1 Ci

q−1

v

= lv1 β i ⟨β lv2 ⟩ = {lv1 β i , lv1 β i η, . . . , lv1 β i ηl 2 −1 } and β = α

v1 ql −1 q−1

is a primitive element of Fq .

10

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



For any u2 ∈ S1 , when lv1 − u2 ∈ Na,i , we have ((q−1)/lv2 ,q)

{lv1 ηu1 +1 alv1 −u2 : 0 ≤ u1 ≤ lv2 − 1} = lv1 Ci ((q−1)/lv2 ,q)

Thus for c ∈ lv1 Ci N (c ) =

tlv2 q tl

q

, it follows from (6) that v

+

v2

=

.

+

l 2 −1 1   

q

u2 ∈S1 u1 =0 y∈F∗ q

1 q

  φ y(lv1 ηu1 +1 alv1 −u2 − c )

 lv1 −u2 ∈Na,i

(q − 1 + (lv2 − 1)(−1)) +

1 q



lv2 (−1)

u2 ∈S1 , lv1 −u2 ̸∈Na,i

= ti . Then v

q−1 −1 lv2

N (0) = l −



ti lv2 = lv − tlv2 .

i=0

Note that

    v1       t q−1 −1 v t t t − t0  a ∈ Fr : Na,0 = t0 , Na,1 = t1 , . . . , N q−1 = t q−1 = l lv2 l2 · · ·  a , v −1 −1  t t t l 2 lv2 t 0

=

1

q−1 −1 lv2

lv1 !lv2 t

(lv1 − t )!t0 !t1 ! · · · t q−1 −1 !

.

lv2

The complete weight enumerator of the code C then follows.



Example 3. Let q = 7, l = 3, v2 = 1, v1 = 1. It follows that v = 2, n = 9, r = 73 . By Theorem 3, the complete weight enumerator of the irreducible cyclic code C defined by (1) is z09 + 9z06 z4 z5 z6 + 9z06 z1 z2 z3 + 27z03 z42 z52 z62 + 54z03 z1 z2 z3 z4 z5 z6 + 27z03 z12 z22 z32

+ 27z43 z53 z63 + 81z1 z2 z3 z42 z52 z62 + 81z12 z22 z32 z4 z5 z6 + 27z13 z23 z33 , which is confirmed by the MAGMA computational algebra system [4]. Example 4. Let q = 9, l = 2, v2 = 3, v1 = 1. It follows that v = 4, n = 16, r = 81. By Theorem 3, the complete weight enumerator of the irreducible cyclic code C defined by (1) is z016 + 16z08 z1 z2 z3 z4 z5 z6 z7 z8 + 64z12 z22 z32 z42 z52 z62 z72 z82 , which is confirmed by the MAGMA computational algebra system [4]. Acknowledgments The authors would like to thank the anonymous reviewers for their valuable comments and suggestions. This research is supported by the National Key Basic Research Program of China (Grant No. 2013CB834204), and the National Natural Science Foundation of China (Grant Nos. 61571243 and 61171082). References [1] [2] [3] [4] [5] [6] [7] [8]

S. Bae, C. Li, Q. Yue, On the complete weight enumerators of some reducible cyclic codes, Discrete Math. 338 (12) (2015) 2275–2287. L.D. Baumert, R.J. McEliece, Weights of irreducible cyclic codes, Inf. Control 20 (2) (1972) 158–175. I.F. Blake, K. Kith, On the complete weight enumerator of Reed-Solomon codes, SIAM J. Discrete Math. 4 (2) (1991) 164–171. W. Bosma, J. Cannon, C. Playoust, The Magma algebra system, J. Symb. Comput. 24 (1997) 235–265. B. Chen, H. Liu, G. Zhang, A class of minimal cyclic codes over finite fields, Des. Codes Cryptogr. 74 (2) (2015) 285–300. P. Delsarte, On subfield subcodes of modified Reed-Solomon codes, IEEE Trans. Inform. Theory 21 (5) (1975) 575–576. C. Ding, Optimal constant composition codes from zero-difference balanced functions, IEEE Trans. Inform. Theory 54 (12) (2008) 5766–5770. C. Ding, J. Yang, Hamming weights in irreducible cyclic codes, Discrete Math. 313 (4) (2013) 434–446. r

[9] T. Feng, On cyclic codes of length on cyclic codes of length 22 − 1 with two zeros whose dual codes have three weights, Des. Codes Cryptogr. 62 (3) (2012) 253–258. [10] K. Feng, J. Luo, Weight distribution of some reducible cyclic codes, Finite Fields Appl. 14 (2) (2008) 390–409. [11] S.J. Gurak, Periodic polynomials for Fq of fixed small degree, CRM Proc. Lecture Notes 36 (8) (2004) 125–147. [12] Z. Heng, Y. Qin, Complete weight distributions of two classes of cyclic codes, Cryptogr. Commun. (2016) 1–21.

Z. Shi, F.-W. Fu / Discrete Applied Mathematics (

)



11

[13] A. Hoshi, Explicit lifts of quintic Jacobi sums and periodic polynomials for Fq , Proc. Japan Acad. Ser. A 82 (2006) 87–92. [14] K. Kith, Complete weight enumeration of Reed-Solomon codes (Master’s thesis), Department of Electrical and Computing Engineering, University of Waterloo, Waterloo, ON, Canada, 1989. [15] A.S. Kuzmin, A.A. Nechaev, Complete weight enumerators of generalized Kerdock code and linear recursive codes over Galois rings, in: Proceedings of the WCC99 Workshop on Coding and Cryptography, Paris, France, 1999, pp. 332–336. [16] A.S. Kuzmin, A.A. Nechaev, Complete weight enumerators of generalized Kerdock code and related linear codes over Galois rings, Discrete Appl. Math. 111 (1–2) (2001) 117–137. [17] C. Li, Q. Yue, Weight distribution of two classes of cyclic codes with respect to two distinct order elements, IEEE Trans. Inform. Theory 60 (1) (2014) 296–303. [18] C. Li, Q. Yue, F.-W. Fu, Complete weight enumerators of some cyclic codes, Des. Codes Cryptogr. 338 (12) (2015) 1–21. [19] C. Li, Q. Yue, F. Li, Weight distributions of cyclic codes with respect to pairwise coprime order elements, Finite Fields Appl. 28 (3) (2014) 94–114. [20] R. Lidl, H. Niederreiter, Finite Fields, Addison-Wesley, Reading, MA, 1983. [21] Y. Luo, F.-W. Fu, A.J. Han Vinck, W. Chen, On constant composition codes over Zq , IEEE Trans. Inform. Theory 49 (11) (2003) 3010–3016. [22] G. Myerson, Period polynomials and Gauss sums for finite fields, Acta Arith. 39 (1981) 251–264. [23] Z. Zhou, C. Ding, A class of three-weight cyclic codes, Finite Fields Appl. 25 (95) (2014) 79–93. [24] X. Zhu, Q. Yue, L. Hu, Weight distributions of cyclic codes of length lm , Finite Fields Appl. 31 (31) (2015) 241–257.