linear size optimal -ary constant-weight codes and constant-composition codes

12
140 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010 Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes Yeow Meng Chee, Senior Member, IEEE, Son Hoang Dau, Alan C. H. Ling, and San Ling Abstract—An optimal constant-composition or constant-weight code of weight has linear size if and only if its distance is at least . When , the determination of the exact size of such a constant-composition or constant-weight code is trivial, but the case of has been solved previously only for binary and ternary constant-composition and constant-weight codes, and for some sporadic instances. This paper provides a construction for quasicyclic optimal constant-composition and constant-weight codes of weight and distance based on a new general- ization of difference triangle sets. As a result, the sizes of optimal constant-composition codes and optimal constant-weight codes of weight and distance are determined for all such codes of sufficiently large lengths. This solves an open problem of Etzion. The sizes of optimal constant-composition codes of weight and distance are also determined for all , except in two cases. Index Terms—Constant-composition codes, constant-weight codes, difference triangle sets, generalized Steiner systems, Golomb rulers, quasicyclic codes. I. INTRODUCTION T HERE are two generalizations of binary constant-weight codes as we enlarge the alphabet beyond size two. These are the classes of constant-composition codes and -ary con- stant-weight codes. While a vast amount of knowledge exists for binary constant-weight codes [1]–[4], relatively little is known about constant-composition codes and -ary constant-weight codes. Recently, these classes of codes have attracted some at- tention [5]–[20] due to several important applications requiring nonbinary alphabets, such as in determining the zero error decision feedback capacity of discrete memoryless channels [21], multiple-access communications [22], spherical codes for modulation [23], DNA codes [24]–[26], powerline commu- nications [10], [11], frequency hopping [27], and coding for bandwidth-limited channels [28]. As in the case of binary constant-weight codes, the deter- mination of the maximum size of a constant-composition code or a -ary constant-weight code of length , given constraints Manuscript received March 02, 2009; revised September 07, 2009. Current version published December 23, 2009. The work of Y. M. Chee and S. Ling was supported in part by the National Research Foundation of Singapore under Research Grant NRF-CRP2-2007-03. The work of Y. M. Chee was also sup- ported in part by the Nanyang Technological University under Research Grant M58110040. Y. M. Chee, S. H. Dau, and S. Ling are with the Division of Mathemat- ical Sciences, School of Physical and Mathematical Sciences, Nanyang Techno- logical University, Singapore 637371, Singapore (e-mail: [email protected]; [email protected]; [email protected]). A. C. H. Ling is with the Department of Computer Science, University of Vermont, Burlington, VT 05405 USA (e-mail: [email protected]). Communicated by T. Etzion, Associate Editor for Coding Theory. Digital Object Identifier 10.1109/TIT.2009.2034814 on its distance, weight and/or composition, constitutes a central problem in their investigation. The ring is denoted by . For integers , the set of integers is denoted . The set is further abbreviated to .A partition is a tuple of integers such that . The ’s are the parts of the partition. Disjoint set union is denoted by . If and are sets, where is finite, then denotes the set of vectors of length , where each component of a vector has value in and is indexed by an element of , that is, .A -ary code of length is a set , for some of size . The elements of are called codewords. For any , their support is the set . We also abbreviate to . The Hamming norm or weight of is defined as . The distance induced by this norm is called the Hamming distance, denoted , so that , for . A code is said to have distance if for all distinct . The com- position of a vector is the tuple , where . A code is said to have constant weight if every codeword in has weight , and is said to have constant composition if every codeword in has composition . Hence, every constant-composition code is a constant-weight code. We refer to a -ary code of length , distance , and constant weight as an -code. If in addition the code has constant composition , then it is referred to as an -code. An -code and an -code coincide in definition, and are binary con- stant-weight codes. The maximum size of an -code is denoted and that of an -code is denoted . Any -code or -code attaining the maximum size is called optimal. The following operations do not affect distance and compo- sition properties of an -code: 1) reordering the components of ; 2) deleting zero components of . Consequently, throughout this paper, attention is restricted to those compositions , where , that is, is a partition. For succinctness, the sum of all the parts of a partition is denoted by . The focus of this paper is on determining and for those , and for which and . The Johnson-type bound of Svanström for ternary constant- composition codes [5, Th. 1] extends easily to the following (see also [27, Prop. 1.3]: 0018-9448/$26.00 © 2009 IEEE

Upload: ach

Post on 25-Sep-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

140 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010

Linear Size Optimal �-ary Constant-Weight Codesand Constant-Composition Codes

Yeow Meng Chee, Senior Member, IEEE, Son Hoang Dau, Alan C. H. Ling, and San Ling

Abstract—An optimal constant-composition or constant-weightcode of weight � has linear size if and only if its distance � is atleast �� � �. When � � ��, the determination of the exact size ofsuch a constant-composition or constant-weight code is trivial, butthe case of � � �� � � has been solved previously only for binaryand ternary constant-composition and constant-weight codes, andfor some sporadic instances. This paper provides a constructionfor quasicyclic optimal constant-composition and constant-weightcodes of weight � and distance �� � � based on a new general-ization of difference triangle sets. As a result, the sizes of optimalconstant-composition codes and optimal constant-weight codes ofweight � and distance ��� � are determined for all such codes ofsufficiently large lengths. This solves an open problem of Etzion.The sizes of optimal constant-composition codes of weight � anddistance �� � � are also determined for all � � �, except in twocases.

Index Terms—Constant-composition codes, constant-weightcodes, difference triangle sets, generalized Steiner systems,Golomb rulers, quasicyclic codes.

I. INTRODUCTION

T HERE are two generalizations of binary constant-weightcodes as we enlarge the alphabet beyond size two. These

are the classes of constant-composition codes and -ary con-stant-weight codes. While a vast amount of knowledge exists forbinary constant-weight codes [1]–[4], relatively little is knownabout constant-composition codes and -ary constant-weightcodes. Recently, these classes of codes have attracted some at-tention [5]–[20] due to several important applications requiringnonbinary alphabets, such as in determining the zero errordecision feedback capacity of discrete memoryless channels[21], multiple-access communications [22], spherical codes formodulation [23], DNA codes [24]–[26], powerline commu-nications [10], [11], frequency hopping [27], and coding forbandwidth-limited channels [28].

As in the case of binary constant-weight codes, the deter-mination of the maximum size of a constant-composition codeor a -ary constant-weight code of length , given constraints

Manuscript received March 02, 2009; revised September 07, 2009. Currentversion published December 23, 2009. The work of Y. M. Chee and S. Lingwas supported in part by the National Research Foundation of Singapore underResearch Grant NRF-CRP2-2007-03. The work of Y. M. Chee was also sup-ported in part by the Nanyang Technological University under Research GrantM58110040.

Y. M. Chee, S. H. Dau, and S. Ling are with the Division of Mathemat-ical Sciences, School of Physical and Mathematical Sciences, Nanyang Techno-logical University, Singapore 637371, Singapore (e-mail: [email protected];[email protected]; [email protected]).

A. C. H. Ling is with the Department of Computer Science, University ofVermont, Burlington, VT 05405 USA (e-mail: [email protected]).

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

on its distance, weight and/or composition, constitutes a centralproblem in their investigation.

The ring is denoted by . For integers , theset of integers is denoted . The set

is further abbreviated to . A partition is a tupleof integers such that . The

’s are the parts of the partition. Disjoint set union is denotedby .

If and are sets, where is finite, then denotesthe set of vectors of length , where each component of avector has value in and is indexed by an elementof , that is, . A -ary code of length is aset , for some of size . The elements of arecalled codewords. For any , their support is the set

. We also abbreviateto . The Hamming norm or weight of

is defined as . The distance induced by thisnorm is called the Hamming distance, denoted , so that

, for . A code is said to havedistance if for all distinct . The com-position of a vector is the tuple ,where . A code is saidto have constant weight if every codeword in has weight ,and is said to have constant composition if every codeword in

has composition . Hence, every constant-composition codeis a constant-weight code. We refer to a -ary code of length

, distance , and constant weight as an -code.If in addition the code has constant composition , then it isreferred to as an -code. An -code and an

-code coincide in definition, and are binary con-stant-weight codes. The maximum size of an -code isdenoted and that of an -code is denoted

. Any -code or -code attainingthe maximum size is called optimal.

The following operations do not affect distance and compo-sition properties of an -code:

1) reordering the components of ;2) deleting zero components of .Consequently, throughout this paper, attention is restricted to

those compositions , where, that is, is a partition. For succinctness, the sum

of all the parts of a partition isdenoted by .

The focus of this paper is on determining andfor those , and for which

and .The Johnson-type bound of Svanström for ternary constant-

composition codes [5, Th. 1] extends easily to the following (seealso [27, Prop. 1.3]:

0018-9448/$26.00 © 2009 IEEE

Page 2: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

CHEE et al.: LINEAR SIZE OPTIMAL -ARY CONSTANT-WEIGHT CODES AND CONSTANT-COMPOSITION CODES 141

Proposition 1.1 (Johnson Bound):

The following Johnson-type bound for -ary constant-weightcodes was established in [6, Th. 10].

Proposition 1.2 (Johnson Bound):

Definition 1.1 (Refinement): A partition isa refinement of (written ) if there existpairwise disjoint sets satisfying

such that for each .Chu et al. [27] made the following observation.

Lemma 1.1: If , then .

Given and , the condition for to holdcan be characterized as follows.

Proposition 1.3: if and only if.

Proof: when followseasily from the Johnson bound.

Rödl’s proof [29] of the Erdös–Hanani conjecture [30] im-plies that ,

so that for all . Therefore,by Lemma 1.1, for all

.A similar proof yields the following.

Proposition 1.4: if and only if.

A. Problem Status and Contribution

For constant-composition codes, it is trivial to see that

ifif .

When , our knowledge of is limited.We know that ,trivially. has also been completely deter-mined by Svanström et al. [7]. In particular,

holds for all sufficiently large. Beyond this(for ), has not been determined,except in one instance: for , estab-lished by Chee et al. [18]. For constant-weight codes, we have

ifif .

An explicit formula for has been obtainedby Östergård and Svanström [6]. When , the value of

is not known.The main contribution of this paper are the following two

results.

Main Theorem 1: Let . Thenfor all sufficiently large

.

Main Theorem 2: for allsufficiently large satisfying .

In particular, Main Theorem 2 solves an open problem of Et-zion concerning generalized Steiner systems [31, Problem 7].

The optimal constant-weight and constant-composition codesconstructed in the proofs of Main Theorem 1 and Main Theorem2 are quasicyclic, and are obtained from difference triangle setsand their generalization.

II. QUASICYCLIC CODES

A code is quasicyclic if there exists an such that a cyclic shiftof a codeword by places is another codeword. More formally,let and define on the cyclic shift operator

. A -ary code of length isquasicyclic (or more precisely, -quasicyclic) if it is invariantunder for some integer . If , such a code is justa cyclic code.

The following two conditions are necessary and sufficient fora code of constant weight to have distance .

C1) For any distinct .C2) For any distinct , if ,

then .

A. Quasicyclic Constant-Composition Codes

The strategy for proving Main Theorem 1 is to constructoptimal -codes (meeting the Johnson bound)that are -quasicyclic when . Optimal

-codes for can be obtainedeasily from those with by lengthening, as inthe lemma below.

Lemma 2.1 (Lengthening): Ifand , thenfor all .

Proof: Let be an -code of size. Let , where

, and define such that ,where

ifif .

Then is an -code of size . Sinceis optimal by the Johnson bound.

As opposed to lengthening a code, we can also shorten acode by selecting a position , removing those codewords with anonzero coordinate , and deleting the th coordinate from everyremaining codeword.

Let . A -quasicyclic-code of size can be obtained by developing a

particular vector

Page 3: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

142 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010

Such a vector is called a base codeword of the quasicycliccode . The remainder of this section develops criteria for avector of composition to be a base codeword of a

-quasicyclic -code .Conditions C1) and C2) may be stated in terms of the base

codeword as follows.C3) For such that , and

, we have the following:• if , then

;• if , then

.C4) If , then .

B. Quasicyclic Constant-Weight Codes

Lemma 2.2: Let and . Then ifand only if there exist positive integers , and such that

, and .Proof: Assume that . Let , and let

. Then . Since , wehave . Hence, . Now let .

The converse is obvious.

Suppose that . By Lemma 2.2, there exist posi-tive integers , and such that , and

. Our strategy is to construct -quasicyclic optimal-codes of size (meeting

the Johnson bound). In other words, we want to find vectors,, each of weight , such that

and

is an -code of size . The vectorsare referred to as base codewords of .

Conditions C1) and C2) can be stated in terms of the basecodewords as follows.

C5) Let and such that, and if . Then, we

have the following:• if , then

;• if , then

.C6) If and , then ,

for all .C7) If ( and are not necessarily distinct),

then , for all .

III. A NEW COMBINATORIAL ARRAY

Conditions C3) and C4) [respectively, C5)–C7)] sug-gest organizing the elements of [respectively,

] of those quasicyclic con-stant-composition codes (respectively, constant-weight codes)into a two-dimensional array, with respect to their congruenceclass modulo (respectively, ) and the value of their corre-sponding components in [respectively, ].

Definition 3.1: Let be a partition. A -array is a array with rows indexed by andcolumns indexed by , such that:

P1) each cell is either empty or contains a nonnegative in-teger congruent to its row index modulo ;

P2) the number of nonempty cells in column is ;P3) if is the set of entries in row of

, then the differences, are all nonzero and distinct.

The scope of is

In particular, if , then a -array has allcells nonempty, and is referred to as a -array. From thedefinition, it is easy to see that the entries of a -array are alldistinct.

Example 3.1: A -array of scope 15

Example 3.2: A -array of scope 42

Proposition 3.1: Let . If there ex-ists a -array , then there exists a -quasicyclic optimal

-code for all.

Proof: Let be a -array and let denote the set ofentries in column of . Define a vector

, as follows:

ifotherwise.

Then, has composition and satisfies conditions C3) and C4).Therefore, is a base codeword of a -quasicyclic optimal

-code.

Example 3.3: The -array in Example 3.1 gives thebase codeword

for a -quasicyclic optimal -code when.

Proposition 3.2: Suppose that and .If there exists an -array , then there exists an -qua-sicyclic optimal -code of size

, provided that and .

Page 4: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

CHEE et al.: LINEAR SIZE OPTIMAL -ARY CONSTANT-WEIGHT CODES AND CONSTANT-COMPOSITION CODES 143

Proof: Let be an -array and let denote the setof entries in column of . We define the vectors

as follows: for and

if for someotherwise.

(1)

Since the entries of are distinct, is well defined. Moreover,the set of nonzero entries of is precisely ,and by property P2), each symbol in occursexactly times in . Therefore, and has weight

.We claim that the vectors satisfy conditions

C5)–C7), and hence form the base codewords for an -quasi-cyclic optimal -code. The following establishesthis claim.

First, suppose that . If and are nonzero, thenand . Since

, we have . Therefore, C7) is satisfied.Next, suppose that and . By (1),

. Since , and must belong to different rowsof . Therefore, by P1). Thus,satisfy C6).

Now suppose that . By (1), thereexist and such that and . If

, then by P1), and are in the same row of .Therefore

and, hence

It follows that .Let and , where

such that , and if , then. We want to show that

or, equivalently

(2)

Again, by (1), , and are entries of . Moreover, andare in the same row. We consider two cases.— Case : Since , we have

. Therefore, if , then (2) holds.If and both and are in the same row, then (2)holds by property P3) of and the assumption thatand . If and are in different rows, thenby P1), . Sinceand , (2) follows.

— Case : We claim that . Indeed, assume thatand . Then, and

. Hence, if , then .Therefore, there are two entries in different columns of

that have the same value , which is a contradiction.

Hence, . Since , we have .Therefore, (2) holds.

Consequently, satisfy C5).

Example 3.4: The -array of scope in Example 3.2gives and , where

ififotherwise

ififotherwise.

In this case, , and . Thevectors and form the base codewords of a -quasicyclicoptimal -code when is even and .

In view of Proposition 3.1 and Proposition 3.2, to proveMain Theorem 1 and Main Theorem 2, it suffices to constructa -array for every partition .

IV. GENERALIZED DIFFERENCE TRIANGLE SETS

In this section, the concept of difference triangle sets is gen-eralized and used to produce -arrays. We begin with the defi-nition of a difference triangle set.

Definition 4.1: An -difference triangle set isa set , where

, are lists of integers such that the differences, are all distinct.

Example 4.1: A - is

The corresponding differences are displayed in triangular arrays

The scope of an - is

Difference triangle sets with scope as small as possible are oftenrequired for applications. Define

is an

Difference triangle sets were introduced by Kløve [32], [33] andhave numerous applications [34]–[40]. A - is knownas a Golomb ruler with marks.

We generalize difference triangle sets as follows.

Definition 4.2: Let be a partition. A setwith

, is a -generalized difference triangle setif the differences , are alldistinct.

Thus, a is similar to a , but allowing the setsto be of different sizes. In particular, if ,

Page 5: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

144 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010

then a - is an - . The scope of ais defined similarly as for a

We now relate - to -arrays. Let bea partition. The Ferrers diagram of is an array of cells with

left-justified rows and cells in row . The conjugate ofis the partition , where is the number ofparts of that are at least . can also be obtained by reflectingthe Ferrers diagram of along its main diagonal. Conjugationof partitions is an involution.

Example 4.2: The Ferrers diagrams of the partitionand its conjugate are shown, re-

spectively, as follows:

Proposition 4.1: Let be a partition. If thereexists a - of scope , then there exists a -array ofscope at most .

Proof: Let and letbe a - of scope . Con-

struct a array as follows: If ,then the th cell of , contains

if , and empty otherwise.Then, the filled cells of take the shape of the Ferrers diagramof . Thus, the number of nonempty cells in column ofis precisely . It is also easy to see that each entry in row of

is congruent to . The differences are alldistinct because the differences are all distinct inthe . Moreover, all of these differences are at most

. Finally, for any and

Therefore, is a -array of scope at most .

Corollary 4.1: If there exists a - of scope , thenthere exists a -array of scope at most .

Example 4.3: Since , we canconstruct a -array from a - viathe proof of Proposition 4.1. If the - is

, the -arrayobtained is

This array has scope 54.

Example 4.4: From the -, we can

construct the following -array via the proof of Proposition4.1.

This array has scope 57.

V. PROOFS OF THE MAIN THEOREMS

In this section, we use Golomb rulers to construct andprovide proofs to Main Theorem 1 and Main Theorem 2.

Let denote the smallest prime power not smaller than .Atkinson et al. [40, Lemma 2] proved the following.

Theorem 5.1:

Proposition 5.1: For any partition , thereexists a - of scope at most .

Proof: By Theorem 5.1, there exists a Golomb rulerof marks and scope .Partition into subsets, , where

. Suppose

where . For each , let

where . Then, the setforms a - of scope

The following corollary is immediate.

Corollary 5.1: For any and , there exists an- of scope at most .

A. Proof of Main Theorem 1

Let be a partition and consider. By Proposition 5.1, there exists a - of

scope at most . Therefore, by Propo-sition 4.1, there exists a -array of scope at most

. Finally, Proposition 3.1 guarantees the existenceof a -quasicyclic optimal -code of size

for all. This, together with Lemma 2.1, proves Main Theorem 1.

B. Proof of Main Theorem 2

Suppose . Then, by Lemma 2.2, let , where. By Corollary 5.1, there exists an - of

scope at most . Therefore, byCorollary 4.1, there exists an -array of scope at most

. Finally, Proposition 3.2 guaranteesthe existence of an -quasicyclic optimal -codeof size for all

. This proves Main Theorem 2.In particular, by taking and , respectively, we

have the following results.i) There exists a -quasicyclic optimal

-code for all.

ii) If , then there exists a cyclic optimal-code for all .

Page 6: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

CHEE et al.: LINEAR SIZE OPTIMAL -ARY CONSTANT-WEIGHT CODES AND CONSTANT-COMPOSITION CODES 145

VI. RESOLUTION OF AN OPEN PROBLEM OF ETZION

A set system is a pair , where is a finite set ofpoints, and . The elements of are called blocks. Theorder of is the number of points . If for all ,then is said to be -uniform. Let . A transverse ofis set such that for all . Hanani [41]introduced the following generalization of -designs.

Definition 6.1: An design is a triple, where is a -uniform set system of order

is a partition of into sets, each ofcardinality , such that:

i) is a transverse of for all ;ii) each -element transverse of is contained in precisely

one block of .

From an design , we can forma constant-weight code as follows. Let

, where . The code has a code-word for each block. Assume is a blockof (this block is denoted by ,where ). We form the codeword correspondingto as follows: for

if for someotherwise.

The distance of is at least . If has distance, Etzion [31] calls the design, from which

is constructed, a generalized Steiner system .It is not hard to verify that a contains exactly

blocks. By the Johnson bound, we have

It follows from the above construction that if aexists, then

The next result establishes the converse when .

Proposition 6.1: Suppose that . Then, aexists if

Proof: Let be an (optimal) -codeof size . Define

and

where . We associate with each codeworda block as follows:

Finally, let .

We claim that is a . Indeed,for all , and for all and .Hence, it remains to show that any -element transverse of iscontained in exactly one block of . Suppose and are twodifferent blocks containing a particular -element transverse of

. Then, , implying, a contradiction. Therefore, any -element

transverse of is contained in at most one block, and hence inexactly one block, since .

Corollary 6.1: Suppose that . Then, there existsa if and only if

Etzion [31, Problem 7] raised the following as an openproblem for further research.

Problem 6.1 (Etzion): Given and , show that there existsan such that for all , where , aexists.

The following result, which is a direct consequence of MainTheorem 2 and Corollary 6.1, solves Problem 6.1.

Theorem 6.1: There exists a for all sufficientlylarge satisfying .

Proof: By Main Theorem 2, we have

for all sufficiently large satisfying . It follows immedi-ately from Corollary 6.1 that there also exists afor all sufficiently large satisfying .

VII. EXPLICIT BOUNDS

Main Theorem 1 and Main Theorem 2 are asymptotic state-ments: the hypothesis that is sufficiently large must be satis-fied. But how large must be? More precisely, for a partition

and a positive integer , define

for all

and

for all

satisfying

We give explicit bounds on and in thissection.

A. Bounds on

The proof of Main Theorem 1 in Section V-A shows that

(3)

Page 7: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

146 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010

By Bertrand’s postulate, for all . Forsufficiently large, better asymptotic bounds on exist (see,for example, [42]), but we are after quantifiable bounds. Thisimplies

We now prove a lower bound on .

Proposition 7.1: Let be a partition. Ifand there exists an -code of size ,

then , where . In particular,when , we have

.Proof: Let be an

-code of size . Then, can be regarded as anmatrix , whose th row is . Let be the

number of nonzero entries in column of . Then,. In each column of , we associate each pair of

distinct nonzero entries with the pair of rows that contain theseentries. There are such pairs of nonzero entries in column

of . Therefore, there are such pairs in all thecolumns of . Since there are no pairs of distinct codewordsin whose supports intersect in two elements, the

pairs of rows associated with the pairs of distinctnonzero entries are also all distinct. Hence

or, equivalently

(4)

Since , there existssuch that

As , we have

(5)

From (4) and (5), we have

giving .

Corollary 7.1:

The upper and lower bounds on in Corollary 7.1differ approximately by a factor of .

B. Bounds on

The proof of Main Theorem 2 in Section V-B shows that.

For constant-weight codes, the following result of Etzion [31,Th. 1] gives .

Proposition 7.2: Given and , if there exists an optimal-code of size , then

.

There is a considerable gap between these upper and lowerbounds on . However, when , a better upper boundcan be obtained. We describe the construction below. The ideaof the construction is similar to the idea of the previous ones.We determine base codewords, denoted ,for which the -quasicyclic code

is an -code. Let us write iffor some . Suppose that .

Then, is an -code if the following two condi-tions hold.C8) if and for some .

C9) if and for .We observe that C8) holds immediately if for every

is chosen so that contains elements whichare congruent to , respectively.

Theorem 7.1: If and , then.

Proof: It suffices to show that there exists an-code of size for any

. We construct base code-words for such a code as follows. For

satisfies

(6)

Condition C8) is satisfied immediately. It remains to show thatthese base codewords satisfy C9). We prove this by con-tradiction. Assume that there exist and

, so that . Suppose thatand . By (6),

we have

and

where the terms and result from the cyclic shift opera-tions applied on and . These equations imply

Page 8: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

CHEE et al.: LINEAR SIZE OPTIMAL -ARY CONSTANT-WEIGHT CODES AND CONSTANT-COMPOSITION CODES 147

TABLE ILINEAR SIZE OPTIMAL ��� � �� � �� ��� -CODES OF WEIGHT AT MOST SIX

and

which together yield

(7)

However, since and ,we have

(8)

as . Thus, (7) and (8) lead to acontradiction.

VIII. TABLES FOR SMALL-WEIGHT

CONSTANT-COMPOSITION CODES

In this section, we provide two tables of exact values ofwith , for almost all . The only

undetermined values in this range arewhen . The following (trivial) upper bound hap-pens to be very useful when we build up the tables, as it is oftentight for codes of small lengths.

Lemma 8.1: .

Table I provides the base codewords for quasicyclic optimalcodes of sufficiently large lengths. For succinctness, we donot indicate trailing zeros at the end of each base codeword.Therefore, the base codeword 1203, say, should be interpretedas . In order to construct these base codewords, weuse either optimal Golomb rulers or a simple computer searchto establish the best -array corresponding to the codes. Table II

includes the sizes of optimal codes with small length . Thesetwo tables together give an almost complete solution for thesizes of optimal constant-composition codes of weight at mostsix.

In Table II, if a cell is empty, then it means that the corre-sponding size is already determined in Table I. The upper boundfor the sizes of codes comes from either the Johnson bound orLemma 8.1, whichever is smaller. The lower bounds come fromoptimal codes constructed by hand or by a hill-climbing algo-rithm. We refer the interested reader to the Appendix for a com-plete description of these optimal codes. We note that the valuesof are included for complete-ness although they have been determined earlier by Östergårdand Svanström [6, Th. 8].

Table III gives the exact value of for all such that, except when . We compare these

values with bounds on given by (3) and Proposition7.1. There is a large gap between these bounds. It would beinteresting to close this gap.

IX. CONCLUSION

The exact sizes of optimal constant-composition and con-stant-weight codes having linear size are determined for all suchcodes of sufficiently large lengths. In the course of establishingthese results, we introduced several new concepts, including thatof generalized difference triangle sets and showed how they canbe constructed from Golomb rulers. The results obtained in thispaper solve an open problem of Etzion.

APPENDIX

Only codes of size at least five are listed here. Those optimalcodes of size four or less can be constructed easily by hand.

Page 9: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

148 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010

TABLE IISIZES OF SOME SMALL OPTIMAL CONSTANT-COMPOSITION CODES WITH � � � �� � �

TABLE III�������� AND BOUNDS ON � � ���

A. Weight Four Codes

1) An optimal -code:

2) An optimal -code:

3) An optimal -code:

B. Weight Five Codes

1) An optimal -code:

2) An optimal -code:Lengthening of an optimal -code.

3) An optimal -code:

4) An optimal -code, :Refinement of an optimal -code

.5) An optimal -code :

Refinement of an optimal -code.

6) An optimal -code:

Page 10: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

CHEE et al.: LINEAR SIZE OPTIMAL -ARY CONSTANT-WEIGHT CODES AND CONSTANT-COMPOSITION CODES 149

7) An optimal -code:

8) An optimal -code:Lengthening of an optimal -code.

C. Weight Six Codes

1) An optimal -code:

2) An optimal -code:Refinement of an optimal -code.

3) An optimal -code:Refinement of an optimal -code.

4) An optimal -code:Refinement of an optimal -code.

5) An optimal -code:

6) An optimal -code:Lengthening of an optimal -code.

7) An optimal -code:

8) An optimal -code:

9) An optimal -code:

10) An optimal -code:Lengthening of an optimal -code.

11) An optimal -code:

12) An optimal -code:Lengthening of an optimal -code.

13) An optimal -code :Refinement of an optimal -code

.14) An optimal -code :

Refinement of an optimal -code.

15) An optimal -code :Refinement of an optimal -code

.16) An optimal -code:

Page 11: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

150 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 1, JANUARY 2010

17) An optimal -code:Shorten an optimal -code.

18) An optimal -code:Shorten an optimal -code.

19) An optimal -code:Shorten an optimal -code.

20) An optimal -code:Lengthening of an optimal -code.

REFERENCES

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

[2] A. E. Brouwer, J. B. Shearer, N. J. A. Sloane, and W. D. Smith, “A newtable of constant weight codes,” IEEE Trans. Inf. Theory, vol. 36, no.6, pp. 1334–1380, Nov. 1990.

[3] E. Agrell, A. Vardy, and K. Zeger, “Upper bounds for constant-weightcodes,” IEEE Trans. Inf. Theory, vol. 46, no. 7, pp. 2373–2395, Nov.2000.

[4] D. H. Smith, L. A. Hughes, and S. Perkins, “A new table of constantweight codes of length greater than 28,” Electron. J. Combin., vol. 13,no. 1, pp. 18–0, 2006, Article #A2 (electronic).

[5] M. Svanström, “Constructions of ternary constant-composition codeswith weight three,” IEEE Trans. Inf. Theory, vol. 46, no. 7, pp.2644–2647, Nov. 2000.

[6] P. R. J. Östergård and M. Svanström, “Ternary constant weight codes,”Electron. J. Combin., vol. 9, no. 1, 2002, Research Paper 41 (elec-tronic).

[7] M. Svanström, P. R. J. Östergård, and G. T. Bogdanova, “Bounds andconstructions for ternary constant-composition codes,” IEEE Trans.Inf. Theory, vol. 48, no. 1, pp. 101–111, Jan. 2002.

[8] G. T. Bogdanova and S. N. Kapralov, “Enumeration of optimal ternarycodes with a given composition,” Problemy Peredachi Informatsii, vol.39, no. 4, pp. 35–40, 2003.

[9] Y. Luo, F.-W. Fu, A. J. H. Vinck, and W. Chen, “On constant-com-position codes over � ,” IEEE Trans. Inf. Theory, vol. 49, no. 11, pp.3010–3016, Nov. 2003.

[10] W. Chu, C. J. Colbourn, and P. Dukes, “Constructions for permutationcodes in powerline communications,” Des. Codes Cryptogr., vol. 32,no. 1–3, pp. 51–64, 2004.

[11] C. J. Colbourn, T. Kløve, and A. C. H. Ling, “Permutation arrays forpowerline communication and mutually orthogonal Latin squares,”IEEE Trans. Inf. Theory, vol. 50, no. 6, pp. 1289–1291, Jun. 2004.

[12] W. Chu, C. J. Colbourn, and P. Dukes, “Tables for constant composi-tion codes,” J. Combin. Math. Combin. Comput., vol. 54, pp. 57–65,2005.

[13] C. Ding and J. Yin, “Algebraic constructions of constant compositioncodes,” IEEE Trans. Inf. Theory, vol. 51, no. 4, pp. 1585–1589, Apr.2005.

[14] C. Ding and J. Yin, “Combinatorial constructions of optimal con-stant-composition codes,” IEEE Trans. Inf. Theory, vol. 51, no. 10, pp.3671–3674, Oct. 2005.

[15] C. Ding and J. Yuan, “A family of optimal constant-compositioncodes,” IEEE Trans. Inf. Theory, vol. 51, no. 10, pp. 3668–3671, oct.2005.

[16] C. Ding and J. Yin, “A construction of optimal constant compositioncodes,” Des. Codes Cryptogr., vol. 40, no. 2, pp. 157–165, 2006.

[17] Y. M. Chee and S. Ling, “Constructions for �-ary constant-weightcodes,” IEEE Trans. Inf. Theory, vol. 53, no. 1, pp. 135–146, Jan.2007.

[18] Y. M. Chee, A. C. H. Ling, S. Ling, and H. Shen, “The PBD-closureof constant-composition codes,” IEEE Trans. Inf. Theory, vol. 53, no.8, pp. 2685–2692, Aug. 2007.

[19] Y. M. Chee, S. H. Dau, A. C. H. Ling, and S. Ling, “The sizes of optimal�-ary codes of weight three and distance four: A complete solution,”IEEE Trans. Inf. Theory, vol. 54, no. 3, pp. 1291–1295, Mar. 2008.

[20] Y. M. Chee, G. Ge, and A. C. H. Ling, “Group divisible codes andtheir application in the construction of optimal constant-compositioncodes of weight three,” IEEE Trans. Inf. Theory, vol. 54, no. 8, pp.3552–3564, Aug. 2008.

[21] I. E. Telatar and R. G. Gallager, “Zero error decision feedback ca-pacity of discrete memoryless channels,” in Proc. Bilkent Int. Conf.New Trends Commun. Control Signal Process., E. Arikan, Ed., 1990,pp. 228–233, Elsevier.

[22] A. G. D’yachkov, “Random constant composition codes for multipleaccess channels,” Problems Control Inf. Theory/Problemy Upravlen.Teor. Inf., vol. 13, no. 6, pp. 357–369, 1984.

[23] T. Ericson and V. Zinoviev, “Spherical codes generated by binary par-titions of symmetric pointsets,” IEEE Trans. Inf. Theory, vol. 41, no. 1,pp. 107–129, Jan. 1995.

[24] O. D. King, “Bounds for DNA codes with constant GC-content,” Elec-tron. J. Combin., vol. 10, no. 1, 2003, Research Paper 33 (electronic).

[25] O. Milenkovic and N. Kashyap, On the Design of Codes for DNA Com-puting, ser. Lecture Notes in Computer Science. Berlin, Germany:Springer-Verlag, 2006, vol. 3969, pp. 100–119.

[26] Y. M. Chee and S. Ling, “Improved lower bounds for constant GC-con-tent DNA codes,” IEEE Trans. Inf. Theory, vol. 54, no. 1, pp. 391–394,Jan. 2008.

[27] W. Chu, C. J. Colbourn, and P. Dukes, “On constant compositioncodes,” Discrete Appl. Math., vol. 154, no. 6, pp. 912–929, 2006.

[28] D. J. Costello and G. D. Forney, “Channel coding: The road to channelcapacity,” Proc. IEEE, vol. 95, no. 6, pp. 1150–1177, Jun. 2007.

[29] V. Rödl, “On a packing and covering problem,” Eur. J. Combin., vol.5, pp. 69–78, 1985.

[30] P. Erdös and H. Hanani, “On a limit theorem in combinatorial analysis,”Publ. Math. Debrecen, vol. 10, pp. 10–13, 1963.

[31] T. Etzion, “Optimal constant weight codes over � and generalizeddesigns,” Discrete Math., vol. 169, no. 1–3, pp. 55–82, 1997.

[32] T. Kløve, “Bounds on the size of optimal difference triangle sets,” IEEETrans. Inf. Theory, vol. IT-34, no. 2, pp. 355–361, Mar. 1988.

[33] T. Kløve, “Bounds and construction for difference triangle sets,” IEEETrans. Inf. Theory, vol. 35, no. 4, pp. 879–886, Jul. 1989.

[34] W. C. Babcock, “Intermodulation interference in radio systems,” BellSystem Tech. J., vol. 31, pp. 63–73, 1953.

[35] A. R. Eckler, “The construction of missile guidance codes resistant torandom interference,” Bell System Tech. J., vol. 38, pp. 973–994, 1960.

[36] J. Robinson and A. Bernstein, “A class of binary recurrent codes withlimited error propagation,” IEEE Trans. Inf. Theory, vol. IT-13, no. 1,pp. 106–113, Jan. 1967.

[37] F. Biraud, E. J. Blum, and J. C. Ribes, “On optimal synthetic lineararrays with applications to radioastronomy,” IEEE Trans. AntennasPropag., vol. AP-22, no. 1, pp. 108–109, Jan. 1974.

[38] E. J. Blum, J. C. Ribes, and F. Biraud, “Some new possibilities ofoptimal synthetic linear arrays for radioastronomy,” Astronom. Astro-phys., vol. 41, pp. 409–411, 1975.

[39] R. J. F. Fang and W. A. Sandrin, “Carrier frequency assignment fornonlinear repeaters,” COMSAT Tech. Rev., vol. 7, pp. 227–245, 1977.

[40] M. D. Atkinson, N. Santoro, and J. Urrutia, “Integer sets with distinctsums and differences and carrier frequency assignment for nonlinearrepeaters,” IEEE Trans. Commun., vol. COMM-34, no. 6, pp. 614–617,Jun. 1986.

[41] H. Hanani, “On some tactical configurations,” Can. J. Math., vol. 15,pp. 702–722, 1963.

[42] R. C. Baker, G. Harman, and J. Pintz, “The difference between con-secutive primes. II,” Proc. London Math. Soc. (3), vol. 83, no. 3, pp.532–562, 2001.

Yeow Meng Chee (SM’08) received the B.Math. degree in computer scienceand combinatorics and optimization and the M.Math. and Ph.D. degrees in com-puter science from the University of Waterloo, Waterloo, ON, Canada, in 1988,1989, and 1996, respectively.

Currently, he is an Associate Professor at the Division of Mathematical Sci-ences, School of Physical and Mathematical Sciences, Nanyang TechnologicalUniversity, Singapore. Prior to this, he was Program Director of Interactive Dig-ital Media R&D in the Media Development Authority of Singapore, Postdoc-toral Fellow at the University of Waterloo and IBM’s Zürich Research Labora-tory, General Manager of the Singapore Computer Emergency Response Team,and Deputy Director of Strategic Programs at the Infocomm Development Au-thority, Singapore. His research interest lies in the interplay between combi-natorics and computer science/engineering, particularly combinatorial designtheory, coding theory, extremal set systems, and electronic design automation.

Son Hoang Dau received the B.S. degree in applied mathematics and in-formatics from the College of Science, Vietnam National University, Hanoi,Vietnam, in 2006 and the M.S. degree in mathematical sciences from the Divi-sion of Mathematical Sciences, Nanyang Technological University, Singapore,where he is currently working towards the Ph.D. degree.

His research interests are coding theory and combinatorics.

Page 12: Linear Size Optimal -ary Constant-Weight Codes and Constant-Composition Codes

CHEE et al.: LINEAR SIZE OPTIMAL -ARY CONSTANT-WEIGHT CODES AND CONSTANT-COMPOSITION CODES 151

Alan C. H. Ling was born in Hong Kong in 1973. He received the B.Math.,M.Math., and Ph.D. degrees in combinatorics and optimization from the Univer-sity of Waterloo, Waterloo, ON, Canada, in 1994, 1995, and 1996, respectively.

He worked at the Bank of Montreal, Montreal, QC, Canada, and MichiganTechnological University, Houghton, prior to his present position as AssociateProfessor of Computer Science at the University of Vermont, Burlington. His re-search interests concern combinatorial designs, codes, and applications in com-puter science.

San Ling received the B.A. degree in mathematics from the University of Cam-bridge, Cambridge, U.K., in 1985 and the Ph.D. degree in mathematics from theUniversity of California, Berkeley, in 1990.

Since April 2005, he has been a Professor with the Division of MathematicalSciences, School of Physical and Mathematical Sciences, Nanyang Technolog-ical University, Singapore. Prior to that, he was with the Department of Mathe-matics, National University of Singapore. His research fields include arithmeticof modular curves and application of number theory to combinatorial designs,coding theory, cryptography, and sequences.