Fact-checked by Grok 6 months ago

Linear code

In coding theory, a linear code is defined as a linear subspace of the vector space Fqn\mathbb{F}_q^n over a finite field Fq\mathbb{F}_q, where codewords are the vectors in this subspace that represent encoded messages for transmission over noisy channels.[1] These codes are particularly efficient because they allow encoding and decoding operations to be performed using linear algebra, such as matrix multiplication, enabling the detection and correction of errors introduced during transmission.[2] The foundations of coding theory, including linear codes, were established by Claude Shannon in his 1948 paper "A Mathematical Theory of Communication," which demonstrated that reliable communication is possible over noisy channels by introducing controlled redundancy, though practical constructions were initially lacking.[3] In 1950, Richard Hamming at Bell Laboratories developed the first explicit linear codes, known as Hamming codes, motivated by frustrations with error-prone computing equipment that required manual restarts; these binary codes of length 2[m](/page/M)12^[m](/page/M) - 1 and dimension 2[m](/page/M)1[m](/page/M)2^[m](/page/M) - 1 - [m](/page/M) can correct single errors and detect double errors.[3] Further early advancements include the 1949 discovery of the Golay codes by Marcel Golay, which expanded the class of perfect linear codes that achieve the theoretical limits of error correction as described by the sphere-packing bound.[3] Linear codes are typically denoted as [n,k,d][n, k, d]-codes, where nn is the code length (block size), kk is the dimension (number of information symbols), and dd is the minimum Hamming distance between any two distinct codewords, which determines the error-correcting capability t=(d1)/2t = \lfloor (d-1)/2 \rfloor.[1] They can be generated using a k×nk \times n generator matrix GG whose rows form a basis for the code, such that any codeword is uGuG for a message vector uFqku \in \mathbb{F}_q^k, or equivalently defined via an (nk)×n(n-k) \times n parity-check matrix HH where codewords satisfy HxT=0Hx^T = 0.[1] A fundamental property is that the minimum distance equals the minimum weight of nonzero codewords, simplifying distance computations.[1] Notable bounds include the Singleton bound dnk+1d \leq n - k + 1, with maximum distance separable (MDS) codes achieving equality, such as Reed-Solomon codes over Fq\mathbb{F}_q with qnq \geq n.[1] Applications of linear codes span digital communications, storage, and beyond; for instance, Hamming codes are used in computer memory like DRAM for single-error correction, while Reed-Solomon codes protect data in CDs, DVDs, satellite communications, and deep-space missions such as NASA's Voyager probes.[3] In modern contexts, they underpin error correction in wireless networks, barcode systems, and even genetic data analysis to model DNA replication errors.[3]

Fundamentals

Definition

A linear code over a finite field Fq\mathbb{F}_q of length nn is defined as a kk-dimensional subspace CFqnC \subseteq \mathbb{F}_q^n, where the codewords are the vectors belonging to CC.[4] The linearity of the code ensures that it is closed under vector addition and scalar multiplication: for any codewords c1,c2C\mathbf{c}_1, \mathbf{c}_2 \in C and any αFq\alpha \in \mathbb{F}_q, both c1+c2\mathbf{c}_1 + \mathbf{c}_2 and αc1\alpha \mathbf{c}_1 are also in CC.[4] This structure distinguishes linear codes from nonlinear codes, as the former constitute vector spaces over Fq\mathbb{F}_q, facilitating the application of algebraic tools like bases and linear transformations.[4] The foundations of error-correcting codes, including linear variants, trace back to Claude Shannon's 1948 seminal paper establishing information theory, which demonstrated the possibility of reliable communication over noisy channels; linear codes were subsequently formalized by researchers such as Richard Hamming in the early 1950s.[5][6] A fundamental property of a linear code CC is its minimum distance dd, which equals the smallest Hamming weight (number of nonzero coordinates) among all nonzero codewords in CC.[4]

Parameters

A linear code over a finite field Fq\mathbb{F}_q is characterized by several key parameters that quantify its structure, efficiency, and error-correcting capabilities. The length nn denotes the total number of symbols in each codeword, where each symbol is an element from Fq\mathbb{F}_q.[7] The dimension kk represents the number of independent information symbols, which corresponds to the dimension of the code as a vector subspace of Fqn\mathbb{F}_q^n, resulting in exactly qkq^k codewords in the code CC, so C=qk|C| = q^k.[1] The redundancy, given by nkn - k, indicates the number of parity symbols or checks introduced to enable error detection and correction, as determined by the rank of the parity-check matrix. The rate R=k/nR = k/n measures the information efficiency of the code, representing the fraction of symbols that carry information relative to the total length; higher rates imply less redundancy but potentially reduced error-correcting power.[1] A fundamental performance metric is the minimum distance dd, defined as the smallest Hamming distance between any two distinct codewords, which equals the minimum weight (number of nonzero symbols) among all nonzero codewords due to the linearity of the code.[8] This parameter governs the code's ability to detect up to d1d-1 errors and correct up to t=(d1)/2t = \lfloor (d-1)/2 \rfloor errors using standard decoding methods.[9] The weight distribution of a linear code provides further insight into its error-correcting properties, describing the number AwA_w of codewords of each possible weight ww from 0 to nn, with A0=1A_0 = 1, AdA_d the number of minimum-weight codewords, and w=0nAw=qk\sum_{w=0}^n A_w = q^k. These values influence advanced decoding performance and bounds but are typically computed for specific codes rather than in general.[8]

Constructions and Representations

Generator Matrix

In coding theory, a generator matrix for a linear code CFqnC \subseteq \mathbb{F}_q^n of length nn and dimension kk is a k×nk \times n matrix GG over the finite field Fq\mathbb{F}_q whose rows form a basis for the vector subspace CC.[1] The rows of GG are linearly independent and span CC, ensuring that every codeword in CC can be expressed as a unique linear combination of these rows.[8] The encoding process using the generator matrix transforms a message vector uFqku \in \mathbb{F}_q^k, treated as a 1×k1 \times k row vector, into a codeword c=uGFqnc = uG \in \mathbb{F}_q^n, which is also a row vector.[1] This operation represents a linear transformation from the kk-dimensional message space to the nn-dimensional code space, embedding the information bits into the codeword while adding redundancy for error correction.[8] All codewords are thus generated by taking all possible linear combinations of the rows of GG with coefficients from Fq\mathbb{F}_q. A generator matrix is said to be in systematic form if it can be arranged as G=[IkP]G = [I_k \mid P], where IkI_k is the k×kk \times k identity matrix and PP is a k×(nk)k \times (n-k) matrix.[1] In this form, the first kk columns correspond directly to the message bits in the codeword, with the remaining nkn-k columns providing the parity or check bits, facilitating straightforward encoding where the codeword's initial segment matches the message uu.[8] Any generator matrix for a linear code can be transformed into systematic form through elementary row operations over Fq\mathbb{F}_q, such as row addition or scaling, without altering the row space.[1] Key properties of the generator matrix include its full row rank, which equals kk and matches the dimension of the code, confirming that the rows are linearly independent.[8] Two k×nk \times n matrices generate the same linear code if and only if one can be obtained from the other by a sequence of elementary row operations, establishing their equivalence in representing the code subspace.[1] The generator matrix provides a constructive representation complementary to the parity-check matrix, which describes the dual code.[8]

Parity-Check Matrix

In coding theory, the parity-check matrix of a linear code CFqnC \subseteq \mathbb{F}_q^n of length nn and dimension kk is an (nk)×n(n-k) \times n matrix HH over the finite field Fq\mathbb{F}_q such that C={cFqnHcT=0}C = \{ c \in \mathbb{F}_q^n \mid H c^T = 0 \}.[8] The rows of HH form a basis for the dual code CC^\perp, which is the orthogonal complement of CC with respect to the standard inner product over Fq\mathbb{F}_q.[10] This matrix thus defines CC as the kernel (nullspace) of HH, and any full-rank (nk)×n(n-k) \times n matrix whose kernel is CC serves as a parity-check matrix.[8] The parity-check matrix relates to the generator matrix GG of CC, a k×nk \times n matrix whose rows span CC, via the orthogonality condition GHT=0G H^T = 0.[11] This ensures that every codeword, as a linear combination of the rows of GG, lies in the kernel of HH. Conversely, the rows of HH span the dual code, and HH can be viewed as a generator matrix for CC^\perp.[8] For error detection, given a received vector r=c+eFqnr = c + e \in \mathbb{F}_q^n where cCc \in C is the transmitted codeword and ee is the error vector, the syndrome is computed as s=HrTFqnks = H r^T \in \mathbb{F}_q^{n-k}.[10] The syndrome s=0s = 0 if and only if rr is a codeword (i.e., e=0e = 0); otherwise, ss depends only on ee and provides information about the error pattern.[8] A common representation is the systematic (or standard) form of HH, obtained via row and column permutations, where the rightmost nkn-k columns form the (nk)×(nk)(n-k) \times (n-k) identity matrix InkI_{n-k}, and the leftmost kk columns form an arbitrary $ (n-k) \times k $ matrix PP.[11] Thus, H=[PInk]H = [P \mid I_{n-k}], which facilitates explicit computation of parity checks corresponding to the systematic encoding.[8] A key property of the parity-check matrix is its role in determining the minimum distance dd of the code: dd is the smallest integer such that some dd columns of HH are linearly dependent, or equivalently, the minimum number of columns of HH that sum to the zero vector.[10] No fewer than dd columns are linearly dependent, ensuring that the code can detect up to d1d-1 errors.[8]

Decoding Algorithms

Syndrome Decoding

Syndrome decoding is a fundamental algebraic technique for error correction in linear codes over a finite field Fq\mathbb{F}_q, leveraging the parity-check matrix HH to detect and correct errors without exhaustive search over all possible codewords. The method computes a syndrome vector from the received word, which identifies the error pattern by mapping to precomputed error vectors of low weight. This approach exploits the linear structure of the code, making it efficient for codes with small redundancy.[12] The core of syndrome decoding lies in the syndrome s=HrTs = H r^T, where rr is the received vector and HH is the (nk)×n(n-k) \times n parity-check matrix of the [n,k][n, k] linear code CC. Since r=c+er = c + e for some codeword cCc \in C and error vector ee, the linearity implies s=HeTs = H e^T, which depends only on the error and not the transmitted codeword. If s=0s = 0, then rr is a codeword (no detectable error); otherwise, ss identifies the coset of CC in Fqn\mathbb{F}_q^n to which rr belongs. The decoding procedure involves looking up the coset leader e^\hat{e}, the minimum-weight error vector in that coset such that He^T=sH \hat{e}^T = s, and correcting via c^=re^\hat{c} = r - \hat{e}. This corrects all errors of weight at most the error-correcting capability t=(d1)/2t = \lfloor (d-1)/2 \rfloor, where dd is the minimum distance.[12] To enable fast lookup, a syndrome table is precomputed, mapping each possible syndrome (there are qnkq^{n-k} syndromes, corresponding to the qnkq^{n-k} cosets) to its coset leader, typically the lowest-weight vector in the coset. Coset leaders are chosen as the error patterns of weight up to tt that minimize the decoding error probability under typical channel models. For implementation, the table stores only entries for correctable errors, assuming higher-weight errors are either undetected or lead to decoding failure. The decoded codeword c^\hat{c} is then the information bits from the first kk positions of re^r - \hat{e}, assuming systematic form.[12] The computational complexity arises from building and querying the table: constructing coset leaders requires enumerating low-weight vectors, with time scaling as O(qnk)O(q^{n-k}) in the worst case due to the number of cosets, though feasible when the redundancy nkn-k is small (e.g., nk10n-k \leq 10 for q=2q=2). Lookup is then O(1)O(1) with hashing or direct indexing, making the overall decoding linear in nn after preprocessing. This efficiency contrasts with brute-force methods but is limited for large nkn-k.[4] A key limitation is that syndrome decoding provides complete coverage—correcting all error patterns up to weight tt for every received word—only for perfect codes, which saturate the Hamming bound: the spheres of radius tt around codewords exactly fill the space Fqn\mathbb{F}_q^n. Non-perfect codes leave gaps, where some low-weight errors map to syndromes without assigned leaders, potentially causing decoding failures or miscorrections. Examples of perfect codes include Hamming and Golay codes, but most linear codes are imperfect, requiring bounded-distance decoding that corrects only a subset of errors. As an alternative, nearest-neighbor decoding uses distance metrics directly, bypassing syndromes for non-algebraic approaches.[4]

Nearest Neighbor Decoding

Nearest neighbor decoding, also referred to as minimum-distance decoding, is a maximum-likelihood decoding method for linear codes over symmetric channels such as the binary symmetric channel (BSC). Given a received vector $ r \in \mathbb{F}_q^n $, the decoder selects the codeword $ c \in C $ that minimizes the Hamming distance $ d_H(r, c) $, where $ C $ is the code subspace of dimension $ k $. This approach interprets the codewords as points in the $ n $-dimensional Hamming space, with decision regions forming Voronoi cells centered at each codeword; the received vector falls into the cell of its closest codeword, ensuring optimal decoding under the assumption of equally likely messages and independent errors.[13][14][15] A bounded-distance variant restricts the search to codewords within a radius $ t = \lfloor (d-1)/2 \rfloor $, where $ d $ is the minimum distance of the code, decoding successfully only if a unique codeword exists in this sphere and declaring a decoding failure otherwise. This guarantees correction of up to $ t $ errors without exhaustive search beyond the bound, leveraging the sphere-packing property that such spheres around codewords are disjoint. Implementation typically involves exhaustive enumeration over the $ q^k $ codewords for small codes, though for larger ones, it may employ sphere-packing-based methods like ordered statistics or lattice decoding adaptations to prune the search space geometrically.[16][17] Under maximum-likelihood nearest neighbor decoding, the probability of decoding error for good linear code ensembles, such as low-density parity-check codes, approaches the Shannon capacity limit as block lengths $ n $ grow large, achieving rates arbitrarily close to capacity with vanishing error probability. This performance is analyzed via tight exponential bounds like the tangential sphere bound, which demonstrate gaps as small as 0.33 dB for moderate $ n $. Nearest neighbor decoding for block codes is analogous to the Viterbi algorithm for convolutional codes, both pursuing maximum likelihood but treating fixed-length vectors versus dynamic sequences. Syndrome decoding serves as a faster algebraic alternative for correcting small numbers of errors in structured linear codes.[15][18]

Examples

Hamming Codes

Hamming codes form a family of binary linear error-correcting codes capable of correcting single errors, introduced by Richard Hamming to address reliability issues in early computing machinery. The binary Hamming code of order m2m \geq 2 has length n=2m1n = 2^m - 1, dimension k=nm=2m1mk = n - m = 2^m - 1 - m, and minimum distance d=3d = 3, defined over the finite field F2\mathbb{F}_2. The code is constructed via its parity-check matrix HH, an m×nm \times n matrix whose columns consist of all distinct nonzero binary vectors of length mm, arranged in any order. This ensures that the columns are linearly independent in pairs, guaranteeing the minimum distance d=3d = 3. The generator matrix GG is a k×nk \times n systematic matrix whose rows form a basis for the kernel (null space) of HH, typically obtained by placing an identity matrix in the information positions corresponding to non-parity columns of HH. Hamming codes are perfect codes, achieving equality in the Hamming bound (sphere-packing bound) for single-error correction (t=1t = 1), where the spheres of radius 1 around codewords exactly fill the entire space F2n\mathbb{F}_2^n without overlap. For example, the [7,4,3]2[7,4,3]_2 Hamming code has 24=162^4 = 16 codewords, and the number of vectors at distance at most 1 from each is 1+7=81 + 7 = 8, totaling 16×8=128=2716 \times 8 = 128 = 2^7, saturating the bound. An extended binary Hamming code is obtained by appending an overall parity-check bit to the standard code, resulting in length n=2mn' = 2^m, dimension k=2m1mk' = 2^m - 1 - m, and minimum distance d=4d' = 4. This modification enables single-error correction and double-error detection. For m=3m=3, the extended [8,4,4]2[8,4,4]_2 code is a well-known instance. Hamming codes satisfy the Singleton bound but are not maximum distance separable (MDS) codes, as their relative distance d/n3/(2m)d/n \approx 3/(2^m) falls short of the MDS requirement d=nk+1=m+1d = n - k + 1 = m + 1. In applications, these codes were among the first implemented for error correction in 1950s digital computers, such as relay-based machines at Bell Laboratories, enabling reliable unattended operation despite noise-induced single-bit errors.

Hadamard Codes

Hadamard codes are binary linear codes of length n=2mn = 2^m, dimension k=m+1k = m + 1, and minimum distance d=2m1d = 2^{m-1}, obtained as the row space over F2\mathbb{F}_2 of a normalized Hadamard matrix of order nn.[19] These codes achieve the optimal relative minimum distance of 1/21/2 among binary codes of length 2m2^m and dimension m+1m+1.[8] The minimum weight of nonzero codewords is 2m12^{m-1}.[20] The construction relies on the Sylvester method for generating Hadamard matrices recursively. Starting with the 2×22 \times 2 matrix H1=(1111)H_1 = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, higher-order matrices are built as Hm=(Hm1Hm1Hm1Hm1)H_m = \begin{pmatrix} H_{m-1} & H_{m-1} \\ H_{m-1} & -H_{m-1} \end{pmatrix}. To form the linear code, the entries of HmH_m are mapped from {±1}\{\pm 1\} to {0,1}\{0,1\} by replacing +1+1 with 00 and 1-1 with 11, and a generator matrix is formed from any m+1m+1 linearly independent rows over F2\mathbb{F}_2, such as the rows corresponding to the constant function and the standard basis vectors in the Walsh-Hadamard transform basis.[21] This yields 2m+12^{m+1} codewords, spanning the space of affine linear functions on F2m\mathbb{F}_2^m.[22] Key properties include the code's equivalence to the first-order Reed-Muller code RM(1,m)\mathrm{RM}(1,m), which shares the same parameters and structure.[20] Puncturing the Hadamard code by deleting one coordinate position produces the simplex code of length 2m12^m - 1, dimension mm, and distance 2m12^{m-1}, whose dual is the Hamming code.[19] Additionally, the codewords exhibit ideal autocorrelation properties in their ±1\pm 1 representation—zero off-peak correlation—enabling their use in spread-spectrum systems for orthogonal signaling and interference rejection.[23] These traits support applications in multi-user communications where low cross-correlation between signals is essential.[24] Hadamard codes were developed in the 1950s as part of early efforts in coding theory for simplex signaling schemes, where orthogonal codewords facilitate efficient transmission over noisy channels.[20] The foundational work tied their construction to Reed-Muller codes, introduced by D. E. Muller and I. S. Reed for multiple-error correction in binary alphabets. This integration of combinatorial matrix constructions with linear algebra laid the groundwork for their role in both error control and signal processing.

Reed-Solomon Codes

Reed–Solomon codes are a prominent class of linear error-correcting codes defined over a finite field Fq\mathbb{F}_q, where qq is a prime power, with code length nqn \leq q, dimension kk, and minimum distance d=nk+1d = n - k + 1. Introduced by Irving S. Reed and Gustave Solomon in their seminal 1960 paper, these codes evaluate polynomials of degree less than kk at nn distinct points in Fq\mathbb{F}_q to form codewords, providing optimal error correction for symbol errors in non-binary alphabets.[25][26] The generator matrix GG for a Reed–Solomon code is constructed in Vandermonde form. Let α1,α2,,αn\alpha_1, \alpha_2, \dots, \alpha_n be nn distinct evaluation points in Fq\mathbb{F}_q. The rows of GG (a k×nk \times n matrix) are given by
gj=(α1j1,α2j1,,αnj1) \mathbf{g}_j = (\alpha_1^{j-1}, \alpha_2^{j-1}, \dots, \alpha_n^{j-1})
for j=1,2,,kj = 1, 2, \dots, k, ensuring the code's linearity. Systematic encoding can be achieved by column permutation so that the first kk columns form an identity matrix. Encoding a message m=(m0,m1,,mk1)Fqk\mathbf{m} = (m_0, m_1, \dots, m_{k-1}) \in \mathbb{F}_q^k involves forming the polynomial p(x)=m0+m1x++mk1xk1p(x) = m_0 + m_1 x + \dots + m_{k-1} x^{k-1} and computing the codeword c=(p(α1),p(α2),,p(αn))\mathbf{c} = (p(\alpha_1), p(\alpha_2), \dots, p(\alpha_n)). This evaluation-based construction guarantees that any kk positions of a codeword uniquely determine the polynomial and thus the entire codeword.[26][25] Reed–Solomon codes are maximum distance separable (MDS) codes, achieving equality in the Singleton bound dnk+1d \leq n - k + 1, which bounds the trade-off between rate and error correction capability. They can correct up to t=(nk)/2t = \lfloor (n - k)/2 \rfloor symbol errors or detect up to nkn - k errors, with efficient decoding algorithms like Berlekamp–Massey leveraging the polynomial structure. For binary approximations, subfield subcodes such as binary BCH codes can be derived, though Reed–Solomon codes excel in q-ary settings. To adapt to lengths shorter than qq, shortening reduces nn and kk by deleting symbols and adjusting the field, while puncturing deletes parity symbols to shorten nn without changing kk, preserving the MDS property in both cases.[26] These codes have found widespread applications due to their optimal performance and simplicity. In deep-space communication, NASA adopted Reed–Solomon codes starting in the 1960s for missions like Voyager (launched 1977), Galileo, and Cassini, enabling reliable data recovery from signals attenuated by billions of miles, often concatenated with convolutional codes for enhanced error resilience. In consumer technologies, they underpin error correction in compact discs (CDs) and DVDs, correcting burst errors from scratches to ensure audio and data fidelity, and in QR codes, where versions up to 40 use Reed–Solomon for up to 30% error correction across four levels of redundancy.[27][28][29]

Bounds and Properties

Singleton Bound

The Singleton bound provides an upper limit on the minimum distance dd of a linear code with length nn and dimension kk over an alphabet of size qq, stating that dnk+1d \leq n - k + 1.[30] This bound applies more generally to any block code with MM codewords, where Mqnd+1M \leq q^{n - d + 1}, and for linear codes, M=qkM = q^k implies the dimension form of the inequality.[31] To prove the bound, consider the projections of the codewords onto any set of nd+1n - d + 1 coordinates. These projections must all be distinct: if two distinct codewords agreed on such a set, they would differ in at most d1d - 1 positions overall, contradicting the minimum distance dd. Thus, the number of codewords MM is at most the number of possible distinct projections, which is qnd+1q^{n - d + 1}. For linear codes, this yields qkqnd+1q^k \leq q^{n - d + 1}, so knd+1k \leq n - d + 1, or equivalently dnk+1d \leq n - k + 1.[31] Linear codes achieving equality in the Singleton bound, d=nk+1d = n - k + 1, are known as maximum distance separable (MDS) codes. Examples include Reed-Solomon codes, which are widely used in applications like data storage and communications due to their optimal distance properties, as well as trivial cases such as the full-space code (k=nk = n, d=1d = 1) and the repetition code (k=1k = 1, d=nd = n).[30] The bound has significant implications for code design, constraining the rate R=k/nR = k/n by R1(d1)/nR \leq 1 - (d-1)/n, which highlights the trade-off between error correction capability and information efficiency.[31] It was introduced by Robert C. Singleton in 1964 for qq-ary codes, building on earlier ideas in error-correcting code theory.[30]

Bonisoli's Theorem

Bonisoli's theorem provides a complete classification of equidistant linear codes over finite fields, which are precisely the constant-weight linear codes where all nonzero codewords have the same weight ww.[32] Introduced by Arrigo Bonisoli in 1984, the theorem builds on earlier work by Assmus and Key on the connections between linear codes and combinatorial designs, particularly in characterizing the supports of codewords as blocks in t-designs.[32] The theorem states that every [n,k]q[n, k]_q linear code CC over the finite field Fq\mathbb{F}_q with constant nonzero weight ww (and k1k \geq 1) satisfies qk1q^{k-1} divides ww, and CC is monomially equivalent to the uu-fold repetition code of the qq-ary simplex code Simq(k)\mathrm{Sim}_q(k), where u=w/qk1u = w / q^{k-1} and the length is n=u(qk1)/(q1)n = u \cdot (q^k - 1)/(q - 1).[32] The simplex code Simq(k)\mathrm{Sim}_q(k) itself has length (qk1)/(q1)(q^k - 1)/(q - 1), dimension kk, and constant weight qk1q^{k-1}, making its repetitions the only possible structures for such codes.[32] This characterization implies that constant-weight linear codes correspond to disjoint direct sums (in the vector space sense) of simplex codes, where the supports of the codewords form disjoint unions of the block structures from multiple copies of the underlying design.[32] In the context of linear codes, the theorem ties optimal constant-weight constructions to geometric designs, such as projective geometries. Specifically, the supports of the nonzero codewords in a simplex code Simq(k)\mathrm{Sim}_q(k) form the hyperplanes of the projective space PG(k1,q)\mathrm{PG}(k-1, q), which is a 2-((qk1)/(q1),qk1,(qk11)/(q1))( (q^k - 1)/(q - 1), q^{k-1}, (q^{k-1} - 1)/(q - 1) ) design; repetitions preserve this structure across disjoint components, yielding optimal weights for parameters where the code achieves the maximum possible size.[32] For example, Hadamard codes arise as special cases of these constructions when the simplex code is extended appropriately.[32] A proof sketch relies on intersection theorems for the supports of codewords and their embedding in block designs. Assuming the code is equidistant, the constant weight implies that any two nonzero codewords have supports intersecting in a fixed size, leading to the code being a module over the ring of scalars and decomposable into simplex components via linear independence arguments and design uniformity from Assmus-Key theory.[32] Applications of the theorem include deriving bounds on A(n,d,w)A(n, d, w), the maximum size of a binary constant-weight code of length nn, minimum distance dd, and weight ww, particularly when seeking optimal subsets within linear codes; since non-simplex structures are ruled out, it limits candidates to these geometric constructions, often achieving tightness for parameters tied to projective dimensions.[32][33]

Notation and Generalizations

Standard Notation

In linear coding theory, a linear code over the finite field Fq\mathbb{F}_q is commonly denoted as an [n,k,d]q[n, k, d]_q code, where nn is the length of the codewords, kk is the dimension of the code (the number of information symbols, yielding qkq^k codewords), and dd is the minimum Hamming distance between any two distinct codewords.[1] This notation encapsulates the essential parameters of the code's structure and error-correcting capability, with the minimum distance dd determining the code's ability to correct up to (d1)/2\lfloor (d-1)/2 \rfloor errors.[34] The maximum possible number of codewords in a binary code of length nn and minimum distance dd is denoted by A(n,d)A(n, d), which represents the size of the largest such code and serves as a benchmark for code optimality. For a linear code CFqnC \subseteq \mathbb{F}_q^n, the weight enumerator is defined as
WC(x,y)=cCxnwt(c)ywt(c), W_C(x, y) = \sum_{c \in C} x^{n - \mathrm{wt}(c)} y^{\mathrm{wt}(c)},
where wt(c)\mathrm{wt}(c) is the Hamming weight of the codeword cc, providing a generating function that encodes the full weight distribution of the code.[35] The dual code CC^\perp is the set of all vectors uFqnu \in \mathbb{F}_q^n such that uc=0u \cdot c = 0 for every cCc \in C, where \cdot denotes the standard dot product over Fq\mathbb{F}_q; this dual has dimension nkn - k and plays a central role in duality theorems.[1] A fundamental relation between a code and its dual is given by the MacWilliams identity, which for binary linear codes states that
WC(x,y)=1CWC(x+y,xy), W_{C^\perp}(x, y) = \frac{1}{|C|} W_C(x + y, x - y),
linking the weight enumerators and enabling derivations of bounds from dual properties.[36] For Bose-Chaudhuri-Hocquenghem (BCH) codes, the BCH bound provides a lower bound on the minimum distance: if the code is designed to correct tt errors, then d2t+1d \geq 2t + 1, ensuring the code meets or exceeds this distance based on the roots of its generator polynomial.[37] The covering radius ρ\rho of a code CC is the smallest nonnegative integer such that the union of Hamming balls of radius ρ\rho centered at codewords covers the entire ambient space Fqn\mathbb{F}_q^n, quantifying the code's efficiency in approximating arbitrary vectors.[38] The standardization of this notation traces its roots to Claude Shannon's 1948 seminal paper on communication theory, which laid the probabilistic foundations without explicit code parameters, evolving through mid-20th-century developments in algebraic coding to the comprehensive framework in modern references like the 1977 text by MacWilliams and Sloane.[39]

q-ary Linear Codes

q-ary linear codes generalize binary linear codes by defining them over the finite field Fq\mathbb{F}_q, where q=pmq = p^m for a prime pp and integer m1m \geq 1. A q-ary linear code is a kk-dimensional subspace of the vector space Fqn\mathbb{F}_q^n, consisting of codewords that are vectors in Fqn\mathbb{F}_q^n closed under addition and scalar multiplication by elements of Fq\mathbb{F}_q. The parameters of such a code are denoted [n,k,d]q[n, k, d]_q, where nn is the length, kk is the dimension (yielding qkq^k codewords), and dd is the minimum Hamming distance. Unlike binary codes, which use symbols from {0,1}\{0,1\}, q-ary codes employ symbols from Fq\mathbb{F}_q, allowing for larger alphabets that scale the code's capacity and error-correcting potential with qq.[40] Key constructions for q-ary linear codes include algebraic geometry (AG) codes, which are built by evaluating functions from Riemann-Roch spaces on rational points of an algebraic curve over Fq\mathbb{F}_q. For a curve of genus gg and divisors DD and GG with supp(G)supp(D)=\operatorname{supp}(G) \cap \operatorname{supp}(D) = \emptyset, the AG code C(L,D,G)C(L, D, G) has length n=deg(D)n = \deg(D), dimension at least deg(G)g+1\deg(G) - g + 1, and minimum distance at least ndeg(G)n - \deg(G). Goppa codes serve as q-ary analogs to BCH codes, constructed using a rational function g(x)g(x) (the Goppa polynomial) over Fq\mathbb{F}_q and a set LL of distinct elements in Fq\mathbb{F}_q, defining the code as the kernel of a parity-check matrix derived from residues of powers of g1g^{-1}. Reed-Solomon codes exemplify prime-power q-ary linear codes, achieving the Singleton bound for lengths up to qq.[41] Properties of q-ary linear codes include the q-ary Hamming bound, which limits the size of an error-correcting code capable of correcting t=(d1)/2t = \lfloor (d-1)/2 \rfloor errors:
qki=0t(ni)(q1)iqn. q^k \sum_{i=0}^t \binom{n}{i} (q-1)^i \leq q^n.
This sphere-packing bound arises from the non-overlapping volumes of Hamming balls of radius tt around codewords in Fqn\mathbb{F}_q^n. For subfield subcodes, trace duality relates the dual of a trace code over Fqm\mathbb{F}_{q^m} to the trace of the dual code, providing a framework for analyzing dimensions and weights when restricting to a subfield Fq\mathbb{F}_q. q-ary codes offer advantages such as higher rates for the same minimum distance dd compared to binary codes, particularly in burst error correction, where a single erroneous symbol can represent multiple bit errors without amplifying the overall error count.[31] The development of q-ary linear codes marked a shift from the binary focus of the 1950s, exemplified by Hamming codes, to non-binary extensions in the 1960s with the introduction of Reed-Solomon codes, which enabled efficient correction over larger alphabets. This evolution continued in the 1970s and 1980s with Goppa's geometric constructions, leading to AG codes that asymptotically surpass previous bounds for sufficiently large qq.[41]

References

Table of Contents