In
coding theory
Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and data storage. Codes are stud ...
, a cyclic code is a
block code, where the
circular shift
In combinatorial mathematics, a circular shift is the operation of rearranging the entries in a tuple, either by moving the final entry to the first position, while shifting all other entries to the next position, or by performing the inverse op ...
s of each codeword gives another word that belongs to the code. They are
error-correcting codes that have algebraic properties that are convenient for efficient
error detection and correction
In information theory and coding theory with applications in computer science and telecommunication, error detection and correction (EDAC) or error control are techniques that enable reliable delivery of digital data over unreliable comm ...
.
Definition
Let
be a
linear code In coding theory, a linear code is an error-correcting code for which any linear combination of codewords is also a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes, although turbo codes can be seen a ...
over a
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
(also called '' Galois field'')
of
block length
In coding theory, block codes are a large and important family of error-correcting codes that encode data in blocks.
There is a vast number of examples for block codes, many of which have a wide range of practical applications. The abstract defin ...
.
is called a cyclic code if, for every
codeword from
, the word
in
obtained by a
cyclic right shift of components is again a codeword. Because one cyclic right shift is equal to
cyclic left shifts, a cyclic code may also be defined via cyclic left shifts. Therefore the linear code
is cyclic precisely when it is invariant under all cyclic shifts.
Cyclic codes have some additional structural constraint on the codes. They are based on
Galois fields
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subtra ...
and because of their structural properties they are very useful for error controls. Their structure is strongly related to Galois fields because of which the encoding and decoding algorithms for cyclic codes are computationally efficient.
Algebraic structure
Cyclic codes can be linked to ideals in certain rings. Let
be a
polynomial ring
In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring (which is also a commutative algebra) formed from the set of polynomials in one or more indeterminates (traditionally also called variable ...
over the finite field
. Identify the elements of the cyclic code
with polynomials in
such that
maps to the polynomial
: thus multiplication by
corresponds to a cyclic shift. Then
is an
ideal in
, and hence
principal, since
is a
principal ideal ring. The ideal is generated by the unique monic element in
of minimum degree, the ''generator polynomial''
.
This must be a divisor of
. It follows that every cyclic code is a
polynomial code.
If the generator polynomial
has degree
then the rank of the code
is
.
The idempotent of
is a codeword
such that
(that is,
is an
idempotent element of
) and
is an identity for the code, that is
for every codeword
. If
and
are
coprime
In mathematics, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equival ...
such a word always exists and is unique; it is a generator of the code.
An irreducible code is a cyclic code in which the code, as an ideal is irreducible, i.e. is minimal in
, so that its check polynomial is an
irreducible polynomial
In mathematics, an irreducible polynomial is, roughly speaking, a polynomial that cannot be factored into the product of two non-constant polynomials. The property of irreducibility depends on the nature of the coefficients that are accepted f ...
.
Examples
For example, if
and
, the set of codewords contained in cyclic code generated by
is precisely
:
.
It corresponds to the ideal in
generated by
.
The polynomial
is irreducible in the polynomial ring, and hence the code is an irreducible code.
The idempotent of this code is the polynomial
, corresponding to the codeword
.
Trivial examples
Trivial examples of cyclic codes are
itself and the code containing only the zero codeword. These correspond to generators
and
respectively: these two polynomials must always be factors of
.
Over
the
parity bit
A parity bit, or check bit, is a bit added to a string of binary code. Parity bits are a simple form of error detecting code. Parity bits are generally applied to the smallest units of a communication protocol, typically 8-bit octets (bytes) ...
code, consisting of all words of even weight, corresponds to generator
. Again over
this must always be a factor of
.
Quasi-cyclic codes and shortened codes
Before delving into the details of cyclic codes first we will discuss quasi-cyclic and shortened codes which are closely related to the cyclic codes and they all can be converted into each other.
Definition
Quasi-cyclic codes:
An
''quasi-cyclic code'' is a linear block code such that, for some
which is coprime to
, the polynomial
is a ''codeword polynomial'' whenever
is a codeword polynomial.
Here, ''codeword polynomial'' is an element of a linear code whose
code word
In communication, a code word is an element of a standardized code or Communications protocol, protocol. Each code word is assembled in accordance with the specific rules of the code and assigned a unique meaning. Code words are typically used for ...
s are polynomials that are divisible by a polynomial of shorter length called the ''generator polynomial''. Every codeword polynomial can be expressed in the form
, where
is the generator polynomial. Any codeword
of a cyclic code
can be associated with a codeword polynomial, namely,
. A quasi-cyclic code with
equal to
is a cyclic code.
Definition
Shortened codes:
An