Weight Distributions of Hamming Codes

We derive a recursive formula determing the weight distribution of the [n=(q^m-1)/(q-1), n-m, 3] Hamming code H(m,q), when (m, q-1)=1. Here q is a prime power. The proof is based on Moisio's idea of using Pless power moment identity together with exp…

Authors: Dae San Kim

1 W eight Distrib utions of Hamming Codes Dae San Kim, Member , I EEE Abstract — W e derive a recursiv e fo rmula determining the weight distribution of the [ n = ( q m − 1) / ( q − 1) , n − m, 3] Hamming code H ( m, q ) , when ( m, q − 1) = 1 . Her e q i s a prime power . The proof is based on M o isio’ s idea of usin g Pless power moment identity together with exponential sum techniqu es. Index T erms — Hamming code, weight distribution, Pless power moment identity , exponential sum. I . I N T RO D U C T I O N The Hamming code is pr obably th e first o ne that someo ne encoun ters when he is taking a beginning course in co ding theory . The q -ary Hamming code H ( m, q ) is an [ n = ( q m − 1) / ( q − 1) , n − m, 3] c ode w hich is a sing le-error-correcting perfect cod e. From n o w on, q will indicate a pr ime power unless o therwise stated. Also, w e assume m > 1 . In [3], Moisio d isco vered a han dful of new power m oments of Kloosterm an sums over F q , with q = 2 r . This was done, via Pless power mome nt identity , by con necting mom ents of Kloosterman sums and f requencies of weights in the binary Zetterberg code of length q + 1 , wh ich wer e kno wn by the work of Scho of an d van d er Vlu gt in [7]. Some new mom ents of Kloosterm an sums wer e also fou nd over F q , with q = 3 r ([4],[8]). In this corresp ondence, we adopt M oisio’ s idea of utilizing Pless p o wer momen t identity and exponential sum techniqu es and prove the following theorem giving t he weight distribution of H ( m, q ) , f or ( m, q − 1) = 1 . Theor em 1: Let { C h } n h =0 ( n = ( q m − 1) / ( q − 1)) denote the weigh t d ist ribution o f the q -ary Hamm ing code H ( m, q ) , with ( m, q − 1) = 1 . Th en, f or h with 1 ≤ h ≤ n , h ! C h =( − 1) h q m ( h − 1) ( q m − 1) + h − 1 X i =0 ( − 1) h + i − 1 C i h X t = i t ! S ( h, t ) q h − t ( q − 1) t − i ( n − i n − t ) , where S ( h, t ) deno tes the Stirling n umber of the second k ind defined by S ( h, t ) = 1 t ! t X j =0 ( − 1) t − j ( t j ) j h . (1) C 0 = 1 , and it is easy to check that C 1 = C 2 = 0 , as i t should be. A f e w n e x t values of C h ’ s were obtained , with the help of Mathematica , from th e above formu la. Cor ollary 2: Let { C h } n h =0 ( n = ( q m − 1) / ( q − 1 )) den ote the we ight distribution of th e q -ary Hamm ing co de H ( m, q ) , This work was supported by grant No. R01-2007-000-11176 -0 from the Basic Research Program of the Korea Science and Enginee ring Foundation. The author is with the Department of Mathematics, Sogang Univ ersity , Seoul 121-742, K orea(e-mail: dskim@sogang.ac.kr). with ( m, q − 1 ) = 1 . Then C 3 = 1 3! ( q m − 1)( − q + q m ) , C 4 = 1 4! ( q m − 1)( − 6 q + 5 q 2 + 6 q m + q 2 m − 6 q 1+ m ) , C 5 = 1 5! ( q m − 1)( − 36 q + 54 q 2 − 26 q 3 + 36 q m + 6 q 2 m + q 3 m − 60 q 1+ m + 35 q 2+ m − 10 q 1+2 m ) , C 6 = 1 6! ( q m − 1)( − 240 q + 500 q 2 − 450 q 3 + 154 q 4 + 240 q m + 20 q 2 m + 10 q 3 m + q 4 m − 520 q 1+ m + 85 q 2(1+ m ) + 550 q 2+ m − 225 q 3+ m − 110 q 1+2 m − 15 q 1+3 m ) , C 7 = 1 7! ( q m − 1)( − 180 0 q + 47 10 q 2 − 6035 q 3 + 3940 q 4 − 1044 q 5 + 1800 q m − 90 q 2 m + 85 q 3 m + 15 q 4 m + q 5 m − 4620 q 1+ m + 1505 q 2(1+ m ) + 6755 q 2+ m − 5215 q 3+ m + 1624 q 4+ m − 805 q 1+2 m − 735 q 3+2 m − 245 q 1+3 m + 175 q 2+3 m − 21 q 1+4 m ) , C 8 = 1 8! ( q m − 1)( − 151 20 q + 4712 4 q 2 − 7719 6 q 3 + 7277 9 q 4 − 3724 0 q 5 + 8028 q 6 + 1512 0 q m − 3276 q 2 m + 840 q 3 m + 175 q 4 m + 21 q 5 m + q 6 m − 4384 8 q 1+ m + 1793 4 q 2(1+ m ) − 1960 q 3(1+ m ) + 7963 2 q 2+ m + 6769 q 2(2+ m ) − 8780 8 q 3+ m + 5266 1 q 4+ m − 1313 2 q 5+ m − 3276 q 1+2 m − 1923 6 q 3+2 m − 3080 q 1+3 m + 4270 q 2+3 m − 476 q 1+4 m + 322 q 2+4 m − 28 q 1+5 m ) , C 9 = 1 9! ( q m − 1)( − 141 120 q + 507 024 q 2 − 1002 736 q 3 + 1221 444 q 4 − 9106 44 q 5 + 3820 88 q 6 − 6926 4 q 7 + 1411 20 q m − 5745 6 q 2 m + 1086 4 q 3 m + 1960 q 4 m + 322 q 5 m + 28 q 6 m + q 7 m − 4495 68 q 1+ m + 1653 96 q 2(1+ m ) − 6711 6 q 3(1+ m ) + 9579 36 q 2+ m + 2466 24 q 2(2+ m ) − 1349 404 q 3+ m + 1175 874 q 4+ m − 5711 16 q 5+ m + 1181 24 q 6+ m + 3393 6 q 1+2 m − 3325 84 q 3+2 m − 6728 4 q 5+2 m − 3939 6 q 1+3 m + 7484 4 q 2+3 m + 2244 9 q 4+3 m − 7812 q 1+4 m + 1033 2 q 2+4 m − 4536 q 3+4 m − 840 q 1+5 m + 546 q 2+5 m − 36 q 1+6 m ) , 2 and C 10 = 1 10! ( q m − 1)( − 145 1520 q + 5880 384 q 2 − 1355 0832 q 3 + 2009 0832 q 4 − 1948 5852 q 5 + 1198 4244 q 6 − 4251 240 q 7 + 6636 96 q 8 + 1451 520 q m − 8933 76 q 2 m + 1743 84 q 3 m + 21 504 q 4 m + 4536 q 5 m + 546 q 6 m + 36 q 7 m + q 8 m − 4987 008 q 1+ m + 8575 20 q 2(1+ m ) − 1569 540 q 3(1+ m ) + 6327 3 q 4(1+ m ) + 1203 5088 q 2+ m + 5797 770 q 2(2+ m ) − 2039 3616 q 3+ m + 7236 80 q 2(3+ m ) + 2305 0848 q 4+ m − 16 423398 q 5+ m + 6661 236 q 6+ m − 1172 700 q 7+ m + 1341 360 q 1+2 m − 4686 480 q 3+2 m − 3264 780 q 5+2 m − 5762 40 q 1+3 m + 1233 960 q 2+3 m + 1030 260 q 4+3 m − 2693 25 q 5+3 m − 1170 12 q 1+4 m + 2278 08 q 2+4 m − 1963 92 q 3+4 m − 1743 0 q 1+5 m + 2226 0 q 2+5 m − 9450 q 3+5 m − 1380 q 1+6 m + 870 q 2+6 m − 45 q 1+7 m ) . The Ham ming code was discovered by Hamming in late 1940’ s. So it is surpr is ing that ther e are no suc h recu rsi ve formu las determining the weig ht distrib utions of the Ha mming codes in the non binary c ases . In the binar y case, we h a ve th e following well kn o wn f ormula which follows fro m elementary combinato rial reasoning([ 2 , p . 12 9]). Theor em 3: Let { C h } n h =0 ( n = (2 m − 1)) deno te the weight distribution of the b inary H amming code H ( m, 2) . Then the weight distribution satisfies the following re currence relation : C 0 = 1 , C 1 = 0 , ( i + 1) C i +1 + C i + ( n − i + 1) C i − 1 = ( n i ) ( i ≥ 1) . It is k no wn [6] that, when ( m, q − 1) = 1 , H ( m, q ) is a cyclic code. Theor em 4: Let n = ( q m − 1) / ( q − 1) , wher e ( m, q − 1) = 1 . Let γ b e a p rimiti ve element of F q m . T hen the cyclic code o f length n with th e d efining zero γ q − 1 is equiv alent to the q -ary Hamming cod e H ( m, q ) . In our discussion b elo w , we will assume th at ( m, q − 1) = 1 , so th at H ( m, q ) is a cyclic code with the defining zero γ q − 1 , where γ is a p rimiti ve element o f F q m . I I . P R E L I M I N A R I E S Let q = p r be a prime power . Then we will use the following n otations thro ughout this correspo ndence. tr ( x ) = x + x p + · · · + x p r − 1 the tr ace f unction F q → F p , T r ( x ) = x + x q + · · · + x q m − 1 the tr ace f unction F q m → F q , λ ( x ) = e 2 πi p tr ( x ) the c a nonical additiv e c h aracter of F q , λ m ( x ) = λ ( T r ( x )) the c a nonical additiv e c h aracter of F q m . The fo llo wing lemm a is well k no wn . Lemma 5: For any α ∈ F q , X x ∈ F q λ ( αx ) =  q , α = 0 , 0 , α 6 = 0 . For a positive integer s , the multiple Kloosterm an sum K s ( α ) ( α ∈ F ∗ q ) , is defined by K s ( α ) = X x 1 , ··· ,x s ∈ F ∗ q λ ( x 1 + · · · + x s + αx − 1 1 · · · x − 1 s ) . The fo llo wing result follows imm ediately f rom Lemm a 5. Lemma 6: For an integer s > 1 , X α ∈ F ∗ q K s − 1 ( α ) = ( − 1) s . Pr oof: P α ∈ F ∗ q K s − 1 ( α ) = ( P x ∈ F ∗ q λ ( x )) s . The fo llo wing lemm a is im mediate. Lemma 7: Let ( m, q − 1) = 1 . Th en the following map is a bijec tion. α 7→ α m : F ∗ q → F ∗ q . Theor em 8 (Thm. 3 of [5]): F or any α ∈ F ∗ q m , X x ∈ F ∗ q m λ m ( αx q − 1 ) = ( − 1 ) m − 1 ( q − 1) K m − 1 ( N ( α )) , where N denotes the norm map N : F ∗ q m → F ∗ q , defined by N ( α ) = α n , with n = ( q m − 1) / ( q − 1) . The fo llo wing theo rem is d ue to Delsarte([ 2 , P . 20 8]). Theor em 9 (Delsarte): Let B be a linear code of length n over F q m . Th en ( B | F q ) ⊥ = T r ( B ⊥ ) . The following is a special case of the r esult stated in [1, Thm. 4.2] , a lthough only the b inary case is mentione d ther e. In fact, u si ng Th eorem 9 above, this can be proved in exactly the sam e m anner as descr ibed im mediately after the pro of o f Theorem 4 .2 in [1]. Theor em 10: The d ual H ( m, q ) ⊥ of H ( m, q ) is given b y H ( m,q ) ⊥ = { c ( a ) = ( T r ( a ) , T r ( aγ ( q − 1) ) , · · · , T r ( aγ ( n − 1)( q − 1) )) | a ∈ F q m } . Lemma 11: The m ap a 7→ c ( a ) : F q m → H ( m, q ) ⊥ is an isomorph ism o f F q -vector spaces. Pr oof: The map is F q -linear, surjecti ve and dim F q F q m = dim F q H ( m, q ) ⊥ . Our rec ursi ve formu la in Th eorem 1 will be a con sequence of the applicatio n of Pless power mom ent identity( [6 ]), which is equ i valent to MacW illiams identity . Theor em 12 ( Pless po wer mome nt identity): Let B be an q -ary [ n , k ] code, and let B i (resp. B ⊥ i ) deno te the number of codewords of weig ht i in B (resp. in B ⊥ ). Then, for h = 0 , 1 , 2 , · · · , n X i =0 i h B i = min { n,h } X i =0 ( − 1) i B ⊥ i h X t = i t ! S ( h, t ) q k − t ( q − 1) t − i ( n − i n − t ) , (2) where S ( h, t ) deno tes the Stirling num ber of the second kind defined by (1). 3 I I I . P R O O F O F T H E O R E M 1 Let h be an integer with 1 ≤ h ≤ n . Observe that the weight of the codeword c ( a ) in T heorem 1 0 can be expressed as w ( c ( a )) = n − 1 X i =0 (1 − q − 1 X α ∈ F q λ ( αT r ( aγ i ( q − 1) ))) ( by Lemm a 5 ) = n − q − 1 X α ∈ F q n − 1 X i =0 λ m ( αaγ i ( q − 1) ) = n − q − 1 ( q − 1) − 1 X α ∈ F q X x ∈ F ∗ q m λ m ( αax q − 1 ) = n − q − 1 ( q − 1) − 1 ( q m − 1) − q − 1 ( q − 1) − 1 × X α ∈ F ∗ q X x ∈ F ∗ q m λ m ( αax q − 1 ) = n − q − 1 ( q − 1) − 1 ( q m − 1) + ( − 1) m q − 1 × X α ∈ F ∗ q K m − 1 ( α m N ( a )) ( by Theo rem 8 ) = n − q − 1 ( q − 1) − 1 ( q m − 1) + ( − 1) m q − 1 × X α ∈ F ∗ q K m − 1 ( αN ( a )) . ( by Lemm a 7 ) (3) W e n o w apply Pless p o wer mome nt identity in Theorem 12 with B = H ( m, q ) ⊥ . On one h and, the LHS of (2) is X a ∈ F ∗ q m w ( c ( a )) h ( by Lemm a 11 ) = X a ∈ F ∗ q m ( n − q − 1 ( q − 1) − 1 ( q m − 1) + ( − 1) m q − 1 × X α ∈ F ∗ q K m − 1 ( αN ( a ))) h ( by ( 3 )) = q m − 1 q − 1 X a ∈ F ∗ q ( n − q − 1 ( q − 1) − 1 ( q m − 1) + ( − 1) m q − 1 × X α ∈ F ∗ q K m − 1 ( αa )) h =( q m − 1)( n − q − 1 ( q − 1) − 1 ( q m − 1) + ( − 1) m q − 1 × X α ∈ F ∗ q K m − 1 ( α )) h =( q m − 1)( n − q − 1 ( q − 1) − 1 ( q m − 1) + q − 1 ) h ( by Lemm a 6 ) = q ( m − 1) h ( q m − 1) ( as n = q m − 1 q − 1 ) . On the oth er han d, b y separ ating the term correspo nding to h an d no ting S ( h, h ) = 1 , the RHS o f (2) is ( − 1) h C h h ! q m − h + h − 1 X i =0 ( − 1) i C i h X t = i t ! S ( h, t ) q m − t ( q − 1) t − i ( n − i n − t ) . So q ( m − 1) h ( q m − 1) =( − 1) h C h h ! q m − h + h − 1 X i =0 ( − 1) i C i h X t = i t ! S ( h, t ) q m − t ( q − 1) t − i ( n − i n − t ) . (4) Multiplying both sides of (4) b y ( − 1 ) h q h − m , we get the desired resu lt.  R E F E R E N C E S [1] I. Honkala an d A. T iet ¨ av ¨ ainen, “Codes a nd number theory , ” i n Handbook of Coding Thero y , V . S. Pless and W . C. Huf fm a n, E ds. Amsterdam, The Netherl ands : North-Holland, 1998, vo l. II, pp. 1141-1194. [2] F . J. MacW illiams and N. J. A. Sloane, The Theory of Error Correcting Codes. Amsterdam, T h e Netherla nds : North-Holland, 1998. [3] M. Moisio, “The m ome nts of a Kloosterman sum and the weight distrib ution of a Zetterbe rg type binary cycl ic code, ” IEEE T rans. Inf. Theory , vol. IT -53, pp. 843-847, 2007. [4] M. Moisio, “On the m ome nts of Kloosterman sum s and fibre products of Kloosterman curves, ” Fini te Fi elds Appl., in Press. [5] M. Moisio, “On the number of rational points on some familie s o f Fermat curve s over finite fields, ” Fi nite F ields Appl., vol. 13, pp. 546 -562, 20 07. [6] V . S. Pless, W . C. Huf fman, and R. A. Brualdi, “ An introduct ion to algebra ic codes, ” in Handbook of Coding Theroy , V . S. Pless and W . C. Huf fman, Eds. Amsterdam, The Net herlan ds : North-Holland, 1998, vol. I, pp. 3-139. [7] R. Schoof and M. van der Vlugt, “Heck e operators and the weight distrib ution of certain codes, ” J . Combin. Ther oy Ser . A, vol. 57, pp. 163-186, 1991. [8] G. v an der Geer , R. Schoof and M. v an der Vlugt, “W eight fo rmulas for ternary Melas codes, ” Math. Comp., vol 58, pp. 781-792, 1992.

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment