# \(q\)-ary quadratic-residue (QR) code

## Description

Member of a quadruple of cyclic \(q\)-ary codes of prime length \(n\) where \(q\) is prime and a quadratic residue modulo \(n\). The codes are constructed using quadratic residues and nonresidues of \(n\).

The roots of the generator polynomial \(r(x)\) of the first code (see Cyclic-to-polynomial correspondence) are all of the inequivalent quadratic residues of \(n\), and the second code's generator polynomial is \((x-1)r(x)\). The roots of the generator polynomial \(a(x)\) of the third code are all inequivalent nonresidues of \(n\), and the fourth code's generator polynomial is \((x-1)a(x)\). The codes corresponding to polynomials \(r,a\) are often called augmented quadratic-residue codes, while the remaining codes are called expurgated.

## Notes

## Parent

- \(q\)-ary duadic code — QR codes are duadic codes of prime length satisfying certain relations [3].

## Children

- Binary quadratic-residue (QR) code
- Hexacode — The hexacode is the smallest example of an extended quadratic residue code of Type \(4^H\) ([4], Sec. 2.4.6).
- Ternary Golay Code — The ternary Golay code is a quadratic residue code over \(GF(3)\) with residue set \(Q = \{1, 3, 4, 5, 9\} \) and generator polynomial \(x^5 + x^4 - x^3 + x^2 - 1\) ([1], Ch. 16).

## References

- [1]
- F. J. MacWilliams and N. J. A. Sloane. The theory of error correcting codes. Elsevier, 1977.
- [2]
- W. C. Huffman and V. Pless, Fundamentals of Error-Correcting Codes (Cambridge University Press, 2003) DOI
- [3]
- V. Pless, “Duadic Codes and Generalizations”, Eurocode ’92 3 (1993) DOI
- [4]
- Self-Dual Codes and Invariant Theory (Springer-Verlag, 2006) DOI

## Page edit log

- Victor V. Albert (2022-07-15) — most recent

## Cite as:

“\(q\)-ary quadratic-residue (QR) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/q-ary_quad_residue