Вы находитесь на странице: 1из 15

Designs, Codes and Cryptography, 16, 185–199 (1999)

°
c 1999 Kluwer Academic Publishers, Boston. Manufactured in The Netherlands.

Construction of Certain Cyclic Distance-Preserving


Codes Having Linear-Algebraic Characteristics
A. J. VAN ZANTEN
Delft University of Technology, Faculty of Technical Mathematics and Informatics,
P.O. Box 5031, 2600 GA DELFT, The Netherlands

AGUNG LUKITO
Delft University of Technology, Faculty of Technical Mathematics and Informatics,
P.O. Box 5031, 2600 GA DELFT, The Netherlands

Communicated by: V. A. Zinoviev

Received May 14, 1997; Revised February 25, 1998; Accepted June 10, 1998

Abstract. An ordered list of binary words of length n is called a distance-preserving hm, ni-code, if the list
distance between two words is equal to their Hamming distance, for distances up to m. A technique for constructing
cyclic hm, ni-codes is presented, based on the standard Gray code and on some simple tools from linear algebra.

Keywords: cyclic distance-preserving codes, cyclic difference-preserving codes, circuit codes, Gray code

1. Introduction

In [11] Preparata and Nievergelt discussed the notion of difference-preserving code (shortly
D P-code), being an ordered list of integers, coded as binary words of length n, satisfying
the following two properties:

(i) the list distance between two words, i.e. the absolute value of the difference of their
indices, is equal to their Hamming distance, as long as the list distance does not exceed
a certain threshold or spread m;

(ii) if the list distance exceeds m, then so does the Hamming distance.

The range N of the code is the number of words in the list. If one considers the list as a
cyclic list, and if the list distance between two words is taken cyclically, identifying the first
word and the (N + 1)st word (cf. Definition 3.1), then one can speak of a cyclic D P-code.
Some authors (cf. e.g. [2,6]) slightly modify condition (ii) by

(ii)0 if the list distance is at least m, then so is the Hamming distance.

Codes defined in this way are sometimes called circuit codes (cf. [2,3,5,6]). Cyclic codes
satisfying (i) and (ii)0 for m = 2 are called snake-in-the-box codes (cf. e.g. [1] ,[4], [5],
[12], [14], [16], and the refs. mentioned in these papers). All these types of codes can be
considered as generalizations of a Gray code, which is a list of all binary words of length n,
ordered such that each word differs from the previous one in precisely one bit. Hence, a Gray
186 VAN ZANTEN AND LUKITO

code satisfies condition (i) for m = 1. However, D P-codes also have aspects in common
with error-correcting codes. These two classes of codes share the property that codewords
(all in the case of error-correcting codes and all but some in the case of D P-codes) are at a
certain minimal distance from each other.
D P-codes are used for error-detection in pattern recognition and classification problems.
The longer the range of the code, the greater the accuracy, the greater the spread, the greater
the error-detection capability. For details we refer to [11]. Also in [11] a technique is
developed for the construction of certain non-cyclic D P-codes. In Section 5, Remark 5.6,
we shall make some remarks concerning that type of construction.
A more general type of ordered code was introduced by Evdokimov. In [7] he studied
codes satisfying condition (i) the nearness condition, (cf. also [8]), not bothering about
condition (ii), the separability condition.
We shall call such a code a distance-preserving hm, ni-code, or shortly, hm, ni-code. It
will be clear that 1 ≤ m ≤ n. It will also be clear that a cyclic Gray code is by definition a
cyclic h1, ni-code. Since the same bit will not be changed immediately again, it is even a
cyclic h2, ni-code.
If the list of codewords of a cyclic hm, ni-code contains all binary words of length n, i.e.
if N = 2n , we say that the hm, ni-code is complete. The binary-reflected Gray code, also
known as standard Gray code, is an example of a complete cyclic h2, ni-code (cf. e.g. [7]
and also Section 3). It is a natural question to ask for the maximal range of D P-codes,
circuit codes and hm, ni-codes. For all these codes one can distinguish between the cyclic
and the non-cyclic case, and ask for the maximal range in each case. If such a value cannot
be determined precisely, one can look for upper and lower bounds. Apart from trivial cases
only a few exact values are known. E.g., in the case of snake-in-the-box codes, the maximal
range is only known for n = 2, 3, 4, 5, 6 and 7 (cf. [5], [9]). As for bounds for the maximal
range of circuit codes, we refer to [2], [3], [5], [6], [14]. In the case of snake-in-the-box
codes, the most recent upper bounds can be found in [4], [12], [16], whereas for lower
bounds we refer to [1].
The maximal range of a cyclic hm, ni-code will be denoted by s(m, n) in this paper.
From the above remarks on Gray codes it follows that s(2, n) = 2n . Another case, which
is almost trivial, is the case m = n. As an example we present the only cyclic h4, 4i-code
of range 8 which is possible (apart from permutations of the columns):

0000
0001
0011
0111
1111
1110
1100
1000

It will be clear that s(4, 4) = 8, and, in general, that s(n, n) = 2n. So, for n > 2, there is no
complete cyclic hn, ni-code. Evdokimov presented in [7] a complete cyclic h4, 5i-code (see
also Example 3.3), and he posed the question for which values of n there exists a complete
CONSTRUCTION OF CERTAIN CYCLIC CODES 187

hn − 1, ni-code. Apart from the cases n = 2, n = 3 and n = 5, there are no other examples
known at this moment.
Still, more generally, one can pose the question for which values of m and n there exists
a complete hm, ni-code, or even, a complete cyclic hm, ni-code. Evdokimov proved in [7]
that there exist complete hm, ni-codes for all m and n satisfying m ≤ n2 + 1, except for
(m, n) = (3, 4).
If we define l(m, n) as the maximal length of an hm, ni-code (cyclic or non-cyclic), we
have the trivial relation l(m, n) ≥ s(m, n). An example where the >-sign holds, is the case
n = 4, m = 3, since s(3, 4) = 12 and l(3, 4) = 14 (cf. [7,14]). For more information
concerning values of l(m, n) we refer to [10] and to Remark 5.5 of this paper.
Equivalent to the list of codewords of an hm, ni-code is its so-called transition sequence
(cf. e.g. [7], and also Section 3), which contains the indices of the bits to be changed suc-
cessively to obtain the whole list of N codewords. Hence, the transition sequence consists
of N − 1 integers taken from the set {1, 2, . . . , n}. If the code is cyclic, like always in this
paper, we can add an N -th integer for the transition of the last codeword to the first one.
Sometimes such a sequence is called the extended transition sequence. Evdokimov’s tech-
niques for constructing hm, ni-codes are mainly based on merging transition sequences of
codes already known. In this paper we shall discuss a different approach for the construction
of cyclic hm, ni-codes based on linear codes.

2. Outlines of the Construction

Many subspaces of V := (G F(2))n , i.e. linear [n, k, d]-codes C, have a basis consisting
of vectors all having the same weight m. Let B = (b1 , b2 , . . . , bk ) be such a basis, with
kbi k = m, for 1 ≤ i ≤ k. Let furthermore G(k) be the transition sequence of a complete
cyclic Gray code of all binary words of length k. If we interpret these words as representation
vectors of the elements of C with respect to the basis B, then we obtain an ordered list of all
vectors of C, such that each vector differs from its predecessor by a single basis vector bi ,
for some i. Written as binary words of length n, this yields a cyclic list such that each word
differs in precisely m bits from the previous one (cf. [13]). Next, we change each word,
one bit after another, into its successor, thus producing (m − 1)2k intermediate words. It is
our aim to prove that under certain conditions, the order of changing the bits can be chosen
such that the resulting list of words is a cyclic hm, ni-code of range m2k . To accomplish
this, we have to prescribe an appropriate order for changing the bits of the codewords. Or,
stated equivalently, we have to define an order for the m 1-bits of the bi -vectors between
successive codewords of C. Two competing requirements play a role here. On the one
hand, all intermediate words should be different, and should also differ from the codewords
of C itself. On the other hand, one should take care that two changes of the same bit are
always separated by at least m − 1 other bit changes, to satisfy condition (i). In Section 4
this idea will be worked out further. We shall define, in an explicit way, the algorithm for
the construction of cyclic hm, ni-codes of range m2n−d 2 e , 1 < m ≤ n − 1. Hence, in the
m

case m = n − 1, we obtain cyclic hn − 1, ni-codes of range (n − 1)2d 2 e . A straightforward,


n

i.e. non-recursive, algorithm for the construction of these hn − 1, ni-codes is discussed in


Section 5.
188 VAN ZANTEN AND LUKITO

As for our notation, we shall not make any distinction between vectors of (G F(2))n
and binary words of length n. Therefore, the successive components of a vector are not
separated by commas.

3. Definitions and Preliminaries

Let Fn2 be the vector space of all binary words of length n. The Hamming distance d(x, y)
between two words x, y ∈ Fn2 is defined, as usual, as

d(x, y) = |{i | xi 6= yi }|. (1)

In this paper we adopt the convention that the index of the positions in a codeword runs
from 1 to n, from right to left.
Let furthermore N be an integer, called the range, and let f , the code, be an injective
mapping from the set {0, 1, . . . , N − 1} into Fn2 .
Definition 3.1 The code f is an hm, ni-code of range N , if

|i − j| ≤ m → d( f (i), f ( j)) = |i − j|

holds for all i, j ∈ {0, 1, . . . , N − 1}. It is called a complete hm, ni-code if N = 2n , and it
is called a cyclic hm, ni-code if

d( f (i), f ( j)) = min{N − |i − j|, |i − j|},

for all i, j ∈ {0, 1, . . . , N − 1}, with min{N − |i − j|, |i − j|} ≤ m.


So, the code f , defined above, preserves the distance between integers from {0, 1, . . . , N −
1}, for all distances up to m, if we represent the integers by vertices of a simple cycle in the
n-dimensional cube.
As usual, we shall write the codeword f (i) in vector notation, like ui , for 0 ≤ i ≤ N − 1,
and identify u N and u0 , if the code is cyclic. From now on we shall only deal with cyclic
hm, ni-codes, although we sometimes omit the adjective “cyclic,” if it is clear from the
context that a cyclic code is meant.
As already mentioned in the Introduction, a cyclic hm, ni-code of range N can also be
specified by a sequence of N integers, each integer from the set {1, 2, . . . , n}, called the
transition sequence. The i-th integer indicates the bit which changes in the i-th codeword
when going to the (i + 1)-st codeword, for 0 ≤ i < N . Such a transition sequence
always exists, since an hm, ni-code is also a h1, ni-code. Conversely, a characterization of
a sequence T := t0 , t1 , . . . , t N −1 being the transition sequence of an hm, ni-code of range
N , is given by the following proposition, which is a slight modification of a Theorem due
to Evdokimov in [7].
PROPOSITION 3.2 A sequence T := t0 , t1 , . . . , t N −1 is the transition sequence of a cyclic
hm, ni-code of range N , if and only if
(i) in each proper subsequence of T at least one ti occurs an odd number of times;
CONSTRUCTION OF CERTAIN CYCLIC CODES 189

(ii) in T each ti occurs an even number of times;

(iii) each subsequence of length m consists of m different integers.

We conclude that we can identify a cyclic hm, ni-code either with the ordered list of code-
words, or with its transition sequence.

Example 3.3 The following list is a complete cyclic h4, 5i-code.

0 00000 8 00011 16 00110 24 00101


1 00100 9 00001 17 00010 25 00111
2 01100 10 01001 18 01010 26 01111
3 01110 11 01101 19 01000 27 01011
4 11110 12 11101 20 11000 28 11011
5 11111 13 11100 21 11001 29 11010
6 10111 14 10100 22 10001 30 10010
7 10011 15 10110 23 10101 31 10000

The transition sequence corresponding to this h4, 5i-code is equal to

3, 4, 2, 5, 1, 4, 3, 5, 2, 4, 3, 5, 1, 4, 2, 5, 3, 4, 2, 5, 1, 4, 3, 5, 2, 4, 3, 5, 1, 4, 2, 5. (2)

Since the binary-reflected Gray code, or standard Gray code, is one of the basic ingredients
of our construction technique to be discussed in the next section, we also give the (extended)
transition sequence G(n) of this code. It is defined recursively, w.r.t. the length of the words,
by

G(1) = 1, G(n) = G(n − 1), n, G(n − 1), n, (3)

for all n > 1.


Hence, the sequence G(n) is of the form

1, 2, 1, 3, 1, 2, 1, 4, . . . , 1, 2, 1, n, 1, . . . , 1, 2, 1, n. (4)

The following properties concerning a transition sequence and its corresponding list of
binary words (not necessarily an hm, ni-code) will be used in Section 4. In the formulation
of these properties we use the vectors of the standard basis of Fn2 , i.e. the vectors ei ,
1 ≤ i ≤ n, with only one 1-bit, at position i.

PROPOSITION 3.4 Let T := t0 , t1 , . . . , t N −2 be a sequence of integers from S := {1, 2, . . . , n},


and let U := u0 , u1 , . . . , u N −1 be a list of words from Fn2 , such that T is the non-extended
transition sequence of U .

(i) If ti , 0 ≤ i ≤ N −2, is replaced in T by some x ∈ S, then the words ui+1 , ui+2 , . . . , u N −1


are altered by adding the vector eti + ex to each of them.
190 VAN ZANTEN AND LUKITO

(ii) If ti and t j , 0 ≤ i ≤ j, are interchanged in T , then the words ui+1 , ui+2 , . . ., u j are
altered by adding the vector eti + etj to each of them.

The proof is trivial and is omitted here.


Another tool which will be used for the construction of cyclic hm, ni-codes is the following
statement concerning the existence of certain independent sets of equal-weight vectors in
Fn2 .

PROPOSITION 3.5 Let m be some integer with 0 ≤ m < n. Then there exists in Fn2 a set
{b1 , b2 , . . . , bn } with the properties kbi k = m, 1 ≤ i ≤ n, kbi + bi+1 k = 2, 1 ≤ i < n,
and such that for m odd, the set itself is independent, whereas for m even, the subset
{b1 , b2 , . . . , bn−1 } is independent.
The proof is elementary and can be accomplished by induction to n, for a fixed value of
m, and n ≥ m + 1. We omit the details.
If we require, in addition, that all bi in Proposition 3.5 have a 1-bit in common, i.e. a 1-bit
on the same position, then a maximal independent subset contains exactly n − 1 vectors,
for both odd and even values of m. From now on we shall call such a bit a “common 1-bit.”
More in general, we have the following property.

COROLLARY 3.6 Let m and p be two integers such that 1 ≤ p < m < n. Then Fn2 has n − p
independent vectors b1 , b2 , . . . , bn− p of weight m, with p common 1-bits, and satisfying
kbi + bi+1 k = 2, for 1 ≤ i < n − p.

4. Construction of Cyclic hm, ni-Codes Based on an Independent Set of Constant-


Weight Vectors

Let

B := (b1 , b2 , . . . , bk ) (5)

be an ordered set of independent vectors from Fn2 , with

kbi k = m, 1 ≤ i ≤ k. (6)

To avoid trivialities, we assume m > 2. Corresponding to the sequence (4), with n replaced
by k, we define the following ordered list of codewords of C := hb1 , b2 , . . . , bk i

v0 = 0, vi+1 = vi + bti , (7)

for 0 ≤ i < 2k − 1, and with v2k ≡ v0 . The list defined by (7) contains all codewords of C,
arranged such that the distance between two successive words is always equal to m, i.e.

kvi + vi+1 k = m, 0 ≤ i ≤ 2k − 1, (8)

(cf. also [12], [15]).


CONSTRUCTION OF CERTAIN CYCLIC CODES 191

Now, we change vi into vi+1 , one bit after another, for all relevant values of i, which gives
rise to 2k sublists of m distinct words each. The intermediate words, when going from vi
to vi+1 , will be denoted by wi1 , wi2 , . . . , wim−1 , 0 ≤ i ≤ 2k − 1. The concatenation of these
sublists, i.e.

Dk := v0 , w10 , w20 , . . . , wm−1


0 , v1 , w11 , w21 , . . . , wm−1
2k −1
(9)

is an ordered list of m2k binary words of length n. These words are not necessarily different,
a priori. The order of changing the bits will be defined by ordered blocks

bi := (α1i , α2i , . . . , αmi ), 1 ≤ i ≤ k, (10)

where the m integers α ij indicate the positions of the 1-bits of bi . The meaning of the
internal order of bi is that first bit α1i has to be changed, then bit α2i , etc. It follows that the
transition sequence corresponding to list (7) can be written as

Tk := b1 b2 b1 · · · b1 bk b1 · · · b1 bk . (11)

Here, we allow that blocks bi on different positions in Tk may have different internal order,
for the same value of i, although this is not explicit in the notation.
To illustrate these definitions and the techniques to be developed in the next, we give the
following example.
Example 4.1 Consider the independent set (b1 , b2 ), with

b1 = 11110, b2 = 11101.

Corresponding to these vectors we define ordered blocks

b1 = (2, 4, 3, 5), b2 = (1, 4, 3, 5).

The transition sequence G(2) of the standard Gray code for words of length 2 now gives
the sequence
T2 = 2435 1435 2435 1435,
which is the transition sequence of a cyclic h4, 5i-code of range 16.
One can easily verify that ordered blocks like b1 = (3, 1, 4, 2), b2 = (4, 2, 5, 1) do not
provide us with any cyclic hm, 5i-code at all. Hence, the internal order of the blocks is
essential.
In order to prove the next theorem, we introduce for each i, 1 ≤ i ≤ k, the transition
sequence

Ti := b1 b2 b1 · · · b1 bi b1 · · · b1 bi , (12)

under the same convention as was adopted right after definition (11). Furthermore, we
introduce, also for each i, 1 ≤ i ≤ k, the subcode

Ci := hb1 , b2 , . . . , bi i, (13)
192 VAN ZANTEN AND LUKITO

with Ck ≡ C, and the sets


j j j j
Ci := {w0 , w1 , . . . , w2i −1 }, 1 ≤ j ≤ m − 1. (14)

We shall prove that if the equal-weight vectors bi of B in (5) satisfy some extra conditions,
the internal order of the blocks can be chosen such that the list in (9) is a cyclic hm, ni-code
with transition sequence (11). These conditions are:
(i) kbi + bi+1 k = 2, 1 ≤ i < k;
(ii) b1 , b2 , . . . , bk have d m2 e common 1-bits;
(iii) if x is a common 1-bit of b1 and b j , but not of b j+1 , then x is a common 1-bit of
b1 , b2 , . . . , b j , for 1 < j < k.
More precisely, if conditions (i) and (ii) hold, one can choose the internal order of the
blocks bi (all blocks bi with the same value of i now having the same order), such that all
words in (9) are different. We call this internal order the initial internal order. Then, (9) is
the list of a cyclic hm 0 , ni-code for some m 0 ≤ m. Actually, the sets Ci in (14) appear to
j

be cosets of the linear code Ci , for all j. Condition (iii) makes it possible to redefine the
order in the various bi -blocks to obtain a real cyclic hm, ni-code. This condition is typical
for the underlying structure of (9) and (11), i.e. the standard Gray code. If the vectors of
the equal-weight basis B satisfy (i)–(iii), we call B a feasible basis.
THEOREM 4.2 If B is a feasible basis, then the internal order of the blocks in Tk can be
chosen such that the resulting sequence (11) is the transition sequence of a cyclic hm, ni-
code of range m2k .

Proof. We choose the initial order in the blocks as follows. The m − 1 common integers
of bi and bi+1 are put on the same positions, for 1 ≤ i < k. Furthermore, the d m2 e common
integers of b1 , b2 , . . . , bk are on non-adjacent positions within a block (cf. Example 4.1).
We now proceed by induction to the index of the sequence Ti .
(i) It is easy to see, that the sequence

T1 = b1 b1 (15)

defines a cyclic hm, ni-code D, of range 2m, and moreover that

j
X
j
C1 = C1 + eαr , 1 ≤ j ≤ m − 1, (16)
r =1

if b1 = (α1 , α2 , . . . , αm ).
(ii) Assume that

Ti = b1 b2 b1 · · · b1 bi b1 · · · b1 bi (17)
CONSTRUCTION OF CERTAIN CYCLIC CODES 193

is the transition sequence of some cyclic hm, ni-code Di of range m2i , where the blocks
do not necessarily have their initial internal order, apart from the last block bi . Assume
furthermore that

j
X
j
Cl = Cl + eαr , 1 ≤ j ≤ m − 1, (18)
r =1

for 1 ≤ l ≤ i.
Now, we replace the last bi in (17) by bi+1 , yielding the sequence

Ti0 := b1 b2 b1 · · · b1 bi b1 · · · b1 bi+1 . (19)

Because both blocks, bi+1 as well as bi , have still their initial order, this replacing of
blocks comes down to replacing one integer in the last block of Ti by a different integer.
It follows from Proposition 3.4 (i) that the corresponding (non-cyclic) list Di0 differs
from Di in the last few words by the vector bi + bi+1 , and moreover, that Di0 contains
one word more that Di , i.e. the word bi + bi+1 , at the end of the list. Next, we define

Ti+1 := Ti0 Ti0 , (20)

∗ ∗
which corresponds to a cyclic list Di+1 . The list Di+1 consists of the words of Di0 ,
0 ∗
followed by those of Di + bi + bi+1 . Hence, Di+1 contains the words of Di and of
Di + bi + bi+1 . We shall show that all these words are different. First, the words of
Di + bi + bi+1 are all different from each other, since the words of Di are, by our
induction assumption. In the second place, the words of Di + bi + bi+1 differ from
those of Di , since otherwise we would have either

v p + bi + bi+1 = vq , (21)

or, from (18),

X
j1 X
j2
vp + eαr + bi + bi+1 = vq + eαr , (22)
r =1 r =1

for some v p , vq ∈ Ci , and for integers j1 , j2 with 1 ≤ j1 , j2 ≤ m.


Now, eqs. (21) and (22) for j1 = j2 , are false, since bi+1 ∈
/ Ci . For j1 + 1 = j2 , eq. (22)
would imply eαj2 ∈ Ci+1 , which is also impossible, since the minimum distance of Ci+1
is equal to 2, as one can easily verify. For j1 = 1 and j2 = m we would have eα1 ∈ Ci+1 ,
which is a contradiction for the same reason. For all remaining cases, j1 + 1 < j2 < m,
and j1 > 1, j2 = m, the vector v p + vq + bi + bi+1 would contain some, but not all of
the d m2 e common 1-bits of the basis vectors of B, which is again a contradiction.

We conclude that Di+1 is a cyclic hm 0 , ni-code of range m2i+1 , for some m 0 ≤ m, and,
moreover, that (18) also holds for l = i + 1. This last statement is true, because cosets
194 VAN ZANTEN AND LUKITO

of Ci+1 are invariant for the various translations over bi + bi+1 . (Remember that this
vector is in Ci+1 itself.)
Suppose that m 0 < m. This can only be the case, if there is some y ∈ bi+1 ∪ b1 , with
y∈ / bi , and such that the list distance between the integers y either in bi+1 b1 or in b1 bi+1

or in both is less than m. Take the first possibility, occurring in the second half of Di+1 .
Consider the subsequence bi+1 b1 b2 · · · b1 bi , and let x ∈ bi , x ∈ / bi+1 . From condition
(iii) for a feasible basis, we have that x ∈ bi , bi−1 , · · · , b1 . Now, we interchange x and
y in the first block b1 of Ti0 . From the induction assumption it follows that the distance
between the integers y in bi+1 and in b1 is now at least m. Remember that in the initial
order y and x have the same position in bi+1 and in bi respectively. If also y ∈ b2 , we
next interchange x and y in the second block of Ti0 , etc, till we meet a block which does
not contain y. Such a block certainly exists, since y ∈ / bi . From Proposition 3.4 (ii)
it follows that this interchanging of x and y amounts to adding bi + bi+1 to the words
of Di0 between the positions indicated by x and y in the relevant blocks. Since we
carry out precisely the same interchanges in the first half Ti0 of Ti+1 ∗
(the configuration
bi+1 b1 occurs twice, in a cyclic sense), the effect is a swapping of words between the

first and the second half of Di+1 . The resulting sequence Ti+1 satisfies the induction
assumptions, since the cosets of Ci+1 are again invariant under this swapping. The
second possibility, i.e. the distance between the integers y in b1 bi+1 is less than m, can be
treated similarly. If both possibilities occur at the same time, we can carry out both series
of interchanges of x and y. These series never interfere, since they stop before getting

to one of the two blocks bi in Ti+1 . The Theorem has been proved now, by induction.

Example 4.1 (continued). Our starting point was the set of basis vectors (b1 , b2 ), with
b1 = 11110, b2 = 11101. Now, we extend this set with a third vector b3 = 11011. As
one can verify, the set B := (b1 , b2 , b3 ) is a feasible basis for a [5, 3, 2]-code C. In the
sequence T2 we replace the last block 1435 by 1425, which is b3 in its initial internal order,
yielding the modified sequence T20 . Hence, the sequence T3∗ := T20 T20 equals

2435 1435 2435 1425


2435 1435 2435 1425

This sequence corresponds to a h2, 5i-code of range 32. In order to change it into a h4, 5i-
code, we interchange 2 and 3 in the b1 -blocks immediately after b3 . Since 2 is not an
element of b2 , the interchanging of the integers 2 and 3 now stops. The resulting sequence
T3 has the form

3425 1435 2435 1425


3425 1435 2435 1425

and defines the complete cyclic h4, 5i-code which was listed in Section 3.
CONSTRUCTION OF CERTAIN CYCLIC CODES 195

From Proposition 3.5 we know that the number of basis vectors in a feasible basis B
satisfies k ≤ n − d m2 e. Actually, this upper bound is tight.

COROLLARY 4.3 For any m, 1 < m < n, there exists a cyclic hm, ni-code of range m2n−d 2 e .
m

Proof. Consider e.g. the following set of n − d m2 e blocks:

b1 = (m, m − 1, m − 2, . . . , d m2 e + 1),
b2 = (m + 1, m − 1, m − 2, . . . , d m2 e + 1),
..
= .
bn−m+1 = (n, m − 1, m − 2, . . . , d m2 e + 1),
bn−m+2 = (n, n − 1, m − 2, . . . , d m2 e + 1),
bn−m+3 = (n, n − 1, n − 2, . . . , d m2 e + 1),
..
= .
bn−m+b m2 c = (n, n − 1, n − 2, . . . , n − b m2 c + 1).

The integers in the above blocks still have to be interlaced by the common integers
1, 2, . . . , d m2 e, but for reasons of convenience these are left out.
The vectors b1 , b2 , . . . , bn−m+b m2 c , corresponding to these blocks, are independent and
satisfy all requirements for the vectors of a feasible basis.

5. The Special Case of Cyclic hn − 1, ni-Codes

The construction of cyclic hm, ni-codes, as described in the proof of Theorem 4.2, is of a
recursive nature, since such a code of range m2i+1 is constructed by using a similar code
of range m2i , for i = 1, 2, . . . , n − d m2 e − 1. If m = n − 1, we are able to formulate a
non-recursive version of this construction. To this end we introduce the following set of
basis vectors of length n
b1 = 111 · · · 11 · · · 110,
b2 = 111 · · · 11 · · · 101,
b3 = 111 · · · 11 · · · 011,
.
= ..
bd n2 e = 111 · · · 10 · · · 111.
Because of our convention of indexing coordinate positions from right to left, each vector
bi has its only 0-bit on position i. Apparently, these vectors form a feasible basis B.
Corresponding to these basis vectors we define the following ordered blocks

b1 = (2, 3, 4, · · · , d n2 e),
b2 = (1, 3, 4, · · · , d n2 e),
b3 = (1, 2, 4, · · · , d n2 e),
.
= ..
bd n2 e = (1, 2, 3, · · · , d n2 e − 1).
196 VAN ZANTEN AND LUKITO

Again, for reasons of convenience, we omitted the common integers d n2 e+1, d n2 e+2, · · · , n.
In this case, the intersection bi ∩ bi+1 does not contain the integers i and i + 1, for 1 ≤
i < d n2 e. Hence, when transforming Ti into Ti+1 , in the proof of Theorem 4.2, we have to

interchange i and i + 1 in a number of blocks in Ti+1 , starting in the first b1 -block. The
process of interchanging stops as soon as we get to the first bi -block. A similar series of

interchangings takes place in the second half of Ti+1 .
We define the following cyclic permutations of order 2
n
σi := (i + 1, i + 2), 0 ≤ i ≤ d e − 2. (23)
2
Now, we give each block in Td n2 e a sequence index, ranging from 0 until 2d 2 e − 1, from left
n

to right. It appears that there exists a simple relationship between the permutation one has
to apply to a block in its initial order, and the binary representation of the sequence index
of the block.

THEOREM 5.1 Let p := d n2 e, and let

Tp = b1 b2 b1 · · · b1 b p b1 · · · b1 b p

be the transition sequence of a cyclic hn − 1, ni-code of range (n − 1)2 p .


If b is the block in Tp with sequence index j, 0 ≤ j ≤ 2 p − 1, and if

(2 p − 1 − j)2 = ε p−1 ε p−2 ε p−3 · · · ε0

is the binary representation of the complement of j, then the internal order of b is obtained
from its initial order by applying the permutation
ε ε ε
π j := σ p−2
p−2
σ p−3
p−3
· · · σl+1
l+1
,

where l is the smallest integer such that εl = 1.


A proof, based on the transformation from Ti into Ti+1 , 1 ≤ i < p, can easily be given,
but is omitted here. Instead, we illustrate the theorem by giving an example.

Example 5.2 For n = 9 we have blocks b1 , b2 , · · · , b5 , initially ordered as

b1 = (2, 3, 4, 5)
b2 = (1, 3, 4, 5),
b3 = (1, 2, 4, 5),
b4 = (1, 2, 3, 5),
b5 = (1, 2, 3, 4).

Again, we omitted the common integers 6, 7, 8 and 9. The integers of block 0 in T5 , which
is a b1 -block, have to be permuted by π0 = σ3 σ2 σ1 . The integers of block 1 in T5 , which is
a b2 -block, have to be permuted by π1 = σ3 σ2 . The integers of block 2, which is again a
b1 -block, have to be permuted by π2 = σ3 σ2 , etc.
CONSTRUCTION OF CERTAIN CYCLIC CODES 197

Applying all permutations, and interlacing the permuted integers with the common in-
tegers 6, 7, 8, and 9 results in the following transition sequence of a cyclic h8, 9i-code of
range 256.

56273849 16573849 26573849 16275849


36275849 16375849 26375849 16273859
46273859 16473859 26473859 16274859
36274859 16374859 26374859 16273849
56273849 16573849 26573849 16275849
36275849 16375849 26375849 16273859
46273859 16473859 26473859 16274859
36274859 16374859 26374859 16273849

Remark 5.3 Let D be the list of codewords or vectors corresponding to the transition
sequence of the last example. If one adds a fixed vector a of (G F(2))9 to all the vectors of
the list, one obtains an equivalent cyclic h8, 9i-code. If one takes a = 000000101 the list
D + a consists of all binary words which are not in D. This is because (C i + a) ∩ C j = ∅,
j
for all cosets C i (= Cki ) and C j (= Ck ) defined in (14).
So, all binary words of length 9 can be arranged in two disjunct lists both representing
a cyclic h8, 9i-code of range 256. A similar observation can possibly be made for other
vector spaces (G F(2))n .

Remark 5.4 Since an hn − 1, ni-code is also an hm, ni-code for m ≤ n − 1, Theorem 5.1
provides us with cyclic hm, ni-codes of range (n − 1)2d 2 e for all these m-values. This is not
n

always the maximal range possible by the construction of Section 4. If one starts, e.g., with
basis vectors of weight 6, Corollary 4.3 states that one can construct a cyclic h6, 9i-code
of range 32 · 28 > 28 . By applying a feasible basis of weight 4 one can even construct a
complete cyclic h4, ni-code, for all n > 4. This result was also obtained by Evdokimov in
[7].

Remark 5.5 Perezhogin constructed cyclic hn − 1, ni-codes of the same range, applying
a different technique, also of a recursive nature. For his approach we refer to [10]. Fur-
thermore, we remark that s(3, 4) = 12 and l(3, 4) = 14 (cf. the Introduction), and, by
Example 3.3, that s(4, 5) = l(4, 5) = 32. Also, as a consequence of Section 4, we have
s(5, 6) ≥ 40, s(6, 7) ≥ 96, s(7, 8) ≥ 112.
Perezhogin and Evdokimov showed that s(5, 6) = 40, and furthermore that l(5, 6) =
50, l(6, 7) ≥ 114 and l(7, 8) ≥ 222, by a computer search (A. A. Evdokimov, private
communication).

Remark 5.6 A basic ingredient of the construction discussed in this paper is the ordering of
the codewords of a linear [n, k, d]-code, such that each pair of successive codewords differ
in a constant number of m bits. We should remark here that this idea is also present in the
work of Preparata and Nievergelt, be it in a somewhat disguised version, because of the use
of polynomials in stead of binary words (cf. [11]). Moreover, they also develop this idea
198 VAN ZANTEN AND LUKITO

only for cyclic error-correcting codes C, and only in the case m = d. In [13] it was shown
that this type of ordering can be carried out for a much wider class of linear codes and for
a larger set of m-values. Furthermore, in Preparata and Nievergelt’s paper the threshold is
taken equal to t := b d2 c (6= m), in which case the problem of the order of changing the
bits, when going from vi to vi+1 , is relatively simple. Although it is not remarked explicitly
in [11], one can choose t bits of the vector bi + bi−1 which are not in bi−1 + bi−2 , and
change these first, yielding a threshold of value t. That this is always possible is due to the
fact that the mutual distances between bi−2 , bi−1 and bi are at least d. The “equal-weight
ordering” of the codewords of the underlying code C in [11] is even more camouflaged
by the lengthening of the codewords, necessary to satisfy the separability condition (cf.
Section 1), and by the fact that Preparata and Nievergelt construct linear, i.e. non-cyclic,
D P-codes instead of cyclic ones.

Acknowledgments

The first author is indebted to Dr. V. A. Zinoviev for bringing the paper of ref. [7] to his
attention, and to Dr. J. Simonis for translating this paper.

References

1. H. L. Abott and M. Katchalski, On the construction of snake-in-the-box codes, Utilitas Math., Vol. 40
(1991) pp. 97–116.
2. R. J. Douglas, Some results on the maximum length of circuits of spread k in the d-cube, J. Comb. Theory,
Vol. 6 (1969) pp. 323–339.
3. R. J. Douglas, Upper bounds on the length of circuits of even spread in the d-cube, J. Comb. Theory, Vol. 7
(1969) pp. 206–214.
4. P. G. Emel’yanov, An upper bound for the length of a snake-in-the n-dimensional unit cube, in Dis-
crete Analysis and Operations Research (A. D. Korshunov, ed.), Kluwer Academic Publishers, Dor-
drecht/Boston/London (1997). (Translation from Sib. Zh. Issled. Oper., Vol. 2 (1995) pp. 10–17).
5. A. A. Evdokimov, Maximal length of a circuit in a unitary n-dimensional cube, Math. Notes, Vol. 6 (1969)
pp. 642–648.
6. A. A. Evdokimov, Circuit codes with arbitrary distance, Soviet Math. Dokl., Vol. 17 (1976) pp. 900–904.
7. A. A. Evdokimov, O numeratsii podmnozhestv konechnogo mnozhẽstṽa (1980), in Metody Diskretnogo
Analiza v Reshenii Kombinatornykh Zadach, Sbornik trudov Instituta Matematiki SO AN SSSR, Vypusk
34 (1980).
8. A. A. Evdokimov, Locally isometric embeddings of graphs and the metric prolongation property, in Dis-
crete Analysis and Operations Research (A. D. Korshunov, ed.), Kluwer Academic Publishers, Dor-
drecht/Boston/London (1996).
9. K. J. Kochut, Snake-in-the-box codes for dimension 7, J. Combin. Math. and Combin. Comput., Vol. 20
(1996) pp. 175–185.
10. A. L. Perezhogin, On local isometric coding of natural numbers, Discrete Analysis and Operations Re-
search, Vol. 3 (1996) pp. 69–76 (in Russian).
11. F. P. Preparata and J. Nievergelt, Difference-preserving codes, IEEE Trans. Inform. Theory, Vol. IT-20
(1974) pp. 643–649.
12. H. S. Snevily, The snake-in-the-box problem: A new upper bound, Discrete Math., Vol. 133 (1994)
pp. 307–314.
13. A. J. van Zanten, Minimal-change order and separabiblity in linear codes, IEEE Trans. Inform. Theory,
Vol. IT-39 (1993) pp. 1988–1989.
CONSTRUCTION OF CERTAIN CYCLIC CODES 199

14. A. J. van Zanten, Difference-preserving codes, circuit codes and hm, ni-codes, Rept. 94-85, Faculty of
Technical Mathematics and Informatics, Delft University of Technology (1994).
15. A. J. van Zanten, On the construction of distance-preserving codes, in Algebraic and Combinatorial Coding
Theory, Proceedings of the Fifth International Workshop of the ACCT, Unicorn, Shumen (Bulg.) (1996).
16. G. Zemor, An upper bound on the size of the snake-in-the-box, Combinatorica, Vol. 17 (1997) pp. 1–12.

Вам также может понравиться