6
1532 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007 Proof: Let us define and . We need to show that if then Since and due to the nature of functions and it can be easily shown that there exists an integer such that if and only if . Therefore (24) where in (24), we use the fact that Therefore REFERENCES [1] M. Luby, “LT codes,” in Proc. 43rd Ann. IEEE Symp. Found. Comp. Sci., 2002. [2] A. Shokrollahi, “Raptor codes,” IEEE Trans. Inf. Theory, vol. 52, pp. 2551–2567, Jun. 2006. [3] P. Maymounkov, Online codes NYU Tech. Rep. TR2003-883, 2002. [4] M. Mitzenmacher, “Digital fountains: A survey and look forward,” in Proc. Inf. Theory Workshop, Oct. 2004, pp. 271–276. [5] J. W. Byers, M. Luby, M. Mitzenmacher, and A. Rege, “A digital foun- tain approach to reliable distribution of bulk data,” in Proc. ACM SIG- COMM, Vancouver, BC, Canada, Aug. 1998, pp. 56–67. [6] T. Sikora, “MPEG digital video coding standards,” IEEE Signal Process. Mag., vol. 14, pp. 82–100, Sep. 1997. [7] L. Xu, “Resource-efficient delivery of on-demand streaming data using UEP codes,” IEEE Trans. Commun., vol. 51, pp. 63–71, Jan. 2003. [8] B. Masnick and J. Wolf, “On linear unequal error protection codes,” IEEE Trans. Inf. Theory, vol. IT-3, pp. 600–607, Oct. 1967. [9] L. A. Bassalygo, V. A. Zinov’ev, V. V. Zyablov, and G. S. P. M. S. Pinsker, “Bounds for codes with unequal protection of two sets of mes- sages,” Problemy Peredachi Informatsii, vol. 15, pp. 40–49, Jul.–Sep. 1979. [10] C. C. Kilgus and W. C. Gore, “Cyclic codes with unequal error protec- tion,” IEEE Trans. Inf. Theory, vol. 17, pp. 214–215, Mar. 1971. [11] N. Rahnavard and F. Fekri, “Unequal error protection using low-den- sity parity-check codes,” in Proc. IEEE Int. Symp. Inf. Theory, Chicago, IL, Jun.–Jul. 2004, p. 449. [12] C. Poulliat, D. Declercq, and I. Fijalkow, “Optimization of LDPC codes for UEP property,” in IEEE Int. Symp. Inf. Theory, Jun.–Jul. 2004, p. 450. [13] H. Pishro-Nik, N. Rahnavard, and F. Fekri, “Nonuniform error correc- tion using low-density parity-check codes,” IEEE Trans. Inf. Theory, vol. 51, pp. 2702–2714, Jul. 2005. [14] N. Rahnavard and F. Fekri, “Finite-length unequal error protection rateless codes: Design and analysis,” in Proc. IEEE GLOBECOM, St. Louis, MO, Nov.–Dec. 2005. [15] N. Rahnavard and F. Fekri, “Generalization of rateless codes for unequal error protection and recovery time: Asymptotic analysis,” in Proc. IEEE Int. Symp. Inf. Theory, Seattle, WA, Jul. 2006, pp. 523–527. [16] M. G. Luby, M. Mitzenmacher, M. A. Shokrollahi, D. A. Spielman, and V. Stemann, “Practical loss-resilient codes,” in Proc. 29th Ann. ACM Symp. Theory Computing (STOC), 1997, pp. 150–159. [17] M. Luby, Mitzenmacher, and A. Shokrallahi, “Analysis of random pro- cesses via and-or tree evaluation,” in Proc. 9th Ann. ACM-SIAM Symp. Discrete Algorithms, 1998, pp. 364–373. [18] R. G. Bartle, The Elements of Real Analysis, 2nd ed. New York: Wiley, 1976. [19] L. Comtet, Advanced Combinatorics, 1974. On -Dual Binary Codes Denis S. Krotov Abstract—A new generalization of the Gray map is introduced. The new generalization is connected with the known generalized Gray map in the following way: if we take two dual linear -codes and construct binary codes from them using the generalizations and of the Gray map, then the weight enumerators of the binary codes obtained will satisfy the MacWilliams identity. The classes of -linear Hadamard codes and co- -linear extended -perfect codes are described, where co- -linearity means that the code can be obtained from a linear -code with the help of the new generalized Gray map. Index Terms—Gray map, Hadamard codes, MacWilliams identity, per- fect codes, -linearity. I. INTRODUCTION As discovered in [1], [2], [20] certain nonlinear binary codes can be represented as linear codes over . The variant of this represen- tation founded in [3] uses the mapping , which is called the Gray map, to construct binary so-called -linear codes from linear quaternary codes. The main property of from this point of view is that it is an isometry between with the Lee metric and with the Hamming metric. In [4] (and in [5] in more gen- eral form) the Gray map is generalized to construct -linear codes. The generalized Gray map (say ; see Section II-A for recalling basic facts on the generalized Gray map) is an isometric imbedding of with the metric specified by the homogeneous weight [6] into with the Hamming metric. In this correspondence, we introduce another generalization of the Gray map (Section II-B). This generalization turns out to be dual to the previous in the following sense. If and are dual linear -codes, then the binary -linear code and the co- -linear code are formally dual. The formal duality is that the weight enumerators of these two codes satisfy the MacWilliams identity Manuscript received July 2, 2006; revised December 8, 2006. The material in this correspondence was presented in part at the 4th International Workshop on Optimal Codes and Related Topics OC 2005, Pamporovo, Bulgaria, June 2005. The author is with the Sobolev Institute of Mathematics, Novosibirsk, 630090 Russia (e-mail: [email protected]). Communicated by T. Etzion, Associate Editor for Coding Theory. Digital Object Identifier 10.1109/TIT.2007.892787 0018-9448/$25.00 © 2007 IEEE

On Z2k-Dual Binary Codes

  • Upload
    ds

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

1532 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007

Proof: Let us define h� (e) = n

e�e1(1� �1)

n�e and h� (e) =n

e�e2(1� �2)

n�e. We need to show that if �2 > �1 thenn

e=0

h� (e)f(e) �

n

e=0

h� (e)f(e):

Since �2 > �1 and due to the nature of functions h� (e) and h� (e) itcan be easily shown that there exists an integer e0 such that h� (e) >h� (e) if and only if e � e0. Therefore

n

e=0

(h� (e)� h� (e))f(e)

=e:h (e)>h (e)

(h� (e)� h� (e))f(e)

e:h (e)�h (e)

(h� (e)� h� (e))f(e)

� f(e0)

n

e=e

(h� (e)� h� (e))� f(e0 � 1)

e �1

e=0

(h� (e)� h� (e))

= (f(e0)� f(e0 � 1))

n

e=e

(h� (e)� h� (e)) � 0 (24)

where in (24), we use the fact thatn

e=0

h� (e) =

n

e=0

h� (e) = 1

Therefore

n

e=e

(h� (e)� h� (e)) =

e �1

e=0

(h� (e)� h� (e)) :

REFERENCES

[1] M. Luby, “LT codes,” in Proc. 43rd Ann. IEEE Symp. Found. Comp.Sci., 2002.

[2] A. Shokrollahi, “Raptor codes,” IEEE Trans. Inf. Theory, vol. 52, pp.2551–2567, Jun. 2006.

[3] P. Maymounkov, Online codes NYU Tech. Rep. TR2003-883, 2002.[4] M. Mitzenmacher, “Digital fountains: A survey and look forward,” in

Proc. Inf. Theory Workshop, Oct. 2004, pp. 271–276.[5] J. W. Byers, M. Luby, M. Mitzenmacher, and A. Rege, “A digital foun-

tain approach to reliable distribution of bulk data,” in Proc. ACM SIG-COMM, Vancouver, BC, Canada, Aug. 1998, pp. 56–67.

[6] T. Sikora, “MPEG digital video coding standards,” IEEE SignalProcess. Mag., vol. 14, pp. 82–100, Sep. 1997.

[7] L. Xu, “Resource-efficient delivery of on-demand streaming data usingUEP codes,” IEEE Trans. Commun., vol. 51, pp. 63–71, Jan. 2003.

[8] B. Masnick and J. Wolf, “On linear unequal error protection codes,”IEEE Trans. Inf. Theory, vol. IT-3, pp. 600–607, Oct. 1967.

[9] L. A. Bassalygo, V. A. Zinov’ev, V. V. Zyablov, and G. S. P. M. S.Pinsker, “Bounds for codes with unequal protection of two sets of mes-sages,” Problemy Peredachi Informatsii, vol. 15, pp. 40–49, Jul.–Sep.1979.

[10] C. C. Kilgus and W. C. Gore, “Cyclic codes with unequal error protec-tion,” IEEE Trans. Inf. Theory, vol. 17, pp. 214–215, Mar. 1971.

[11] N. Rahnavard and F. Fekri, “Unequal error protection using low-den-sity parity-check codes,” in Proc. IEEE Int. Symp. Inf. Theory, Chicago,IL, Jun.–Jul. 2004, p. 449.

[12] C. Poulliat, D. Declercq, and I. Fijalkow, “Optimization of LDPC codesfor UEP property,” in IEEE Int. Symp. Inf. Theory, Jun.–Jul. 2004, p.450.

[13] H. Pishro-Nik, N. Rahnavard, and F. Fekri, “Nonuniform error correc-tion using low-density parity-check codes,” IEEE Trans. Inf. Theory,vol. 51, pp. 2702–2714, Jul. 2005.

[14] N. Rahnavard and F. Fekri, “Finite-length unequal error protectionrateless codes: Design and analysis,” in Proc. IEEE GLOBECOM, St.Louis, MO, Nov.–Dec. 2005.

[15] N. Rahnavard and F. Fekri, “Generalization of rateless codes forunequal error protection and recovery time: Asymptotic analysis,”in Proc. IEEE Int. Symp. Inf. Theory, Seattle, WA, Jul. 2006, pp.523–527.

[16] M. G. Luby, M. Mitzenmacher, M. A. Shokrollahi, D. A. Spielman, andV. Stemann, “Practical loss-resilient codes,” in Proc. 29th Ann. ACMSymp. Theory Computing (STOC), 1997, pp. 150–159.

[17] M. Luby, Mitzenmacher, and A. Shokrallahi, “Analysis of random pro-cesses via and-or tree evaluation,” in Proc. 9th Ann. ACM-SIAM Symp.Discrete Algorithms, 1998, pp. 364–373.

[18] R. G. Bartle, The Elements of Real Analysis, 2nd ed. New York:Wiley, 1976.

[19] L. Comtet, Advanced Combinatorics, 1974.

On -Dual Binary Codes

Denis S. Krotov

Abstract—A new generalization of the Gray map is introduced. Thenew generalization � : Z ! Z is connected with the knowngeneralized Gray map ' in the following way: if we take two dual linearZ -codes and construct binary codes from them using the generalizations' and � of the Gray map, then the weight enumerators of the binarycodes obtained will satisfy the MacWilliams identity. The classes ofZ -linear Hadamard codes and co-Z -linear extended 1-perfect codesare described, where co-Z -linearity means that the code can be obtainedfrom a linear Z -code with the help of the new generalized Gray map.

Index Terms—Gray map, Hadamard codes, MacWilliams identity, per-fect codes, Z -linearity.

I. INTRODUCTION

As discovered in [1], [2], [20] certain nonlinear binary codes canbe represented as linear codes over Z4. The variant of this represen-tation founded in [3] uses the mapping � : 0! 00; 1! 01; 2! 11;3! 10, which is called the Gray map, to construct binary so-calledZ4-linear codes from linear quaternary codes. The main property of �from this point of view is that it is an isometry between Z4 with the Leemetric andZ2

2 with the Hamming metric. In [4] (and in [5] in more gen-eral form) the Gray map is generalized to construct Z2 -linear codes.The generalized Gray map (say '; see Section II-A for recalling basicfacts on the generalized Gray map) is an isometric imbedding of Z2

with the metric specified by the homogeneous weight [6] into Z22

with the Hamming metric.In this correspondence, we introduce another generalization � of the

Gray map (Section II-B). This generalization turns out to be dual to theprevious in the following sense. If C and C? are dual linear Z2 -codes,then the binary Z2 -linear code '(C) and the co-Z2 -linear code�(C?) are formally dual. The formal duality is that the weightenumerators of these two codes satisfy the MacWilliams identity

Manuscript received July 2, 2006; revised December 8, 2006. The material inthis correspondence was presented in part at the 4th International Workshop onOptimal Codes and Related Topics OC 2005, Pamporovo, Bulgaria, June 2005.

The author is with the Sobolev Institute of Mathematics, Novosibirsk, 630090Russia (e-mail: [email protected]).

Communicated by T. Etzion, Associate Editor for Coding Theory.Digital Object Identifier 10.1109/TIT.2007.892787

0018-9448/$25.00 © 2007 IEEE

IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007 1533

(Section III); note that these codes, in general, can be nonlinear, inwhich case they cannot be dual in the usual sense, as subspaces of thebinary vector space. So, we solve the problem of duality for Z2 -linearbinary codes: to relate the weight enumerators of the images of duallinear codes over Z2 . This problem cannot be solved using only thestandard generalized Gray map ', because, as noted in [4], the weightenumerators of '(C) and '(C?) are in general not related, contrarilyto the case of Z4-linear codes.

In [5], it is shown that binary (and, in general, nonbinary) codes canbe represented as group codes over different groups. Such representa-tions use a special scaled isometry (' is a partial case of such isom-etry), which acts isometrically from some module with a specially de-fined metric to the binary (or, in general, nonbinary) Hamming space.With such approach, each module element corresponds to one code-word; Z2 -linear codes are a partial case of that approach.

In our approach, every module element (word) corresponds tosome set of codewords, which is a Cartesian product of the setscorresponding, by a special mapping, to the symbols of the moduleword. In the constructive part, this approach can be represented bythe generalized concatenation construction [7], [21], but the resultingcode distance differs from the constructive distance of generalizedconcatenated codes. Calculating distance, we use some isometricalproperties of the mapping, which can be considered as an analog of ascaled isometry. The map � considered in this correspondence allowsto construct only codes with distance maximum 4, but in general theapproach may have a larger potential.

The new way to generalize the Gray map (Section II-B) and its du-ality (Section III) to the “old way” are the main results of the first partof the correspondence. The second part (Sections IV–VI) is devotedto constructions of co-Z2 -linear and Z2 -linear codes with parame-ters of extended 1-perfect and Hadamard codes. There is a series (e.g.,[8]–[16]) of papers that concern 1-perfect (or extended 1-perfect) andHadamard codes which are linear in some nonstandard sense (note thatfor each considered values of parameters only exists one linear code, upto equivalence). Using the two generalized '; � Gray maps, we con-struct a wide class of such codes. Some natural questions on the con-structed codes remain open for future researching: which of these codesare equivalent to each other or to other known codes; which of them arepropelinear (see the definition in [8]) or at least transitive (see [17] forthe definition and some constructions of transitive 1-perfect codes); toestablish the bounds on the dimension of the kernel and rank for thesecodes (the dimension of the kernel and rank are good measures of lin-earity of nonlinear codes in the classical binary sense. For Z4-linearextended 1-perfect and Hadamard codes these parameters were calcu-lated in [10], [11], [13]–[15]); and so on.

In Section IV we construct co-Z2 -linear extended 1-perfect(n; 2n=2n; 4) codes. As noted above, the code distance of aco-Z2 -linear code cannot exceed 4 if k > 2 (see Lemma 2-5).So, extended 1-perfect codes are the best examples.

As a corollary, the dual distance of a Z2 -linear code (k > 2) alsocannot exceed 4. Best examples are codes with large code distance. InSection V we constructZ2 -linear codes with parameters (n; 2n; n=2),i.e., Hadamard codes. They are Z2 -dual to the extended 1-perfectcodes from Section IV; i.e., the ' and, respectively, � preimage ofthe constructed extended 1-perfect and Hadamard codes are dual Z2codes.

The introduced constructions of codes are a generalization of theconstructions of Z4-linear extended 1-perfect and Hadamard codes[10], [11] (see also [13]).

It is natural to ask whether our construction of co-Z2 -linear ex-tended 1-perfect and Z2 -linear Hadamard codes is complete or not.In Section VI we show that the answer is yes; i.e., all co-Z2 -linear ex-tended 1-perfect codes and all Z2 -linear Hadamard codes are equiva-lent to codes constructed in Sections IV and V.

II. DEFINITIONS AND BASIC FACTS. TWO GENERALIZATIONS

OF GRAY MAP

We will use the following common notations. An (n;M; d) binarycode is a cardinality M subset of Zn2 = Z2 � � � � � Z2 with thedistance at least d between every two different elements (codewords);n is called the code length and d is called the code distance. An(n; 2n; n=2) binary code is called a Hadamard code; such codesexist if and only if Hadamard n � n matrices exist, i.e., at leastn � 0mod 4 if n > 2, see, e.g., [18]. A linear Hadamard code isknown as a first order Reed–Muller code; n is a power of two is thiscase. An (n; 2n=2n; 4) binary code is called an extended 1-perfectcode; such codes exist if and only if n is a power of two. Such a codeis always an extension of a (n � 1; 2n=2n; 3) code, which is called1-perfect; so, studying extended 1-perfect codes is an alternative wayto study 1-perfect codes. For each admissible length there is only one,up to coordinate permutation, linear (extended) 1-perfect code and,if n > 8, many nonlinear ones; the classification of all such codes iscurrently an open problem. In the following two subsections we willdefine the basic concepts, which will be used throughout the corre-spondence: two weight functions on Z2 , two corresponding metrics,two generalized Gray maps ' and �, the concepts of Z2 -linear andco-Z2 -linear codes; we will formulate simple but fundamental claimson isometric properties of ' and �.

A. Z2m-Linear Codes

This section recalls basic definitions and facts about the generalizedGray map and Z2 -linear codes [4], [5].

Assume m � 2 is an integer such that there exist an Hadamard m�m matrix. Let A � Zm2 be a Hadamard (m; 2m;m=2) code. Assumethat A = fa0; a1; . . . ; a2m�1g, where a0 is the all-zero codeword andai + ai+m is the all-one codeword for each i from 0 to m� 1. Definethe generalized Gray map ': Zn2m ! Zmn2 by the rule

'(x1; . . . ; xn)4

= (ax ; . . . ; ax ):

Let the weight function wt�: Z2m ! R+ be given by

wt�(x)4

=

0; if x = 0

m if x = m

m=2; otherwise.

The weight wt� is the homogeneous weight introduced in [6] for moregeneral class of rings. The corresponding distance d� onZn2m is definedby the standard way:

d�((x1; . . . ; xn); (y1; . . . ; yn))4

=

n

i=1

wt�(yi � xi):

Proposition 2-1 [5]: The mapping ' is an isometric embeddingof (Zn2m; d

�) into (Zmn2 ; d), i.e., d�(�x; �y) = d('(�x); '(�y)), whered(�; �) is the Hamming distance.

If C � Zn2m, then

'(C)4

= f'(�x) j �x 2 Cg:

We will say that C is a (n;M; d)� code if C � Zn2m; jCj = M ,and the d�-distance between any two different elements of C is not lessthan d.

Corollary 2-2: If C is a (n;M; d)� code, then '(C) is a binary(mn;M; d) code.

A binary code is calledZ2m-linear if its coordinates can be arrangedin such a way that it is the image of a linear Z2m-code by '. As notedin [4], the length of a Z2m-linear code must be a multiple of m and allthe weights of its codewords must be multiples of m=2.

1534 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007

Remark 2-3: The map ' and the concept of Z2m-linearity givenabove depend on the choice of a Hadamard codeA and the only restric-tion on m is that exists a Hadamard m�m matrix. In fact, originally[4] (and in the binary subcase of [5, Sec. D]) m = 2k�1 and the codeA is fixed as R(1; k � 1), the Reed–Muller code of order 1.

B. Co-Z2 -Linear Codes

Here, we will introduce another approach to construct binary codesfrom linear codes over Z2 .

First, we will introduce a new way to generalize the Gray map,defining a map �: Zn2m ! 2Z , where 2Z denotes the setof the subsets of Zmn2 . Then we will define a weight functionwt� : Z2m ! R+ and the corresponding distance d� and we willshow (Lemma 2-5) relations between the d�-distance of a codeC � Zn2m and the Hamming distance of the code �(C). Finally, wewill introduce the concept of co-Z2 -linear codes.

Put m = 2k�1. Let fH0; . . . ; H2m�1g be a partition of Zm2 intoextended 1-perfect (m; 2m=2m; 4) codes (for example, we can takeH0 as the extended Hamming code andH0; . . . ; H2m�1 as its cosets).Moreover, we assume that H0 contains the all-zero word �0 and Hj isan even (odd) weighted if and only if j is even (odd).

Define the map �: Zn2m ! 2Z by the rule

�(x1; . . . ; xn)4= Hx � � � � �Hx :

If C � Zn2m, then

�(C)4=

�x2C

�(�x):

Example 2-4: Let k = 3; H0 = f0000;1111g; . . . ; H2 =f1100;0011g; . . . ; H7 = f0001;1110g. Then

�(20 7) = H2 �H0 �H7

= f110000000001; 110000001110;

110011110001;110011111110;

001100000001;001100001110;

001111110001;001111111110g:

Define the weight function wt� : Z2m ! R+ as

wt�(x)4=

0; if x = 0

1; if x is odd2; if x 6= 0 is even.

The corresponding distance d� on Zn2m is defined by the standard way

d�((x1; . . . ; xn); (y1; . . . ; yn))4=

n

i=1

wt�(yi � xi):

We will say that C is an (n;M; d)� code if C � Zn2m, jCj = M ,and the d�-distance between any two different elements of C is not lessthan d.

Lemma 2-5: Let m � 4. If C � Zn2m is an (n;M; d)� code, then�(C) is a binary (mn;M( 2

2m)n;min(4; d)) code.

The proof is straightforward, and we omit it.We call a binary code co-Z2m-linear if its coordinates can be ar-

ranged so that it is the image of a linear Z2m-code by the map �.

Remark 2-6: Co-Z2m-linear codes can be considered as a partialcase of generalized concatenated codes [7], [21]. For this special casethe code distance given by Lemma 2-5 may be better than the codedistance guaranteed by the generalized concatenation construction.

III. Z2 -DUALITY OF BINARY CODES

In this section, we will show (Theorem 3-4) that if two binary codesare obtained from dual linear Z2 -codes by, both, ' and � generaliza-tions of Gray map, then these codes are formally dual, i.e., their weightenumerators satisfy the MacWilliams identity.

LetC be aZ2 -linear code, the image by' of a linearZ2 -code C oflengthn. Let C? be the linearZ2 -code dual to C. LetSWC (X;Z; T )be the polynomial obtained from the complete weight enumeratorWC (X0;X1; . . . ; X2 �1) of C? by identifying to Z (respectively,to T ) all the Xj ’s such that j is odd (respectively, j is even 6= 0).

Lemma 3-1 [4]: Then we have

WC(X;Y )

=1

jC?jSWC X2 + Y 2 + (2k � 2)(XY )2 ;

X2 � Y 2 ;

X2 + Y 2 � 2(XY )2 :

The following lemma is a known fact about the weight distribution ofextended 1-perfect binary codes.

Lemma 3-2: Let H be an extended 1-perfect (m; 2m=2m; 4) code;then

a)1

jHjWH(X + Y;X � Y ) = Xm + Y m + (2m� 2)(XY )m=2;

if �0 2 H

b)1

jHjWH(X + Y;X � Y ) = Xm � Y m; if H is odd-weight

c)1

jHjWH(X + Y;X � Y ) = Xm + Y m � 2(XY )m=2;

if H is an even-weight code and �0 62 H:

Proposition 3-3: Let C be a Z2 -code and ~C = �(C); then

W~C(X;Y ) = SWC(WH (X;Y );WH (X;Y );WH (X;Y ))

where fH0; . . . ; H2m�1g is the partition of Zm2 into extended 1-per-fect codes from the definition of �; 0 2 H0; H1 is an odd-weight code,H2 is an even-weight code, and �0 62 H2.

Proof: The statement follows almost immediately from the def-inition of the map �. Indeed, each codeword �z = (z1; . . . ; zn) 2 Cadds SWz � . . . � SWz to SWC(X;Z; T ), where

SW0

4= X

SW2j+14= Z; j = 0; . . . ;m� 1

SW2j4= T; j = 1; . . . ; m� 1:

On the other hand, as follows from the definition of the map �, eachcodeword �z = (z1; . . . ; zn) 2 C addsWH (X;Y )�. . .�WH (X;Y )to W~C(X;Y ). The relations

WH (X;Y ) =WH (X;Y ); j = 0; . . . ; m� 1

WH (X;Y ) =WH (X;Y ); j = 1; . . . ; m� 1

follow from Lemma 3-2 and conclude the proof.The following theorem is the main result of this section.

Theorem 3-4: Let C and C? be dual linear Z2 -codes, C = '(C)and ~C? = �(C?). Then the codes C and ~C? are formally dual, i.e.,WC(X;Y ) =

1

j~C jW~C (X + Y;X � Y ).

IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007 1535

Proof: By Lemmas 3-1 and 3-2

WC(X; Y ) =1

jC?jSWC

1

jH0jWH (X+Y;X�Y );

1

jH1jWH (X+Y;X�Y );

1

jH2jWH (X+Y;X�Y )

=1

jC?j

2m

2m

n

SWC WH (X+Y;X�Y );

WH (X+Y;X�Y );

WH (X+Y;X�Y ) :

It remains to note that by Lemma 2-5 we have jC?j( 22m

)n = j ~C?j andby Proposition 3-3 we obtain

SWC (WH (X+Y;X�Y );WH (X+Y;X�Y );

WH (X+Y;X�Y )) = W~C (X+Y;X�Y ):

In Sections IV and V we will construct two Z2 -dual classesof codes: co-Z2 -linear extended 1-perfect codes and Z2 -linearHadamard codes. In the last section, we will show the completeness ofthe constructions.

IV. CO-Z2 -LINEAR EXTENDED PERFECT CODES

This section concerns extended 1-perfect codes. We first introducethe concept of �1-perfect code, which is a generalization of the con-cept of extended 1-perfect binary code to some nonbinary cases. Asin the case of 1-perfect codes, the existence of 1-perfect codes in dif-ferent spaces is independently interesting. Then, in Section IV-B, weconstruct a class of �1-perfect codes in (Zn

2; d�). In Section IV-C we

summarize: the images of such codes under � are co-Z2 -linear ex-tended 1-perfect codes. In Section IV-D we give examples of �1-perfectcodes in Z2m where m is not a power of two.

A. �1-Perfect Codes

Let G = (V;E) be a regular bipartite graph with parts Vev; Vod. Asubset C � Vev is called a �1-perfect codes if for each �x 2 Vod thereexist exactly one �c 2 C adjacent with �x. It is not difficult to see thata �1-perfect code is an optimal distance 4 code, i.e., its cardinality ismaximum among the distance 4 codes in the same space. In particular,such a code is a 3-diameter perfect code in the sense [19]. �1-perfectcodes in a binary Hamming space are known as extended 1-perfectcodes. The following test can be considered as an alternative definitionof a �1-perfect code.

Proposition 4-1: Assume G = (V;E) is a regular bipartite graphof degree r > 0 and dG is the graph distance in V . Then C � V isa �1-perfect code if and only if jCj = jV j=2r and dG(�c1; �c2) � 4 foreach different �c1; �c2 2 C .

Proof: Only if: Assume C � V is a �1-perfect code. Then by thedefinition it is a subset of a part Vev of the graph (V;E) and the graphdistance between any two elements of C is even.

On the other hand, if dG(�c1; �c2) = 2 for some �c1; �c2 2 C , then thereexist an element �x 2 V such that dG(�x; �c1) = 1 and dG(�x; �c2) = 1.The existence of such element contradicts to the definition of �1-perfectcode. Consequently, dG(�c1; �c2) � 4 for each different �c1; �c2 2 C .

Each element of Vod4

= V nVev is adjacent with exactly one elementof C . On the other hand, each element of C is adjacent with exactly r

elements of Vod. Therefore, jCj = jVodj=r = jV j=2r.If: Assume C is a code of cardinality jV j=2r and distance at least 4.Denote

C1

4

= f�x j dG(�x; C) = 1g:

Each element of C1 is adjacent with exactly one element of C (other-wise the code distance of C is not more than 2). Consequently, jC1j =rjCj = jV j=2.

(*) We claim that C1 does not contain two adjacent elements. As-sume the contrary. Then the graph G contains a chain (�c; �x; �y; �c0),where �c; �c0 2 C; �x; �y 2 C1. The case �c = �c0 contradicts to the bi-partiteness of the graph G. The case �c 6= �c0 contradicts to the codedistance of C . The claim (*) is proved.

Since G is a regular graph, the other half of vertices V nC1 also doesnot contain two adjacent elements. Therefore C is a �1-perfect code bythe definition, where Vod = C1.

B. A Class of �1-Perfect Codes in Zn2

Let n = 2r and I = (i1; . . . ; ik) be a collection of nonnegative inte-gers such that 1i1+2i2+� � �+kik = r. Let�b1; . . . ;�bn 2 Z

1+i +���+i

2

be all the elements of f1g � (2k�1Z2 )i � (2k�2Z2 )i � . . . �(20Z2 )i ordered lexicographically. And let BI be the matrix withthe columns �b1; . . . ;�bn.

Example 4-2: If k = 3; i1 = 2; i2 = 1; i3 = 0, then r = 4; n =2r = 16; and

BI =

1111111111111111

0000000044444444

0000444400004444

0246024602460246

:

If k = 3; i1 = 0; i2 = i3 = 1, then r = 5; n = 2r = 32, and

BI =

11111111111111111111111111111111

00000000222222224444444466666666

01234567012345670123456701234567

:

Lemma 4-3: The linear code

HI4

= �h = (h1; . . . ; hn) 2 Zn2

n

j=1

hj�bj = BI�hT = �0

with the check matrix BI is �1-perfect.Proof: First we claim that

(*) the distance 2 between codewords �h1; �h2 fromHI is impossible.Indeed, if d�(�h1; �h2) = 2, then the codeword �h

4

= �h1��h2 have one ortwo nonzero positions. The first case contradicts to the fact that �bi 6= �0;i = 1; . . . ; n. In the second case we have ��bi + �bj = �0 for somedifferent i; j and odd �; . But the first row ofBI implies that � = � and, since � and are odd, we get �bi = �bj . This again contradicts tothe construction of BI . The claim (*) is proved.

The first row of BI implies that the words of HI have even weight.We need to check that each odd word is at the distance 1 from exactly

one codeword. Let �z = (z1; . . . ; zn) 2 Zn2

have an odd weight, �s4

=n

j=1zi�bi; and s

4

= n

j=1zi. Note that s is odd. Since s�1�s 2 f1g�

(2k�1Z2 )i � (2k�2Z2 )i � � � � � (20Z2 )i , there exists j0 suchthat s�1�s = �bj . Let �z0 2 Zn

2be the word with s in the j0th position

and zeroes in the others. It is easy to check that �z � �z0 is a codewordat the distance 1 from �z. As follows from (*), such codeword is uniquefor each odd �z.

1536 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007

C. Co-Z2 -Linear Extended 1-Perfect Binary Codes

Now we have all we need to construct a class of co-Z2 -linear ex-tended 1-perfect binary codes. As we will see in Section VI, the classconstructed exhaust all such codes provided the mapping � is fixed.

Theorem 4-4: The co-Z2 -linear code ~HI4

= �(HI) is a binary(nm; 2nm=2nm; 4) code, i.e., an extended 1-perfect code.

Proof: The statement follows directly from Lemma 2-5, Propo-sition 4-1, and Lemma 4-3.

D. Note on the General Case Z2m

Indeed, �1-perfect codes can be constructed over Z2m with d�-dis-tance for each m � 1, see the following examples. Since m = 2� isa necessary condition for constructing binary codes using the way ofSection II-B, the classification of �1-perfect codes in the other cases isout of view of this correspondence.

Example 4-5: The codes with the check matrices

B0 4=

1 1 1 1 1 1 1 1

0 0 0 0 12 12 12 12

0 6 12 18 0 6 12 18

B00 4=1 1 1 1 1 1

0 4 8 12 16 20

are �1-perfect codes over Z24 with d�-distance.

V. Z2 -LINEAR HADAMARD CODES

Lemma 5-1: Let H be a linear code in Zn2 . Then H is an

(n; n2k; n2k�2)� code if and only if H? is a �1-perfect code in(Zn

2 ; d�).Proof: Assume the code H has parameters (n; n2k; n2k�2)�.

Then '(H) has the parameters of a Hadamard code, see Corollary 2-2.By Theorem 3-4 the code �(H?) is formally dual to the Hadamardcode '(H), i.e., �(H?) is an extended 1-perfect code. Then the car-dinality and the minimal d�-distance 4 of the code H? follow fromLemma 2-5.

The reverse statement can be proved by reversing the arguments.The next theorem follows immediately from Lemmas 4-3 and 5-1.

Theorem 5-2: The code DI4

= H?

I is a linear (n; n2k; n2k�2)�

code with the generator matrix BI . The Z2 -linear code DI4

= '(DI)is a binary (n2k�1; n2k; n2k�2) code, i.e., a Hadamard code.

Remark 5-3: The code D(r;0;...;0) is the first-order Reed–Mullercode over Z2 [16].

Remark 5-4: Indeed, if a Hadamard code A of length m exists (seeSection II-A), then Z2m-linear Hadamard code can be constructed forlength nm = 2rm, even if m is not a power of two. For example,the linear Z24-code with the generator matrix B0 from Example 4-5has parameters (16; 192; 48)� and the corresponding binaryZ24-linearcode has parameters (96;192; 48), i.e., the parameters of a Hadamardcode of length 96.

However, the code with the generator matrix B00 (Example 4-5) hasparameters (6; 144;30)�, corresponding a binary (72; 144; 30) code.The code distance of this code is smaller than the code distance of aHadamard code with the same length and cardinality.

VI. NONEXISTENCE OF UNKNOWN CO-Z2 -LINEAR EXTENDED

PERFECT CODES AND Z2 -LINEAR HADAMARD CODES

Let n be a power of 2. In this section, we will show (Theorem6-2) that each linear (n; 2kn=n2k; 4)� code in Zn

2 is equivalent to acode from the class constructed in Section IV. Similarly, each linear

(n; n2k; n2k�2)� code in Zn2 is equivalent to a code from the class

constructed in Section V (Theorem 6-3). The key moment of the proofis Lemma 6-4. The partial Z4 case of this lemma was proved in [10]and in [13], but the proof given here is not similar.

We say that two linear codes C1; C2 � Zn2 are equiva-

lent if C2 = �z � �C1 where � is a coordinate permutation,

�z 2 (Z�2 )n4

= f1; 3; . . . ; 2k � 1gn, and � is the coordinate-wise

product defined as (z1; . . . ; zn) � (x1; . . . ; xn)4

= (z1x1; . . . ; znxn).Note that both operations � and �z � are group automorphisms of theadditive group of Zn

2 and isometries of the metric spaces (Zn2 ; d�)

and (Zn2 ; d�). The following proposition shows that there are no other

linear isometries of (Zn2 ; d�) or (Zn

2 ; d�), and thus our definition ofthe equivalence is natural.

Proposition 6-1: Assume that � is a linear transformation of Zn2

and isometry of (Zn2 ; d) where d = d� or d = d�. Then �(�x) �

�z � �(�x) where � is a coordinate permutation and �z 2 (Z�2 )n.Proof: Denote by �ei the word with 1 in ith position and zeroes

in the other positions. It is enough to check that for each i we have�(�ei) � zj�ej with some j = �(i) and zj 2 Z�2 . Indeed, from theisometric properties of � we derive that �(�ei) has only one nonzerocoordinate. On the other hand, this coordinate belongs to Z�2 , because� is a bijection.

The following two theorems are the main results of this section. Re-mind that the codes HI and DI are defined in Sections IV and V.

Theorem 6-2: Let H � Zn2 be a linear �1-perfect code. Then H is

equivalent toHI where I = (i1; . . . ; ik) is a collection of nonnegativeintegers such that 1i1 + 2i2 + � � � + kik = log2 n.

Theorem 6-3: Let D � Zn2 be a linear (n; n2k; n2k�2)� code.

Then D is equivalent to DI , where I = (i1; . . . ; ik) is a collection ofnonnegative integers such that 1i1 + 2i2 + � � �+ kik = log2 n.

By Lemma 5-1 it is enough to prove only one of Theorems 6-2, 6-3.We need the following auxiliary result.

Lemma 6-4: If D is a linear (n; n2k; n2k�2)� code in Zn2 , then D

contains an element from (Z�2 )n.Proof: We prove the lemma by induction. If n = 1, then D =

Z2 . Assume n > 1.(*) We claim that D contains an element from f0; 2k�1gn of weight

n2k�2. Let �x0 and �x00 be two linear independent elements inD of order2m0 and 2m00, respectively. This means that m0�x0 and m00�x00 are dif-ferent nonzero elements from D\f0; 2k�1gn. Since ' is an isometricimbedding (see Proposition 2-1 and '(D) is an (n2k�1; n2k; n2k�2)Hadamard code, the only possible values of wt�-weight of elements inD are 0, n2k�2 and n2k�1. So, at least one of m0�x0 and m00�x00 hasweight n2k�2. The claim (*) is proved.

Without loss of generality assume that

�a4

= (2k�1; . . . ; 2k�1; 0; . . . ; 0) 2 D \ f0; 2k�1gn:

Let us consider two codes obtained from D by puncturing n=2 co-ordinates

D14

= f�z0 2 Zn=2

2j9 �z00 2 Z

n=2

2:(�z0; �z00) 2 Dg

D24

= f�z00 2 Zn=2

2j9 �z0 2 Z

n=2

2:(�z0; �z00) 2 Dg:

(**) We claim that D1 and D2 are linear (n=2; n2k�1; n2k�3)�

codes. The linearity of the codes is obvious. The code distance followsfrom the fact that the distance between �a and any element �z 2 D is0, n2k�2 or n2k�1. It is true that jD1j � jDj=2 because the codedistance of D permits of only one nonzero codeword with zeroes inthe first n=2 coordinates. On the other hand, such a codeword exists:(0; . . . ; 0; 2k�1; . . . ; 2k�1) = (2k�1; . . . ; 2k�1)+�a 2 D. So, jD1j =

IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 53, NO. 4, APRIL 2007 1537

jDj=2 = n2k�1. Similarly, we get jD2j = n2k�1. The claim (**) isproved.

By the assumption of induction D1 contains an element �u0 from(Z�

2)n=2. This means that there exists �u00 from Z

n=2

2such that

(�u0; �u00) 2 D. Since wt�(2k�1(�u0; �u00)) 2 fn2k�2; n2k�1g and2k�1�u0 = (2k�1; . . . ; 2k�1), we have wt�(2k�1�u00) = 0 orwt�(2k�1�u00) = n2k�2. So

2k�1�u00 = (0; . . . ; 0) (1)

or

2k�1�u00 = (2k�1; . . . ; 2k�1): (2)

Similarly, considering the code D2, we can find a codeword (�v0; �v00) 2D such that 2k�1�v00 = (2k�1; . . . ; 2k�1) and v0 satisfies

2k�1�v0 = (0; . . . ; 0) (3)

or

2k�1�v0 = (2k�1; . . . ; 2k�1): (4)

If (2) is true, then (u0; u00) 2 (Z�2)n\D. If (4) is true, then (v0; v00) 2

(Z�2)n \ D. If (1) is true and (4) is true, then (u0; u00) + (v0; v00) 2

(Z�2)n \ D. Lemma 6-4 is proved.

Proof of Theorem 6-3: By Lemma 6-4 the code D containsan element �c = (c1; . . . ; cn) from (Z�

2)n. Then the code

D0 4

= (c�1

1; . . . ; c�1

n ) � D is equivalent to D and contains�1 = (1; . . . ; 1). Let f�1; q1; . . . ; qsg be a basis of D0 and ij be thenumber of elements of order 2j ; j = 1; � � � ; k. Assume �1; q1; . . . ; qsare the rows of the matrix Q of size (1 + i1 + � � � + ik) � n, agenerator matrix of the code D0. Then the columns of Q are ele-ments of f1g � (2k�1Z

2)i � (2k�2Z

2)i � . . . � (20Z

2)i .

Since by Lemma 5-1 the code d�-distance of D0? is more than 2,all the columns are pairwise different. Therefore Q coincides withBI ; I = (i1; . . . ; ik), up to permutation of columns.

So, we conclude, provided the mappings ' and � are fixed, all upto equivalence co-Z

2-linear extended 1-perfect codes and Z

2-linear

Hadamard codes are described in Sections IV and V.

REFERENCES

[1] A. A. Nechaev, “Trace-function in Galois ring and noise-stable codes,”in Proc. V All-Union Symp. Theory of Rings, Alg. Mod., Novosibirsk,Russia, 1982, p. 97, in Russian.

[2] ——, “Kerdock code in a cyclic form,” Discr. Math. Applicat., vol. 1,no. 4, pp. 365–384, 1991.

[3] A. R. J. Hammons, P. V. Kumar, A. R. Calderbank, N. J. A. Sloane, andP. Solé, “The Z -linearity of Kerdock, Preparata, Goethals, and relatedcodes,” IEEE Trans. Inf. Theory, vol. 40, no. 2, pp. 301–319, 1994.

[4] C. Carlet, “Z -linear codes,” IEEE Trans. Inf. Theory, vol. 44, no. 4,pp. 1543–1547, 1998.

[5] T. Honold and A. A. Nechaev, “Fully weighted modules and represen-tations of codes,” Probl. Inf. Transm., vol. 35, no. 3, pp. 205–223, 1999.

[6] I. Constantinescu and W. Heise, “A metric for codes over residue classrings of integers,” Probl. Inf. Transm., vol. 33, no. 3, pp. 208–213, 1997.

[7] V. A. Zinoviev, “Generalized concatenated codes,” Probl. Inf. Transm.,vol. 12, no. 1, pp. 2–9, 1976.

[8] J. Rifa and J. Pujol, “Translation-invariant propelinear codes,” IEEETrans. Inf. Theory, vol. 43, no. 2, pp. 590–598, 1997.

[9] J. Borges and J. Rifa, “A characterization of 1-perfect additive codes,”IEEE Trans. Inf. Theory, vol. 45, no. 8, pp. 1688–1697, 1999.

[10] D. S. Krotov, “Z -linear perfect codes,” Diskr. Analiz i Issled. Oper-atsii, Ser.1, vol. 7, no. 4, pp. 78–90, 2000, in Russian.

[11] ——, “Z -linear Hadamard and extended perfect codes,” Electron.Notes in Discr. Math., vol. 6, pp. 107–112, 2001.

[12] K. T. Phelps and J. Rifa, “On binary 1-perfect additive codes: Somestructural properties,” IEEE Trans. Inf. Theory, vol. 48, no. 9, pp.2587–2592, 2002.

[13] J. Borges, K. T. Phelps, and J. Rifa, “The rank and kernel of extended1-perfect Z -linear and additive non-Z -linear codes,” IEEE Trans.Inf. Theory, vol. 49, no. 8, pp. 2028–2034, 2003.

[14] K. T. Phelps, J. Rifa, and M. Villanueva, “Rank and kernel of ad-ditive (Z -linear and non-Z -linear) Hadamard codes,” in Proc.9th Int. Workshop on Algebraic and Combinatorial Coding TheoryACCT’2004, Kranevo, Bulgaria, Jun. 2004, pp. 327–332.

[15] K. T. Phelps, J. Rifa, and M. Villanueva, “On the additive (Z -linearand non-Z -linear) Hadamard codes. Rank and kernel,” IEEE Trans.Inf. Theory, vol. 52, no. 1, pp. 316–319, Jan. 2006.

[16] M. K. Gupta, M. C. Bhandari, and A. K. Lal, “On linear codes overZ ,” Designs, Codes Cryptogr., vol. 36, no. 3, pp. 227–244, 2005.

[17] F. I. Solov’eva, “On the construction of transitive codes,” Probl. Inf.Transm., vol. 41, no. 3, pp. 204–211, 2005.

[18] F. J. MacWilliams and N. J. A. Sloan, The Theory of Error-CorrectingCodes. Amsterdam, Netherlands: North Holland, 1977.

[19] R. Ahlswede, H. K. Aydinian, and L. K. Khachatrian, “On perfect codesand related concepts,” Designs, Codes Cryptogr., vol. 22, no. 3, pp.221–237, 2001.

[20] Translated from Diskretnaya Matematika, vol. 1, no. 4, pp. 123–139,1989.

[21] Translated from Probl. Peredachi Inf., vol. 12, no. 1, pp. 5–15, 1976.

Entropy of Bit-Stuffing-Induced Measures forTwo-Dimensional Checkerboard Constraints

Søren Forchhammer, Member, IEEE, and Torben V. Laursen

Abstract—A modified bit-stuffing scheme for two-dimensional (2-D)checkerboard constraints is introduced. The entropy of the scheme isdetermined based on a probability measure defined by the modifiedbit-stuffing. Entropy results of the scheme are given for 2-D constraintson a binary alphabet. The constraints considered are 2-D RLL (d;1)for d = 2; 3 and 4 as well as for the constraint with a minimum 1-normdistance of 3 between 1s. For these results the entropy is within 1–2% ofan upper bound on the capacity for the constraint. As a variation of thescheme, periodic merging arrays are also considered.

Index Terms—Bit-stuffing encoding, cascading two-dimensional (2-D)arrays, run-length-limited (RLL) constraints, 2-D constraints.

I. INTRODUCTION

Constrained coding has found widespread use in optical and mag-netic data storage devices. Writing data along tracks, constrained codes[1] have been applied to increase the density for a given physical mediaand facilitate synchronization. Codes have been designed, e.g., for run-length-limited RLL(d; k) constraints, where the number of 0s betweensuccessive 1s has to be at least d and at most k.

New developments in storage medias such as holographic storageand advances in nano storage such as the millipede project [2], [3] arepossible application areas for two-dimensional (2-D) constrained codesand fields. An advantage of 2-D constrained coding could be to increase

Manuscript received November 28, 2005; revised December 22, 2006. Thematerial in this correspondence was presented in part at the IEEE InternationalSymposium on Information Theory, Chicago, IL, June/July 2004.

S. Forchhammer is with the Research Center COM, B.343, Technical Uni-versity of Denmark, DK-2800 Lyngy, Denmark (e-mail: [email protected]).

T. V. Laursen was with the Research Center COM, B.343, Technical Uni-versity of Denmark, DK-2800 Lyngy, Denmark. He is now with the TrygVesta,DK-2750 Ballerup, Denmark (e-mail: [email protected]).

Communicated by G. Zémor, Associate Editor for Coding Theory.Digital Object Identifier 10.1109/TIT.2007.892781

0018-9448/$25.00 © 2007 IEEE