Error-correcting codes
An error-correcting code adds redundancy to a message so that the receiver can still recover it after some symbols are changed. This page covers the basic definitions, the Hamming and Reed–Solomon codes, and then how codes that can be decoded by reading only a few symbols lead to central results of computational complexity.
1 Codes and distance
Proof. For part 1, \(0 < {\Delta\mathopen{}\left(c, y\right)\mathclose{}} \le d - 1 < d\), so \(y \ne c\). If \(y\) were another codeword \(c'\), then \({\Delta\mathopen{}\left(c, c'\right)\mathclose{}} = {\Delta\mathopen{}\left(c, y\right)\mathclose{}} < d\), which the minimum distance rules out.
For part 2, a position where \(c\) and \(c'\) differ is a position where \(y\) differs from \(c\) or from \(c'\), so \({\Delta\mathopen{}\left(c, c'\right)\mathclose{}} \le {\Delta\mathopen{}\left(c, y\right)\mathclose{}} + {\Delta\mathopen{}\left(c', y\right)\mathclose{}}\). So for any codeword \(c' \ne c\),
\[ {\Delta\mathopen{}\left(c', y\right)\mathclose{}} \ge {\Delta\mathopen{}\left(c, c'\right)\mathclose{}} - {\Delta\mathopen{}\left(c, y\right)\mathclose{}} \ge d - t \ge t + 1 > {\Delta\mathopen{}\left(c, y\right)\mathclose{}}, \tag{2}\]
where \(d - t \ge t + 1\) because \(2t \le d - 1\).
2 Linear codes
3 Reed–Solomon codes
Proof. Delete the last \(d - 1\) symbols of every codeword. Two different codewords differ in at least \(d\) positions, so they still differ in one of the first \(n - d + 1\) positions. So the \(q^k\) codewords stay distinct as strings of length \(n - d + 1\), of which there are \(q^{n - d + 1}\). Hence \(q^k \le q^{n - d + 1}\), that is, \(k \le n - d + 1\).
Proof. The map \(m \mapsto E(m)\) is linear, because \(f_{m + m'} = f_m + f_{m'}\) and \(f_{b m} = b f_m\) for every scalar \(b \in \mathbb{F}_{q}\). If \(m \ne 0\), then \(f_m\) is a nonzero polynomial of degree at most \(k - 1\), so it has at most \(k - 1\) roots, and \(E(m)\) has at least \(n - k + 1 \ge 1\) nonzero entries. So \(E\) is one-to-one, the codewords form a \(k\)-dimensional subspace, and by Remark 2 the minimum distance is at least \(n - k + 1\). The Singleton bound says it is at most \(n - k + 1\).
4 From codes to complexity
Complexity theory uses codes that can be decoded by reading only a few symbols of the received word. The Computational Complexity for Data Science library covers the complexity classes these results are about.
Proof. Let \(x \ne 0\), and pick \(i\) with \(x_i = 1\). Let \(e_i\) have a 1 in position \(i\) only. Then \(x \cdot \mathopen{}\left(a + e_i\right)\mathclose{} = x \cdot a + 1\), so pairing each \(a\) with \(a + e_i\) pairs a 0 with a 1, and exactly half of the \(2^k\) entries of the codeword of \(x\) are 1. So every nonzero message has a codeword of weight \(2^{k-1} \ge 1\). Each entry \(x \cdot a\) is linear in \(x\), so the encoding map is linear, and only the zero message has the zero codeword, so the map is one-to-one and the code is linear. Then Remark 2 gives the minimum distance.
Proof. Both \(a\) and \(a + e_i\) are uniformly distributed on \(\mathbb{F}_{2}^k\), so each of \(w(a)\) and \(w(a + e_i)\) is wrong with probability at most \(\delta\), and the chance that either is wrong is at most \(2\delta\), so both are correct with probability at least \(1 - 2\delta\). When both are correct, the output is
\[x \cdot a + x \cdot \mathopen{}\left(a + e_i\right)\mathclose{} = x \cdot e_i = x_i, \tag{8}\]
because \(x \cdot a + x \cdot a = 0\) modulo 2.