Professional Documents
Culture Documents
Reversible Codes
JAM~S L. MASSEY
Department of Electrical Engineering, University of Notre Dame,
Notre Dame, Indiana
LIST OF SYMBOLS
O~ P r i m i t i v e e l e m e n t of GF(q)
A n y e l e m e n t of GF(q)
D Delay operator
f(X) C o d e - w o r d p o l y n o m i a l in cyclic code
GF(q) F i n i t e field consisting of q e l e m e n t s
g(x) G e n e r a t i n g p o l y n o m i a l of cyclic code
(~)k / C o d e - g e n e r a t i n g - p o l y n o m i a l of c o n v o l u t i o n a l code
I(J) ( D ) I n f o r m a t i o n sequence of c o n v o l u t i o n a l e n c o d e r
k N u m b e r of i n f o r m a t i o n digits in b l o c k code
ko N u m b e r of i n p u t lines of c o n v o l u t i o n a l e n c o d e r
m M a x i m u m degree of c o d e - g e n e r a t i n g - p o l y n o m i a l s in c o n v o
l u t i o n a l code
n N u m b e r of d i g i t s in code w o r d of b l o c k code
nA D e c o d i n g c o n s t r a i n t l e n g t h of c o n v o l u t i o n a l code
no N u m b e r of o u t p u t lines of c o n v o l u t i o n a l e n c o d e r
p(X) P r i m i t i v e p o l y n o m i a l w i t h coefficients in GF(q)
r D e g r e e of g ( X )
T(J) ( D ) O u t p u t sequences of c o n v o l u t i o n a l e n c o d e r
A code is defined to be reversible if its code-word set is invariant
under a reversal of the digits in each code word. Such codes may
have application in certain data storage and retrieval systems. I t is
shown that cyclic codes and convolutional codes are reversible when
and only when their code-generating polynomials are self-reciprocal.
Reversible codes are quite rare therefore, but it is shown that an im-
portant subclass of the Bose-Chaudhuri codes consists entirely of re-
versible codes. Techniques are developed by which any nonreversible
cyclic code can be converted into a reversible cyclic code with at
least as much error-correcting power, but at the cost of increased
369
370 M~ss~Y
I. INTRODUCTION
Considerable use has been made in coding theory of transformations
which leave invariant the code-word set of an error-correcting code, e.g.,
the cyclic shift which leaves invariant the code-word set of a cyclic code.
In this paper, the transformation that consists of reversing the order of
the digits in a code word will be studied in some detail. Codes invariant
under this transformation are of practical value in certain data storage
applications and may be of some theoretical interest as well.
Hamming codes and the maximal-length codes are not reversible except
in trivial instances. Consider first the binary cyclic Hamming codes
(Peterson, 1961). These are sphere-packed codes with minimum dis-
tance three obtained by taking g(X) = p ( X ) where p ( X ) is a primitive
polynomial in GF(2) with degree m => 2. Thus, from Lemma 1, the only
reversible such code is that generated by g(X) = X 2 + X + 1. This is
the trivial (3, 1) code with code-word set {111, 000}. In summary,
TI~EOREM 2. The trivial (3, 1) code is the only reversible binary cyclic
Hamming code.
Consider next the maximal-length codes (Peterson, 1961). These are
cyclic codes generated by g(X) such that
g ( X ) p ( Z ) = X ~-1 - 1 (6)
where p ( X ) is a primitive polynomial of degree m. The right-hand-side
of (6) is self-reciprocal. If the code is reversible, g(X) is self-reciprocal
and hence so must be p ( X ) . Thus, from Lemma 1, the only reversible
maximM-length codes are those generated by g(X) where p ( X ) in (6)
is: (a) X ~ + X + 1 in GF(2) ; this yields g(X) = X + i which generates
the (3, 2) code with code-word set {110, 011,101,000}, and (b) X + 1
in GF(3); this yields g(X) = X + 2 which generates the (2, 1) code
with code-word set {00, 21, 12}. In summary,
THEOREM 3. The trivial (3, 2) binary code and the trivial (2, 1) ternary
code are the only reversible maximal-length codes.
Theorems 2 and 3 arc somewhat discouraging, but fortunately there
is at least one important class of cyclic codes that are reversible. These
are given in the next theorem and are a subclass of the elass of codes
discovered independently by Bose-Chaudhuri (1960) and Hoequenghem
(1959).
THEOREM 4. Let ~ be any element of GF(q ~) and let g(X) be the mini-
mum degree monic polynomial having as roots ~-t, f~-t+l, . . . fl0 = 1, f~,
... fit. Then g( X) generates a reversible Bose-Chaudhuri code with mini-
mum distance at least 2t + 2.
PnooF: It follows immediately from Theorem 1A that the cyclic code
generated by g(X) is reversible. Since g(X) has 2t + 1 consecutive
powers of f~ as roots, it generates a Bose-Chaudhuri code with minimum
distance at least 2t -t- 2. Q.E.D.
In Table I, we list several reversible Bose-Chaudhuri codes obtained
from Theorem 4 by taking f~ = a where a is a primitive element of
GF(2m). The "ordinary" Bose-Chaudhuri codes with the same guaran-
374 MASSEY
TABLE I
COMPARISON OF REVERSIBLEAND ORDINARY (NONREVERSIBLE)
BOSE -CHAuDI-IURI CODES
r r ~ r
n 2t+2 (reversible) (ordinary) n 2t+2 (reversible) (ordinary)
15 6 9 9 127 6 15 15
31 6 11 11 10 29 29
10 21 21 14 43 43
63 6 13 13 18 57 --
10 25 25 20 -- 57
14 37 34 22 71 64
18 43 -- 26 85 --
22 49 46 28 -- 77
38 99 --
44 -- 99
teed minimum distance are shown for comparison. These latter codes
are not reversible and are generated by the minimum degree polynomial
2 2t
having 1, a, a , • • • , a as roots. I t can be seen from Table I that in
m a n y cases the reversible code has the same redundancy as the ordinary
code, but, especially at low rates, the reversibility must sometimes be
purchased at the price of increased code redundancy.
f o, o I
2¢ LINEAR °2
SEQUENTIAL
kO ¢
CIRCUIT
N0
FIG. 2. A n N - r e c o r d of a e o n v o l u t i o n a l code
and thus it can be seen by comparison to (11) that the code is reversible
if and only if
DmGI~(D -1) = GlJkI(D) all j and k, (13)
i.e. if and only if every code-generating-polynomial is self-reciprocal
when treated as a polynomial of degree exactly m. Hence, we have shown
the following parallel of Theorem 1:
T~EOnE~ 6. A binary convolutional code with code-generating-poly-
nomials of degree m or less is reversible if and only if every one of its code-
generating-polynomials is self-reciprocal when treated as a polynomial of
degree exactly m.
VIII. AUGMENTATION OF NONREVERSIBLE CONVOLUTIONAL
CODES
At present, only a few specific classes of convolutional codes are known,
viz. the burst-correcting codes of Hagelbarger (1959) and a few classes
of random-error-correction codes found by the author (Massey, 1963a).
Except in trivial cases, none of these codes is reversible. Fortunately,
an augmentation technique can be used to convert a nonreversible con-
volutional code into a reversible code in a practical manner.
Consider a nonreversible convolutional code generated by the code-
generating-polynomials G ~ (D) of degree m or less. Let m' be the small-
est integer such that b y adding terms of degree greater than m but no
greater than m' to each GI~I(D), the polynomials GI~I~(D) thus formed
are self-reciprocal when treated as polynomials of degree exactly m'.
This can always be done for m p _-< 2m since the polynomial
(]) /~2my-~(j) [ y-j--l,~ (3") D m