IEEE TRANSACTIONS ON , VOL. 57, NO. 11, NOVEMBER 2011 7473 Product Constructions for Perfect Lee Codes Tuvi Etzion, Fellow, IEEE

Abstract—A well-known conjecture of Golomb and Welch is that sublattices of . The vectors are called the basis the only nontrivial perfect codes in the Lee and Manhattan met- for ,andthe matrix rics have length two or minimum three. This problem and related topics were subject for extensive research in the last 40 years. In this paper, two product constructions for perfect Lee codes and diameter perfect Lee codes are presented. These con- . . .. . structions yield a large number of nonlinear perfect codes and non- . . . . linear diameter perfect codes in the Lee and Manhattan metrics. A short survey and other related problems on perfect codes in the Lee and Manhattan metrics are also discussed. having these vectors as its rows is said to be the generator matrix Index Terms—Anticode, diameter perfect code, Hamming for . The lattice with the generator matrix is denoted by scheme, Lee , Manhattan metric, perfect code, periodic . code, product construction. Remark 1: There are other ways to describe a in the Manhattan metric and the Lee metric. The traditional way I. INTRODUCTION of using a parity-check matrix can be also used [4], [5]. But, in our discussion, the lattice representation is the most convenient.

HE Lee metric was introduced in [1] and [2] The volume of a lattice , denoted , is inversely propor- T for transmission of signals taken from tional to the number of lattice points per unit volume. More pre- over certain noisy channels. It was generalized for cisely, may be defined as the volume of the fundamental in [3]. The between two words parallelogram , which is given by is given by . A related metric, the Manhattan metric, is defined for There is a simple expression for the volume of , namely, alphabet letters taken as any integer. For two words . , Ashape tiles if disjoint copies of cover all the points the Manhattan distance between and is defined as of .Thecoverof with disjoint copies of is called a .Acode in either metric tiling.Wesaythat induces a lattice tiling of a shape if dis- (and in any other metric as well) has minimum distance if for joint copies of placed on the lattice points on a given specific each two distinct codewords we have , point in form a tiling of . where stands for either the Lee distance or the Manhattan Codes in generated by a lattice are periodic. We say that distance (or any other distance measure). Linear codes are usu- the code has period if for each , ally the codes which can be handled more effectively and hence ,theword is a codeword if and linear codes will be the building blocks in our constructions. only if .Let be the We will not restrict ourself only for linear codes, but we will least common multiplier of the period .The always assume that the all-zero word is a codeword. code has also period and the code can be A linear code in is an integer lattice. A lattice is a dis- reduced to acode in the Lee metric over the alphabet with crete, additive subgroup of the real -space . Without loss of thesameminimum distance as . The parameters of such code generality (w.l.o.g.), we can assume that will be given by ,where is the length of the code, is its minimum distance, is the volume of the related lattice (1) ( is the redundancy of the code), and is the alphabet size. The number of codewords in such a code is . where is a set of linearly independent vectors The research on codes with the Manhattan metric is not exten- in . A lattice defined by (1) is a sublattice of if and sive. It is mostly concern with the existence and nonexistence of only if . We will be interested solely in perfect codes [3], [6]–[8]. Nevertheless, all codes defined in the Lee metric over some finite alphabet can be extended to codes in the Manhattan metric over the integers. The code resulting from Manuscript received March 21, 2011; accepted June 16, 2011. Date of cur- rent version November 11, 2011. This work was supported in part by the Israeli aLee code over is periodic with period .The Science Foundation (ISF), Jerusalem, Israel, under Grant 230/08. minimum Manhattan distance willbethesameastheminimum The author is with the Department of Computer Science, Technion—Israel Lee distance. The literature on codes in the Lee metric is very Institute of Technology, Haifa 32000, Israel (e-mail: [email protected]). Communicated by G. Cohen, Associate Editor for . extensive, e.g., [4] and [9]–[16]. The interest in Lee codes has Digital Object Identifier 10.1109/TIT.2011.2161133 been increased in the last decade due to many new and diverse

0018-9448/$26.00 © 2011 IEEE 7474 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 57, NO. 11, NOVEMBER 2011 applications of these codes. Some examples are constrained and II. BASIC CONCEPTS AND CONSTRUCTIONS partial-response channels [4], interleaving schemes [17], multi- dimensional burst error correction [18], and error correction for A. Spheres and Perfect Codes flash memories [19]. The increased interest is also due to new The main two concepts in this paper are perfect codes and attempts to settle the existence question of perfect codes in these codes in the Lee and Manhattan metrics. We start with a general metrics [8]. definition of perfect codes. For a given space , with a distance Perfect codes is one of the most fascinating topics in coding measure ,asubset of is a perfect code with radius theory. A perfect code in a given metric is a code in which the if for every element there exists a unique codeword set of spheres with a given radius around its codewords form such that . For a point ,thesphere a partition of the space. These codes were mainly considered for of radius around , ,isthesetofelementsin such the Hamming scheme, e.g., [20]–[26]. They were also consid- that if and only if ,i.e., ered for other schemes as the Johnson scheme and the Grass- . For the sphere , is called mann scheme, But, as said, these codes were considered to a the center of the sphere. In this paper, we consider only the larger extent also in the Lee and Manhattan metrics. Hamming scheme and the Lee and Manhattan metrics, in which This paper was motivated by some basic concepts which were the size of a sphere does not depend on the center of the sphere. presented in [27] and [28]. There are two goals for this research. Hence, in the rest of the paper, we will assume that in our metric The first one is to present product constructions for perfect codes the size of a sphere with radius does not depend on its center. in the Lee and Manhattan metrics in a similar way to what was If is a code with minimum distance and is a sphere done in the Hamming scheme. The second one is to show how with radius then the following is readily verified. these constructions can be used to solve other problems related Theorem 1: For a code with minimum distance and to perfect codes in the Lee and Manhattan metrics. One problem a sphere with radius ,wehave . is the number of different perfect codes and diameter perfect codes in the Lee and Manhattan metrics. A second problem is Theorem 1 is known as the sphere packing bound.Inacode the existence of non-periodic perfect codes in the Manhattan which attains the sphere packing bound, i.e., , metric. In the process, we will also present a new product con- the spheres with radius around the codewords of form a struction for perfect codes in the Hamming scheme. partition of . Hence, such a code is a perfect code. A perfect The rest of this paper is organized as follows. In Section II, code with radius is also called a perfect -error-correcting we introduce the basic concepts which are used in our paper. code. We first define a perfect code in general and discuss some of the Finally, a code of length which attains the sphere packing known results on perfect codes and extended perfect codes in bound is determined by three parameters, its length, the radius of the Hamming scheme and the known results on perfect codes the sphere , which is equivalent to the fact that has minimum in the Lee and Manhattan metrics. We continue by introducing distance ; the size of the code is ,where is the space the concept of anticodes and diameter perfect code as was first on which the code is defined and isaspherewithradius . discussed in [29]. We prove that the definition of diameter per- It is clear from the sphere packing bound that it is important to fect codes can be applied to codes in the Lee and Manhattan compute the size of a sphere in any given metric. We start with metrics. We discuss the knowledge on these codes. We present the size of a sphere in the Hamming scheme. For two words a simple construction for diameter perfect codes with minimum and over the distance four in the Lee and Manhattan metrics. Finally, we de- , is defined by scribe a doubling construction for perfect codes in the Ham- ming scheme which was given by Phelps [20]. In Section III, we present a new product construction for -ary perfect codes Lemma 1: The size of a sphere with radius centeredina in the Hamming scheme. Similar idea to the one in this construc- word of length over in the Hamming scheme is tion was used in other papers, e.g., [24] and [30]–[32], for con- struction of relatively large binary codes (perfect and nonper- fect) with minimum Hamming distance three in the Hamming scheme. In Section IV, we present two product constructions, one for perfect codes and one for diameter perfect codes in the Corollary 1: Let be a perfect single-error-correcting code Lee and Manhattan metrics. These constructions are modifica- of length over an alphabet with letters in the Hamming tions of the two product constructions in the Hamming scheme. scheme. Then, the size of is . In Section V, we discuss two problems related to perfect codes Corollary 2: If a code of length over an alphabet with and diameter perfect codes in the Lee and Manhattan metrics. letters has minimum Hamming distance and size The first one is the number of nonequivalent such codes and the then is a perfect code. second one is the existence of nonperiodic perfect codes and nonperiodic diameter perfect codes. We will show how our con- An -dimensional Lee sphere with radius , centered structions can be used in the context of these two problems. A at is the shape in such that summary and a list of questions for future research are given in if and only if ,i.e., Section VI. it consists of all points in whose Manhattan distance from ETZION: PRODUCT CONSTRUCTIONS FOR PERFECT LEE CODES 7475 the given point is at most .Thesizeof where is the parity of ,i.e.,zero if the weight of (number is well known [3] of ones in ) is even and one if the weight of is odd. The extended code has length , size exactly as the size of , and minimum Hamming distance four. All the codewords of (2) have even weight. The extended code has odd translates (all words have odd weight) consisting of all translates from The -dimensional Lee sphere with radius is the sphere unit vectors. It has even translates (all words have even with radius in the Manhattan metric and also in the Lee metric weight) consisting of the code and all translates from vectors whenever the alphabet satisfies . of weight two with an one in the last coordinate. All these translates are disjoint and together form a partition of .A Corollary 3: Let be a perfect single-error-correcting code binary perfect single-error-correcting code has length of length over in the Lee metric. Then, the size of is and codewords. Let beacodeoflength , minimum . distance four, and codewords all with even weight. It is Corollary 4: If a code of length over has minimum easy to verify that the punctured code Lee distance three and size then is a perfect code. If the code is over and the code is a perfect -error-cor- recting code then the spheres with radius around the code- words form a tiling of . Instead of Theorem 1, we have the has length , minimum distance three, and codewords. following theorem. Hence, by Corollary 2, is a perfect code. Theorem 2: For a code with minimum Manhattan distance , whose codewords are the points of a lattice C. Perfect Codes in the Lee and Manhattan Metrics we have . The existence question of perfect -error-correcting codes in B. Perfect Codes in the Hamming Scheme the Lee metric was first asked by Golomb and Welch in their The existence question of perfect codes in the Hamming seminal paper [3]. They constructed perfect codes for length scheme was well investigated. It is well known [33] that the over ,where , and the minimum only parameters for nontrivial perfect codes over are Lee distance of the code is . They also constructed perfect those of the two Golay codes and the Hamming codes. Also single-error-correcting codes of length over , . over other alphabets it is highly probable that no new perfect They also considered perfect codes in the Manhattan metric. codes exist [34]. The Hamming codes have length , , They proved that for each there exists an integer where the alphabet is . The minimum Hamming distance such that for each radius there is no tiling of the -di- of the code is three. Codes with the parameters of the Hamming mensional Euclidian space with the sphere ,i.e.,thereis codes were extensively studied. A small sample of references no length , perfect -error-correcting code in the Manhattan includes [20]–[26]. metric. The existence problem of other perfect codes was dis- An code over is a linear subspace cussed in many papers, e.g., [3], [8]–[10], and [12]. We will of dimension of . Clearly, has codewords and mention two of the results given in these papers. Post [9] proved cosets. For any code (linear or nonlinear) of length over that if then there are no perfect Lee codes over and a word we define a translate of for , ,andfor , with the word by . Another interesting result was given in [12] where it was proved that the smallest for which there exists a perfect single-error-correcting Lee code over is the multiplication of all the prime factors of . If is a linear code then each translate is a coset of the code. It is In the same way as was done for the Hamming scheme, a easy to verify that the size of a translate is equal to the size perfect single-error-correcting code (in the Lee metric) and of .If is linear and ,theneither or its translates formed from the unit vectors (vectors of length . Therefore, the cosets of the code form with exactly one nonzero entry having value or )forma a partition of .If is nonlinear then this is usually not true. partition of . If the perfect code is over then the partition But, if is a perfect code then some translates form a partition of is of . In contrary to the Hamming scheme, not many con- . For example, if is a perfect single-error-correcting code structions are known for perfect single-error-correcting codes and and are two different unit vectors of length ,then in the Lee metric. Not many properties are known, and there is . Therefore, the code and all its no ”reasonable” lower bound on the number of nonequivalent translates formed from the unit vectors form a partition of . perfect single-error-correcting codes. Given a binary perfect single-error-correcting code of Finally, if ,then is not the sphere in the length , one can define the extended code by corresponding parameters of the Lee metric. If or , then the Lee metric coincides with the Hamming scheme for binary codes or ternary codes, respectively. If , then the situation becomes more interesting, but also more complicated. 7476 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 57, NO. 11, NOVEMBER 2011

D. Anticodes and Diameter Perfect Codes Thus, the claim is proved. Corollary 5 can be stated similarly to Theorem 2. In all the perfect codes the minimum distance of the code is an odd integer. If the minimum distance of the code is an Theorem 5: Let be a lattice which forms a code even integer then there cannot be any perfect code since for with minimum Manhattan distance . Then, the size of any anti- any two codewords such that there code of length with maximum distance is at most . exists a word such that and .For A code which attains either the bounds of Theorem 3 or the this case another concept is used, a diameter perfect code, as bound of Corollary 5 or the bound of Theorem 5 with equality is was defined in [29]. This concept is based on the code–anticode called a diameter perfect code.Thedefinition in a space which bound presented by Delsarte [35]. An anticode of diameter consists of the vertices from a distance regular graph was first in a space is a subset of words from such that given by Ahlswede et al. [29]. for all . What is the size of the largest anticode with Diameter in Theorem 3: If a code , in a space of a distance regular , ? The answer was given in [36, pp. 30–41]. If graph, has minimum distance and in the anticode of the then this anticode is an -dimensional Lee sphere with radius , space the maximum distance is then . . For odd we define anticodes with diameter as follows. For ,let be a shape which consists of Theorem3whichisprovedin[35]isappliedtotheHam- two adjacent points of , where two points are adjacent if the ming scheme since the related graph is distance regular. It Manhattan distance between them is one. is defined by cannot be applied to the Manhattan metric since the related adding to all the points which are adjacent to at least one of graph is not finite. It cannot be applied to the Lee metric its points. is the largest anticode in with diameter since the related graph is not distance regular. This can be . and were used in [17] for 2-D interleaving schemes easily verified by considering the three words , to correct 2-D cluster errors. Similarly to the computation of (2) ,and of length over , in [3], one can compute the size of [27] and obtain . ; there exists exactly one word for which and , while there are exactly two words of the form for which (3) and . Fortunately, an alternative proof which was given in [29] can be slightly modified to work for the Lee metric. Ahlswede et al. [29] have examined the Hamming, Johnson, Theorem 4: Let be a code of length over with Lee and Grassmann schemes for the existence of diameter perfect between codewords taken from a set .Let codes. All perfect codes in these schemes are also diameter per- and let be the largest code in with Lee distances between fect codes. In the Hamming schemes, there are two more fami- codewords taken from the set .Then lies of diameter perfect codes. MDS codes [33] are diameter per- fect codes, extended Golay codes, and extended binary perfect single-error-correcting codes are also diameter perfect codes. Finally, similarly to Corollaries 2 and 4 we have the following result. Proof: Let . Lemma 2: If a code of length over has minimum Lee For a given codeword and a word ,thereis distance four and size ,then is a diameter perfect code. exactly one element such that . Therefore, . Since is the largest code in , with Lee distances between codewords taken from the set , it follows that for any given E. Diameter Perfect Codes in the Lee Metric word the set has at most codewords. Hence, . Thus, and the claim is proved. By (3), the size of a maximum anticode of length with di- ameter three over in the Manhattan metric is . Therefore, Corollary 5: Theorem 3 holds for the Lee metric, i.e., if a by Theorem 5, a related diameter perfect code with minimum code has minimum Lee distance andintheanticode distance four can be formed from a lattice with volume in themaximumLeedistanceis ,then which the minimum Manhattan distance is four. Consider the . lattice defined in [27] by the following generator matrix: Proof: Let and let be a code from with minimum Lee distance .Let be a subset of with Lee distances between words of taken from the set . i.e., is an anticode with diameter . Clearly, the largest code in with Lee distances from has where , is the matrix for which only one codeword. Applying Theorem 4 on , ,and , , is an all-zero matrix, implies ,i.e., . and . ETZION: PRODUCT CONSTRUCTIONS FOR PERFECT LEE CODES 7477

Example 1: For , has the form that there exists a codeword with odd Manhattan weight. Since is a perfect diameter code it follows that there exists a tiling of with the anticode whose diameter is . W.l.o.g., we can assume that the two adjacent points in (the core of each in this tiling) differ in the last coordinate: one of these points is a codeword in and the second point is . In the tiling there exists two points such that for which is in an anticode which Thevolumeof is anditiseasytoverifythatthe contains the codeword and is in an anticode which minimum Manhattan distance of the code defined by is contains the codeword ; and furthermore, has even four. Moreover, it is readily verified that is reduced to a Manhattan weight and has odd Manhattan weight. Clearly, code over . Hence, we have the following theorem. , is odd and at least . It implies that Theorem 6: Thecodedefinedbythelattice is a diam- and . eter perfect code, with minimum distance four, in the Manhattan and the facts that in the tiling is contained in the anticode metric. The code can be reduced to a Lee code over . of and is contained in the anticode of implies that is a diameter perfect code, with minimum distance four, in the is greater than the last entry of and is greater than the Lee metric. last entry of . It follows that Thecodedefined by is not unique. There are other and since diameter perfect codes of length and minimum Lee distance we have that , a contradiction. four. Some of these codes will be considered in Section IV. The Thus, if is a diameter perfect code with minimum Man- main goal will be to construct many such codes over alphabets hattan distance , even, then all the codewords of have even with the smallest possible size. Manhattan weight. For there are diameter perfect codes for each even Lemma 5: If is a diameter perfect code with minimum Lee minimum Lee distance. By (3), the size of a maximum anticode distance , even, over ,then is even. of length 2 with diameter over is . For each Proof: By (3), the size of the anticode with maximum dis- the following generator matrix forms a lattice tance is even. This implies by the definition of a diameter which generates a diameter perfect code with minimum distance perfect code that the size of the space is even. Thus, is even. .

Corollary 6: If is a diameter perfect code with minimum Lee distance , even, then all the codewords of have even These lattices will be interleaved together to form more diam- Lee weight. eter perfect codes and nonperiodic diameter perfect codes in Theorem 7: Each translate of a diameter perfect code with Section V. even distance, in the Lee metric, is either an even translate or an Cosets and translates of a code are definedintheLee odd translate. The number of even translates is equal the number and Manhattan metrics in the same way that they are de- of odd translates. finedintheHammingscheme.TheLee (Manhattan) weight Proof: Let be a diameter perfect code in the Lee metric. of a word over is defined by By Lemma 5 and Corollary 6 each translate of is either even ,where is the all-zero word. A translate translate or an odd translate. W.l.o.g., we can assume that the of a code is said to be an even translate if all its words have two points of in are and even Lee (Manhattan) weight. A translate is said to be an odd .Let be a diameter perfect code of length and translate if all its words have odd Lee (Manhattan) weight. diameter , in the Lee metric, where .Since is Similarlytoextendedperfectsingle-error-correcting codes in symmetric around and we have that for each , the Hamming scheme we have even translates and odd translates for diameter perfect codes with even distance. This is proved in , and for each point , . the following results. The first lemma can be readily verified. Therefore, the number of even translates of is equal to the Lemma 3: A diameter perfect code of length , over , number of odd translates of . with minimum Lee distance can be extended to a diameter We note one important difference between binary perfect perfect code of length ,over , with minimum Manhattan codes and binary diameter perfect codes in the Hamming distance . scheme and perfect codes and diameter perfect codes in the Lemma 4: If is a diameter perfect code with minimum Lee metric. While binary perfect single-error-correcting codes Manhattan distance , even, then all the codewords of have in the Hamming scheme can be extended to binary diameter even Manhattan weight. perfect codes (and vice versa via puncturing) by adding a parity Proof: Let be a diameter perfect code with minimum bit (removing a coordinate) and thus increasing (decreasing) distance , in the Manhattan metric. Assume the contrary the distance by one, this cannot be done in the Lee metric. 7478 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 57, NO. 11, NOVEMBER 2011

Finally, there is one more diameter perfect code in the Lee translates, including itself. The second code is a per- and Manhattan metric. It is formed by the Minkowski lattice fect single-error-correcting code of length over an [37] with the generator matrix alphabet with letters. Let be the th translate of ,where . We construct the following code :

Theorem 10: The code is a -ary perfect single-error-cor- The related anticode in this case is . recting code of length . Proof: Clearly, the length of the codewords from F. A Doubling Construction for Binary Perfect Codes is .Wewillfirst prove that the min- Let be a binary perfect single-error-correcting code of imum distance of is three. Let and length and let be its extended code of length be two distinct codewords of . We now .Let be its translates and let distinguish between two cases. be the even translates of its extended Case 1) If ,then code. Let be the code constructed as follows: ,since and . W.l.o.g., we can assume that , ,and , and hence , The following was proved by Phelps [20]. ,and , which implies that . Theorem 8: is a perfect single-error-correcting code of Case 2) If , then there exists length . a ,suchthat and since It is readily verified that the perfect extended code is the (i.e., ), ,and code defined by , it follows that and therefore . Thus, . By Corollary 1, the size of is and the Let be a binary perfect single-error-correcting code of size of is . Clearly, length and let be its extended code of length . .Let be the even translates of This implies by Corollary 2 that is a -ary perfect single- its extended code. Let be error-correcting code of length . a permutation of . The following theorem is an immediate consequence IV. CONSTRUCTIONS FOR PERFECT AND DIAMETER Theorem 9: Thecodedefined by PERFECT LEE CODES In this section, we will modify the two product constructions for perfect codes and diameter perfect codes in the Hamming is an extended perfect code of length with minimum Ham- scheme to obtain perfect codes and diameter perfect codes in ming distance four. the Lee and Manhattan metrics.

Note that the first element in the permutation is to make A. Diameter Perfect Codes With Minimum Distance Four sure that the all-zero word will be a codeword in . Let and be diameter perfect codes. Each code has translates from which are even translates. Let III. A NEW PRODUCT CONSTRUCTION FOR -ARY , ,bethese even translates. PERFECT CODES Let be a permutation of There are several product constructions for nonbinary per- . The following theorem is a modification of The- fect codes in the Hamming scheme. Most notable is the general orem 9. construction of Phelps [22]. Another construction was given by Theorem 11: The code defined by Mollard [23]. The construction that we present is a generaliza- tion for a construction of Zinov’ev [24]. We will present a new simple construction, for perfect codes in the Hamming scheme, which will be very effective in con- is a diameter perfect Lee code of length , over , with min- structions of perfect codes in the Lee metric. For our construc- imum Lee distance four. tion, we will use two perfect codes in the Hamming scheme. The Proof: Thesizeofthecode , ,is and hence first code is a perfect single-error-correcting code of length the size of is . The Lee distance of the code over an alphabet with letters, which have a total of is four as the one given in Theorem 9. Since no proof is given ETZION: PRODUCT CONSTRUCTIONS FOR PERFECT LEE CODES 7479 in Section II-F we will now present a proof. Let and Theorem 14: The code is a perfect single-error-correcting be two distinct codewords in such that and Lee code of length over an alphabet of size . . We distinguish between two cases. Proof: Clearly, the length of the codewords from is Case 1) If ,then and . Hence, . The proof that the code has minimum , , which implies that Lee distance three is identical to the related proof in Theorem . 10. Case 2) If ,then and . By Corollary 1, the size of is . Since or ,wehavethat Thesizeof is . Clearly, or , respectively. Hence, . . Thus, . This implies by Corollary 4 that is a perfect single-error- The code is defined over and hence the size of its correcting Lee code of length over an alphabet of size space is . Since by (3) the size of the related anticode with . diameter four is and the minimum Lee distance of is four, itfollowsbyLemma2that is a diameter perfect Lee code of V. O NTHENUMBER OF PERFECT CODES AND NONPERIODIC length ,over , with minimum Lee distance four. CODES IN THE MANHATTAN METRIC Corollary 7: Let ,where is an odd prime greater In this section, we consider two problems related to perfect than one. There exists an diameter perfect code. codes. The first one is the number of nonequivalent perfect The lattice of the following generator matrix: codes, which was considered in many papers for the Hamming schemes, e.g., [22] and [26]. It was proved that the number of nonequivalent perfect single-error-correcting code of length over is ,where is a constant, .The forms a diameter perfect code. By applying Theorem second problem is whether there exist nonperiodic perfect 11 iteratively we obtain the following theorem. and diameter perfect codes in with the Manhattan metric. Theorem 12: For each , , there exists an Periodic and nonperiodic codes were mentioned in [12], but for diameter perfect code. the best of our knowledge no construction of nonperiodic codes was known until recently. We note that we ask the question on Codes with the same parameters as in Theorem 12 were gen- nonperiodic codes in the Manhattan metric. erated by Krotov [38]. We will not go into the more complicated exact computations Theorem 11 can be modifiedandappliedoncodesin with on the number of nonequivalent perfect and diameter perfect the Manhattan metric. codes. We will just count the number of different perfect codes. Theorem 13: Let and be diameter perfect codes The two product constructions given in Section IV can be used of length with minimum Manhattan distance four. Each to provide a lower bound on the number of perfect codes and code has translates from which are even translates. Let diameter perfect codes in the Lee metric. Given a diameter per- , ,bethese even translates. fect code of length , prime, the size of the related anticode is Let be a permutation of , and hence there are even translates. Therefore, there are . The code defined by different perfect codes of length , given in the con- struction of Theorem 11. Continuing iteratively with the con- (4) struction of Theorem 11, we obtain is a diameter perfect Manhattan code of length ,over ,with minimum Manhattan distance four.

B. Perfect Single-Error-Correcting Lee Codes different diameter perfect codes of length over . Similarly, a bound on the number of perfect Lee code can be In this subsection, we use a modification of the product obtained from the construction of Section IV-B. In this compu- construction of Section III to construct perfect single-error-cor- tation, we can also take into account the bounds on the number recting Lee codes. of perfect codes in the Hamming scheme which are used in the Let be a perfect single-error-correcting Lee code of length construction. , odd, over an alphabet with letters, which Before we continue to discuss the topic of nonperiodic perfect has a total of translates (the size of the Lee sphere), including codes and diameter perfect codes in we consider a question itself. Let relatedtobothproblemsdiscussedinthissection. ,beapermutationof .Wehave permutation, Let and be two distinct subcodes of , such that any where the first permutation is the identity permutation. Let be elements in is within Manhattan distance one from a unique a perfect single-error-correcting of length codeword of and a unique codeword of .Ifweconsider over an alphabet with letters. Let , anticodes instead of spheres then the elements of and are be the th translate of ,where .Weconstructthe centers of the anticodes which form a tiling of .If is con- following code : tained in a perfect single-error-correcting Manhattan code (or a diameter perfect code with minimum Manhattan distance four) 7480 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 57, NO. 11, NOVEMBER 2011

then it can be replaced by to obtain a new different per- is exactly the lattice formed from the generator fect single-error-correcting Manhattan code (or a diameter per- matrix fect code with minimum Manhattan distance four) . The tech- nique was used in the Hamming scheme to form a large number of nonequivalent perfect codes [25], [26]. The same technique can be considered for the Lee metric. which forms a diameter perfect code with minimum distance The constructions in Section IV can provide such a space . Finally, replacing the set of centers and codes and . If we change the permutation of the last in this tiling by the set of centers coordinate by one transposition, it is easily verified that the in- is just a tersection of the two generated codes is relatively large (usually shift of the diagonal strip in a 45 diagonal direction. This does about of the code size, where for the construc- not affect the fact that the set of these centers forms a tiling with tion of the diameter perfect codes and for the construc- the spheres . tion of the perfect single-error-correcting code). The two parts It is readily verified that if the sequence is nonperiodic, then which are not in the intersection will have the role of and also the tiling generated from is nonperiodic. . These can be the building block for nonperiodic codes in the Manhattan metric. This is left as a problem for future re- The construction of 2-D nonperiodic diameter perfect codes search. Unfortunately, such a finite space and codes yields an uncountable number of diameter perfect codes. The and cannot exist. A subset is perfectly -covered by if number of nonequivalent perfect codes formed in this way is for each element there is a unique element such equal the number of infinite sequences over the alphabet . that . Finally, it is easy to verify the following theorem. Theorem 15: There is no finite subset of that can be per- Theorem 17: Let be a nonperiodic diameter perfect code fectly -covered by two different codes, using the Manhattan of length with minimum Manhattan distance four, and let metric. be a diameter perfect code of length and minimum Manhattan Proof: Assume the contrary; let be a subset of of distance four. The code defined in (4) is a nonperiodic diam- smallest possible size, such that there exist two codes and eter perfect code of length and minimum Manhattan distance which -cover .Let be the largest integer for which four. there exists a codeword in or with the value in one of the coordinates. W.l.o.g., we can assume that such a code- VI. CONCLUSION AND OPEN PROBLEMS word is . This codeword covers the word .Since can be the largest integer We have considered several questions regarding perfect codes in a codeword of , then the only codeword of which can in the Lee and Manhattan metrics. We gave two product con- cover is .Thus, structions for perfect and diameter perfect codes in these met- and perfectly -cover rics. One product construction is based on a new product con- a subset , a contradiction to the assumption that is such struction for -ary perfect codes in the Hamming scheme. The subset with the smallest size. Thus, there is no finite subset in second product construction is based on the well-known dou- that can be perfectly -covered by two different codes. bling construction for binary perfect codes in the Hamming scheme. We used our constructions to find a lower bound on For each , , there exists a nonperiodic diameter the number of perfect and diameter perfect codes in the Lee and perfect code. If , then such a code exists for each even Manhattan metrics. We also used the constructions to prove the minimum Manhattan distance , .Weareusing existence of nonperiodic perfect diameter codes in . Our dis- interleaving of the lattices used to construct diameter cussion raises many open problem from which we choose a non- perfect codes with minimum Manhattan distance .Fora representative set of problems. given ,let be an infinite sequence, where 1) Find new product constructions for perfect Lee codes and .Given , we construct the following set of points: diameter perfect Lee codes with different parameters from those given in our discussion. 2) Prove that there are no nontrivial perfect codes, of length , with radius greater than one in the Manhattan The sequence will be called nonperiodic if there metric. are no nonzero integer and an integer such that 3) Do there exist more diameter perfect codes with minimum . distance greater than four in the Lee metric? Minkowski’s Theorem 16: If the points of the set are taken as centers for lattice is the only known example. the spheres , then we obtain a tiling. The tiling is nonperi- 4) For each ,whatisthesmallest for which there odic if the sequence is nonperiodic. exists diameter perfect codes? Proof: First, we note that the set of centers 5) A tiling of is called regular if neighboring anticodes forms a connected nonintersecting diagonal strip meet along entire -dimensional faces of the original with the spheres . The same is true for the set of centers cubes. Nonregular tiling of exists if and only if for any given is not a prime [39]. Does there exist a nonregular tiling of . The set of centers formed from anticodes with diameter three? ETZION: PRODUCT CONSTRUCTIONS FOR PERFECT LEE CODES 7481

6) Are there values of for which there are no two nonequiv- [20] K. T. Phelps, “A combinatorial construction of perfect codes,” SIAM alent perfect single-error-correcting Lee codes of length ? J. Algebraic Discrete Methods, vol. 4, pp. 398–403, 1983. [21] K. T. Phelps, “A general product construction for error-correcting 7) Does there exist a nonperiodic diameter perfect code with codes,” SIAM J. Algebraic Discrete Methods, vol. 5, pp. 224–228, minimum Manhattan distance four for each length greater 1984. than one? Recently, such a construction was given in [40] [22] K. T. Phelps, “A product construction for perfect codes over arbitrary alphabets,” IEEE Trans. Inf. Theory, vol. IT-30, no. 5, pp. 769–771, for nonperiodic perfect single-error-correcting codes of Sep. 1984. length ,where is not a prime, in the Manhattan [23] M. Mollard, “A generalized parity function and its use in the construc- metric. tion of perfect codes,” SIAM J. Algebraic Discrete Methods,vol.7,pp. 113–115, 1986. [24] V. A. Zinov’ev, “A combinatorial methods for the construction and analysis of nonlinear error-correcting codes,” Doctor of Sciences dis- ACKNOWLEDGMENT sertation, Comput. Centre, Russian Adac. Sci., Moscow, Russia, 1988. The author would like to devote this work for the memory [25] T. Etzion and A. Vardy, “Perfect binary codes: Constructions, prop- erties, and enumeration,” IEEE Trans. Inf. Theory, vol. 40, no. 3, pp. of the late Rudolph Ahlswede with whom he had several inter- 754–763, May 1994. esting discussions during the last 15 years on anticodes and per- [26] T. Etzion, “Nonequivalent -ary perfect codes,” SIAM J. Discrete fect codes. During an ITW meeting in Ireland at the beginning Math., vol. 9, pp. 413–423, 1996. [27] T. Etzion, “Tilings with generalized Lee spheres,” in Mathematical of September 2010 he brought to his attention that the size of a Properties of Sequences and other Combinatorial Structures,J.-SNo, maximum anticode in the Manhattan metric was found recently. H.-Y Song, T. Helleseth, and P. V. Kumar, Eds. New York: Springer- This made it possible to call the codes in the Lee metric obtained Verlag, 2002, pp. 181–198. [28] T. Etzion, A. Vardy, and E. Yaakobi, “Dense error-correcting codes in this paper, diameter perfect codes. The author would also like in the Lee metric,” in Proc. Inf. Theory Workshop, Dublin, Ireland, to thank P. Horak and D. Krotov for their important comments Aug.–Sep. 2010, DOI: 10.1109/CIG.2010.5592743. and for providing him some important references. [29] R.Ahlswede,H.K.Aydinian,andL.H.Khachatrian,“Onperfectcodes and related concepts,” Designs Codes Crypto., vol. 22, pp. 221–237, 2001. [30] G. A. Kabatyanskii and V. I. Panchenko, “Unit sphere packings and REFERENCES coverings of the ,” Prob. Inf. Transm., vol. 34, pp. [1] C. Y. Lee, “Some properties of nonbinary error-correcting code,” IRE 3–16, 1988. Trans. Inf. Theory, vol. 4, no. 2, pp. 72–82, Jun. 1958. [31] H. O. Hämäläinen, “Two new binary codes with minimum distance [2] W. Ulrich, “Non-binary error correction codes,” Bell Syst. J., vol. 36, three,” IEEE Trans. Inf. Theory, vol. IT-34, no. 4, pp. 875–875, Jul. pp. 1341–1387, 1957. 1988. [3] S. W. Golomb and L. R. Welch, “Perfect codes intheLeemetricandthe [32] S. Litsyn and B. Mounits, “Improved lower bounds on the sizes of packing of polyominos,” SIAM J. Appl. Math., vol. 18, pp. 302–317, single-error correcting codes,” Designs Codes Crypto., vol. 42, pp. 1970. 67–72, 2007. [4]R.M.RothandP.H.Siegel,“Lee-metricBCHcodes and their appli- [33] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting cation to constrained and partial-response channels,” IEEE Trans. Inf. Codes. Amsterdam, The Netherlands: North-Holland, 1977. Theory, vol. 40, no. 4, pp. 1083–1096, Jul. 1994. [34] M. Best, “Perfect codes hardly exist,” IEEE Trans. Inf. Theory, vol. [5]R.M.Roth,IntroductiontoCodingTheory. Cambridge, U.K.: Cam- IT-29, no. 3, pp. 349–351, May 1983. bridge Univ. Press, 2005. [35] P. Delsarte, “An algebraic approach to association schemes of coding [6] S. Gravier, M. Mollard, and C. Payan, “On the existence of three- theory,” Philips J. Res., vol. 10, pp. 1–97, 1973. dimensional tiling in the Lee metric,” Eur. J. Combin., vol. 19, pp. [36] R. Ahlswede and V. Blinovsky, Lectures on Advances in Combina- 567–572, 1998. torics. New York: Springer-Verlag, 2008. [7] S. Špacapan, “Non-existence of face-to-face four dimensional tiling in [37] H. Minkowski, “Dichteste gitterformige lagerung kongruenter korper,” the Lee metric,” Eur. J. Combin.,vol.28, pp. 127–133, 2007. Nachrichten Ges. Wiss. Gottingen, pp. 311–355, 1904. [8] P. Horak, “Tilings in Lee metric,” Eur. J. Combin., vol. 30, pp. [38] D. S. Krotov, “ -linear Hadamard and extended perfect codes,” 480–489, 2009. Electro. Notes Discrete Math., vol. 6, pp. 107–112, 2001. [9] K. A. Post, “Nonexistence theorem on perfect Lee codes over large [39] S. Szabó, “On mosaics consisting of multidimensional crosses,” Acta alphabets,” Inf. Control, vol. 29, pp. 369–380, 1975. Math. Acad. Sci. Hung., vol. 38, pp. 191–203, 1981. [10] J. Astola, “On perfect Lee codes over small alphabets of odd cardi- [40] P. Horak and B. AlBdaiwi, “Non-periodic tilings of by crosses,” nality,” Discrete Appl. Math.,vol.4, pp. 227–228, 1982. Discrete Comput. Geometry, unpublished. [11] P. Horak, “On perfect Lee codes,” Discrete Math.,vol.309,pp. 5551–5561, 2009. Tuvi Etzion (M’89–SM’94–F’04) was born in Tel Aviv,Israel,in1956.Here- [12] B. AlBdaiwi, P. Horak, and L. Milazzo, “Enumerating and decoding ceived the B.A., M.Sc., and D.Sc. degrees in computer science from the Tech- perfect linear Lee codes,” Designs Codes Crypto., vol. 52, pp. 155–162, nion—Israel Institute of Technology, Haifa, Israel, in 1980, 1982, and 1984, 2009. respectively. [13] J. C.-Y. Chiang and J. K. Wolf, “On channels and codes for the Lee Since 1984 he held a position in the Department of Computer Science, metric,” Inf. Control, vol. 19, pp. 1593–173, Sep. 1971. Technion, where he currently has a Professor position. During 1986–1987, [14] C. Satyanarayana, “Lee metric codes over integer residue rings,” IEEE he was a Visiting Research Professor with the Department of Electrical Trans. Inf. Theory,vol.IT-25,no.2, pp. 250–254, Mar. 1979. Engineering—Systems, University of Southern California, Los Angeles. [15] K. Nakamura, “A class of error-correcting codes for DPSK channels,” During summers 1990 and 1991, he was visiting Bellcore in Morristown, in Proc. IEEE Conf. Commun.,1979,pp. 45.4.1–45.4.5. NJ. During 1994–1996, he was a Visiting Research Fellow in the Computer [16] J. T. Astola, “Concatenated codes for the Lee metric,” IEEE Trans. Inf. Science Department, Royal Holloway College, Egham, U.K. He also had Theory, vol. IT-28, no. 5, pp. 778–779, Sep. 1982. several visits to the Coordinated Science Laboratory, University of Illinois [17] M. Blaum, J. Bruck, and A. Vardy, “Interleaving schemes for multidi- in Urbana-Champaign, Urbana, during 1995–1998, two visits to HP Bristol mensional cluster errors,” IEEE Trans. Inf. Theory, vol. 44, no. 2, pp. during summers 1996 and 2000, a few visits to the Department of Electrical 730–743, Mar. 1998. Engineering, University of California at San Diego during 2000–2010, and [18] T. Etzion and E. Yaakobi, “Error-correction of multidimensional several visits to the Mathematics Department, Royal Holloway College, during bursts,” IEEE Trans. Inf. Theory, vol. 55, no. 3, pp. 961–976, Mar. 2007–2009. His research interests include applications of discrete mathematics 2009. to problems in computer science and information theory, coding theory, and [19] A. Barg and A. Mazumdar, “Codes in permutations and error correc- combinatorial designs. tion for rank modulation,” IEEE Trans. Inf. Theory, vol. 56, no. 7, pp. Dr. Etzion was an Associate Editor for Coding Theory for the IEEE 3158–3165, Jul. 2010. TRANSACTIONS ON INFORMATION THEORY from 2006 until 2009.