A generalized Reed-Solomon code consists of , where the evaluation points are distinct, all coordinate multipliers are nonzero, and . It remains a maximum distance separable code. Its dual code is another generalized Reed-Solomon code with dimension and multipliers proportional to .
Let be distinct elements of a finite field , with . The Reed-Solomon code consists of the evaluation vectors
Evaluation is an injective linear map: a nonzero polynomial of degree at most cannot vanish at all distinct points. Thus the dimension is . The same bound on polynomial roots shows that every nonzero codeword has Hamming weight at least . Conversely, choosing any evaluation points and taking their product of linear factors gives a polynomial whose evaluation vanishes at exactly those points. Its Hamming weight is . Hence
For completeness, deleting coordinates from a linear code of minimum Hamming distance is injective on codewords, since two words with the same retained coordinates would differ in fewer than positions. Therefore , giving the Singleton bound . The Reed-Solomon code attains this bound and is a maximum distance separable code. Multiplying individual coordinates by nonzero field elements changes neither the dimension nor the Hamming weight, so the same proof applies to a generalized Reed-Solomon code.
To specify the generator polynomials of a cyclic code unambiguously, use the primitive cyclic Reed-Solomon code convention. Put , choose a primitive element of a finite field , and set
Exponents are taken modulo . This generator polynomial is a monic polynomial of degree dividing , so the dimension is . It agrees with the evaluation form
Indeed, at a defining exponent , a monomial contributes the finite geometric series . Its exponent lies between and , so the sum vanishes: but its th power is one. Every displayed evaluation vector therefore lies in the cyclic code, and both spaces have dimension , proving equality. The narrow-sense choice is the ordinary unweighted evaluation linear code on all nonzero field elements.
The duality of primitive cyclic Reed-Solomon codes now follows directly. A vector in has coordinates , while a vector in has coordinates , with . Their dot product is . Every appearing exponent is between and , so every such finite geometric series is zero. The two spaces are orthogonal and their dimensions sum to , giving
Thus the full cyclic family is closed under dual codes. The offset matters: the dual code of the narrow-sense linear code generally has offset zero, rather than one.
For arbitrary evaluation points, the precise statement is closure of generalized Reed-Solomon codes under duality. If , put and . Lagrange interpolation shows whenever : this sum is the coefficient of in the interpolation formula for . Taking with and proves orthogonality of and . Comparing dimensions gives equality with . An unweighted evaluation linear code at arbitrary points need not have an unweighted evaluation dual at the same points; the multiplier form and the cyclic offset formula resolve that convention issue.
For the length-, dimension- linear code, choose and as in the field table. Then and
The field characteristic is two, and the table gives . In the basis , the four roots are represented by . Their elementary symmetric functions are
The repeated terms in cancel because the field characteristic is two. There are no alternating minus signs in this characteristic, so
For example, the coefficient vectors in ascending order are , giving the required single powers of .
For the length-, dimension- linear code over , take the table's primitive element of a finite field and again . The four roots are . Expanding in gives
Thus
The coefficients are reduced modulo , including the constant term .
A suitable two-error-correcting Reed-Solomon code over is precisely the first linear code:
Two distinct codewords cannot both be within Hamming distance two of a received word, because the triangle inequality would put them at distance at most four. Thus this linear code corrects any two symbol errors. Its generator polynomial has four consecutive defining zeros of a cyclic code, and its dimension and exact minimum Hamming distance have already been proved.
For distinct evaluation points and , the Reed-Solomon code is
This is a linear code of dimension : evaluation is linear, and a nonzero polynomial of degree less than cannot vanish at all distinct points. The assertion of cyclicity concerns the primitive, unextended construction: set and , where generates the multiplicative group of a finite field . Arbitrary evaluation sets or arbitrary coordinate orders need not make a Reed-Solomon code a cyclic code.
For this ordered full-length construction, shifting the evaluation vector to the right gives . This is the evaluation vector of , whose degree is still less than , so it is a cyclic code. Its generator polynomial follows from the finite geometric series
Here the scalar is nonzero in . Write and . For ,
since . Thus every word is divisible by . This monic divisor of generates a cyclic code of dimension , equal to the evaluation code by inclusion and dimension. Hence
It is useful to allow a starting exponent for the consecutive zeros of a cyclic code. Define the primitive cyclic Reed-Solomon code
All exponents are understood modulo . The same geometric-sum calculation shows that
Indeed evaluating its word polynomial at , , gives sums with exponents between one and . This is a generalized Reed-Solomon code, with nonzero coordinate multipliers ; is the unweighted evaluation code. Directly, a right shift corresponds to replacing by , so these offset codes are also cyclic codes.
A maximum distance separable code, or MDS code, is a linear code attaining the Singleton bound, with . To see the bound, deleting any coordinates is injective on a code of minimum Hamming distance , since two words with the same puncture would differ in at most positions. Therefore and . For a nonzero Reed-Solomon evaluation word, the polynomial has at most distinct polynomial roots, so at least coordinates are nonzero. Nonzero coordinate multipliers do not change these zero positions. This proves for both Reed-Solomon codes and generalized Reed-Solomon codes. Equality can also be exhibited: choose any evaluation points and take their linear factors as ; it vanishes exactly at those points and has weight . Thus
The duality of primitive cyclic Reed-Solomon codes is especially transparent in the evaluation form. Assume first . A vector of has coordinates , ; a vector of has coordinates , . Their standard dot product is
Every monomial in has exponent at least one and at most , and every such power sum vanishes. Thus . Both sides have dimension , giving
In particular has generator . This agrees with the general dual of a cyclic code rule: invert the roots belonging to the complementary factor . The dual is a Reed-Solomon code in the consecutive-zero convention. With the strictly unweighted evaluation definition, its coordinates instead have the form , so it is a generalized Reed-Solomon code; it need not equal the unweighted code of dimension on the same points. This convention distinction is essential. The case is the full word space and its dual is the zero code, obtained by taking .
For code encoding, use the finite-field discrete Fourier transform and its inverse:
For a message , put for , and set all other transform coordinates to zero. The inverse discrete Fourier transform returns
The zero transform coordinates are precisely the root checks defining . This gives non-systematic encoding by evaluation. For systematic polynomial encoding of a cyclic code with a message polynomial of degree less than , put and calculate the remainder of upon division by . Then is divisible by , and the last coefficients are the message coefficients. Both methods use the same generator polynomial and the same ordered powers of .
For bounded-distance decoding, let , put , and assume at most symbol errors. The following description uses the Reed-Solomon key equation and fixes the transform and locator conventions explicitly.
  • Set , all other error coordinates to zero, and output . Verify that all root checks vanish and that the correction has weight at most . Recover the message from the unconstrained transform coordinates by , or from the last coefficients if systematic encoding was used.
The denominator in the Forney algorithm is nonzero for distinct locations. The minimum-distance error-detection and correction guarantee gives unique recovery because . If the required locator or a valid correction cannot be found, declare decoding failure. Beyond errors, a received word may lie near a different codeword, so successful root checks alone do not certify recovery of the originally transmitted message. The guaranteed correction radius is symbol errors.
For distinct elements of a finite field, a Reed-Solomon code consists of the evaluation vectors of polynomials with degree less than . It has dimension and minimum Hamming distance , so it is a maximum distance separable code. A nonzero polynomial has at most its degree many distinct polynomial roots. Primitive cyclic Reed-Solomon codes use all nonzero field elements, ordered as powers of a primitive root of unity; arbitrary evaluation sets need not give a cyclic code.