Singleton bound
In coding theory, the Singleton bound provides an upper limit on the size of a block code with specified length and minimum distance, stating that for a q-ary code C of length n and minimum distance d, the number of codewords |C| satisfies |C| \leq q^{n-d+1}.[1] Named after American mathematician Richard C. Singleton, who introduced it in 1964, the bound applies to both linear and nonlinear codes and represents one of the earliest and simplest fundamental limits on code performance.[1] For linear codes over a finite field \mathbb{F}_q with dimension k, the bound equivalently implies that the minimum distance d satisfies d \leq n - k + 1.[2] The proof of the Singleton bound relies on the pigeonhole principle: consider the projection of the code onto any n - d + 1 coordinates; if |C| > q^{n-d+1}, then at least two distinct codewords must agree on those coordinates, implying their Hamming distance is at most d-1, which contradicts the minimum distance assumption.[2] Codes achieving equality in the Singleton bound are known as maximum distance separable (MDS) codes, a class that includes trivial examples like repetition codes and the full space, as well as nontrivial constructions such as Reed-Solomon codes when the alphabet size q is sufficiently large relative to n.[2] While the bound is relatively loose for small alphabets like binary codes (where stronger bounds like the Hamming or Plotkin bounds apply), it is asymptotically tight for large q and plays a key role in understanding the trade-offs between rate, distance, and error-correcting capability in applications such as data storage, communications, and cryptography.[3]Fundamentals
Statement of the Bound
In coding theory, a block code over an alphabet of size q is a subset C \subseteq \Sigma^n, where \Sigma is the alphabet with |\Sigma| = q and n is the code length, consisting of M = |C| codewords, each a sequence of n symbols from \Sigma. The dimension k of the code is defined such that M = q^k, representing the number of information symbols encoded. The minimum (Hamming) distance d is the smallest number of positions in which any two distinct codewords differ.[2] The Singleton bound states that for any such q-ary block code of length n and minimum distance d, the size satisfies M \leq q^{n - d + 1}. Equivalently, in terms of dimension, d \leq n - k + 1. This bound holds for arbitrary codes, independent of the alphabet size q beyond the basic setup.[2] This inequality implies that a code with minimum distance d can detect up to d-1 errors and correct up to t = \lfloor (d-1)/2 \rfloor errors in a received word, as the separation between codewords limits the ambiguity in decoding. Codes achieving equality in the bound, where d = n - k + 1, are called maximum distance separable (MDS) codes and represent optimal performance in terms of error correction capability for given parameters.[2][3] In the asymptotic regime, as block length n \to \infty, the rate R = k/n and relative distance \delta = d/n satisfy R \leq 1 - \delta. This provides a fundamental tradeoff between information rate and error resilience for large-scale codes.[2][3]Proof of the Bound
The Singleton bound establishes an upper limit on the minimum distance d of a block code over an alphabet of size q with length n and q^k codewords, showing that d \leq n - k + 1. To derive this, consider the projection of the code onto any n - d + 1 coordinate positions, which effectively punctures (deletes) the remaining d - 1 positions to form a shortened code of length n - d + 1.[2] Suppose two distinct codewords agree on these n - d + 1 positions; then they can differ only in the punctured d - 1 positions, yielding a Hamming distance of at most d - 1. This contradicts the minimum distance d of the code, so the projections must all be distinct. Since there are at most q^{n - d + 1} possible distinct tuples over the alphabet of size q, the code can have at most q^{n - d + 1} codewords.[2] Thus, q^k \leq q^{n - d + 1}, implying k \leq n - d + 1 or equivalently d \leq n - k + 1. This argument relies on an injective mapping from codewords to their projections on the n - d + 1 positions, ensuring no collisions and bounding the code size directly.[2] It holds for arbitrary (nonlinear) block codes without assuming any linear structure, as the pigeonhole principle applies generally to the finite alphabet. To see the bound's tightness in the equality case, assume d = n - k + 1; then the projection onto any k positions must be injective, allowing exactly q^k codewords if the code achieves the bound.[2]Linear Codes
Application to Linear Codes
A linear [n, k, d]_q code C is defined as a k-dimensional subspace of the vector space \mathbb{F}_q^n, where \mathbb{F}_q is the finite field with q elements, n is the code length, k is the dimension, and d is the minimum Hamming weight (or distance) of its nonzero codewords. The codewords are all linear combinations of k linearly independent basis vectors, and the total number of codewords is q^k. The Singleton bound specializes naturally to linear codes, stating that d \leq n - k + 1. This follows immediately from the general bound applied to block codes, as the code size M = q^k implies \log_q M = k, so the inequality M \leq q^{n - d + 1} yields the same relation. A direct proof exploiting the linear structure uses the parity-check matrix H, an (n-k) \times n matrix of rank n-k such that C = \{ \mathbf{c} \in \mathbb{F}_q^n \mid H \mathbf{c}^T = \mathbf{0} \}. Since the column space of H has dimension n-k, any collection of n-k+1 columns of H must be linearly dependent. Thus, there exists a nonzero vector \boldsymbol{\lambda} \in \mathbb{F}_q^{n-k+1} such that the linear combination of those columns with coefficients from \boldsymbol{\lambda} is the zero vector, implying H \boldsymbol{\lambda}^T = \mathbf{0}. The vector \boldsymbol{\lambda}^T \in \mathbb{F}_q^n (with zeros elsewhere) is then a nonzero codeword of weight at most n-k+1, so d \leq n - k + 1. This bound is crude in the sense that the actual minimum distance d is the size of the smallest linearly dependent set of columns of H, which may be strictly less than n-k+1 if lower-weight dependencies exist. An alternative proof leverages the generator matrix G, a k \times n matrix whose rows form a basis for C. Without loss of generality, assume G is in systematic form [I_k \mid P], where I_k is the k \times k identity matrix and P is k \times (n-k). Codewords are then of the form \mathbf{c} = ( \mathbf{u}, \mathbf{u} P ) for \mathbf{u} \in \mathbb{F}_q^k. To establish the bound, consider puncturing C by deleting any d-1 coordinates; the resulting map is a linear injection from the k-dimensional space C to \mathbb{F}_q^{n-d+1}, because if the first n-d+1 symbols of a codeword are zero, its weight is at most d-1 < d, implying it is the zero codeword. The image is thus a k-dimensional subspace of \mathbb{F}_q^{n-d+1}, requiring k \leq n - d + 1, or equivalently d \leq n - k + 1. The rank properties of G further highlight the bound: the minimum distance condition ensures that every d-1 columns of G are linearly independent, and the overall rank k limits the possible independence in larger sets, aligning with the Singleton limit via dimension arguments. Examples of linear codes achieving the Singleton bound include trivial cases. The full space \mathbb{F}_q^n forms an [n, n, 1]_q code with d = 1 = n - n + 1. The repetition code, generated by the all-ones vector repeated n times, is a [n, 1, n]_q code with d = n = n - 1 + 1, where every nonzero codeword has full weight n. These illustrate how the bound is tight for extreme dimension values, though nontrivial achieving codes (MDS codes) exist beyond these.Relation to Other Bounds
The Singleton bound offers a general upper limit on the size of a code C with length n, minimum distance d, and alphabet size q, stating |C| \leq q^{n-d+1}, which applies universally regardless of q or n. In comparison, the Hamming bound, derived from sphere-packing considerations around each codeword to ensure non-overlapping balls of radius t = \lfloor (d-1)/2 \rfloor, provides a tighter constraint for many practical cases, particularly when the code can correct up to t errors, but it depends on the specific error-correcting capability and alphabet geometry.[3] For binary codes at moderate relative distances \delta = d/n, the Hamming bound often yields a lower upper bound on the rate than the Singleton bound, though the latter remains valid without such assumptions.[4] The Plotkin bound further refines upper limits for codes with high rates or \delta > 1/2, especially over small alphabets like binary, where it exploits pairwise distance properties to cap the code size more stringently than the Singleton bound. Since the Singleton bound's asymptotic form does not incorporate q, it becomes relatively loose for large q, allowing potentially larger codes, whereas the Plotkin bound leverages alphabet-specific inequalities to perform better in high-rate regimes over fixed small q.[2] For instance, in binary settings, the Plotkin bound can exclude rates above $1 - 2\delta for \delta > 1/2, improving on Singleton's $1 - \delta.[3] Complementing these upper bounds, the Gilbert-Varshamov bound serves as a lower bound on achievable code sizes, guaranteeing the existence of codes with rate at least $1 - h_q(\delta), where h_q is the q-ary entropy function, thus contrasting the Singleton bound's restriction on maximum distance for a given rate.[5] This highlights the gap between upper and lower limits, with Gilbert-Varshamov showing that rates approaching its curve are attainable, often surpassing what fixed-alphabet constraints under Singleton might suggest. The Singleton bound achieves tightness for codes with small dimension k (low rate) or large d (high \delta), where few codewords are possible, but for binary linear codes, the Hamming and Plotkin bounds frequently offer stricter estimates, as seen in applications like error-correcting codes over GF(2).[4] Asymptotically, the Singleton bound yields R + \delta \leq 1, a q-independent linear tradeoff that bounds the fundamental tradeoff between rate and relative distance across all code families.[3]MDS Codes
Definition and Properties
Maximum distance separable (MDS) codes are a class of error-correcting codes that achieve equality in the Singleton bound, attaining the maximum possible minimum distance for given code length n, dimension k, and alphabet size q. Specifically, an [n, k, d]_q code is MDS if its minimum distance satisfies d = n - k + 1. This optimality makes MDS codes particularly valuable in applications requiring efficient error correction and rate-distortion trade-offs. A key algebraic property of linear MDS codes is that the dual code is also MDS. For an [n, k]_q linear MDS code with generator matrix G, any k columns of G are linearly independent over the finite field \mathbb{F}_q. Equivalently, in the parity-check matrix H (of size (n-k) \times n), any n-k columns are linearly independent. These properties ensure the code's separability, allowing systematic encoding in any choice of k positions. The error-correcting capability of an MDS code follows directly from its minimum distance: it can correct up to t = \lfloor (d-1)/2 \rfloor = \lfloor (n-k)/2 \rfloor errors, which is optimal for the given rate k/n. The Singleton defect, defined as s = n - k + 1 - d, measures how far a code is from MDS optimality; for MDS codes, s = 0, while s > 0 indicates suboptimality.[6] Trivial MDS codes always exist and include the repetition code [n, 1, n]_q (which repeats a single symbol n times), the even-weight (or parity-check) code [n, n-1, 2]_q, and the full space [n, n, 1]_q (all possible vectors). Nontrivial MDS codes exist only for specific parameter sets, such as when n \leq q + 1 over \mathbb{F}_q, though their existence beyond trivial cases is limited by the MDS conjecture.Constructions and Examples
One of the simplest constructions of maximum distance separable (MDS) codes are the trivial examples, which achieve the Singleton bound for extreme dimension parameters. These include the repetition code [n, 1, n]_q, where all symbols are identical and the minimum distance equals the length; the single parity-check code [n, n-1, 2]_q, which adds one overall parity symbol to detect single errors; and the full space code [n, n, 1]_q, consisting of all possible vectors with minimum distance 1. These codes exist over any finite field \mathbb{F}_q for arbitrary length n and are MDS by definition, though they offer limited practical utility due to their degenerate error-correcting capabilities.[7] A foundational non-trivial construction is the Reed-Solomon code, introduced by Reed and Solomon in 1960. These are linear MDS codes over \mathbb{F}_q of length n \leq q, dimension k, and minimum distance d = n - k + 1, obtained by evaluating all polynomials of degree at most k-1 in \mathbb{F}_q at n distinct points in \mathbb{F}_q. The generator matrix has rows corresponding to powers of these evaluation points, ensuring the Vandermonde structure guarantees the exact MDS distance. Reed-Solomon codes are widely used in applications like digital communications and data storage due to their optimal trade-off between rate and error correction. To extend the length beyond q, the extended Reed-Solomon code appends an additional coordinate corresponding to evaluation at the "point at infinity," yielding an MDS code of length n = q + 1, dimension k, and distance d = n - k + 1 over \mathbb{F}_q. This construction involves modifying the parity-check matrix to include a row of ones for the infinity point, preserving the MDS property while increasing the code length by one. Extended Reed-Solomon codes maintain efficient encoding and decoding algorithms similar to their non-extended counterparts.[8] Beyond algebraic constructions like Reed-Solomon codes, algebraic geometry codes derived from curves provide MDS examples for longer lengths relative to the field size. A notable instance is the Hermitian code, constructed from the Hermitian curve x^{q+1} + y^{q+1} + z^{q+1} = 0 over \mathbb{F}_{q^2}, where q is a prime power. These codes have length n = q^3 + 1, and for appropriate choices of the Riemann-Roch space divisor (e.g., multiples of the point at infinity), they achieve MDS parameters such as dimension k up to roughly q^2 and distance d = n - k + 1. Hermitian codes thus surpass the length limit of Reed-Solomon codes, enabling stronger error correction in scenarios requiring n > q + 1.[9] The existence of non-trivial MDS codes is constrained by the MDS conjecture for q-ary linear codes, which posits that the maximum length n for a code of dimension k (with $2 \leq k \leq q-1) is at most q + 1, except in specific cases: when q is even and k = 3 or k = q - 1, where n \leq q + 2. This conjecture highlights the rarity of long MDS codes and guides construction efforts, with Reed-Solomon and extended variants saturating the bound for most parameters.[10] The following table summarizes known maximum lengths n for non-trivial MDS codes over small fields \mathbb{F}_q with $2 \leq k \leq q-1, based on exhaustive classifications; entries indicate the largest n achieving MDS for some k in that range.| q | Maximum n for MDS codes |
|---|---|
| 4 | 6 |
| 5 | 6 |
| 7 | 8 |
| 8 | 10 |
| 9 | 10 |
| 11 | 12 |
| 13 | 14 |
| 16 | 18 |
| 17 | 18 |
| 19 | 20 |
| 32 | 34 |