# Burst error-correcting code

In coding theory, burst error-correcting codes employ methods of correcting burst errors, which are errors that occur in many consecutive bits rather than occurring in bits independently of each other.

Many codes have been designed to correct random errors. Sometimes, however, channels may introduce errors which are localized in a short interval. Such errors occur in a burst (called burst errors) because they occur in many consecutive bits. Examples of burst errors can be found extensively in storage mediums. These errors may be due to physical damage such as scratch on a disc or a stroke of lightning in case of wireless channels. They are not independent; they tend to be spatially concentrated. If one bit has an error, it is likely that the adjacent bits could also be corrupted. The methods used to correct random errors are inefficient to correct burst errors.

## Definitions

A burst of length 5

A burst of length ${\displaystyle \ell }$[1]

Say a codeword ${\displaystyle C}$ is transmitted, and it is received as ${\displaystyle Y=C+E.}$ Then, the error vector ${\displaystyle E}$ is called a burst of length ${\displaystyle \ell }$ if the nonzero components of ${\displaystyle E}$ are confined to ${\displaystyle \ell }$ consecutive components. For example, ${\displaystyle E=(0{\textbf {1000011}}0)}$ is a burst of length ${\displaystyle \ell =7.}$

Although this definition is sufficient to describe what a burst error is, the majority of the tools developed for burst error correction rely on cyclic codes. This motivates our next definition.

A cyclic burst of length ${\displaystyle \ell }$[1]

An error vector ${\displaystyle E}$ is called a cyclic burst error of length ${\displaystyle \ell }$ if its nonzero components are confined to ${\displaystyle \ell }$ cyclically consecutive components. For example, the previously considered error vector ${\displaystyle E=(010000110)}$, is a cyclic burst of length ${\displaystyle \ell =5}$, since we consider the error starting at position ${\displaystyle 6}$ and ending at position ${\displaystyle 1}$. Notice the indices are ${\displaystyle 0}$-based, that is, the first element is at position ${\displaystyle 0}$.

For the remainder of this article, we will use the term burst to refer to a cyclic burst, unless noted otherwise.

### Burst description

It is often useful to have a compact definition of a burst error, that encompasses not only its length, but also the pattern, and location of such error. We define a burst description to be a tuple ${\displaystyle (P,L)}$ where ${\displaystyle P}$ is the pattern of the error (that is the string of symbols beginning with the first nonzero entry in the error pattern, and ending with the last nonzero symbol), and ${\displaystyle L}$ is the location, on the codeword, where the burst can be found.[1]

For example, the burst description of the error pattern ${\displaystyle E=(010000110)}$ is ${\displaystyle D=(1000011,1)}$. Notice that such description is not unique, because ${\displaystyle D'=(11001,6)}$ describes the same burst error. In general, if the number of nonzero components in ${\displaystyle E}$ is ${\displaystyle w}$, then ${\displaystyle E}$ will have ${\displaystyle w}$ different burst descriptions each starting at a different nonzero entry of ${\displaystyle E}$. To remedy the issues that arise by the ambiguity of burst descriptions with the theorem below, however before doing so we need a definition first.

Definition. The number of symbols in a given error pattern ${\displaystyle y,}$ is denoted by ${\displaystyle \mathrm {length} (y).}$

Theorem (Uniqueness of burst descriptions). Suppose ${\displaystyle E}$ is an error vector of length ${\displaystyle n}$ with two burst descriptions ${\displaystyle (P_{1},L_{1})}$ and ${\displaystyle (P_{2},L_{2})}$. If ${\displaystyle \mathrm {length} (P_{1})+\mathrm {length} (P_{2})\leqslant n+1,}$ then the two descriptions are identical that is, their components are equivalent.[2]
Proof. Let ${\displaystyle w}$ be the hamming weight (or the number of nonzero entries) of ${\displaystyle E}$. Then ${\displaystyle E}$ has exactly ${\displaystyle w}$ error descriptions. For ${\displaystyle w=0,1,}$ there is nothing to prove. So we assume that ${\displaystyle w\geqslant 2}$ and that the descriptions are not identical. We notice that each nonzero entry of ${\displaystyle E}$ will appear in the pattern, and so, the components of ${\displaystyle E}$ not included in the pattern will form a cyclic run of zeros, beginning after the last nonzero entry, and continuing just before the first nonzero entry of the pattern. We call the set of indices corresponding to this run as the zero run. We immediately observe that each burst description has a zero run associated with it and that each zero run is disjoint. Since we have ${\displaystyle w}$ zero runs, and each is disjoint, we have a total of ${\displaystyle n-w}$ distinct elements in all the zero runs. On the other hand we have:
{\displaystyle {\begin{aligned}n-w={\text{number of zeros in }}E&=(n-\mathrm {length} (P_{1}))+(n-\mathrm {length} (P_{2}))\\&=2n-\left(\mathrm {length} (P_{1})+\mathrm {length} (P_{2})\right)\\&\geqslant 2n-(n+1)&&\mathrm {length} (P_{1})+\mathrm {length} (P_{2})\leqslant n+1\\&=n-1\end{aligned}}}
This contradicts ${\displaystyle w\geqslant 2.}$ Thus, the burst error descriptions are identical.

A corollary of the above theorem is that we cannot have two distinct burst descriptions for bursts of length ${\displaystyle {\tfrac {1}{2}}(n+1).}$

## Cyclic codes for burst error correction

Cyclic codes are defined as follows: think of the ${\displaystyle q}$ symbols as elements in ${\displaystyle \mathbb {F} _{q}}$. Now, we can think of words as polynomials over ${\displaystyle \mathbb {F} _{q},}$ where the individual symbols of a word correspond to the different coefficients of the polynomial. To define a cyclic code, we pick a fixed polynomial, called generator polynomial. The codewords of this cyclic code are all the polynomials that are divisible by this generator polynomial.

Codewords are polynomials of degree ${\displaystyle \leqslant n-1}$. Suppose that the generator polynomial ${\displaystyle g(x)}$ has degree ${\displaystyle r}$. Polynomials of degree ${\displaystyle \leqslant n-1}$ that are divisible by ${\displaystyle g(x)}$ result from multiplying ${\displaystyle g(x)}$ by polynomials of degree ${\displaystyle \leqslant n-1-r}$. We have ${\displaystyle q^{n-r}}$ such polynomials. Each one of them corresponds to a codeword. Therefore, ${\displaystyle k=n-r}$ for cyclic codes.

Cyclic codes can detect all bursts of length up to ${\displaystyle \ell =n-k=r}$. We will see later that the burst error detection ability of any ${\displaystyle (n,k)}$ code is bounded from above by ${\displaystyle \ell \leqslant n-k}$. Cyclic codes are considered optimal for burst error detection since they meet this upper bound:

Theorem (Cyclic burst correction capability). Every cyclic code with generator polynomial of degree ${\displaystyle r}$ can detect all bursts of length ${\displaystyle \leqslant r.}$
Proof. We need to prove that if you add a burst of length ${\displaystyle \leqslant r}$ to a codeword (i.e. to a polynomial that is divisible by ${\displaystyle g(x)}$), then the result is not going to be a codeword (i.e. the corresponding polynomial is not divisible by ${\displaystyle g(x)}$). It suffices to show that no burst of length ${\displaystyle \leqslant r}$ is divisible by ${\displaystyle g(x)}$. Such a burst has the form ${\displaystyle x^{i}b(x)}$, where ${\displaystyle \deg(b(x)) Therefore, ${\displaystyle b(x)}$ is not divisible by ${\displaystyle g(x)}$ (because the latter has degree ${\displaystyle r}$). ${\displaystyle g(x)}$ is not divisible by ${\displaystyle x}$ (Otherwise, all codewords would start with ${\displaystyle 0}$). Therefore, ${\displaystyle x^{i}}$ is not divisible by ${\displaystyle g(x)}$ as well.

The above proof suggests a simple algorithm for burst error detection/correction in cyclic codes: given a transmitted word (i.e. a polynomial of degree ${\displaystyle \leqslant n-1}$), compute the remainder of this word when divided by ${\displaystyle g(x)}$. If the remainder is zero (i.e. if the word is divisible by ${\displaystyle g(x)}$), then it is a valid codeword. Otherwise, report an error. To correct this error, subtract this remainder from the transmitted word. The subtraction result is going to be divisible by ${\displaystyle g(x)}$ (i.e. it is going to be a valid codeword).

By the upper bound on burst error detection (${\displaystyle \ell \leqslant n-k=r}$), we know that a cyclic code can not detect all bursts of length ${\displaystyle \ell >r}$. However cyclic codes can indeed detect most bursts of length ${\displaystyle >r}$. The reason is that detection fails only when the burst is divisible by ${\displaystyle g(x)}$. Over binary alphabets, there exist ${\displaystyle 2^{\ell -2}}$ bursts of length ${\displaystyle \ell }$. Out of those, only ${\displaystyle 2^{\ell -2-r}}$ are divisible by ${\displaystyle g(x)}$. Therefore, the detection failure probability is very small (${\displaystyle 2^{-r}}$) assuming a uniform distribution over all bursts of length ${\displaystyle \ell }$.

We now consider a fundamental theorem about cyclic codes that will aid in designing efficient burst-error correcting codes, by categorizing bursts into different cosets.

Theorem (Distinct Cosets). A linear code ${\displaystyle C}$ is an ${\displaystyle \ell }$-burst-error-correcting code if all the burst errors of length ${\displaystyle \leqslant \ell }$ lie in distinct cosets of ${\displaystyle C}$.
Proof. Let ${\displaystyle \mathbf {e} _{1},\mathbf {e} _{2}}$ be distinct burst errors of length ${\displaystyle \leqslant \ell }$ which lie in same coset of code ${\displaystyle C}$. Then ${\displaystyle \mathbf {c} =\mathbf {e} _{1}-\mathbf {e} _{2}}$ is a codeword. Hence, if we receive ${\displaystyle \mathbf {e} _{1},}$ we can decode it either to ${\displaystyle \mathbf {0} }$ or ${\displaystyle \mathbf {c} }$. In contrast, if all the burst errors ${\displaystyle \mathbf {e} _{1}}$ and ${\displaystyle \mathbf {e} _{2}}$ do not lie in same coset, then each burst error is determined by its syndrome. The error can then be corrected through its syndrome. Thus, a linear code ${\displaystyle C}$ is an ${\displaystyle \ell }$-burst-error-correcting code if and only if all the burst errors of length ${\displaystyle \leqslant \ell }$ lie in distinct cosets of ${\displaystyle C}$.
Theorem (Burst error codeword classification). Let ${\displaystyle C}$ be a linear ${\displaystyle \ell }$-burst-error-correcting code. Then no nonzero burst of length ${\displaystyle \leqslant 2\ell }$ can be a codeword.
Proof. Let ${\displaystyle c}$ be a codeword with a burst of length ${\displaystyle \leqslant 2\ell }$. Thus it has the pattern ${\displaystyle (0,1,u,v,1,0)}$, where ${\displaystyle u}$ and ${\displaystyle v}$ are words of length ${\displaystyle \leqslant \ell -1.}$ Hence, the words ${\displaystyle w=(0,1,u,0,0,0)}$ and ${\displaystyle c-w=(0,0,0,v,1,0)}$ are two bursts of length ${\displaystyle \leqslant \ell }$. For binary linear codes, they belong to the same coset. This contradicts the Distinct Cosets Theorem, therefore no nonzero burst of length ${\displaystyle \leqslant 2\ell }$ can be a codeword.

## Burst error correction bounds

### Upper bounds on burst error detection and correction

By upper bound, we mean a limit on our error detection ability that we can never go beyond. Suppose that we want to design an ${\displaystyle (n,k)}$ code that can detect all burst errors of length ${\displaystyle \leqslant \ell .}$ A natural question to ask is: given ${\displaystyle n}$ and ${\displaystyle k}$, what is the maximum ${\displaystyle \ell }$ that we can never achieve beyond? In other words, what is the upper bound on the length ${\displaystyle \ell }$ of bursts that we can detect using any ${\displaystyle (n,k)}$ code? The following theorem provides an answer to this question.

Theorem (Burst error detection ability). The burst error detection ability of any ${\displaystyle (n,k)}$ code is ${\displaystyle \ell \leqslant n-k.}$
Proof. First we observe that a code can detect all bursts of length ${\displaystyle \leqslant \ell }$ if and only if no two codewords differ by a burst of length ${\displaystyle \leqslant \ell }$. Suppose that we have two code words ${\displaystyle \mathbf {c} _{1}}$ and ${\displaystyle \mathbf {c} _{2}}$ that differ by a burst ${\displaystyle \mathbf {b} }$ of length ${\displaystyle \leqslant \ell }$. Upon receiving ${\displaystyle \mathbf {c} _{1}}$, we can not tell whether the transmitted word is indeed ${\displaystyle \mathbf {c} _{1}}$ with no transmission errors, or whether it is ${\displaystyle \mathbf {c} _{2}}$ with a burst error ${\displaystyle \mathbf {b} }$ that occurred during transmission. Now, suppose that every two codewords differ by more than a burst of length ${\displaystyle \ell .}$ Even if the transmitted codeword ${\displaystyle \mathbf {c} _{1}}$ is hit by a burst ${\displaystyle \mathbf {b} }$ of length ${\displaystyle \ell }$, it is not going to change into another valid codeword. Upon receiving it, we can tell that this is ${\displaystyle \mathbf {c} _{1}}$ with a burst ${\displaystyle \mathbf {b} .}$ By the above observation, we know that no two codewords can share the first ${\displaystyle n-\ell }$ symbols. The reason is that even if they differ in all the other ${\displaystyle \ell }$ symbols, they are still going to be different by a burst of length ${\displaystyle \ell .}$ Therefore, the number of codewords ${\displaystyle q^{k}}$ satisfies ${\displaystyle q^{k}\leqslant q^{n-\ell }.}$ Applying ${\displaystyle \log _{q}}$ to both sides and rearranging, we can see that ${\displaystyle \ell \leqslant n-k}$.

Now, we repeat the same question but for error correction: given ${\displaystyle n}$ and ${\displaystyle k}$, what is the upper bound on the length ${\displaystyle \ell }$ of bursts that we can correct using any ${\displaystyle (n,k)}$ code? The following theorem provides a preliminary answer to this question:

Theorem (Burst error correction ability). The burst error correction ability of any ${\displaystyle (n,k)}$ code satisfies ${\displaystyle \ell \leqslant n-k-\log _{q}(n-\ell )+2}$
Proof. First we observe that a code can correct all bursts of length ${\displaystyle \leqslant \ell }$ if and only if no two codewords differ by the sum of two bursts of length ${\displaystyle \leqslant \ell .}$ Suppose that two codewords ${\displaystyle \mathbf {c} _{1}}$ and ${\displaystyle \mathbf {c} _{2}}$ differ by bursts ${\displaystyle \mathbf {b} _{1}}$ and ${\displaystyle \mathbf {b} _{2}}$ of length ${\displaystyle \leqslant \ell }$ each. Upon receiving ${\displaystyle \mathbf {c} _{1}}$ hit by a burst ${\displaystyle \mathbf {b} _{1}}$, we could interpret that as if it was ${\displaystyle \mathbf {c} _{2}}$ hit by a burst ${\displaystyle -\mathbf {b} _{2}}$. We can not tell whether the transmitted word is ${\displaystyle \mathbf {c} _{1}}$ or ${\displaystyle \mathbf {c} _{2}}$. Now, suppose that every two codewords differ by more than two bursts of length ${\displaystyle \ell }$. Even if the transmitted codeword ${\displaystyle \mathbf {c} _{1}}$ is hit by a burst of length ${\displaystyle \ell }$, it is not going to look like another codeword that has been hit by another burst. For each codeword ${\displaystyle \mathbf {c} ,}$ let ${\displaystyle B(\mathbf {c} )}$ denote the set of all words that differ from ${\displaystyle \mathbf {c} }$ by a burst of length ${\displaystyle \leqslant \ell .}$ Notice that ${\displaystyle B(\mathbf {c} )}$ includes ${\displaystyle \mathbf {c} }$ itself. By the above observation, we know that for two different codewords ${\displaystyle \mathbf {c} _{i}}$ and ${\displaystyle \mathbf {c} _{j},B(\mathbf {c} _{i})}$ and ${\displaystyle B(\mathbf {c} _{j})}$ are disjoint. We have ${\displaystyle q^{k}}$ codewords. Therefore, we can say that ${\displaystyle q^{k}|B(\mathbf {c} )|\leqslant q^{n}}$. Moreover, we have ${\displaystyle (n-\ell )q^{\ell -2}\leqslant |B(\mathbf {c} )|}$. By plugging the latter inequality into the former, then taking the base ${\displaystyle q}$ logarithm and rearranging, we get the above theorem.

A stronger result is given by the Rieger bound:

Theorem (Rieger bound). If ${\displaystyle \ell }$ is the burst error correcting ability of an ${\displaystyle (n,k)}$ linear block code, then ${\displaystyle 2\ell \leqslant n-k}$.
Proof. Any linear code that can correct any burst pattern of length ${\displaystyle \leqslant \ell }$ cannot have a burst of length ${\displaystyle \leqslant 2\ell }$ as a codeword. If it had a burst of length ${\displaystyle \leqslant 2\ell }$ as a codeword, then a burst of length ${\displaystyle \ell }$ could change the codeword to a burst pattern of length ${\displaystyle \ell }$, which also could be obtained by making a burst error of length ${\displaystyle \ell }$ in all zero codeword. If vectors are non-zero in first ${\displaystyle 2\ell }$ symbols, then the vectors should be from different subsets of an array so that their difference is not a codeword of bursts of length ${\displaystyle 2\ell }$. Ensuring this condition, the number of such subsets is at least equal to number of vectors. Thus, the number of subsets would be at least ${\displaystyle q^{2\ell }}$. Hence, we have at least ${\displaystyle 2\ell }$ distinct symbols, otherwise, the difference of two such polynomials would be a codeword that is a sum of two bursts of length ${\displaystyle \leqslant \ell .}$ Thus, this proves the Rieger Bound.

Definition. A linear burst-error-correcting code achieving the above Rieger bound is called an optimal burst-error-correcting code.

### Further bounds on burst error correction

There is more than one upper bound on the achievable code rate of linear block codes for multiple phased-burst correction (MPBC). One such bound is constrained to a maximum correctable cyclic burst length within every subblock, or equivalently a constraint on the minimum error free length or gap within every phased-burst. This bound, when reduced to the special case of a bound for single burst correction, is the Abramson bound (a corollary of the Hamming bound for burst-error correction) when the cyclic burst length is less than half the block length.[3]

Theorem (number of bursts). For ${\displaystyle 1\leqslant \ell \leqslant {\tfrac {1}{2}}(n+1),}$ over a binary alphabet, there are ${\displaystyle n2^{\ell -1}+1}$ vectors of length ${\displaystyle n}$ which are bursts of length ${\displaystyle \leqslant \ell }$.[1]
Proof. Since the burst length is ${\displaystyle \leqslant {\tfrac {1}{2}}(n+1),}$ there is a unique burst description associated with the burst. The burst can begin at any of the ${\displaystyle n}$ positions of the pattern. Each pattern begins with ${\displaystyle 1}$ and contain a length of ${\displaystyle \ell }$. We can think of it as the set of all strings that begin with ${\displaystyle 1}$ and have length ${\displaystyle \ell }$. Thus, there are a total of ${\displaystyle 2^{\ell -1}}$ possible such patterns, and a total of ${\displaystyle n2^{\ell -1}}$ bursts of length ${\displaystyle \leqslant \ell .}$ If we include the all-zero burst, we have ${\displaystyle n2^{\ell -1}+1}$ vectors representing bursts of length ${\displaystyle \leqslant \ell .}$
Theorem (Bound on the number of codewords). If ${\displaystyle 1\leqslant \ell \leqslant {\tfrac {1}{2}}(n+1),}$ a binary ${\displaystyle \ell }$-burst error correcting code has at most ${\displaystyle 2^{n}/(n2^{\ell -1}+1)}$ codewords.
Proof. Since ${\displaystyle \ell \leqslant {\tfrac {1}{2}}(n+1)}$, we know that there are ${\displaystyle n2^{\ell -1}+1}$ bursts of length ${\displaystyle \leqslant \ell }$. Say the code has ${\displaystyle M}$ codewords, then there are ${\displaystyle Mn2^{\ell -1}}$ codewords that differ from a codeword by a burst of length ${\displaystyle \leqslant \ell }$. Each of the ${\displaystyle M}$ words must be distinct, otherwise the code would have distance ${\displaystyle <1}$. Therefore, ${\displaystyle M(2^{\ell -1}+1)\leqslant 2^{n}}$ implies ${\displaystyle M\leqslant 2^{n}/(n2^{\ell -1}+1).}$
Theorem (Abramson's bounds). If ${\displaystyle 1\leqslant \ell \leqslant {\tfrac {1}{2}}(n+1)}$ is a binary linear ${\displaystyle (n,k),\ell }$-burst error correcting code, its block-length must satisfy:
${\displaystyle n\leqslant 2^{n-k-\ell +1}-1.}$
Proof: For a linear ${\displaystyle (n,k)}$ code, there are ${\displaystyle 2^{k}}$ codewords. By our previous result, we know that
${\displaystyle 2^{k}\leqslant {\frac {2^{n}}{n2^{\ell -1}+1}}.}$
Isolating ${\displaystyle n}$, we get ${\displaystyle n\leqslant 2^{n-k-\ell +1}-2^{-\ell +1}}$. Since ${\displaystyle \ell \geqslant 1}$ and ${\displaystyle n}$ must be an integer, we have ${\displaystyle n\leqslant 2^{n-k-\ell +1}-1}$.

Remark. ${\displaystyle r=n-k}$ is called the redundancy of the code and in an alternative formulation for the Abramson's bounds is ${\displaystyle r\geqslant \lceil \log _{2}(n+1)\rceil +\ell -1.}$

## Fire codes[3][4][5]

While cyclic codes in general are powerful tools for detecting burst errors, we now consider a family of binary cyclic codes named Fire Codes, which possess good single burst error correction capabilities. By single burst, say of length ${\displaystyle \ell }$, we mean that all errors that a received codeword possess lie within a fixed span of ${\displaystyle \ell }$ digits.

Let ${\displaystyle p(x)}$ be an irreducible polynomial of degree ${\displaystyle m}$ over ${\displaystyle \mathbb {F} _{2}}$, and let ${\displaystyle p}$ be the period of ${\displaystyle p(x)}$. The period of ${\displaystyle p(x)}$, and indeed of any polynomial, is defined to be the least positive integer ${\displaystyle r}$ such that ${\displaystyle p(x)|x^{r}-1.}$ Let ${\displaystyle \ell }$ be a positive integer satisfying ${\displaystyle \ell \leqslant m}$ and ${\displaystyle 2\ell -1}$ not divisible by ${\displaystyle p}$, where ${\displaystyle p}$ is the period of ${\displaystyle p(x)}$. Define the Fire Code ${\displaystyle G}$ by the following generator polynomial:

${\displaystyle g(x)=\left(x^{2\ell -1}+1\right)p(x).}$

We will show that ${\displaystyle G}$ is an ${\displaystyle \ell }$-burst-error correcting code.

Lemma 1. ${\displaystyle \gcd \left(p(x),x^{2\ell -1}+1\right)=1.}$
Proof. Let ${\displaystyle d(x)}$ be the greatest common divisor of the two polynomials. Since ${\displaystyle p(x)}$ is irreducible, ${\displaystyle \deg(d(x))=0}$ or ${\displaystyle \deg(p(x))}$. Assume ${\displaystyle \deg(d(x))\neq 0,}$ then ${\displaystyle p(x)=cd(x)}$ for some constant ${\displaystyle c}$. But, ${\displaystyle (1/c)p(x)}$ is a divisor of ${\displaystyle x^{2\ell -1}+1}$ since ${\displaystyle d(x)}$ is a divisor of ${\displaystyle x^{2\ell -1}+1}$. But this contradicts our assumption that ${\displaystyle p(x)}$ does not divide ${\displaystyle x^{2\ell -1}+1.}$ Thus, ${\displaystyle \deg(d(x))=0,}$ proving the lemma.
Lemma 2. If ${\displaystyle p(x)}$is a polynomial of period ${\displaystyle p}$, then ${\displaystyle p(x)|x^{k}-1}$ if and only if ${\displaystyle p|k.}$
Proof. If ${\displaystyle p|k}$, then ${\displaystyle x^{k}-1=(x^{p}-1)(1+x^{p}+x^{2p}+\ldots +x^{k/p})}$. Thus, ${\displaystyle p(x)|x^{k}-1.}$
Now suppose ${\displaystyle p(x)|x^{k}-1}$. Then, ${\displaystyle k\geqslant p}$. We show that ${\displaystyle k}$ is divisible by ${\displaystyle p}$ by induction on ${\displaystyle k}$. The base case ${\displaystyle k=p}$ follows. Therefore, assume ${\displaystyle k>p}$. We know that ${\displaystyle p(x)}$ divides both (since it has period ${\displaystyle p}$)
${\displaystyle x^{p}-1=(x-1)\left(1+x+\ldots +x^{p-1}\right)\quad {\text{and}}\quad x^{k}-1=(x-1)\left(1+x+\ldots +x^{k-1}\right).}$
But ${\displaystyle p(x)}$ is irreducible, therefore it must divide both ${\displaystyle (1+x+\ldots +x^{p-1})}$ and ${\displaystyle (1+x+\ldots +x^{k-1})}$; thus, it also divides the difference of the last two polynomials, ${\displaystyle x^{p}(1+x+\ldots +x^{p-k-1})}$. Then, it follows that ${\displaystyle p(x)}$ divides ${\displaystyle (1+x+\cdots +x^{p-k-1})}$. Finally, it also divides: ${\displaystyle x^{k-p}-1=(x-1)(1+x+\ldots +x^{p-k-1})}$. By the induction hypothesis, ${\displaystyle p|k-p}$, then ${\displaystyle p|k}$.

A corollary to Lemma 2 is that since ${\displaystyle p(x)=x^{p}-1}$ has period ${\displaystyle p}$, then ${\displaystyle p(x)}$ divides ${\displaystyle x^{k}-1}$ if and only if ${\displaystyle p|k}$.

Theorem. The Fire Code is ${\displaystyle \ell }$-burst error correcting[4][5]

If we can show that all bursts of length ${\displaystyle \ell }$ or less occur in different cosets, we can use them as coset leaders that form correctable error patterns. The reason is simple: we know that each coset has a unique syndrome decoding associated with it, and if all bursts of different lengths occur in different cosets, then all have unique syndromes, facilitating error correction.

### Proof of Theorem

Let ${\displaystyle x^{i}a(x)}$ and ${\displaystyle x^{j}b(x)}$ be polynomials with degrees ${\displaystyle \ell _{1}-1}$ and ${\displaystyle \ell _{2}-1}$, representing bursts of length ${\displaystyle \ell _{1}}$ and ${\displaystyle \ell _{2}}$ respectively with ${\displaystyle \ell _{1},\ell _{2}\leqslant \ell .}$ The integers ${\displaystyle i,j}$ represent the starting positions of the bursts, and are less than the block length of the code. For contradiction sake, assume that ${\displaystyle x^{i}a(x)}$ and ${\displaystyle x^{j}b(x)}$ are in the same coset. Then, ${\displaystyle v(x)=x^{i}a(x)+x^{j}b(x)}$ is a valid codeword (since both terms are in the same coset). Without loss of generality, pick ${\displaystyle i\leqslant j}$. By the division theorem we can write: ${\displaystyle j-i=g(2\ell -1)+r,}$ for integers ${\displaystyle g}$ and ${\displaystyle r,0\leqslant r<2\ell -1}$. We rewrite the polynomial ${\displaystyle v(x)}$ as follows:

${\displaystyle v(x)=x^{i}a(x)+x^{i+g(2\ell -1)+r}=x^{i}a(x)+x^{i+g(2\ell -1)+r}+2x^{i+r}b(x)=x^{i}\left(a(x)+x^{b}b(x)\right)+x^{i+r}b(x)\left(x^{g(2\ell -1)}+1\right)}$

Notice that at the second manipulation, we introduced the term ${\displaystyle 2x^{i+r}b(x)}$. We are allowed to do so, since Fire Codes operate on ${\displaystyle \mathbb {F} _{2}}$. By our assumption, ${\displaystyle v(x)}$ is a valid codeword, and thus, must be a multiple of ${\displaystyle g(x)}$. As mentioned earlier, since the factors of ${\displaystyle g(x)}$ are relatively prime, ${\displaystyle v(x)}$ has to be divisible by ${\displaystyle x^{2\ell -1}+1}$. Looking closely at the last expression derived for ${\displaystyle v(x)}$ we notice that ${\displaystyle x^{g(2\ell -1)}+1}$ is divisible by ${\displaystyle x^{2\ell -1}+1}$ (by the corollary of Lemma 2). Therefore, ${\displaystyle a(x)+x^{b}b(x)}$ is either divisible by ${\displaystyle x^{2\ell -1}+1}$ or is ${\displaystyle 0}$. Applying the division theorem again, we see that there exists a polynomial ${\displaystyle d(x)}$ with degree ${\displaystyle \delta }$ such that:

${\displaystyle a(x)+x^{b}b(x)=d(x)(x^{2\ell -1}+1)}$

Then we may write:

{\displaystyle {\begin{aligned}\delta +2\ell -1&=\deg \left(d(x)\left(x^{2\ell -1}+1\right)\right)\\&=\deg \left(a(x)+x^{b}b(x)\right)\\&=\deg \left(x^{b}b(x)\right)&&\deg(a(x))=\ell _{1}-1<2\ell -1\\&=b+\ell _{2}-1\end{aligned}}}

Equating the degree of both sides, gives us ${\displaystyle b=2\ell -\ell _{2}+\delta .}$ Since ${\displaystyle \ell _{1},\ell _{2}\leqslant \ell }$ we can conclude ${\displaystyle b\geqslant \ell +\delta ,}$ which implies ${\displaystyle b>\ell -1}$ and ${\displaystyle b>\delta }$. Notice that in the expansion:

${\displaystyle a(x)+x^{b}b(x)=1+a_{1}x+a_{2}x^{2}+\ldots +x^{\ell _{1}-1}+x^{b}\left(1+b_{1}x+b_{2}x^{2}+\ldots +x^{\ell _{2}-1}\right).}$

the term ${\displaystyle x^{b}}$ appears, but since ${\displaystyle \delta , the resulting expression ${\displaystyle d(x)(x^{2\ell -1}+1)}$ does not contain ${\displaystyle x^{b}}$, therefore ${\displaystyle d(x)=0}$ and subsequently ${\displaystyle a(x)+x^{b}b(x)=0.}$ This requires that ${\displaystyle b=0}$, and ${\displaystyle a(x)=b(x)}$. We can further revise our division of ${\displaystyle j-i}$ by ${\displaystyle g(2\ell -1)}$ to reflect ${\displaystyle b=0,}$ that is ${\displaystyle j-i=g(2\ell -1)}$. Substituting back into ${\displaystyle v(x)}$ gives us,

${\displaystyle v(x)=x^{i}b(x)\left(x^{j-1}+1\right).}$

Since ${\displaystyle \deg(b(x))=\ell _{2}-1<\ell }$, we have ${\displaystyle \deg(b(x))<\deg(p(x))=m}$. But ${\displaystyle p(x)}$ is irreducible, therefore ${\displaystyle b(x)}$ and ${\displaystyle p(x)}$ must be relatively prime. Since ${\displaystyle v(x)}$ is a codeword, ${\displaystyle x^{j-1}+1}$ must be divisible by ${\displaystyle p(x)}$, as it cannot be divisible by ${\displaystyle x^{2\ell -1}+1}$. Therefore, ${\displaystyle j-i}$ must be a multiple of ${\displaystyle p}$. But it must also be a multiple of ${\displaystyle 2\ell -1}$, which implies it must be a multiple of ${\displaystyle n={\text{lcm}}(2\ell -1,p)}$ but that is precisely the block-length of the code. Therefore, ${\displaystyle j-i}$ cannot be a multiple of ${\displaystyle n}$ since they are both less than ${\displaystyle n}$. Thus, our assumption of ${\displaystyle v(x)}$ being a codeword is incorrect, and therefore ${\displaystyle x^{i}a(x)}$ and ${\displaystyle x^{j}b(x)}$ are in different cosets, with unique syndromes, and therefore correctable.

### Example: 5-burst error correcting fire code

With the theory presented in the above section, let us consider the construction of a ${\displaystyle 5}$-burst error correcting Fire Code. Remember that to construct a Fire Code, we need an irreducible polynomial ${\displaystyle p(x)}$, an integer ${\displaystyle \ell }$, representing the burst error correction capability of our code, and we need to satisfy the property that ${\displaystyle 2\ell -1}$ is not divisible by the period of ${\displaystyle p(x)}$. With these requirements in mind, consider the irreducible polynomial ${\displaystyle p(x)=1+x^{2}+x^{5}}$, and let ${\displaystyle \ell =5}$. Since ${\displaystyle p(x)}$ is a primitive polynomial, its period is ${\displaystyle 2^{5}-1=31}$. We confirm that ${\displaystyle 2\ell -1=9}$ is not divisible by ${\displaystyle 31}$. Thus,

${\displaystyle g(x)=(x^{9}+1)\left(1+x^{2}+x^{5}\right)=1+x^{2}+x^{5}+x^{9}+x^{11}+x^{14}}$

is a Fire Code generator. We can calculate the block-length of the code by evaluating the least common multiple of ${\displaystyle p}$ and ${\displaystyle 2\ell -1}$. In other words, ${\displaystyle n={\text{lcm}}(9,31)=279}$. Thus, the Fire Code above is a cyclic code capable of correcting any burst of length ${\displaystyle 5}$ or less.

## Binary Reed–Solomon codes

Certain families of codes, such as Reed–Solomon, operate on alphabet sizes larger than binary. This property awards such codes powerful burst error correction capabilities. Consider a code operating on ${\displaystyle \mathbb {F} _{2^{m}}}$. Each symbol of the alphabet can be represented by ${\displaystyle m}$ bits. If ${\displaystyle C}$ is an ${\displaystyle (n,k)}$ Reed–Solomon code over ${\displaystyle \mathbb {F} _{2^{m}}}$, we can think of ${\displaystyle C}$ as an ${\displaystyle [mn,mk]_{2}}$ code over ${\displaystyle \mathbb {F} _{2}}$.

The reason such codes are powerful for burst error correction is that each symbol is represented by ${\displaystyle m}$ bits, and in general, it is irrelevant how many of those ${\displaystyle m}$ bits are erroneous; whether a single bit, or all of the ${\displaystyle m}$ bits contain errors, from a decoding perspective it is still a single symbol error. In other words, since burst errors tend to occur in clusters, there is a strong possibility of several binary errors contributing to a single symbol error.

Notice that a burst of ${\displaystyle (m+1)}$ errors can affect at most ${\displaystyle 2}$ symbols, and a burst of ${\displaystyle 2m+1}$ can affect at most ${\displaystyle 3}$ symbols. Then, a burst of ${\displaystyle tm+1}$ can affect at most ${\displaystyle t+1}$ symbols; this implies that a ${\displaystyle t}$-symbols-error correcting code can correct a burst of length at most ${\displaystyle (t-1)m+1}$.

In general, a ${\displaystyle t}$-error correcting Reed–Solomon code over ${\displaystyle \mathbb {F} _{2^{m}}}$ can correct any combination of

${\displaystyle {\frac {t}{1+\lfloor (l+m-2)/m\rfloor }}}$

or fewer bursts of length ${\displaystyle l}$, on top of being able to correct ${\displaystyle t}$-random worst case errors.

### An example of a binary RS code

Let ${\displaystyle G}$ be a ${\displaystyle [255,223,33]}$ RS code over ${\displaystyle \mathbb {F} _{2^{8}}}$. This code was employed by NASA in their Cassini-Huygens spacecraft.[6] It is capable of correcting ${\displaystyle \lfloor 33/2\rfloor =16}$ symbol errors. We now construct a Binary RS Code ${\displaystyle G'}$ from ${\displaystyle G}$. Each symbol will be written using ${\displaystyle \lceil \log _{2}(255)\rceil =8}$ bits. Therefore, the Binary RS code will have ${\displaystyle [2040,1784,33]_{2}}$ as its parameters. It is capable of correcting any single burst of length ${\displaystyle l=121}$.

## Interleaved codes

Interleaving is used to convert convolutional codes from random error correctors to burst error correctors. The basic idea behind the use of interleaved codes is to jumble symbols at the receiver. This leads to randomization of bursts of received errors which are closely located and we can then apply the analysis for random channel. Thus, the main function performed by the interleaver at transmitter is to alter the input symbol sequence. At the receiver, the deinterleaver will alter the received sequence to get back the original unaltered sequence at the transmitter.

### Burst error correcting capacity of interleaver

Illustration of row- and column-major order
Theorem. If the burst error correcting ability of some code is ${\displaystyle \ell ,}$ then the burst error correcting ability of its ${\displaystyle \lambda }$-way interleave is ${\displaystyle \lambda \ell .}$
Proof: Suppose that we have an ${\displaystyle (n,k)}$ code that can correct all bursts of length ${\displaystyle \leqslant \ell .}$ Interleaving can provide us with a ${\displaystyle (\lambda n,\lambda k)}$ code that can correct all bursts of length ${\displaystyle \leqslant \lambda \ell ,}$ for any given ${\displaystyle \lambda }$. If we want to encode a message of an arbitrary length using interleaving, first we divide it into blocks of length ${\displaystyle \lambda k}$. We write the ${\displaystyle \lambda k}$ entries of each block into a ${\displaystyle \lambda \times k}$ matrix using row-major order. Then, we encode each row using the ${\displaystyle (n,k)}$ code. What we will get is a ${\displaystyle \lambda \times n}$ matrix. Now, this matrix is read out and transmitted in column-major order. The trick is that if there occurs a burst of length ${\displaystyle h}$ in the transmitted word, then each row will contain approximately ${\displaystyle {\tfrac {h}{\lambda }}}$ consecutive errors (More specifically, each row will contain a burst of length at least ${\displaystyle \lfloor {\tfrac {h}{\lambda }}\rfloor }$ and at most ${\displaystyle \lceil {\tfrac {h}{\lambda }}\rceil }$). If ${\displaystyle h\leqslant \lambda \ell ,}$ then ${\displaystyle {\tfrac {h}{\lambda }}\leqslant \ell }$ and the ${\displaystyle (n,k)}$ code can correct each row. Therefore, the interleaved ${\displaystyle (\lambda n,\lambda k)}$ code can correct the burst of length ${\displaystyle h}$. Conversely, if ${\displaystyle h>\lambda \ell ,}$ then at least one row will contain more than ${\displaystyle {\tfrac {h}{\lambda }}}$ consecutive errors, and the ${\displaystyle (n,k)}$ code might fail to correct them. Therefore, the error correcting ability of the interleaved ${\displaystyle (\lambda n,\lambda k)}$ code is exactly ${\displaystyle \lambda \ell .}$ The BEC efficiency of the interleaved code remains the same as the original ${\displaystyle (n,k)}$ code. This is true because:
${\displaystyle {\frac {2\lambda \ell }{\lambda n-\lambda k}}={\frac {2\ell }{n-k}}}$

### Block interleaver

The figure below shows a 4 by 3 interleaver.

An example of a block interleaver

The above interleaver is called as a block interleaver. Here, the input symbols are written sequentially in the rows and the output symbols are obtained by reading the columns sequentially. Thus, this is in the form of ${\displaystyle M\times N}$ array. Generally, ${\displaystyle N}$ is length of the codeword.

Capacity of block interleaver: For an ${\displaystyle M\times N}$ block interleaver and burst of length ${\displaystyle \ell ,}$ the upper limit on number of errors is ${\displaystyle {\tfrac {\ell }{M}}.}$ This is obvious from the fact that we are reading the output column wise and the number of rows is ${\displaystyle M}$. By the theorem above for error correction capacity up to ${\displaystyle t,}$ the maximum burst length allowed is ${\displaystyle Mt.}$ For burst length of ${\displaystyle Mt+1}$, the decoder may fail.

Efficiency of block interleaver (${\displaystyle \gamma }$): It is found by taking ratio of burst length where decoder may fail to the interleaver memory. Thus, we can formulate ${\displaystyle \gamma }$ as

${\displaystyle \gamma ={\frac {Mt+1}{MN}}\approx {\frac {t}{N}}.}$

Drawbacks of block interleaver : As it is clear from the figure, the columns are read sequentially, the receiver can interpret single row only after it receives complete message and not before that. Also, the receiver requires a considerable amount of memory in order to store the received symbols and has to store the complete message. Thus, these factors give rise to two drawbacks, one is the latency and other is the storage (fairly large amount of memory). These drawbacks can be avoided by using the convolutional interleaver described below.

### Convolutional interleaver

Cross interleaver is a kind of multiplexer-demultiplexer system. In this system, delay lines are used to progressively increase length. Delay line is basically an electronic circuit used to delay the signal by certain time duration. Let ${\displaystyle n}$ be the number of delay lines and ${\displaystyle d}$ be the number of symbols introduced by each delay line. Thus, the separation between consecutive inputs = ${\displaystyle nd}$ symbols Let the length of codeword ${\displaystyle \leqslant n.}$ Thus, each symbol in the input codeword will be on distinct delay line. Let a burst error of length ${\displaystyle \ell }$ occur. Since the separation between consecutive symbols is ${\displaystyle nd,}$ the number of errors that the deinterleaved output may contain is ${\displaystyle {\tfrac {\ell }{nd+1}}.}$ By the theorem above, for error correction capacity up to ${\displaystyle t}$, maximum burst length allowed is ${\displaystyle (nd+1)(t-1).}$ For burst length of ${\displaystyle (nd+1)(t-1)+1,}$ decoder may fail.

An example of a convolutional interleaver
An example of a deinterleaver

Efficiency of cross interleaver (${\displaystyle \gamma }$): It is found by taking the ratio of burst length where decoder may fail to the interleaver memory. In this case, the memory of interleaver can be calculated as

${\displaystyle (0+1+2+3+\cdots +(n-1))d={\frac {n(n-1)}{2}}d.}$

Thus, we can formulate ${\displaystyle \gamma }$ as follows:

${\displaystyle \gamma ={\frac {(nd+1)(t-1)+1}{{\frac {n(n-1)}{2}}d}}.}$

Performance of cross interleaver : As shown in the above interleaver figure, the output is nothing but the diagonal symbols generated at the end of each delay line. In this case, when the input multiplexer switch completes around half switching, we can read first row at the receiver. Thus, we need to store maximum of around half message at receiver in order to read first row. This drastically brings down the storage requirement by half. Since just half message is now required to read first row, the latency is also reduced by half which is good improvement over the block interleaver. Thus, the total interleaver memory is split between transmitter and receiver.

## Applications

### Compact disc

Without error correcting codes, digital audio would not be technically feasible.[7] The Reed–Solomon codes can correct a corrupted symbol with a single bit error just as easily as it can correct a symbol with all bits wrong. This makes the RS codes particularly suitable for correcting burst errors.[5] By far, the most common application of RS codes is in compact discs. In addition to basic error correction provided by RS codes, protection against burst errors due to scratches on the disc is provided by a cross interleaver.[3]

Current compact disc digital audio system was developed by N. V. Philips of The Netherlands and Sony Corporation of Japan (agreement signed in 1979).

A compact disc comprises a 120 mm aluminized disc coated with a clear plastic coating, with spiral track, approximately 5 km in length, which is optically scanned by a laser of wavelength ~0.8 μm, at a constant speed of ~1.25 m/s. For achieving this constant speed, rotation of the disc is varied from ~8 rev/s while scanning at the inner portion of the track to ~3.5 rev/s at the outer portion. Pits and lands are the depressions (0.12 μm deep) and flat segments constituting the binary data along the track (0.6 μm width).[8]

The CD process can be abstracted as a sequence of the following sub-processes: -> Channel encoding of source of signals -> Mechanical sub-processes of preparing a master disc, producing user discs and sensing the signals embedded on user discs while playing – the channel -> Decoding the signals sensed from user discs

The process is subject to both burst errors and random errors.[7] Burst errors include those due to disc material (defects of aluminum reflecting film, poor reflective index of transparent disc material), disc production (faults during disc forming and disc cutting etc.), disc handling (scratches – generally thin, radial and orthogonal to direction of recording) and variations in play-back mechanism. Random errors include those due to jitter of reconstructed signal wave and interference in signal. CIRC (Cross-Interleaved Reed–Solomon code) is the basis for error detection and correction in the CD process. It corrects error bursts up to 3,500 bits in sequence (2.4 mm in length as seen on CD surface) and compensates for error bursts up to 12,000 bits (8.5 mm) that may be caused by minor scratches.

Encoding: Sound-waves are sampled and converted to digital form by an A/D converter. The sound wave is sampled for amplitude (at 44.1 kHz or 44,100 pairs, one each for the left and right channels of the stereo sound). The amplitude at an instance is assigned a binary string of length 16. Thus, each sample produces two binary vectors from ${\displaystyle \mathbb {F} _{2}^{16}}$ or 4 ${\displaystyle \mathbb {F} _{2}^{8}}$ bytes of data. Every second of sound recorded results in 44,100 × 32 = 1,411,200 bits (176,400 bytes) of data.[5] The 1.41 Mbit/s sampled data stream passes through the error correction system eventually getting converted to a stream of 1.88 Mbit/s.

Input for the encoder consists of input frames each of 24 8-bit symbols (12 16-bit samples from the A/D converter, 6 each from left and right data (sound) sources). A frame can be represented by ${\displaystyle L_{1}R_{1}L_{2}R_{2}\ldots L_{6}R_{6}}$ where ${\displaystyle L_{i}}$ and ${\displaystyle R_{i}}$ are bytes from the left and right channels from the ${\displaystyle i^{th}}$ sample of the frame.

Initially, the bytes are permuted to form new frames represented by ${\displaystyle L_{1}L_{3}L_{5}R_{1}R_{3}R_{5}L_{2}L_{4}L_{6}R_{2}R_{4}R_{6}}$ where ${\displaystyle L_{i},R_{i}}$represent ${\displaystyle i^{th}}$ left and right samples from the frame after 2 intervening frames.

Next, these 24 message symbols are encoded using C2 (28,24,5) Reed–Solomon code which is a shortened RS code over ${\displaystyle \mathbb {F} _{256}}$. This is two-error-correcting, being of minimum distance 5. This adds 4 bytes of redundancy, ${\displaystyle P_{1}P_{2}}$ forming a new frame: ${\displaystyle L_{1}L_{3}L_{5}R_{1}R_{3}R_{5}P_{1}P_{2}L_{2}L_{4}L_{6}R_{2}R_{4}R_{6}}$. The resulting 28-symbol codeword is passed through a (28.4) cross interleaver leading to 28 interleaved symbols. These are then passed through C1 (32,28,5) RS code, resulting in codewords of 32 coded output symbols. Further regrouping of odd numbered symbols of a codeword with even numbered symbols of the next codeword is done to break up any short bursts that may still be present after the above 4-frame delay interleaving. Thus, for every 24 input symbols there will be 32 output symbols giving ${\displaystyle R=24/32}$. Finally one byte of control and display information is added.[5] Each of the 33 bytes is then converted to 17 bits through EFM (eight to fourteen modulation) and addition of 3 merge bits. Therefore, the frame of six samples results in 33 bytes × 17 bits (561 bits) to which are added 24 synchronization bits and 3 merging bits yielding a total of 588 bits.

Decoding: The CD player (CIRC decoder) receives the 32 output symbol data stream. This stream passes through the decoder D1 first. It is up to individual designers of CD systems to decide on decoding methods and optimize their product performance. Being of minimum distance 5 The D1,D2 decoders can each correct a combination of ${\displaystyle e}$ errors and ${\displaystyle f}$ erasures such that ${\displaystyle 2e+f<5}$.[5] In most decoding solutions, D1 is designed to correct single error. And in case of more than 1 error, this decoder outputs 28 erasures. The deinterlever at the succeeding stage distributes these erasures across 28 D2 codewords. Again in most solutions, D2 is set to deal with erasures only (a simpler and less expensive solution). If more than 4 erasures were to be encountered, 24 erasures are output by D2. Thereafter, an error concealment system attempts to interpolate (from neighboring symbols) in case of uncorrectable symbols, failing which sounds corresponding to such erroneous symbols get muted.

Performance of CIRC:[7] CIRC conceals long bust errors by simple linear interpolation. 2.5 mm of track length (4000 bits) is the maximum completely correctable burst length. 7.7 mm track length (12,300 bits) is the maximum burst length that can be interpolated. Sample interpolation rate is one every 10 hours at Bit Error Rate (BER) ${\displaystyle =10^{-4}}$ and 1000 samples per minute at BER = ${\displaystyle 10^{-3}}$ Undetectable error samples (clicks): less than one every 750 hours at BER = ${\displaystyle 10^{-3}}$ and negligible at BER = ${\displaystyle 10^{-4}}$.