A binary linear-feedback shift register stores bits, shifts them at each clock step, and inserts a fixed linear combination over of the stored bits. Its output obeys a recurrence . Write its connection polynomial as ; the corresponding monic feedback polynomial is .
The Berlekamp-Massey algorithm maintains the shortest recurrence fitting the observed prefix. Initialize , length , displacement , and previous nonzero discrepancy . At symbol , calculate . If , increase . If , save and replace by . If , replace by , by , by , and by ; otherwise only increase . In the binary field subtraction equals addition. The shifted previous discrepancy polynomial cancels the current discrepancy while preserving earlier equations. A failed recurrence of length at position requires a corrected length at least when this exceeds , explaining the length update. Thus the algorithm recovers the shortest compatible register; a known bound and at least output symbols suffice to identify its minimal recurrence.
For the printed twelve-bit prefix, the nonzero discrepancies occur at positions (indexing from zero). The successive updated pairs areAll remaining discrepancies vanish. ThereforeThe first four observed bits are the fill. Length four is necessary: a length-three recurrence would need to hold already at and no such recurrence fits the prefix. Indeed the equations at force , , , a contradiction. Finite observations cannot rule out longer nonminimal registers.
Articles by others on the same topic
There are currently no matching articles.