BCH code Created 2026-09-24 Updated 2026-11-05
Let be a finite field, let be coprime to , and choose an element of multiplicative order in an field extension. A BCH code of length , starting exponent , and design distance is the cyclic code whose generator polynomial of a cyclic code iswhere is the algebraic minimal polynomial of over . Equivalently, is the least-degree monic polynomial over the base finite field vanishing at consecutive powers. This least-degree condition distinguishes the BCH code from its proper cyclic code subcodes with additional zeros. The BCH bound gives minimum Hamming distance at least .
For example, over the field with two elements, let and let be a polynomial root of . The roots and have the same algebraic minimal polynomial, so and give , a Hamming code of length seven.[ref]
Shift-Register Synthesis and BCH Decoding by James L. Massey. Sections IV–V: BCH codes and synthesis-based decoding
Berlekamp-Massey algorithm Created 2026-09-24 Updated 2026-11-05
The Berlekamp-Massey algorithm finds a shortest linear recurrence consistent with a finite sequence over a field. It returns a register length and a connection polynomial such thatMissing coefficients are zero; for a finite prefix the polynomial degree of can be less than . The output describes the shortest recurrence for the observed prefix, rather than proving how an unknown infinite sequence continues.
Initialize , , , and . At index , compute the discrepancy . If , increase by one. Otherwise save and replace by . If , also set , , , and ; if , only increase . The saved discrepancy cancels the current failure of the linear recurrence, while the update of accounts for the extra memory it requires.[ref]
Shift-Register Synthesis and BCH Decoding by James L. Massey. Sections II–III: register length, discrepancy, and synthesis algorithm
For the binary prefix , the result is and , corresponding to over the field with two elements. This is useful both in analyzing a linear-feedback shift register and in constructing a BCH code error-locator polynomial.
James L. Massey 2026-11-05
James L. Massey showed that Berlekamp's iterative BCH-decoding algorithm solves a general register-synthesis problem: find a shortest linear-feedback shift register generating a prescribed finite sequence. His 1969 paper derives the algorithm through the lengths and discrepancies of successive candidate recurrences, connecting the Berlekamp-Massey algorithm to error correction.[ref]
A sequence that satisfies can be generated from stored symbols and feedback coefficients over a field. A newly observed symbol may contradict the current recurrence; the algorithm then updates the candidate using a prior discrepancy. Minimal synthesis is therefore more than finding some recurrence that happens to fit the observations.