Skip to content

komm.ReedSolomonCode

Reed–Solomon code. For given parameters $\mu \geq 2$ and $\delta$ satisfying $2 \leq \delta \leq 2^{\mu} - 1$, a Reed–Solomon code is a cyclic code over $\mathrm{GF}(2^\mu)$ with generator polynomial given by $$ g(X) = (X + \alpha) (X + \alpha^2) \cdots (X + \alpha^{\delta - 1}), $$ where $\alpha$ is a primitive element of $\mathrm{GF}(2^\mu)$. The resulting code has the following parameters, in symbols:

  • Length: $n = 2^{\mu} - 1$
  • Dimension: $k = 2^{\mu} - \delta$
  • Redundancy: $m = \delta - 1$
  • Minimum distance: $d = \delta$

This class represents the binary image of the code, a linear block code in which each symbol is replaced by the $\mu$ coefficients of its polynomial representation, in increasing order of degree. The binary image has the following parameters, in bits:

  • Length: $\mu n$
  • Dimension: $\mu k$
  • Redundancy: $\mu m$
  • Minimum distance: $d \geq \delta$

Only narrow-sense and primitive Reed–Solomon codes are implemented. For more details, see LC04, Sec. 7.3.

Notes
  • For $\mu = 8$ and $\delta = 33$ it is a $(255, 223)$ Reed–Solomon code, which corrects $16$ symbol errors. Its binary image is a $(2040, 1784)$ code.

Parameters:

  • mu (int) –

    The parameter $\mu$ of the code. Must satisfy $\mu \geq 2$.

  • delta (int) –

    The minimum distance $\delta$ of the code, in symbols. Must satisfy $2 \leq \delta \leq 2^{\mu} - 1$.

This class represents the code in systematic form, with the information set on the right.

Examples:

>>> code = komm.ReedSolomonCode(mu=3, delta=5)
>>> (code.length, code.dimension, code.redundancy)
(21, 9, 12)
>>> code.minimum_distance()
6
>>> code = komm.ReedSolomonCode(mu=8, delta=33)
>>> (code.length, code.dimension, code.redundancy)
(2040, 1784, 256)