next up previous
Next: About this document ... Up: lecture9 Previous: The Reed decoding algorithm

Algorithms for first-order RM codes

Some efficient algorithms have been developed for first-order $R(1,m)$ codes. Consider the $R(1,3)$ code generated by

\begin{displaymath}\begin{aligned}
\cbf &= (c_0,c_1,\ldots,c_7) = \mbf G = (m_0,...
...0&0&1&1&0&0&1&1 \\
0&1&0&1&0&1&0&1
\end{bmatrix}\end{aligned}\end{displaymath}

The columns of $G$ are simply the 4-tuples (1000) increasing to (1111) in binary counting order. We can generate these using a simple counter circuit.

Decoding: We can translate the binary received signal $\rbf$ to a $\pm 1$ sequence by the mapping


Define the correlation between two of the sequences as


Finding the the codeword $\cbf$ that minimizes the distance $d(\rbf,\cbf)$ is equivalent to finding the codeword that maximizes the correlation $\text{cor}(\Fc(\rbf),\Fc(\cbf))$. The operation of computing the correlation can be performed efficiently by means of the Hadamard transform.

Let $\Fhat = FH_{2^m}$ denote the Hadamard transform of $F$, where $H_{2^m}$ is the $\matsize{2^m}{2^m}$ Hadamard matrix. For decoding the $R(1,3)$ code we would use the Hadamard matrix

\begin{displaymath}H_8 = \begin{bmatrix}1&1&1&1&1&1&1&1 \\ 1&-&1&-&1&-&1&- \\ 1&...
...-&-&1&-&1 \\
1&1&-&-&-&-&1&1\\
1&-&-&1&-&1&1&-
\end{bmatrix}\end{displaymath}

Observe that the first, second, and fourth columns (starting counting from the zeroth column) are $\Fc(\vbf_1), \Fc(\vbf_2)$ and $\Fc(\vbf_3)$, respectively. The $i$th column of $H_8$, where $i =
(i_3i_2i_1)$ in binary is the vector


For example, the fifth column (5 = (101)) consists of the vector


The Hadamard transform of $F = \Fc(\rbf)$ thus computes the correlation of $\Fc(\rbf)$ with the mappings of all the codewords. We simply find the coordinate in the transform with the largest value and determine the codeword from it.

There is one last trick. The $R(1,m)$ code has $2^{m+1}$ codewords in it, and we only get $2^m$ values out of the Hadamard transform just described. However, we note that if we complement each bit, by


then the correlation is the negative of $\Fc(\cbf)$. Thus we can look at the sign and on that basis get the other half of the codewords.
  1. Given $\rbf,$ compute $F = \Fc(\rbf)$.
  2. Compute the Hadamard transform $\Fhat = FH_{2^m}$.
  3. Determine the coordinate $ \abf = (a_m\ldots a_2a_1)$ where $\Fhat$ has the greatest magnitude (starting count from zero). Let $\Fhat_a$ denote the correlation value at that coordinate.
  4. If $\Fhat_a$ is negative, then $\cbf = \onebf + a_1 \vbf_1 +
\cdots + a_m \vbf_m$. if $\Fhat_a$ is positive, then $\cbf = a_1
\vbf_1 + \cdots a_m \vbf_m.$

\begin{example}
We receive $\rbf = (10000011)$:
\begin{enumerate}
\item $F = ...
...+ 1\vbf_2 + 0\vbf_1 = (11000011).
\end{displaymath} \end{enumerate}\end{example}
Fast algorithms exist for the Hadamard transform, making the decoding operation fairly efficient.


next up previous
Next: About this document ... Up: lecture9 Previous: The Reed decoding algorithm
Todd Moon
2001-03-28