In coding theory, the dual code of a linear code
n | |
C\subsetF | |
q |
is the linear code defined by
C\perp=\{x\in
n | |
F | |
q |
\mid\langlex,c\rangle=0 \forallc\inC\}
where
\langlex,c\rangle=
n | |
\sum | |
i=1 |
xici
\langle ⋅ \rangle
\dimC+\dimC\perp=n.
A generator matrix for the dual code is the parity-check matrix for the original code and vice versa. The dual of the dual code is always the original code.
A self-dual code is one which is its own dual. This implies that n is even and dim C = n/2. If a self-dual code is such that each codeword's weight is a multiple of some constant
c>1
Codes of types I, II, III, or IV exist only if the length n is a multiple of 2, 8, 4, or 2 respectively.
If a self-dual code has a generator matrix of the form
G=[Ik|A]
C\perp
T|I | |
[-\bar{A} | |
k] |
Ik
(n/2) x (n/2)
q\inF | |
\bar{a}=a | |
q |
. Vera Pless . Introduction to the theory of error-correcting codes. Introduction to the Theory of Error-Correcting Codes . John Wiley & Sons. Wiley-Interscience Series in Discrete Mathematics . 1982. 0-471-08684-3 . 8 .
. John Horton Conway . Sloane, N.J.A. . Neil Sloane . Sphere packings, lattices and groups . Grundlehren der mathematischen Wissenschaften . 290 . . 1988 . 0-387-96617-X . 77 .